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

Unified Diff: media/mojo/services/mojo_renderer_service.cc

Issue 1935873002: Implement disabling and enabling media tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control2
Patch Set: Updated comments + dchecks in ffmpeg demux stream Created 4 years, 7 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: media/mojo/services/mojo_renderer_service.cc
diff --git a/media/mojo/services/mojo_renderer_service.cc b/media/mojo/services/mojo_renderer_service.cc
index 9c6f2adf0d11eb581920b6ee7244d8dadd8f09fa..52acb9a2016ddc87290eb229b7018ddff0e78cec 100644
--- a/media/mojo/services/mojo_renderer_service.cc
+++ b/media/mojo/services/mojo_renderer_service.cc
@@ -67,6 +67,21 @@ void MojoRendererService::StartPlayingFrom(int64_t time_delta_usec) {
SchedulePeriodicMediaTimeUpdates();
}
+void MojoRendererService::RestartStreamPlayback(bool video_stream,
+ int64_t time_delta_usec) {
+ DemuxerStream* demuxer_stream = nullptr;
+
+ if (video_stream)
+ demuxer_stream = stream_provider_->GetStream(DemuxerStream::VIDEO);
+ else
+ demuxer_stream = stream_provider_->GetStream(DemuxerStream::AUDIO);
+
+ DVLOG(2) << __FUNCTION__ << ": demuxer_stream=" << demuxer_stream
+ << " time=" << time_delta_usec;
+ renderer_->RestartStreamPlayback(
+ demuxer_stream, base::TimeDelta::FromMicroseconds(time_delta_usec));
+}
+
void MojoRendererService::SetPlaybackRate(double playback_rate) {
DVLOG(2) << __FUNCTION__ << ": " << playback_rate;
DCHECK_EQ(state_, STATE_PLAYING);

Powered by Google App Engine
This is Rietveld 408576698