Commit 5768e84a authored by Thomas Guillem's avatar 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
parent dcc738d5
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment