Chromium Code Reviews
DescriptionFix underflow and av/sync issues in low delay and stall presence.
When in low delay mode we were previously transitioning to HAVE_ENOUGH
if any frame was available; this may include frames which are bad. I.e.
frames that are too far in the past to be effective. Instead we need to
enter the underflow state in these cases and wait for effective frames
to enter the queue.
In low delay this should just add a frame or two of latency while we
catchup since the frames should be readily available in most cases. In
the stalled case, i.e. VideoFrameStream::CanReadWithoutStalling() is
false, this will attempt to purge frames as fast as possible such that
the decoder can catch up.
This is done by taking advantage of a new VideoRendererAlgorithm::Reset()
call which allows the frame queue to be purged while maintaining some of
the next frame estimates.
In all cases this patch also adds the ability to try and avoid ever
reaching the paused underflow state by removing expired frames as they
are enqueued if the decoder is not keeping.
BUG=599908, 601066
TEST=new unittest, manual testing w/ AVDA adaptivePlayback=false.
Committed: https://crrev.com/675f8b4aacfec7f7fb1d33f430996672c4dc3eec
Cr-Commit-Position: refs/heads/master@{#389564}
Patch Set 1 #Patch Set 2 : Fixes. #Patch Set 3 : Rebase. #Patch Set 4 : Moar tests. #
Total comments: 1
Patch Set 5 : Rebase. Rename enum. #Patch Set 6 : Clarified comment. #
Messages
Total messages: 25 (13 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||