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

Rémi Denis-Courmont remi at remlab.net
Fri Aug 28 17:53:21 CEST 2015


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.

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list