00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef FFMPEG_OS_SUPPORT_H
00023 #define FFMPEG_OS_SUPPORT_H
00024
00036 #if defined(__BEOS__) || defined(__INNOTEK_LIBC__)
00037 typedef int socklen_t;
00038 #endif
00039
00040 #ifdef __MINGW32__
00041 __declspec(dllimport) void __stdcall Sleep(unsigned long dwMilliseconds);
00042
00043 # define usleep(t) Sleep((t) / 1000)
00044 # include <fcntl.h>
00045 # define lseek(f,p,w) _lseeki64((f), (p), (w))
00046 #endif
00047
00048 #ifdef __BEOS__
00049 # include <sys/socket.h>
00050 # include <netinet/in.h>
00051
00052 # include <BeBuild.h>
00053
00054 # if B_BEOS_VERSION <= B_BEOS_VERSION_5
00055 # include <OS.h>
00056
00057 # define usleep(t) snooze((bigtime_t)(t))
00058 # endif
00059 # ifndef SA_RESTART
00060 # warning SA_RESTART not implemented; ffserver might misbehave.
00061 # define SA_RESTART 0
00062 # endif
00063 #endif
00064
00065
00066 #ifndef HAVE_CLOSESOCKET
00067 #define closesocket close
00068 #endif
00069
00070 #ifdef CONFIG_FFSERVER
00071 #ifndef HAVE_SYS_POLL_H
00072 typedef unsigned long nfds_t;
00073
00074 struct pollfd {
00075 int fd;
00076 short events;
00077 short revents;
00078 };
00079
00080
00081 #define POLLIN 0x0001
00082 #define POLLOUT 0x0002
00083 #define POLLRDNORM POLLIN
00084 #define POLLWRNORM POLLOUT
00085 #define POLLRDBAND 0x0008
00086 #define POLLWRBAND 0x0010
00087 #define POLLPRI 0x0020
00088
00089
00090 #define POLLERR 0x0004
00091 #define POLLHUP 0x0080
00092 #define POLLNVAL 0x1000
00093
00094
00095 extern int poll(struct pollfd *fds, nfds_t numfds, int timeout);
00096 #endif
00097 #endif
00098
00099 #endif