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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 10879056: Support setting an explicit duration on MediaSource objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: response to CR Created 8 years, 4 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 | « webkit/media/webmediaplayer_impl.h ('k') | webkit/media/webmediaplayer_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediaplayer_impl.cc
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index e07b0d4c3cdcf42d2a88e7603b9c4a5e16aa521f..0b9cc7a770757fbf667efab82d1cdfb8467ea77f 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -665,6 +665,16 @@ bool WebMediaPlayerImpl::sourceAbort(const WebKit::WebString& id) {
return true;
}
+void WebMediaPlayerImpl::sourceSetDuration(double new_duration) {
+ if (static_cast<double>(duration()) == new_duration)
+ return;
+
+ proxy_->DemuxerSetDuration(
+ base::TimeDelta::FromMicroseconds(
+ new_duration * base::Time::kMicrosecondsPerSecond));
+ GetClient()->durationChanged();
+}
+
void WebMediaPlayerImpl::sourceEndOfStream(
WebMediaPlayer::EndOfStreamStatus status) {
DCHECK_EQ(main_loop_, MessageLoop::current());
« no previous file with comments | « webkit/media/webmediaplayer_impl.h ('k') | webkit/media/webmediaplayer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698