[Ffmpeg-devel] Network patch for MingW users
koyama tadayoshi
koyama
Thu Feb 22 05:04:52 CET 2007
On Feb 22, 2007, at 5:28 AM, Ryan Martell wrote:
>
> On Feb 21, 2007, at 1:58 PM, Ryan Martell wrote:
>
>>
>> On Feb 21, 2007, at 1:44 PM, Diego Biurrun wrote:
>>
>>> On Wed, Feb 21, 2007 at 01:42:02PM -0600, Ryan Martell wrote:
>>>>
>>>> Trying to help Alex out here, how does this look. (his code,
>>>> rearranged into a smaller patch)
>>>>
>>>> This fixes the fcntl & issue that Diego (i think) spotted, changes
>>>> the version number to a < instead of an equal to (as I think that's
>>>> probably what was intended), and wraps them with calls. I don't
>>>> like
>>>> the naming convention on av_initialize_socket_instance, and am
>>>> definitely open to ideas.
>>>
>>> Please comment the #endif lines if the #if is not close.
>>
>> Actually, in looking at this, I have come up with a better way.
>>
>> create an opensocket() like closesocket().
>>
>> opensocket() calls WSAImAWindowsCrackProgrammer(), then calls socket()
>> on other machines, just calls socket()
>>
>> clossocket() for mingw calls close() then WSAShutdown().
>>
>> It's clean, and I like it.
>>
>> Thoughts?
>>
>> (Will post patch in a second...)
>
> As above. This is clean. I like it.
>
> (note this doesn't do anything until the configure stuff is done.
> Also note that it hasn't been tested yet on windows).
My thought.
tcp_open calls resolve_host() before socket(), and
resolve_host() won't work unless WSAStartup() is called.
I think initialize/cleanup calls shoud be made in applications code,
not in a function of av library.
i.e. ffserver/ffplay should calls them by itself, in it's main() or such.
TK
More information about the ffmpeg-devel
mailing list