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); |