summaryrefslogtreecommitdiffstats
path: root/media/blink/media_blink.gyp
diff options
context:
space:
mode:
authordalecurtis <dalecurtis@chromium.org>2015-03-27 11:35:45 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-27 18:36:36 +0000
commit849cf4b2ae0cd74c9f618b0950fee69f075de492 (patch)
treebd5351b80a4a4497ffe3bc63fd593ca526184aca /media/blink/media_blink.gyp
parent43eb02c2ffcfa18adfcbf34cd0507a3d7494febe (diff)
downloadchromium_src-849cf4b2ae0cd74c9f618b0950fee69f075de492.zip
chromium_src-849cf4b2ae0cd74c9f618b0950fee69f075de492.tar.gz
chromium_src-849cf4b2ae0cd74c9f618b0950fee69f075de492.tar.bz2
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. Review URL: https://codereview.chromium.org/1029763002 Cr-Commit-Position: refs/heads/master@{#322610}
Diffstat (limited to 'media/blink/media_blink.gyp')
-rw-r--r--media/blink/media_blink.gyp1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/blink/media_blink.gyp b/media/blink/media_blink.gyp
index fa6042f..9a697e6 100644
--- a/media/blink/media_blink.gyp
+++ b/media/blink/media_blink.gyp
@@ -95,6 +95,7 @@
'../../base/base.gyp:test_support_base',
'../../cc/cc.gyp:cc',
'../../cc/blink/cc_blink.gyp:cc_blink',
+ '../../gin/gin.gyp:gin',
'../../net/net.gyp:net',
'../../testing/gmock.gyp:gmock',
'../../testing/gtest.gyp:gtest',