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

Side by Side Diff: webrtc/modules/audio_coding/audio_network_adaptor/controller_manager_unittest.cc

Issue 2745473003: Resolve cyclic dependency between audio network adaptor and event log api (Closed)
Patch Set: Revert "Activated checks for rtc_event_log_api" Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 DTX, 292 DTX,
293 FRAME_LENGTH, 293 FRAME_LENGTH,
294 BIT_RATE 294 BIT_RATE
295 }; 295 };
296 296
297 void CheckControllersOrder(const std::vector<Controller*>& controllers, 297 void CheckControllersOrder(const std::vector<Controller*>& controllers,
298 const std::vector<ControllerType>& expected_types) { 298 const std::vector<ControllerType>& expected_types) {
299 ASSERT_EQ(expected_types.size(), controllers.size()); 299 ASSERT_EQ(expected_types.size(), controllers.size());
300 300
301 // We also check that the controllers follow the initial settings. 301 // We also check that the controllers follow the initial settings.
302 AudioNetworkAdaptor::EncoderRuntimeConfig encoder_config; 302 AudioEncoderRuntimeConfig encoder_config;
303 303
304 for (size_t i = 0; i < controllers.size(); ++i) { 304 for (size_t i = 0; i < controllers.size(); ++i) {
305 AudioNetworkAdaptor::EncoderRuntimeConfig encoder_config; 305 AudioEncoderRuntimeConfig encoder_config;
306 // We check the order of |controllers| by judging their decisions. 306 // We check the order of |controllers| by judging their decisions.
307 controllers[i]->MakeDecision(&encoder_config); 307 controllers[i]->MakeDecision(&encoder_config);
308 308
309 // Since controllers are not provided with network metrics, they give the 309 // Since controllers are not provided with network metrics, they give the
310 // initial values. 310 // initial values.
311 switch (expected_types[i]) { 311 switch (expected_types[i]) {
312 case ControllerType::FEC: 312 case ControllerType::FEC:
313 EXPECT_EQ(rtc::Optional<bool>(kInitialFecEnabled), 313 EXPECT_EQ(rtc::Optional<bool>(kInitialFecEnabled),
314 encoder_config.enable_fec); 314 encoder_config.enable_fec);
315 break; 315 break;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 // Reorder now. 412 // Reorder now.
413 CheckControllersOrder(controllers, 413 CheckControllersOrder(controllers,
414 std::vector<ControllerType>{ 414 std::vector<ControllerType>{
415 ControllerType::FRAME_LENGTH, ControllerType::FEC, 415 ControllerType::FRAME_LENGTH, ControllerType::FEC,
416 ControllerType::CHANNEL, ControllerType::DTX, 416 ControllerType::CHANNEL, ControllerType::DTX,
417 ControllerType::BIT_RATE}); 417 ControllerType::BIT_RATE});
418 } 418 }
419 #endif // WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP 419 #endif // WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
420 420
421 } // namespace webrtc 421 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698