Deliver non-realtime OMX messages in a timely manner
Allow non-realtime messages to always be delivered even if the
end-of-stream is never reached. Start using a timeout to process
all messages on a periodic basis after the first non-realtime
message is encountered. This guarantees that non-realtime
messages are delivered in a reasonable amount of time.
This only affects tunnel mode decoders, since they are the only
decoders that produce frame-rendered messages, and frame-rendered
messages are the only non-realtime messages.
Note that this introduces periodic wakeups even when the decoder
is not actively rendering. This should not be problematic from a
performance perspective since a non-active decoder means the
device is likely underutilized.
Bug: 240622361
Fixes: 240622361
Test: atest android.media.decoder.cts.DecoderTest#testTunneledAudioUnderrunHevc
Change-Id: I0b9d4bcd56cc64fc37f52d295111e4e3eb6a157f
1 file changed