[vlc-commits] mediacodec: add an output thread, remove polling

Thomas Guillem git at videolan.org
Fri Dec 11 14:24:36 CET 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Dec  2 18:48:50 2015 +0100| [5768e84a99b4a1e3c32baf541cd237155a3be1b7] | committer: Thomas Guillem

mediacodec: add an output thread, remove polling

This commit improve MediaCodec performances and remove polling every 10 msecs
when DecodeCommon is waiting for an input or an output buffer.

One new thread is used for output: once an input buffer is queued, this thread
will wait indefinitely for a MediaCodec output buffer (this can be cancelled by
a flush).  This buffer will be queued to the video or audio output via
decoder_QueueVideo or decoder_QueueAudio.

This thread, and pf_decode call are locked by the same mutex. Only
mc->dequeue_in/mc->dequeue_out are not locked since these functions can block.

Fixes #15079

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5768e84a99b4a1e3c32baf541cd237155a3be1b7
---

 modules/codec/omxil/mediacodec.c |  543 +++++++++++++++++++++++---------------
 1 file changed, 332 insertions(+), 211 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=5768e84a99b4a1e3c32baf541cd237155a3be1b7


More information about the vlc-commits mailing list