Commit Graph

22 Commits

Author SHA1 Message Date
Maksym Veremeyenko dd9134c22e Fix compilation with win32 threads.after 'unbreak avcodec_thread_init' 2011-03-30 12:36:52 +02:00
Reimar Döffinger 46027c7286 Unbreak avcodec_thread_init
avcodec_thread_init currently doesn't do anything at all with pthreads enabled.
2011-03-28 23:07:52 +02:00
Mans Rullgard 74711b72cc w32thread: add missing #include thread.h
This should fix building with win32 threads.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit aef669cdfd)
2011-02-11 02:54:08 +01:00
Alexander Strange 043d2ff267 Deprecate avcodec_thread_init()
As a side effect of the last commit, avcodec_open() now calls it automatically,
so there is no longer any need for clients to call it.
Instead they should set AVCodecContext.thread_count.

avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the
next MAJOR libavcodec bump.

Rename the functions to ff_thread_init/free, since they are now internal.
Wrappers are provided to maintain API compatibility.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit c0b102ca03)
2011-02-11 02:54:08 +01:00
Alexander Strange b38f008ea6 Frame-based multithreading framework using pthreads
See doc/multithreading.txt for details on use in codecs.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-11 02:53:58 +01:00
Benoit Fouet 4a287145c2 Remove avcodec_thread_execute from avcodec.h, and make static functions that
need it in *thread.c.

Originally committed as revision 22544 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-15 14:03:01 +00:00
Andreas Öman 9b066ecbf0 w32thread: Make avcodec_thread_execute2() static here as well
Originally committed as revision 22325 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 12:58:22 +00:00
Måns Rullgård 68cf92ee5e Always call avcodec_thread_init()
The various avcodec_thread_init() functions are updated to return
immediately after setting avctx->thread_count.  This allows -threads 0
to pass through to codecs.  It also simplifies the usage for apps
using libavcodec.

Originally committed as revision 21358 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 22:55:50 +00:00
Reimar Döffinger 9fe0894210 In win32 thread implementation do not access jobnr if the thread is asked
to terminate, jobnr it does not point to a valid location in that case.

Originally committed as revision 20565 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-20 21:08:26 +00:00
Reimar Döffinger 7537726f47 Implement execute2 for w32thread
Originally committed as revision 20225 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-13 13:40:03 +00:00
Reimar Döffinger 1e6ff470b5 Fix w32thread implementation to handle job count > thread_count.
Originally committed as revision 20224 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-13 13:03:12 +00:00
Shehzad Salim 51fdb6f08d Fix a memleak with win32 threads: the handle returned by _beginthreadex
must be closed (this differs from _beginthread).
Patch by Shehzad Salim (shehzadsalim gmail com)

Originally committed as revision 19633 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-12 13:25:37 +00:00
Roman Shaposhnik 3a84713aaa Making it easier to send arbitrary structures as work orders to MT workers
Originally committed as revision 15804 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-11-12 17:47:23 +00:00
Ramiro Polla 5dea940937 __stdcall -> WINAPI
Windows x64 has no __stdcall.
It is not yet supported, but someday it might...

Originally committed as revision 12363 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-03-07 19:47:44 +00:00
Ramiro Polla 5e4c7ca224 Add attribute that forces alignment of stack to functions that need it.
Necessary for systems that don't align by default to 16 bytes, required by some
SSE instructions.
Requires GCC >= 4.2.
Based on patch by Gaël Chardon.

Originally committed as revision 10106 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-13 15:28:29 +00:00
Diego Biurrun e5a389a1b7 license header consistency cosmetics
Originally committed as revision 9484 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-05 10:40:25 +00:00
Diego Biurrun 755bfeabcc misc spelling fixes
Originally committed as revision 9289 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-06-12 09:29:25 +00:00
Diego Biurrun 2029f312e8 Remove redundant #inclusion of common.h, avcodec.h already #includes it.
Originally committed as revision 8967 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-05-10 09:00:44 +00:00
Diego Biurrun b78e7197a8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
and fix GPL/LGPL version mismatches.

Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-07 15:30:46 +00:00
Diego Biurrun 5509bffa88 Update licensing information: The FSF changed postal address.
Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-01-12 22:43:26 +00:00
Diego Biurrun 115329f160 COSMETICS: Remove all trailing whitespace.
Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-12-17 18:14:38 +00:00
Michael Niedermayer 16806499fc w32threads by (Gildas Bazin <gbazin at altern dot org>)
Originally committed as revision 2803 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-02-19 20:29:26 +00:00