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

Unified Diff: media/renderers/renderer_impl.h

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/renderers/renderer_impl.h
diff --git a/media/renderers/renderer_impl.h b/media/renderers/renderer_impl.h
index 9eb1d4f6e650e9f840832e751fc476c31653a4e0..76c62c263bd799944390aa89776866070cffac52 100644
--- a/media/renderers/renderer_impl.h
+++ b/media/renderers/renderer_impl.h
@@ -56,6 +56,7 @@ class MEDIA_EXPORT RendererImpl : public Renderer {
const CdmAttachedCB& cdm_attached_cb) final;
void Flush(const base::Closure& flush_cb) final;
void StartPlayingFrom(base::TimeDelta time) final;
+ void RestartStreamPlayback(DemuxerStream* stream, base::TimeDelta time) final;
void SetPlaybackRate(double playback_rate) final;
void SetVolume(float volume) final;
base::TimeDelta GetMediaTime() final;
@@ -103,6 +104,9 @@ class MEDIA_EXPORT RendererImpl : public Renderer {
void FlushVideoRenderer();
void OnVideoRendererFlushDone();
+ void OnAudioRendererFlushDone_ForRestart(base::TimeDelta time);
xhwang 2016/06/04 00:09:43 nit: We don't use underscore in function names.
+ void OnVideoRendererFlushDone_ForRestart(base::TimeDelta time);
+
// Callback executed by filters to update statistics.
void OnStatisticsUpdate(const PipelineStatistics& stats);
@@ -178,6 +182,9 @@ class MEDIA_EXPORT RendererImpl : public Renderer {
// runs out of data but the audio renderer still has enough.
base::TimeDelta video_underflow_threshold_;
+ bool restarting_audio_ = false;
+ bool restarting_video_ = false;
+
base::WeakPtr<RendererImpl> weak_this_;
base::WeakPtrFactory<RendererImpl> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698