Skip to content
  • Thomas Guillem's avatar
    mediacodec: add an output thread, remove polling · 5768e84a
    Thomas Guillem authored
    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
    5768e84a