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

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

Issue 133903004: Cleaned up the WebRtcAudioCapturer a bit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed the debugging DLOG. Created 6 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
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 1d904fa496202277130bc900edb0aea72b525472..05d7c6e86bf840471fd28203cbf3409a700f486c 100644
--- a/content/renderer/media/webrtc_audio_device_impl.h
+++ b/content/renderer/media/webrtc_audio_device_impl.h
@@ -299,14 +299,11 @@ class CONTENT_EXPORT WebRtcAudioDeviceImpl
// Called on the main renderer thread.
bool SetAudioRenderer(WebRtcAudioRenderer* renderer);
- // Adds the capturer to the ADM.
+ // Adds/Removes the capturer to the ADM.
+ // 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);
-
- // Gets the default capturer, which is the capturer in the list with
- // a valid |device_id|. Microphones are represented by capturers with a valid
- // |device_id|, since only one microphone is supported today, only one
- // capturer in the |capturers_| can have a valid |device_id|.
- scoped_refptr<WebRtcAudioCapturer> GetDefaultCapturer() const;
+ void RemoveAudioCapturer(const scoped_refptr<WebRtcAudioCapturer>& capturer);
const scoped_refptr<WebRtcAudioRenderer>& renderer() const {
return renderer_;
@@ -355,6 +352,10 @@ class CONTENT_EXPORT WebRtcAudioDeviceImpl
virtual void SetRenderFormat(const media::AudioParameters& params) OVERRIDE;
virtual void RemoveAudioRenderer(WebRtcAudioRenderer* renderer) OVERRIDE;
+ // Helper to get the default capturer, which is the capturer in the list with
+ // a valid |device_id|.
+ scoped_refptr<WebRtcAudioCapturer> GetDefaultCapturer() const;
+
// Used to DCHECK that we are called on the correct thread.
base::ThreadChecker thread_checker_;

Powered by Google App Engine
This is Rietveld 408576698