[FFmpeg-devel] [PATCH 2/6] Frame-based multithreading framework using pthreads

Reimar Döffinger Reimar.Doeffinger
Sat Feb 5 22:43:07 CET 2011


On Sat, Feb 05, 2011 at 04:20:38PM -0500, Ronald S. Bultje wrote:
> On Sat, Feb 5, 2011 at 3:55 PM, Reimar D?ffinger
> <Reimar.Doeffinger at gmx.de> wrote:
> > My suggestions is to add a way to detect which types (or at least if at
> > all) threading will be used, and to add that in a way that allows to
> > still change the draw_slice, get_frame and possibly other callback pointers.
> > It's not a big deal if we do not manage to get it 100% accurate in cases
> > where it depends on content (e.g. for slice multithreading), but at least
> > the big cases "codec does support MT" and "FFmpeg compiled without pthread"
> > should be covered.
> 
> I see, so something like AVCodec bla { [..] .capabilities = horiz_band
> | bla | ONLY_IF_THRADS_ENABLED(CODEC_CAP_FRAME_THREADS) [..] would be
> sufficient?
> 
> (And I guess we'd need a similar flag for slice-threads also?)

In principle I would prefer something more convenient to check and
that e.g. could be set in decoder init based on extradata,
but as a baseline I guess this could work "well enough" at least.



More information about the ffmpeg-devel mailing list