summaryrefslogtreecommitdiffstats
path: root/media/base
diff options
context:
space:
mode:
authordalecurtis <dalecurtis@chromium.org>2015-04-02 22:07:08 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-03 05:08:02 +0000
commitc11e7bb244652731cc67c023bd2cf39e52df3544 (patch)
tree8f2469e39ebaf83c4ce70c81f0604663b5533640 /media/base
parent65cd862d0ba40f3fc93e5910aa8a81819748393b (diff)
downloadchromium_src-c11e7bb244652731cc67c023bd2cf39e52df3544.zip
chromium_src-c11e7bb244652731cc67c023bd2cf39e52df3544.tar.gz
chromium_src-c11e7bb244652731cc67c023bd2cf39e52df3544.tar.bz2
Move underflow threshold limits out of the video renderer.
The threshold logic is incorrect when there's no audio track, which the VideoRendererImpl has no knowledge of, so this logic needs to live in the RendererImpl. As a consequence of this, the underflow threshold is now based on wall clock time instead of media time; which means non-realtime playback will allow more or less media time to elapse before underflow occurs. Exposes a new command line flag --video-underflow-threshold-ms to allow for experiments varying the threshold for YouTube. BUG=423801, 470940 TEST=new unittests. Review URL: https://codereview.chromium.org/1034233002 Cr-Commit-Position: refs/heads/master@{#323599}
Diffstat (limited to 'media/base')
-rw-r--r--media/base/media_switches.cc5
-rw-r--r--media/base/media_switches.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
index 44dea87..4390412 100644
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -106,4 +106,9 @@ const char kEnableInbandTextTracks[] = "enable-inband-text-tracks";
const char kRequireAudioHardwareForTesting[] =
"require-audio-hardware-for-testing";
+// Allows clients to override the threshold for when the media renderer will
+// declare the underflow state for the video stream when audio is present.
+// TODO(dalecurtis): Remove once experiments for http://crbug.com/470940 finish.
+const char kVideoUnderflowThresholdMs[] = "video-underflow-threshold-ms";
+
} // namespace switches
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
index 8c509a1ee..fa2bb9c 100644
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -54,6 +54,8 @@ MEDIA_EXPORT extern const char kEnableInbandTextTracks[];
MEDIA_EXPORT extern const char kRequireAudioHardwareForTesting[];
+MEDIA_EXPORT extern const char kVideoUnderflowThresholdMs[];
+
} // namespace switches
#endif // MEDIA_BASE_MEDIA_SWITCHES_H_