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

Thomas Guillem thomas at gllm.fr
Tue Sep 1 21:37:45 CEST 2015



On Fri, Aug 28, 2015, at 17:53, Rémi Denis-Courmont wrote:
> Le 2015-08-28 17:57, Thomas Guillem a écrit :
> > 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.
> 
> The patch is still draining. Instead of draining the decoder and the 
> output, it drains the decoder. That's just wrong.
> 
> > Yes, this is exactly like a draining, except that it doesn't touch to
> > the b_drained state.
> 
> That's wrong. You want to queue a decoded picture (or audio block or 
> SPU) to the filters and output, not drain the decoder buffers.
> 
> > 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.
> 
> They are supposed to be callable from any thread. libavcodec uses both 
> from other threads. Of course the decoder is responsible for ensuring 
> sane ordering and updating the output format adequately. That's 
> unavoidable and your draining approach won't change anything in that 
> respect.

OK, I didn't know that these functions were callable from any thread. I
was mislead by my first and too complicated version of my async decoder.
I'll try with the "decoder_QueuePicture" way.

I need also to add decoder_QueueAudio, decoder_QueueSubpicture, and
decoder_QueuePacket for audio, sub and packetize.

> 
> -- 
> 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