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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 10800041: Update media duration if data is appended after the previous duration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 5 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
Index: webkit/media/webmediaplayer_impl.cc
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index aa69b1ac5b57c5c4b852d860f57f6a8d1c485f6d..011393f8454d1231bdadd120b3ead45d70f4f4d4 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -884,6 +884,12 @@ void WebMediaPlayerImpl::OnPipelineError(PipelineStatus error) {
Repaint();
}
+void WebMediaPlayerImpl::OnPipelineDurationChanged() {
+ DCHECK_EQ(main_loop_, MessageLoop::current());
+
+ GetClient()->durationChanged();
+}
+
void WebMediaPlayerImpl::OnDemuxerOpened() {
DCHECK_EQ(main_loop_, MessageLoop::current());
@@ -987,6 +993,8 @@ void WebMediaPlayerImpl::StartPipeline() {
base::Bind(&WebMediaPlayerProxy::PipelineEndedCallback, proxy_.get()),
base::Bind(&WebMediaPlayerProxy::PipelineErrorCallback, proxy_.get()),
base::Bind(&WebMediaPlayerProxy::PipelineInitializationCallback,
+ proxy_.get()),
+ base::Bind(&WebMediaPlayerProxy::PipelineDurationChangedCallback,
proxy_.get()));
}

Powered by Google App Engine
This is Rietveld 408576698