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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc

Issue 2510373002: Revert of Move smoothing filter to common audio. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « webrtc/modules/audio_coding/audio_network_adaptor/smoothing_filter_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <memory> 10 #include <memory>
11 11
12 #include "webrtc/modules/audio_coding/audio_network_adaptor/smoothing_filter.h"
12 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" 13 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h"
13 #include "webrtc/system_wrappers/include/clock.h"
14 #include "webrtc/test/gtest.h" 14 #include "webrtc/test/gtest.h"
15 15
16 namespace webrtc { 16 namespace webrtc {
17 namespace { 17 namespace {
18 18
19 constexpr int64_t kClockInitialTime = 123456; 19 constexpr int64_t kClockInitialTime = 123456;
20 20
21 struct AimdRateControlStates { 21 struct AimdRateControlStates {
22 std::unique_ptr<AimdRateControl> aimd_rate_control; 22 std::unique_ptr<AimdRateControl> aimd_rate_control;
23 std::unique_ptr<SimulatedClock> simulated_clock; 23 std::unique_ptr<SimulatedClock> simulated_clock;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 auto states = CreateAimdRateControlStates(); 83 auto states = CreateAimdRateControlStates();
84 constexpr int kBitrate = 300000; 84 constexpr int kBitrate = 300000;
85 InitBitrate(states, kBitrate, states.simulated_clock->TimeInMilliseconds()); 85 InitBitrate(states, kBitrate, states.simulated_clock->TimeInMilliseconds());
86 UpdateRateControl(states, kBwOverusing, kBitrate - 2000, 86 UpdateRateControl(states, kBwOverusing, kBitrate - 2000,
87 states.simulated_clock->TimeInMilliseconds()); 87 states.simulated_clock->TimeInMilliseconds());
88 EXPECT_EQ(rtc::Optional<int>(46700), 88 EXPECT_EQ(rtc::Optional<int>(46700),
89 states.aimd_rate_control->GetLastBitrateDecreaseBps()); 89 states.aimd_rate_control->GetLastBitrateDecreaseBps());
90 } 90 }
91 91
92 } // namespace webrtc 92 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/audio_network_adaptor/smoothing_filter_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698