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

Unified Diff: media/renderers/renderer_impl.h

Issue 2605473002: Fix processing of multiple stream status changes by renderer (Closed)
Patch Set: CR feedback (use a single unified notification queue) Created 3 years, 11 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 | « no previous file | media/renderers/renderer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/renderer_impl.h
diff --git a/media/renderers/renderer_impl.h b/media/renderers/renderer_impl.h
index 07ea2241cfb145ede0b0a233e3adc779bdcf1a23..46fb71c0fe79aa0c7986d9baa65ca1af1fe96513 100644
--- a/media/renderers/renderer_impl.h
+++ b/media/renderers/renderer_impl.h
@@ -5,6 +5,7 @@
#ifndef MEDIA_RENDERERS_RENDERER_IMPL_H_
#define MEDIA_RENDERERS_RENDERER_IMPL_H_
+#include <list>
#include <memory>
#include <vector>
@@ -60,7 +61,7 @@ class MEDIA_EXPORT RendererImpl : public Renderer {
void SetVolume(float volume) final;
base::TimeDelta GetMediaTime() final;
- void RestartStreamPlayback(DemuxerStream* stream,
+ void OnStreamStatusChanged(DemuxerStream* stream,
bool enabled,
base::TimeDelta time);
@@ -146,6 +147,8 @@ class MEDIA_EXPORT RendererImpl : public Renderer {
void OnVideoNaturalSizeChange(const gfx::Size& size);
void OnVideoOpacityChange(bool opaque);
+ void OnStreamRestartCompleted();
+
State state_;
// Task runner used to execute pipeline tasks.
@@ -197,6 +200,7 @@ class MEDIA_EXPORT RendererImpl : public Renderer {
bool restarting_audio_ = false;
bool restarting_video_ = false;
+ std::list<base::Closure> pending_stream_status_notifications_;
base::WeakPtr<RendererImpl> weak_this_;
base::WeakPtrFactory<RendererImpl> weak_factory_;
« no previous file with comments | « no previous file | media/renderers/renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698