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

Thomas Guillem thomas at gllm.fr
Tue Nov 4 10:25:59 CET 2014


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