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

Unified Diff: media/renderers/renderer_impl.h

Issue 2890603004: Freeze the reported media time while audio is restarted (Closed)
Patch Set: Fixed nits Created 3 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
« 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 e400e8ac161675608a38b74af23fe3d876b462f6..aae8b52aa7dfc46660ace4d84237f1c44e531d8b 100644
--- a/media/renderers/renderer_impl.h
+++ b/media/renderers/renderer_impl.h
@@ -229,7 +229,14 @@ class MEDIA_EXPORT RendererImpl : public Renderer {
// runs out of data but the audio renderer still has enough.
base::TimeDelta video_underflow_threshold_;
+ // Lock used to protect access to the |restarting_audio_| flag and
+ // |restarting_audio_time_|.
+ // TODO(servolk): Get rid of the lock and replace restarting_audio_ with
+ // std::atomic<bool> when atomics are unbanned in Chromium.
+ base::Lock restarting_audio_lock_;
bool restarting_audio_ = false;
+ base::TimeDelta restarting_audio_time_ = kNoTimestamp;
+
bool restarting_video_ = false;
// Flush operations and media track status changes must be serialized to avoid
« 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