[vlc-devel] [PATCH 01/12] decoder: add decoder_OnOutputReady

Thomas Guillem thomas at gllm.fr
Fri Aug 28 16:57:45 CEST 2015

On Thu, Aug 27, 2015, at 14:59, Rémi Denis-Courmont wrote:
> Le 2015-08-27 15:20, Thomas Guillem a écrit :
> > ---
> >
> > This new patch wakes up the decoder thread without messing with the 
> > drain
> > state.
> That does not seem much better than draining. Leave the decoder thread 
> alone please. It's already intricate enough.

This patch allows me to remove polling for asynchronous decoders like
omxil and mediacodec (and maybe mmal ?). It's not yet implemented for
omxil but I plan to do it.

Yes, this is exactly like a draining, except that it doesn't touch to
the b_drained state.

This patch is an alternative to my old RFC PATCH that added
decoder_QueuePicture function. The main issue with that previous patch
is that decoder functions like decoder_NewPicture or decode_UpdateFormat
are meant to be called inside the DecoderThread.

With this new patch, an asynchronous decoder can signal the
DecoderThread to wake up and call pf_decode with a NULL pp_block. Then,
the decoder module can safely call decoder_NewPicture or
decode_UpdateFormat from the pf_decode callback.

If this patch is applied, I will be able remove a very old hack for
OMX/MediaCodec that forced a high value of file/network caching. Indeed,
with a high cache value, pf_decode is called more often and output
buffers are more likely to be returned. This patch will also help me to
fix a high output latency with some OMX codecs.

> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

More information about the vlc-devel mailing list