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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1029763002: Introduce CancelUponDeferral() to buffered media loaders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/blink/run_all_unittests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 93f3bd43cf20d7f92c05ff5cc423e3a716159334..87c90c541d26c34f624b162754eb6c0eef33c72e 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -789,8 +789,7 @@ void WebMediaPlayerImpl::OnPipelineMetadata(
pipeline_metadata_ = metadata;
- UMA_HISTOGRAM_ENUMERATION("Media.VideoRotation",
- metadata.video_rotation,
+ UMA_HISTOGRAM_ENUMERATION("Media.VideoRotation", metadata.video_rotation,
VIDEO_ROTATION_MAX + 1);
SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata);
@@ -824,6 +823,11 @@ void WebMediaPlayerImpl::OnPipelineBufferingStateChanged(
DCHECK_EQ(buffering_state, BUFFERING_HAVE_ENOUGH);
SetReadyState(WebMediaPlayer::ReadyStateHaveEnoughData);
+ // Let the DataSource know we have enough data. It may use this information to
+ // release unused network connections.
+ if (data_source_)
+ data_source_->OnBufferingHaveEnough();
+
// Blink expects a timeChanged() in response to a seek().
if (should_notify_time_changed_)
client_->timeChanged();
« no previous file with comments | « media/blink/run_all_unittests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698