[Ffmpeg-devel] [PATCH] MingW RTSP support

Diego Biurrun diego
Mon Oct 30 20:50:11 CET 2006


On Mon, Apr 03, 2006 at 01:50:45PM -0500, Michael A. Kohn wrote:
> 
> > On Sun, Apr 02, 2006 at 09:58:10AM -0500, Michael A. Kohn wrote:
> >
> > Yes. Somehow BeOS lusers get away with this stuff because their OS
> > isn't considered as "lame" as windows by most developers, but I don't
> > distinguish. One broken, standards-violating, proprietary OS is as bad
> > as another..
> 
> Okay, I'm going to try one more time I think.  This patch is just
> like the others, except I changed the way the headers look.  I downloaded
> a copy of BeOS just to make sure these changes don't change the way it
> compiles.  The headers that used to look like this:
> 
> #include "avformat.h"
> #include <unistd.h>
> #include <sys/types.h>
> #include <sys/socket.h>
> #include <netinet/in.h>
> #if defined(__BEOS__) || defined(__INNOTEK_LIBC__)
> typedef int socklen_t;
> #endif
> #ifndef __BEOS__
> # include <arpa/inet.h>
> #else
> # include "barpainet.h"
> #endif
> #include <netdb.h>
> #include <sys/time.h>
> #include <fcntl.h>
> 
> now look like this (and mingw compiles and works):
> 
> #include "avformat.h"
> #include <unistd.h>
> #include <sys/types.h>
> #include <sys/time.h>
> #include <fcntl.h>
> #if !defined(__MINGW32__) && !defined(__BEOS__)
> #include <sys/socket.h>
> #include <netinet/in.h>
> #include <netdb.h>
> #include <arpa/inet.h>
> #endif
> 
> I think this is a nice comprimise.. the code looks cleaner now and
> both broken OS's compile...
> 
> the only problem with BeOS (which I guess doesn't matter anyway) is
> SO_ERROR doesn't exist so without commenting or #defining out, it won't
> compile anyway... maybe no one even uses ffmpeg under BeOS so no one
> noticed?
> 
> One other extra thing I did... I added this these lines for UINT32_MAX
> and INT32_MAX in os_support.h:
> 
> #ifndef UINT32_MAX
> #define UINT32_MAX (4294967295U)
> #endif
> 
> BeOS required this.. and I believe OpenBSD requires it too.  So these
> lines might be a good thing whether this patch is accepted or not..

I've looked at this patch again, here is a slightly cleaned-up version.
Is this OK to commit?

Diego




More information about the ffmpeg-devel mailing list