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

Side by Side Diff: webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc

Issue 1929863002: NetEq: Use TickTimer in DelayManager (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@delay-pdt-tick-timer
Patch Set: Created 4 years, 7 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
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_impl.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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 std::unique_ptr<MockDelayPeakDetector> mock( 84 std::unique_ptr<MockDelayPeakDetector> mock(
85 new MockDelayPeakDetector(tick_timer_)); 85 new MockDelayPeakDetector(tick_timer_));
86 mock_delay_peak_detector_ = mock.get(); 86 mock_delay_peak_detector_ = mock.get();
87 EXPECT_CALL(*mock_delay_peak_detector_, Reset()).Times(1); 87 EXPECT_CALL(*mock_delay_peak_detector_, Reset()).Times(1);
88 deps.delay_peak_detector = std::move(mock); 88 deps.delay_peak_detector = std::move(mock);
89 } 89 }
90 delay_peak_detector_ = deps.delay_peak_detector.get(); 90 delay_peak_detector_ = deps.delay_peak_detector.get();
91 91
92 if (use_mock_delay_manager_) { 92 if (use_mock_delay_manager_) {
93 std::unique_ptr<MockDelayManager> mock(new MockDelayManager( 93 std::unique_ptr<MockDelayManager> mock(new MockDelayManager(
94 config_.max_packets_in_buffer, delay_peak_detector_)); 94 config_.max_packets_in_buffer, delay_peak_detector_, tick_timer_));
95 mock_delay_manager_ = mock.get(); 95 mock_delay_manager_ = mock.get();
96 EXPECT_CALL(*mock_delay_manager_, set_streaming_mode(false)).Times(1); 96 EXPECT_CALL(*mock_delay_manager_, set_streaming_mode(false)).Times(1);
97 deps.delay_manager = std::move(mock); 97 deps.delay_manager = std::move(mock);
98 } 98 }
99 delay_manager_ = deps.delay_manager.get(); 99 delay_manager_ = deps.delay_manager.get();
100 100
101 if (use_mock_dtmf_buffer_) { 101 if (use_mock_dtmf_buffer_) {
102 std::unique_ptr<MockDtmfBuffer> mock( 102 std::unique_ptr<MockDtmfBuffer> mock(
103 new MockDtmfBuffer(config_.sample_rate_hz)); 103 new MockDtmfBuffer(config_.sample_rate_hz));
104 mock_dtmf_buffer_ = mock.get(); 104 mock_dtmf_buffer_ = mock.get();
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 UseNoMocks(); 1174 UseNoMocks();
1175 CreateInstance(); 1175 CreateInstance();
1176 ASSERT_TRUE(tick_timer_); 1176 ASSERT_TRUE(tick_timer_);
1177 EXPECT_EQ(0u, tick_timer_->ticks()); 1177 EXPECT_EQ(0u, tick_timer_->ticks());
1178 AudioFrame output; 1178 AudioFrame output;
1179 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output)); 1179 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output));
1180 EXPECT_EQ(1u, tick_timer_->ticks()); 1180 EXPECT_EQ(1u, tick_timer_->ticks());
1181 } 1181 }
1182 1182
1183 }// namespace webrtc 1183 }// namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698