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

Unified Diff: content/renderer/media/webrtc_audio_capturer.cc

Issue 883293005: Cast: Basic cast_receiver API for chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed extra BUILD.gn line Created 5 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_capturer.cc
diff --git a/content/renderer/media/webrtc_audio_capturer.cc b/content/renderer/media/webrtc_audio_capturer.cc
index cea18a1c602670f038fd55be3e96b97d73fe9e67..2145ceee25755a840cfab3aee066017e93a12fe4 100644
--- a/content/renderer/media/webrtc_audio_capturer.cc
+++ b/content/renderer/media/webrtc_audio_capturer.cc
@@ -201,9 +201,10 @@ bool WebRtcAudioCapturer::Initialize() {
}
// Create and configure the default audio capturing source.
- SetCapturerSource(AudioDeviceFactory::NewInputDevice(render_view_id_),
- channel_layout,
- static_cast<float>(device_info_.device.input.sample_rate));
+ SetCapturerSourceInternal(
+ AudioDeviceFactory::NewInputDevice(render_view_id_),
+ channel_layout,
+ static_cast<float>(device_info_.device.input.sample_rate));
// Add the capturer to the WebRtcAudioDeviceImpl since it needs some hardware
// information from the capturer.
@@ -285,7 +286,7 @@ void WebRtcAudioCapturer::RemoveTrack(WebRtcLocalAudioTrack* track) {
}
}
-void WebRtcAudioCapturer::SetCapturerSource(
+void WebRtcAudioCapturer::SetCapturerSourceInternal(
const scoped_refptr<media::AudioCapturerSource>& source,
media::ChannelLayout channel_layout,
float sample_rate) {
@@ -364,9 +365,9 @@ void WebRtcAudioCapturer::EnablePeerConnectionMode() {
// Create a new audio stream as source which will open the hardware using
// WebRtc native buffer size.
- SetCapturerSource(AudioDeviceFactory::NewInputDevice(render_view_id),
- input_params.channel_layout(),
- static_cast<float>(input_params.sample_rate()));
+ SetCapturerSourceInternal(AudioDeviceFactory::NewInputDevice(render_view_id),
+ input_params.channel_layout(),
+ static_cast<float>(input_params.sample_rate()));
}
void WebRtcAudioCapturer::Start() {
@@ -585,12 +586,12 @@ int WebRtcAudioCapturer::GetBufferSize(int sample_rate) const {
return (sample_rate / 100);
}
-void WebRtcAudioCapturer::SetCapturerSourceForTesting(
+void WebRtcAudioCapturer::SetCapturerSource(
const scoped_refptr<media::AudioCapturerSource>& source,
media::AudioParameters params) {
// Create a new audio stream as source which uses the new source.
- SetCapturerSource(source, params.channel_layout(),
- static_cast<float>(params.sample_rate()));
+ SetCapturerSourceInternal(source, params.channel_layout(),
+ static_cast<float>(params.sample_rate()));
}
} // namespace content
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.h ('k') | content/renderer/media/webrtc_audio_capturer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698