summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authoracolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-02 23:37:45 +0000
committeracolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-02 23:37:45 +0000
commit4b68de2bd99382527b94f893820d1f998e7c42f5 (patch)
tree86e9af5be03e45f9d5054a4403f0677cc097aeef /content
parent2a79350a2a7c9fc4ec039cb921442518028d6294 (diff)
downloadchromium_src-4b68de2bd99382527b94f893820d1f998e7c42f5.zip
chromium_src-4b68de2bd99382527b94f893820d1f998e7c42f5.tar.gz
chromium_src-4b68de2bd99382527b94f893820d1f998e7c42f5.tar.bz2
Restore capacity increase on underflow for MSE playbacks.
The "increase preroll capacity on underflow" logic was disabled for MSE playbacks a while ago because it was causing unwanted garbage collections and was allowing the capacity to grow too large. This change restores the capacity increase logic, but restricts the capacity so that it never grows beyond 3 seconds worth of data. This will avoid the GC issues encountered before. This change also resets the capacity on flush so that capacity increases in one playback period don't negatively effect the seek start time. BUG=291726 TEST=AudioRendererImplTest.Underflow, AudioRendererImplTest.Underflow_FollowedByFlush Review URL: https://codereview.chromium.org/88743004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238230 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/renderer/media/webmediaplayer_impl.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/content/renderer/media/webmediaplayer_impl.cc b/content/renderer/media/webmediaplayer_impl.cc
index 4be4b9f..3f23df7 100644
--- a/content/renderer/media/webmediaplayer_impl.cc
+++ b/content/renderer/media/webmediaplayer_impl.cc
@@ -1083,7 +1083,6 @@ void WebMediaPlayerImpl::NotifyDownloading(bool is_downloading) {
void WebMediaPlayerImpl::StartPipeline() {
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
- bool increase_preroll_on_underflow = true;
// Keep track if this is a MSE or non-MSE playback.
UMA_HISTOGRAM_BOOLEAN("Media.MSE.Playback",
@@ -1114,12 +1113,6 @@ void WebMediaPlayerImpl::StartPipeline() {
// TODO(acolwell): Remove this once http://crbug.com/151045 is fixed.
gpu_factories_ = NULL;
#endif
-
- // Disable preroll increases on underflow since the web application has no
- // way to detect that this is happening and runs the risk of triggering
- // unwanted garbage collection if it is to aggressive about appending data.
- // TODO(acolwell): Remove this once http://crbug.com/144683 is fixed.
- increase_preroll_on_underflow = false;
}
scoped_ptr<media::FilterCollection> filter_collection(
@@ -1144,8 +1137,7 @@ void WebMediaPlayerImpl::StartPipeline() {
new media::AudioRendererImpl(media_loop_,
audio_source_provider_.get(),
audio_decoders.Pass(),
- set_decryptor_ready_cb,
- increase_preroll_on_underflow));
+ set_decryptor_ready_cb));
filter_collection->SetAudioRenderer(audio_renderer.Pass());
// Create our video decoders and renderer.