[FFmpeg-devel] [RFC] Removing non-pthreads support
Ramiro Polla
ramiro.polla
Tue Apr 20 04:29:44 CEST 2010
On Mon, Apr 19, 2010 at 7:04 PM, Alexander Strange
<astrange at ithinksw.com> wrote:
> On Apr 19, 2010, at 5:55 PM, M?ns Rullg?rd wrote:
>> Alexander Strange <astrange at ithinksw.com> writes:
>>> On Apr 19, 2010, at 5:22 PM, Howard Chu wrote:
>>>> M?ns Rullg?rd wrote:
>>>>> FFmpeg currently supports four different threading libraries:
>>>>> pthreads, beos, win32, and OS/2. ?I suspect most people already use
>>>>> pthreads, and all the relevant operating systems seem to have a
>>>>> pthreads implementation, even OS/2. ?I'm not sure about old BeOS, but
>>>>> I doubt anyone is still using that, much less with threads.
>>>>>
>>>>> To ease the maintenance burden, I suggest we drop support for all but
>>>>> pthreads in FFmpeg. ?If there is a compelling reason for keeping any
>>>>> of the others, please speak up now.
>>>>>
>>>> Just out of curiosity, what pthreads implementation on Windows are
>>>> you referring to?
>>>
>>> This one:
>>> http://sourceware.org/pthreads-win32/
>>>
>>> Unfortunately the last release isn't perfect - if you use it as a
>>> static library you have to call some init code yourself. ?pthread.c
>>> obviously doesn't do that since that's not required by pthreads, but
>>> some distributions patched it.
>>>
>>> Ramiro's Windows builds now use a patch against the library itself
>>> (autostatic) which gets rid of that, but I don't know if it's been
>>> applied upstream. ?I hope it has since the idea of needing a local
>>> patch for this is gross and prevents switching to some other
>>> library.
>>
>> Does a plain build, with dynamically linked systems libs, work
>> correctly? ?Pure static builds can fail in crazy ways with glibc too
>> (thanks a lot, Drepper), so I'm not terribly concerned if this case
>> requires an extra hack or two. ?What does the ffmpeg patch look like?
>
> I believe the dynamic library works fine.
yes, it works fine.
> Patch:
> http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/01_static_pthread_O2.patch?revision=43316&view=markup
>
> Don't know why it's not in pthread.c - I think I asked Ramiro to try it but he'd already switched to patching the library.
this is my latest patch against pthreads-win32 CVS 20091019. compiles
and links and works fine with both gcc and msvc (the later was asked
by an ffms2 dev) and any combination of those 2. what it does is:
- remove the false wsock32 dependency
- remove the requirement for PTW32_STATIC_LIB to be defined for using
the library in mingw32 (like faac did)
- hint the linker (currently gcc and msvc) to run the initialization
code before main() or DllMain().
I'm not sending them upstream myself (busy/lazy), but feel free to
split them up and send them...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autostatic.diff
Type: application/octet-stream
Size: 6175 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100419/c42e9617/attachment.obj>
More information about the ffmpeg-devel
mailing list