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

Issue 1029763002: Introduce CancelUponDeferral() to buffered media loaders. (Closed)

Created:
5 years, 9 months ago by DaleCurtis
Modified:
5 years, 9 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce CancelUponDeferral() to buffered media loaders. Fixes hitting the maximum connection limit of 6 per domain when a media tag is used with preload=metadata. Deferred network connections will be cancelled once reaching the HAVE_ENOUGH_DATA state for preload=metadata, non-streaming resources that have not started playback. A soft cancel is introduced which allows us to preserve the data cached thus far in the BufferedResourceLoader. Once this cache is exhausted the loader will fulfill subsequent reads with a cache miss and continue on as normal. preload=metadata intentionally does not cache enough data for a smooth playback experience on slow connections, so the cache miss here does not increase jank relative to the current status quo. For similar reasons, since preload=auto does load enough data for an uninterrupted playback, we can't use this method there or we'll introduce jank during the cache miss and subsequent catch up. Note: This does not resolve hung connections if multiple media elements are actually playing back or if they are served from a server without range requests. Note 2: This also fixes a broken media_blink_unittests, which was missing some Gin dependency. BUG=162627 TEST=new unittest, passes layout tests. Committed: https://crrev.com/849cf4b2ae0cd74c9f618b0950fee69f075de492 Cr-Commit-Position: refs/heads/master@{#322610}

Patch Set 1 #

Patch Set 2 : Move cancelation. #

Total comments: 4

Patch Set 3 : Comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -3 lines) Patch
M media/blink/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M media/blink/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M media/blink/buffered_data_source.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M media/blink/buffered_data_source.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M media/blink/buffered_data_source_unittest.cc View 1 2 2 chunks +42 lines, -0 lines 0 comments Download
M media/blink/buffered_resource_loader.h View 1 2 chunks +9 lines, -0 lines 0 comments Download
M media/blink/buffered_resource_loader.cc View 1 2 4 chunks +15 lines, -1 line 0 comments Download
M media/blink/buffered_resource_loader_unittest.cc View 2 chunks +28 lines, -0 lines 0 comments Download
M media/blink/media_blink.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M media/blink/run_all_unittests.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 2 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 19 (4 generated)
DaleCurtis
5 years, 9 months ago (2015-03-24 02:02:52 UTC) #2
DaleCurtis
+jochen for +gin DEP to get media_blink_unittests working, which since they weren't loading the isolates ...
5 years, 9 months ago (2015-03-24 02:03:33 UTC) #4
mmenke
On 2015/03/24 02:03:33, DaleCurtis wrote: > +jochen for +gin DEP to get media_blink_unittests working, which ...
5 years, 9 months ago (2015-03-24 02:05:43 UTC) #5
DaleCurtis
Actually, I'm beginning to think this should work for the preload=auto case too... If we ...
5 years, 9 months ago (2015-03-24 02:59:40 UTC) #6
philipj_slow
Note that the default preload state is auto, which is allowed but not what the ...
5 years, 9 months ago (2015-03-24 07:26:52 UTC) #7
philipj_slow
From the description: > The WebMediaPlayerImpl will now cancel deferred connections once > reaching the ...
5 years, 9 months ago (2015-03-24 07:35:03 UTC) #8
jochen (gone - plz use gerrit)
lgtm
5 years, 9 months ago (2015-03-24 09:25:16 UTC) #9
DaleCurtis
On 2015/03/24 07:35:03, philipj_UTC7 wrote: > From the description: > > The WebMediaPlayerImpl will now ...
5 years, 9 months ago (2015-03-24 17:14:14 UTC) #10
DaleCurtis
On 2015/03/24 17:14:14, DaleCurtis wrote: > On 2015/03/24 07:35:03, philipj_UTC7 wrote: > > From the ...
5 years, 9 months ago (2015-03-24 20:29:08 UTC) #11
xhwang
I am a little concerned about the preload=auto case. Will this cause extra buffering time ...
5 years, 9 months ago (2015-03-26 07:21:55 UTC) #12
DaleCurtis
Can you elaborate on your concern for preload=auto? This is limited to preload=metadata for the ...
5 years, 9 months ago (2015-03-26 17:22:00 UTC) #13
xhwang
On 2015/03/26 17:22:00, DaleCurtis wrote: > Can you elaborate on your concern for preload=auto? This ...
5 years, 9 months ago (2015-03-26 20:07:51 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1029763002/40001
5 years, 9 months ago (2015-03-27 16:43:08 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 9 months ago (2015-03-27 18:35:54 UTC) #18
commit-bot: I haz the power
5 years, 9 months ago (2015-03-27 18:36:50 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/849cf4b2ae0cd74c9f618b0950fee69f075de492
Cr-Commit-Position: refs/heads/master@{#322610}

Powered by Google App Engine
This is Rietveld 408576698