|
|
DescriptionPass seek event through pipeline during loading state
When try to land https://codereviougew.chromium.org/456343002/ the test
controls-restrained-media-controller.html is failing sometimes as the
frame is not ready before the canplay event. Reason being canplay event
is fired before VideoFrameCompositor::UpdateCurrentFrame if the seek event
is not passed to pipeline during loading state. Also removed
OnPipelineSeeked which is redundant now.
Required for landing https://codereview.chromium.org/456343002/
Committed: https://crrev.com/ccf67181d8ccd356d86019b6768e5a9096956fbf
Cr-Commit-Position: refs/heads/master@{#310483}
Patch Set 1 #Patch Set 2 : Modified to check for buffering state #
Total comments: 1
Patch Set 3 : Removed OnPipelineSeeked as it is redundant #
Total comments: 1
Patch Set 4 : updated comment #Messages
Total messages: 22 (10 generated)
srirama.m@samsung.com changed reviewers: + dalecurtis@chromium.org, philipj@opera.com
Investigated further on why frame is not ready during controls-restrained-media-controller.html test. Sometimes the canplay event is fired before VideoFrameCompositor::UpdateCurrentFrame is executed even though FrameReady callback has been called from pipeline. So delaying OnPipelineBufferingStateChanged event makes sure that frame is actually ready at blink side before the canplay event.
Patchset #2 (id:20001) has been deleted
Patchset #4 (id:80001) has been deleted
Patchset #3 (id:60001) has been deleted
Patchset #2 (id:40001) has been deleted
This doesn't look right. Can you instead just perform the seek if the state isn't already BUFFERING_HAVE_ENOUGH ?
On 2015/01/05 19:13:06, DaleCurtis wrote: > This doesn't look right. Can you instead just perform the seek if the state > isn't already BUFFERING_HAVE_ENOUGH ? I couldn't find a way to check for buffering state directly, so i have checked with readystate. Even the readystate is reset to ReadyStateHaveMetadata just before every seek operation in WebMediaPlayerImpl::seek(). So i have stored the old value before the reset. If this is fine i will modify the description and go ahead.
https://codereview.chromium.org/787373008/diff/100001/media/blink/webmediapla... File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/787373008/diff/100001/media/blink/webmediapla... media/blink/webmediaplayer_impl.cc:334: if (paused_time_ != seek_time || old_state != ReadyStateHaveEnoughData) { Can you see if this allows the removal of OnPipelineSeeked() now? I.e. move the inverse of this state check to the PostTask for OnPipelineBufferingStateChanged(). if (paused_time_ != seek_time) { paused_time_ = seek_time; } else if (old_state == ReadyStateHaveEnoughData) { // PostTask(OnPipelineBufferingStateChanged); return; } This will avoid redoing the seek to the beginning if load is still in progress. I also don't remember exactly why the OnPipelineSeeked() is necessary. The load event should eventually completely and issue the correct buffering state change.
On 2015/01/06 19:18:55, DaleCurtis wrote: > https://codereview.chromium.org/787373008/diff/100001/media/blink/webmediapla... > File media/blink/webmediaplayer_impl.cc (right): > > https://codereview.chromium.org/787373008/diff/100001/media/blink/webmediapla... > media/blink/webmediaplayer_impl.cc:334: if (paused_time_ != seek_time || > old_state != ReadyStateHaveEnoughData) { > Can you see if this allows the removal of OnPipelineSeeked() now? I.e. move the > inverse of this state check to the PostTask for > OnPipelineBufferingStateChanged(). > > if (paused_time_ != seek_time) { > paused_time_ = seek_time; > } else if (old_state == ReadyStateHaveEnoughData) { > // PostTask(OnPipelineBufferingStateChanged); > return; > } > > This will avoid redoing the seek to the beginning if load is still in progress. > I also don't remember exactly why the OnPipelineSeeked() is necessary. The load > event should eventually completely and issue the correct buffering state change. I have added OnPipelineSeeked event to fix the failure on blink side but it is of no use. So i have removed it now and the test cases are passing even without that. And i have shuffled the condition as suggested.
dalecurtis@google.com changed reviewers: + dalecurtis@google.com
lgtm % comment update. https://codereview.chromium.org/787373008/diff/120001/media/blink/webmediapla... File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/787373008/diff/120001/media/blink/webmediapla... media/blink/webmediaplayer_impl.cc:330: // In paused state ignore the seek operations to current time and generate Please update the comment here to remove the OnPipelineSeeked() mention as well as indicate why we only send the buffering state update when old_state is already correct. => I.e., that a soon to be fired buffering state change will take care of this.
dalecurtis@chromium.org changed reviewers: - dalecurtis@google.com
(from the right account) lgtm
The CQ bit was checked by srirama.m@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/787373008/140001
The CQ bit was unchecked by commit-bot@chromium.org
Exceeded time limit waiting for builds to trigger.
The CQ bit was checked by srirama.m@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/787373008/140001
Message was sent while issue was closed.
Committed patchset #4 (id:140001)
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/ccf67181d8ccd356d86019b6768e5a9096956fbf Cr-Commit-Position: refs/heads/master@{#310483} |