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

Unified Diff: content/renderer/media/webrtc_audio_device_impl.h

Issue 1721273002: MediaStream audio object graph untangling and clean-ups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed mcasas's 1st round comments, plus REBASE. Created 4 years, 10 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: content/renderer/media/webrtc_audio_device_impl.h
diff --git a/content/renderer/media/webrtc_audio_device_impl.h b/content/renderer/media/webrtc_audio_device_impl.h
index a3bbf6b8ee7f362b696f0911bc66509d78317cc7..49ef691b4d3d782602ddc98088cd87146bc6f6cc 100644
--- a/content/renderer/media/webrtc_audio_device_impl.h
+++ b/content/renderer/media/webrtc_audio_device_impl.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <list>
#include <string>
#include <vector>
@@ -306,15 +307,12 @@ class CONTENT_EXPORT WebRtcAudioDeviceImpl
// Called on the main renderer thread.
bool SetAudioRenderer(WebRtcAudioRenderer* renderer);
- // Adds/Removes the capturer to the ADM.
+ // Adds/Removes the |capturer| to the ADM. Does NOT take ownership.
+ // Capturers must remain valid until RemoveAudioCapturer() is called.
o1ka 2016/02/29 14:28:04 How will we prevent bugs cause by violation of thi
miu 2016/03/01 09:43:55 The risk of that is non-existent here because the
o1ka 2016/03/01 14:18:59 Thanks a lot for the detailed reply - it answers e
// TODO(xians): Remove these two methods once the ADM does not need to pass
// hardware information up to WebRtc.
- void AddAudioCapturer(const scoped_refptr<WebRtcAudioCapturer>& capturer);
- void RemoveAudioCapturer(const scoped_refptr<WebRtcAudioCapturer>& capturer);
-
- // Gets the default capturer, which is the last capturer in |capturers_|.
- // The method can be called by both Libjingle thread and main render thread.
- scoped_refptr<WebRtcAudioCapturer> GetDefaultCapturer() const;
+ void AddAudioCapturer(WebRtcAudioCapturer* capturer);
+ void RemoveAudioCapturer(WebRtcAudioCapturer* capturer);
// Gets paired device information of the capture device for the audio
// renderer. This is used to pass on a session id, sample rate and buffer
@@ -331,7 +329,7 @@ class CONTENT_EXPORT WebRtcAudioDeviceImpl
}
private:
- typedef std::list<scoped_refptr<WebRtcAudioCapturer> > CapturerList;
+ typedef std::list<WebRtcAudioCapturer*> CapturerList;
typedef std::list<WebRtcPlayoutDataSource::Sink*> PlayoutDataSinkList;
class RenderBuffer;

Powered by Google App Engine
This is Rietveld 408576698