[FFmpeg-devel] libossupport status

Luca Abeni lucabe72
Sun Dec 23 13:14:46 CET 2007

Hi Vadim,

On Sat, 2007-12-22 at 22:18 +0100, Vadim Lebedev wrote:
> >If win32 supports closing sockets, there should be a function doing that,
> >that can then be used. If it supports the equivalent of select() on files
> >AND we need that, then the existing function can be used.
> >If win32 doesnt support XYZ and we do have a implementation for it currently,
> >that can be moved from libavformat to libossupport. If we win32 doesnt
> >support XYZ and we do not have a implementation for it there wont be one
> >on libossupport either. At least not until some win32 devel implements it.
> >
> >  
> >
> I'm affraid i was not clear enough:
> Suppose that ffmpeg (or one of components) use 'close(fd)'   to close 
> file decriptors and sockets.
> On WIN32 it means that ossupport will have to imlement 'close' routine

This is not what we are currently doing, so in my proposal I did things
in a different way.
Sockets are closed with "closesocket()"; since this is not a POSIX call
(in my understanding), my patch adds a "#define closesocket close" in
network.h, before including the netinet/in.h & friends.
libossupport (or whatever its name will be) provides some missing
standard headers, and one of them (in this case, netinet/in.h) contains
an "#undef closesocket".

This should fix the problem (at least, it seems to work for me)


More information about the ffmpeg-devel mailing list