[vlc-devel] [RFC PATCH 0/6] Asynchronous MediaCodec

Thomas Guillem thomas at gllm.fr
Wed Nov 5 10:20:37 CET 2014


The patches are not ready to be pushed, I have a regression with
mediacodec and software rendering.

On flush, the decoder will be more and more late (with some 1080p
samples), I think it's because the picture pool when using android vout
has only one picture.
I'll try to fix the android vout first then.

In the meantime, these new commits are here
https://github.com/tguillem/vlc/commits/async-omx
I fixed some leak, and some error cases.

These commits could be pushed safely (from github, or ask me to resend
patches)
 - "mediacodec: process input buffers in only one place"
 - "mediacodec: handle error_state in one place "
 - and maybe "decoder: add decoder_QueuePicture ", Rémi ?

On Tue, Nov 4, 2014, at 10:25, Thomas Guillem wrote:
> I'm fixing the 4 last patches.
> Got a free leak, and didn't handle carefully cleaning in case of error.
> 
> On Mon, Nov 3, 2014, at 19:41, Thomas Guillem wrote:
> > This series of patches set the MediaCodec decoder asynchronous.
> > 
> > MediaCodec pf_decode_video will always return immediately and send the
> > p_block
> > to the input thread.
> > 
> > The output thread will send decoded picture to the renderer thread via
> > the new
> > decoder_QueuePicture call. (MediaCodec can still work without this last
> > patch).
> > 
> > It's not done yet, But I plan to also use QueueThread for omx too. Adding
> > an
> > input thread seems to fix omx on nvidia K1 (and some others maybe).
> > 
> > These patches are not ready to be merged since MediaCodec is broken on
> > last
> > master.
> > 
> > Thomas Guillem (6):
> >   mediacodec: process input buffers in only one place
> >   mediacodec: handle error_state in one place
> >   omxil/mediacodec: add QueueThread
> >   mediacodec: process input buffers in a separate thread
> >   decoder: add decoder_QueuePicture
> >   mediacodec: process output buffers in a separate thread
> > 
> >  include/vlc_codec.h                      |  14 +
> >  modules/codec/Makefile.am                |   2 +
> >  modules/codec/omxil/android_mediacodec.c | 426
> >  ++++++++++++++++++++-----------
> >  modules/codec/omxil/queue_thread.c       | 383
> >  +++++++++++++++++++++++++++
> >  modules/codec/omxil/queue_thread.h       |  66 +++++
> >  src/input/decoder.c                      |  93 ++++---
> >  6 files changed, 799 insertions(+), 185 deletions(-)
> >  create mode 100644 modules/codec/omxil/queue_thread.c
> >  create mode 100644 modules/codec/omxil/queue_thread.h
> > 
> > -- 
> > 2.1.1
> > 



More information about the vlc-devel mailing list