OLD | NEW |
---|---|
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 |
11 #include <memory> | 11 #include <memory> |
12 | 12 |
13 #include "webrtc/modules/audio_coding/audio_network_adaptor/channel_controller.h " | 13 #include "webrtc/modules/audio_coding/audio_network_adaptor/channel_controller.h " |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "webrtc/base/gtest.h" |
kjellander_webrtc
2016/09/23 12:32:38
sort
| |
15 | 15 |
16 namespace webrtc { | 16 namespace webrtc { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 constexpr int kNumChannels = 2; | 20 constexpr int kNumChannels = 2; |
21 constexpr int kChannel1To2BandwidthBps = 31000; | 21 constexpr int kChannel1To2BandwidthBps = 31000; |
22 constexpr int kChannel2To1BandwidthBps = 29000; | 22 constexpr int kChannel2To1BandwidthBps = 29000; |
23 constexpr int kMediumBandwidthBps = | 23 constexpr int kMediumBandwidthBps = |
24 (kChannel1To2BandwidthBps + kChannel2To1BandwidthBps) / 2; | 24 (kChannel1To2BandwidthBps + kChannel2To1BandwidthBps) / 2; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 // Use between-thresholds bandwidth to check output remains at 2. | 104 // Use between-thresholds bandwidth to check output remains at 2. |
105 metrics.uplink_bandwidth_bps = rtc::Optional<int>(kMediumBandwidthBps); | 105 metrics.uplink_bandwidth_bps = rtc::Optional<int>(kMediumBandwidthBps); |
106 CheckDecision(controller.get(), metrics, 2); | 106 CheckDecision(controller.get(), metrics, 2); |
107 | 107 |
108 // Use low bandwidth to check output switch to 1. | 108 // Use low bandwidth to check output switch to 1. |
109 metrics.uplink_bandwidth_bps = rtc::Optional<int>(kChannel2To1BandwidthBps); | 109 metrics.uplink_bandwidth_bps = rtc::Optional<int>(kChannel2To1BandwidthBps); |
110 CheckDecision(controller.get(), metrics, 1); | 110 CheckDecision(controller.get(), metrics, 1); |
111 } | 111 } |
112 | 112 |
113 } // namespace webrtc | 113 } // namespace webrtc |
OLD | NEW |