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

Issue 2280123002: Fix under-invalidation of media buffered ranges (Closed)

Created:
4 years, 3 months ago by Xianzhu
Modified:
4 years, 3 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dglazkov+blink, dshwang, eric.carlson_apple.com, feature-media-reviews_chromium.org, fs, gasubic, mlamouri+watch-blink_chromium.org, nessy, slimming-paint-reviews_chromium.org, vcarbune.chromium
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Invalidate timeline periodically when media buffered ranges change Instead of letting media player or source notify HTMLMediaElement on buffered range change (which would introduce much complexity in multiple branches and levels of code), add a timer in MediaControls which checks change of buffered ranges while the media is loading in paused state, invalidates paint if the ranges change. BUG=484288 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Patch Set 1 #

Patch Set 2 : - #

Patch Set 3 : Synchronize buffered ranges when the current play time changes #

Total comments: 4

Patch Set 4 : - #

Patch Set 5 : Simplify #

Patch Set 6 : - #

Patch Set 7 : Conditionally invalidate #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -4 lines) Patch
M third_party/WebKit/Source/core/html/TimeRanges.h View 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/shadow/MediaControls.h View 1 2 3 4 5 6 3 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/shadow/MediaControls.cpp View 1 2 3 4 5 6 9 chunks +51 lines, -4 lines 0 comments Download

Messages

Total messages: 28 (13 generated)
Xianzhu
4 years, 3 months ago (2016-08-26 20:57:35 UTC) #9
chrishtr
How does it invalidate all the other things in the media controls correctly? Are those ...
4 years, 3 months ago (2016-08-26 23:14:17 UTC) #12
Xianzhu
On 2016/08/26 23:14:17, chrishtr wrote: > How does it invalidate all the other things in ...
4 years, 3 months ago (2016-08-26 23:33:21 UTC) #13
liberato (no reviews please)
https://codereview.chromium.org/2280123002/diff/40001/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp File third_party/WebKit/Source/core/html/shadow/MediaControls.cpp (right): https://codereview.chromium.org/2280123002/diff/40001/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp#newcode812 third_party/WebKit/Source/core/html/shadow/MediaControls.cpp:812: } else if (*m_bufferedRangesForPainting == *newBuffered) { might one ...
4 years, 3 months ago (2016-08-29 15:25:34 UTC) #16
Xianzhu
https://codereview.chromium.org/2280123002/diff/40001/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp File third_party/WebKit/Source/core/html/shadow/MediaControls.cpp (right): https://codereview.chromium.org/2280123002/diff/40001/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp#newcode812 third_party/WebKit/Source/core/html/shadow/MediaControls.cpp:812: } else if (*m_bufferedRangesForPainting == *newBuffered) { On 2016/08/29 ...
4 years, 3 months ago (2016-08-29 18:04:15 UTC) #17
chrishtr
On 2016/08/26 at 23:33:21, wangxianzhu wrote: > On 2016/08/26 23:14:17, chrishtr wrote: > > How ...
4 years, 3 months ago (2016-08-29 19:34:17 UTC) #18
Xianzhu
On 2016/08/29 19:34:17, chrishtr wrote: > On 2016/08/26 at 23:33:21, wangxianzhu wrote: > > On ...
4 years, 3 months ago (2016-08-29 20:54:06 UTC) #19
liberato (no reviews please)
On 2016/08/29 20:54:06, Xianzhu wrote: > On 2016/08/29 19:34:17, chrishtr wrote: > > On 2016/08/26 ...
4 years, 3 months ago (2016-08-29 21:19:39 UTC) #20
liberato (no reviews please)
On 2016/08/29 20:54:06, Xianzhu wrote: > On 2016/08/29 19:34:17, chrishtr wrote: > > On 2016/08/26 ...
4 years, 3 months ago (2016-08-29 21:19:41 UTC) #21
Xianzhu
On 2016/08/29 21:19:41, liberato wrote: > On 2016/08/29 20:54:06, Xianzhu wrote: > > On 2016/08/29 ...
4 years, 3 months ago (2016-08-29 22:18:27 UTC) #23
Xianzhu
liberato@ what do you think about the latest patch? It now doesn't deal with anything ...
4 years, 3 months ago (2016-08-30 22:16:19 UTC) #24
liberato (no reviews please)
On 2016/08/30 22:16:19, Xianzhu wrote: > liberato@ what do you think about the latest patch? ...
4 years, 3 months ago (2016-08-30 22:40:17 UTC) #25
Xianzhu
On 2016/08/30 22:40:17, liberato wrote: > On 2016/08/30 22:16:19, Xianzhu wrote: > > liberato@ what ...
4 years, 3 months ago (2016-08-30 23:52:38 UTC) #26
chrishtr
I don't like the pattern of starting extra timers during phases of playback that slow ...
4 years, 3 months ago (2016-08-31 01:01:55 UTC) #27
Xianzhu
4 years, 3 months ago (2016-08-31 05:14:46 UTC) #28
This doesn't seem an important feature though because I haven't seen any bug
report about it except the one I filed for under-invalidation. I'd like to just
close the issue and this CL.

On 2016/08/31 01:01:55, chrishtr wrote:
> I don't like the pattern of starting extra timers during phases of playback
that
> slow down
> the whole page when they fire. Also, isn't this feature deprecated, per what
> liberato@ said
> earlier?

It's the android implementation that will be deprecated, not the feature. Some
mediaplayer implementations still support the feature. We seem also to support
the feature for media sources.

> It's a bit hacky, but how about noticing that the the buffered range changed
> when invalidating
> a part of the media element for some other reason?

We already paint the latest buffered range whenever the timeline is invalidated
for any reason. The problem is that when the video is paused and is being
loaded, the whole media player is still, and the user can't see the buffering
progress. It may be not important at all.

Powered by Google App Engine
This is Rietveld 408576698