[Ffmpeg-devel] FFMPEG RTSP for Windows

Michael A. Kohn mike
Fri Mar 31 20:51:12 CEST 2006



On Fri, 31 Mar 2006, Rich Felker wrote:

>
> How/why? Just add headers with these names which #include the
> corresponding mingw headers...
>
> Supporting broken crap is a delicate art. The lazy and unacceptable
> way to do it is by polluting the general, portable code with special
> cases for all the broken crap. The artful way to do it is by wrapping
> the workarounds for the broken crap as close to the broken crap as
> possible so that they're invisible unless you read the code that
> directly interfaces with the broken crap. :)

Okay.. I took your advice and tried to move as much as possible into
os_support.h and os_support.c.  Unfortunately I had to put the MINGW
#ifdefs at the top of udp.c, tcp.c, http.c, rtsp.c, rtp.c, and rtpproto.c
since some of the include files don't exist on MingW.  I changed the
read()'s to recv() which allowed me to get rid of a #define for BEOS, also
making that look cleaner too.  I made a #define for fcntl to map it to the
appropriate MingW call and made an inet_aton function.

I think there is only one spot in tcp.c where I had a #define to
initialize winsock.  Other than that I think I got rid of the rest.  So
I'll try one more time with a patch.  Hopefully you'll like this patch
better.. despite its support for "broken crap" :)

/mike









More information about the ffmpeg-devel mailing list