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

Unified Diff: content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc

Issue 227743004: Added a kEchoCancellation constraint to turn off the audio processing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: moved some of the constraints code to MediaAudioConstraints class, and hope it makes the code more … Created 6 years, 8 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/webrtc_local_audio_track_adapter_unittest.cc
diff --git a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc
index a937d6d1379dc8fa01f4d37bce287c48bf3a3d4f..ea7839cf6dffe1c6a02fe496bc3a9b65ce990b12 100644
--- a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc
+++ b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "content/renderer/media/mock_media_constraint_factory.h"
#include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h"
#include "content/renderer/media/webrtc_local_audio_track.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -33,11 +34,13 @@ class WebRtcLocalAudioTrackAdapterTest : public ::testing::Test {
WebRtcLocalAudioTrackAdapterTest()
: params_(media::AudioParameters::AUDIO_PCM_LOW_LATENCY,
media::CHANNEL_LAYOUT_STEREO, 48000, 16, 480),
- adapter_(WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL)),
- capturer_(WebRtcAudioCapturer::CreateCapturer(
- -1, StreamDeviceInfo(MEDIA_DEVICE_AUDIO_CAPTURE, "", ""),
- blink::WebMediaConstraints(), NULL)),
- track_(new WebRtcLocalAudioTrack(adapter_, capturer_, NULL)) {}
+ adapter_(WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL)) {
+ MockMediaConstraintFactory constraint_factory;
+ capturer_ = WebRtcAudioCapturer::CreateCapturer(
+ -1, StreamDeviceInfo(MEDIA_DEVICE_AUDIO_CAPTURE, "", ""),
+ constraint_factory.CreateWebMediaConstraints(), NULL);
+ track_.reset(new WebRtcLocalAudioTrack(adapter_, capturer_, NULL));
+ }
protected:
virtual void SetUp() OVERRIDE {

Powered by Google App Engine
This is Rietveld 408576698