[FFmpeg-devel] MinGW network support

Michael Niedermayer michaelni
Tue May 15 23:21:41 CEST 2007


Hi

On Tue, May 15, 2007 at 05:10:19PM +0200, Alex Beregszaszi wrote:
> Hi,
> 
> > > Attached you'll find a patch which was composed of patches from various
> > > people in previous threads, probably (Alex Beregszaszi, Michael Kohn,
> > > Ryan Martell, Klaas-Pieter Vlieg - my apologies if I've forgotten
> > > anyone...).
> > 
> > I have a different, and imho much cleaner implementation. Will post in
> > in a few hours.
> > 
> > Also note your patch wont be working. Setting EINPROGRESS to zero has no
> > effect, as it is checking for WSAEINPROGRESS.
> 
> Just applied the sane changes to the SVN.
> 
> Attached patches are:
> 
> einprogress.diff:
> Make tcp/http working on mingw. I dont think this patch is the best way.
> Any ideas?

no, but id like to understand what is wrong / why this is needed, it looks
very much like a random not at all understood change ...


> 
> wsainit.diff:
> I think this is the best way to do that crazy winsock init. This way
> ffserver.c wont need an own implementation.

i dont like this, IMHO this belongs into the application or at least into
some seperate function like

/**
 * inits bill gates socks, and does nothing on a real OS
 * this likely is not thread safe
 */
av_network_init()

one obvious issue with your suggestion is that in an application which
uses libavformat amongth other network code the init has likely been
performed already and doing it 2x sounds like a bad idea
also what about uninit, doesnt this need some uninit? no i dont know
winsock API at all ...


> 
> pollbug.diff:
> FD_SETSIZE is broken on Windows, this workarounds its. This patch is
> needed for ffserver.

this looks wrong
first IMHO it should be set as parameter to gcc like -DFD_SETSIZE= ...
second, what happens if the user application includes winsock*.h without
the same FD_SETSIZE set ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070515/c8f5214e/attachment.pgp>



More information about the ffmpeg-devel mailing list