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

Unified Diff: media/renderers/renderer_impl.h

Issue 2890603004: Freeze the reported media time while audio is restarted (Closed)
Patch Set: Use inline initialization for restarting_audio_time_ 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') | media/renderers/renderer_impl.cc » ('J')
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..a7cfdbf011bdba4eeb4f55a5956cf387f29d434b 100644
--- a/media/renderers/renderer_impl.h
+++ b/media/renderers/renderer_impl.h
@@ -229,7 +229,12 @@ 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.
xhwang 2017/05/24 00:23:41 nit: Also protecting restarting_audio_time_?
servolk 2017/05/24 00:28:00 Done.
+ // 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;
xhwang 2017/05/24 00:23:41 nit: add an empty line here since restarting_video
servolk 2017/05/24 00:28:00 Done.
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') | media/renderers/renderer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698