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

Unified Diff: media/base/audio_renderer_sink.h

Issue 2038053002: Change audio render thread checking to use new AudioRendererSink::BelongsToRendererThread() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_renderer_sink.h
diff --git a/media/base/audio_renderer_sink.h b/media/base/audio_renderer_sink.h
index b0b5f26a729d3667882ded2265250250430b7c9e..4e32f741be7837965c63212d3362d3e4bb6a1770 100644
--- a/media/base/audio_renderer_sink.h
+++ b/media/base/audio_renderer_sink.h
@@ -27,6 +27,10 @@ class AudioRendererSink
public:
class RenderCallback {
public:
+ // Informs that rendering has been initialized and will start soon. This
+ // means that a new rendering thread has been started.
+ virtual void OnInitialized() = 0;
Henrik Grunell 2016/06/03 13:53:42 Only WebRTC will care about this function, and wil
DaleCurtis 2016/06/03 20:54:13 Why not always detach until the first render call?
Henrik Grunell 2016/06/08 09:19:06 The mixer in the upcoming mixing changes will rest
+
// Attempts to completely fill all channels of |dest|, returns actual
// number of frames filled. |frames_skipped| contains the number of frames
// the consumer has skipped, if any.
@@ -70,6 +74,9 @@ class AudioRendererSink
// Must never be called on the IO thread.
virtual OutputDeviceInfo GetOutputDeviceInfo() = 0;
+ // Returns true if called on rendering thread, otherwise false.
+ virtual bool BelongsToRenderingThread() = 0;
Henrik Grunell 2016/06/03 13:53:42 If we go for the above OnInitialized(), we don't n
DaleCurtis 2016/06/03 20:54:13 What do you mean about detaching? This would repla
Henrik Grunell 2016/06/08 09:19:06 In the case above, when the mixer restarts AOD, wi
DaleCurtis 2016/06/08 18:10:13 The corollary to my question is that if this repla
+
protected:
friend class base::RefCountedThreadSafe<AudioRendererSink>;
virtual ~AudioRendererSink() {}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698