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

Side by Side Diff: content/browser/media/media_internals_unittest.cc

Issue 1275783003: Add a virtual beamforming audio device on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mcasas comments Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/media/media_internals.h" 5 #include "content/browser/media/media_internals.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 ExpectString("captureApi", "QTKit"); 220 ExpectString("captureApi", "QTKit");
221 #elif defined(OS_ANDROID) 221 #elif defined(OS_ANDROID)
222 ExpectString("captureApi", "Camera API2 Legacy"); 222 ExpectString("captureApi", "Camera API2 Legacy");
223 #endif 223 #endif
224 } 224 }
225 225
226 class MediaInternalsAudioLogTest 226 class MediaInternalsAudioLogTest
227 : public MediaInternalsTestBase, 227 : public MediaInternalsTestBase,
228 public testing::TestWithParam<media::AudioLogFactory::AudioComponent> { 228 public testing::TestWithParam<media::AudioLogFactory::AudioComponent> {
229 public: 229 public:
230 MediaInternalsAudioLogTest() : 230 MediaInternalsAudioLogTest()
231 update_cb_(base::Bind(&MediaInternalsAudioLogTest::UpdateCallbackImpl, 231 : update_cb_(base::Bind(&MediaInternalsAudioLogTest::UpdateCallbackImpl,
232 base::Unretained(this))), 232 base::Unretained(this))),
233 test_params_(media::AudioParameters::AUDIO_PCM_LINEAR, 233 test_params_(media::AudioParameters::AUDIO_PCM_LINEAR,
234 media::CHANNEL_LAYOUT_MONO, 234 media::CHANNEL_LAYOUT_MONO,
235 48000, 235 48000,
236 16, 236 16,
237 128, 237 128,
238 media::AudioParameters::ECHO_CANCELLER | 238 std::vector<media::Point>(),
239 media::AudioParameters::DUCKING), 239 media::AudioParameters::ECHO_CANCELLER |
240 test_component_(GetParam()), 240 media::AudioParameters::DUCKING),
241 audio_log_(media_internals_->CreateAudioLog(test_component_)) { 241 test_component_(GetParam()),
242 audio_log_(media_internals_->CreateAudioLog(test_component_)) {
242 media_internals_->AddUpdateCallback(update_cb_); 243 media_internals_->AddUpdateCallback(update_cb_);
243 } 244 }
244 245
245 virtual ~MediaInternalsAudioLogTest() { 246 virtual ~MediaInternalsAudioLogTest() {
246 media_internals_->RemoveUpdateCallback(update_cb_); 247 media_internals_->RemoveUpdateCallback(update_cb_);
247 } 248 }
248 249
249 protected: 250 protected:
250 MediaInternals::UpdateCallback update_cb_; 251 MediaInternals::UpdateCallback update_cb_;
251 const media::AudioParameters test_params_; 252 const media::AudioParameters test_params_;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 ExpectStatus("closed"); 303 ExpectStatus("closed");
303 } 304 }
304 305
305 INSTANTIATE_TEST_CASE_P( 306 INSTANTIATE_TEST_CASE_P(
306 MediaInternalsAudioLogTest, MediaInternalsAudioLogTest, testing::Values( 307 MediaInternalsAudioLogTest, MediaInternalsAudioLogTest, testing::Values(
307 media::AudioLogFactory::AUDIO_INPUT_CONTROLLER, 308 media::AudioLogFactory::AUDIO_INPUT_CONTROLLER,
308 media::AudioLogFactory::AUDIO_OUTPUT_CONTROLLER, 309 media::AudioLogFactory::AUDIO_OUTPUT_CONTROLLER,
309 media::AudioLogFactory::AUDIO_OUTPUT_STREAM)); 310 media::AudioLogFactory::AUDIO_OUTPUT_STREAM));
310 311
311 } // namespace content 312 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698