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

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

Issue 1917913002: NetEq: Use TickTimer in PacketBuffer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@add-tick-timer-to-neteq
Patch Set: Remove superfluous comment 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
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } else { 123 } else {
124 dtmf_buffer_ = new DtmfBuffer(config_.sample_rate_hz); 124 dtmf_buffer_ = new DtmfBuffer(config_.sample_rate_hz);
125 } 125 }
126 if (use_mock_dtmf_tone_generator_) { 126 if (use_mock_dtmf_tone_generator_) {
127 mock_dtmf_tone_generator_ = new MockDtmfToneGenerator; 127 mock_dtmf_tone_generator_ = new MockDtmfToneGenerator;
128 dtmf_tone_generator_ = mock_dtmf_tone_generator_; 128 dtmf_tone_generator_ = mock_dtmf_tone_generator_;
129 } else { 129 } else {
130 dtmf_tone_generator_ = new DtmfToneGenerator; 130 dtmf_tone_generator_ = new DtmfToneGenerator;
131 } 131 }
132 if (use_mock_packet_buffer_) { 132 if (use_mock_packet_buffer_) {
133 mock_packet_buffer_ = new MockPacketBuffer(config_.max_packets_in_buffer); 133 mock_packet_buffer_ =
134 new MockPacketBuffer(config_.max_packets_in_buffer, tick_timer_);
134 packet_buffer_ = mock_packet_buffer_; 135 packet_buffer_ = mock_packet_buffer_;
135 } else { 136 } else {
136 packet_buffer_ = new PacketBuffer(config_.max_packets_in_buffer); 137 packet_buffer_ =
138 new PacketBuffer(config_.max_packets_in_buffer, tick_timer_);
137 } 139 }
138 if (use_mock_payload_splitter_) { 140 if (use_mock_payload_splitter_) {
139 mock_payload_splitter_ = new MockPayloadSplitter; 141 mock_payload_splitter_ = new MockPayloadSplitter;
140 payload_splitter_ = mock_payload_splitter_; 142 payload_splitter_ = mock_payload_splitter_;
141 } else { 143 } else {
142 payload_splitter_ = new PayloadSplitter; 144 payload_splitter_ = new PayloadSplitter;
143 } 145 }
144 timestamp_scaler_ = new TimestampScaler(*decoder_database_); 146 timestamp_scaler_ = new TimestampScaler(*decoder_database_);
145 AccelerateFactory* accelerate_factory = new AccelerateFactory; 147 AccelerateFactory* accelerate_factory = new AccelerateFactory;
146 ExpandFactory* expand_factory = new ExpandFactory; 148 ExpandFactory* expand_factory = new ExpandFactory;
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 UseNoMocks(); 1199 UseNoMocks();
1198 CreateInstance(); 1200 CreateInstance();
1199 ASSERT_TRUE(tick_timer_); 1201 ASSERT_TRUE(tick_timer_);
1200 EXPECT_EQ(0u, tick_timer_->ticks()); 1202 EXPECT_EQ(0u, tick_timer_->ticks());
1201 AudioFrame output; 1203 AudioFrame output;
1202 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output)); 1204 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output));
1203 EXPECT_EQ(1u, tick_timer_->ticks()); 1205 EXPECT_EQ(1u, tick_timer_->ticks());
1204 } 1206 }
1205 1207
1206 }// namespace webrtc 1208 }// namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_impl.cc ('k') | webrtc/modules/audio_coding/neteq/packet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698