Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Issue 2581533002: MSE: Fix logic bugs with high precision duration (Closed)

Created:
4 years ago by chcunningham
Modified:
3 years, 10 months ago
CC:
apacible+watch_chromium.org, blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eric.carlson_apple.com, erickung+watch_chromium.org, feature-media-reviews_chromium.org, fs, gasubic, miu+watch_chromium.org, mlamouri+watch-blink_chromium.org, posciak+watch_chromium.org, nessy, Srirama, vcarbune.chromium, xjz+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MSE: Fix logic bugs with high precision duration Upon end of stream, chunk demuxer should decrease the duration to match the highest buffered end time. This was not happening for user-set durations which exceeded the highest buffered end time by less than a microsecond. Additionally, some style refactoring. For MSE, we pull duration directly from the demuxer, which stores the user set value with full precision. Moving this logic to WMPI from HTMLMediaElement ensures duration WMPI uses matches that of HTMLMediaElement. TEST=New layout test and manual testing of bug report steps BUG=669997 Review-Url: https://codereview.chromium.org/2581533002 Cr-Commit-Position: refs/heads/master@{#442699} Committed: https://chromium.googlesource.com/chromium/src/+/b92d50681a244d9cf988ea32fcdb6ea7cd096be2

Patch Set 1 #

Total comments: 23

Patch Set 2 : Feedback, simplify, rebase. #

Total comments: 1

Patch Set 3 : Fix failing test #

Total comments: 1

Patch Set 4 : Fix orientation test #

Total comments: 11

Patch Set 5 : Feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -41 lines) Patch
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 2 chunks +12 lines, -12 lines 0 comments Download
M media/filters/chunk_demuxer.cc View 1 2 chunks +7 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-precise-duration.html View 1 1 chunk +53 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 5 chunks +20 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegateTest.cpp View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (19 generated)
chcunningham
wolenetz@ for everything mlamouri@ for HTMLMediaElement https://codereview.chromium.org/2581533002/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (left): https://codereview.chromium.org/2581533002/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#oldcode2017 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:2017: // duration. See ...
4 years ago (2016-12-15 01:24:26 UTC) #2
mlamouri (slow - plz ping)
lgtm https://codereview.chromium.org/2581533002/diff/1/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2581533002/diff/1/media/blink/webmediaplayer_impl.cc#newcode706 media/blink/webmediaplayer_impl.cc:706: } style: no { } https://codereview.chromium.org/2581533002/diff/1/media/blink/webmediaplayer_impl.cc#newcode709 media/blink/webmediaplayer_impl.cc:709: return ...
4 years ago (2016-12-15 10:20:52 UTC) #3
wolenetz
https://codereview.chromium.org/2581533002/diff/1/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2581533002/diff/1/media/blink/webmediaplayer_impl.cc#newcode705 media/blink/webmediaplayer_impl.cc:705: return chunk_demuxer_->GetDuration(); Is WMPI::duration() ever queried in a code ...
4 years ago (2016-12-16 00:56:52 UTC) #4
chcunningham
Mounir/Matt, please take a second look at HTMLMediaElement. I've reworked duration(). https://codereview.chromium.org/2581533002/diff/1/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): ...
3 years, 11 months ago (2017-01-03 17:48:06 UTC) #5
chcunningham
Hold on that review - I've got a failing content_browsertest to look into.
3 years, 11 months ago (2017-01-03 18:12:06 UTC) #8
chcunningham
Go ahead with review - test is fixed. https://codereview.chromium.org/2581533002/diff/40001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2581533002/diff/40001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1991 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1991: !std::isnan(duration()) ...
3 years, 11 months ago (2017-01-03 19:06:31 UTC) #13
wolenetz
It looks like the most recent patch set is failing some tests: MediaControlsOrientationLockDelegateTest.ReceivedMetadataLater MediaControlsOrientationLockDelegateTest.ReceivedMetadataAfterExitingFullscreen
3 years, 11 months ago (2017-01-03 21:04:56 UTC) #16
chcunningham
Fixed orientation tests. IMO tests should not force readyState values before setting up the WebMediaPlayer. ...
3 years, 11 months ago (2017-01-04 00:11:54 UTC) #17
wolenetz
I'm back after being sick. I'll do another review round on this today.
3 years, 11 months ago (2017-01-09 19:52:33 UTC) #22
wolenetz
lgtm % nits and % mlamouri@ responding to the orientation unit tests' questions. https://codereview.chromium.org/2581533002/diff/60001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File ...
3 years, 11 months ago (2017-01-09 22:19:35 UTC) #23
mlamouri (slow - plz ping)
Changes to MediaControlsOrientationLockDelegateTest lgtm. Feel free to rephrase the comments that didn't look clear. https://codereview.chromium.org/2581533002/diff/60001/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegateTest.cpp ...
3 years, 11 months ago (2017-01-10 14:29:30 UTC) #24
chcunningham
Thanks https://codereview.chromium.org/2581533002/diff/60001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2581533002/diff/60001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1991 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1991: !std::isnan(duration()) ? std::min(duration(), position) : position; On 2017/01/09 ...
3 years, 11 months ago (2017-01-10 18:49:29 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2581533002/80001
3 years, 11 months ago (2017-01-10 18:50:32 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/97036)
3 years, 11 months ago (2017-01-10 20:19:14 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2581533002/80001
3 years, 11 months ago (2017-01-10 20:31:22 UTC) #32
commit-bot: I haz the power
3 years, 11 months ago (2017-01-10 21:51:05 UTC) #35
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/b92d50681a244d9cf988ea32fcdb...

Powered by Google App Engine
This is Rietveld 408576698