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

Side by Side Diff: webrtc/audio/audio_send_stream_unittest.cc

Issue 2452643002: Revert of Clean up logging in AudioSendStream::SetupSendCodec(). (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/audio/audio_send_stream.cc ('k') | webrtc/config.h » ('j') | 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 }; 212 };
213 } // namespace 213 } // namespace
214 214
215 TEST(AudioSendStreamTest, ConfigToString) { 215 TEST(AudioSendStreamTest, ConfigToString) {
216 AudioSendStream::Config config(nullptr); 216 AudioSendStream::Config config(nullptr);
217 config.rtp.ssrc = kSsrc; 217 config.rtp.ssrc = kSsrc;
218 config.rtp.extensions.push_back( 218 config.rtp.extensions.push_back(
219 RtpExtension(RtpExtension::kAbsSendTimeUri, kAbsSendTimeId)); 219 RtpExtension(RtpExtension::kAbsSendTimeUri, kAbsSendTimeId));
220 config.rtp.c_name = kCName; 220 config.rtp.c_name = kCName;
221 config.voe_channel_id = kChannelId; 221 config.voe_channel_id = kChannelId;
222 config.min_bitrate_kbps = 12;
223 config.max_bitrate_kbps = 34;
224 config.send_codec_spec.nack_enabled = true;
225 config.send_codec_spec.transport_cc_enabled = false;
226 config.send_codec_spec.enable_codec_fec = true;
227 config.send_codec_spec.enable_opus_dtx = false;
228 config.send_codec_spec.opus_max_playback_rate = 32000;
229 config.send_codec_spec.cng_payload_type = 42; 222 config.send_codec_spec.cng_payload_type = 42;
230 config.send_codec_spec.cng_plfreq = 56;
231 config.send_codec_spec.codec_inst = kIsacCodec;
232 EXPECT_EQ( 223 EXPECT_EQ(
233 "{rtp: {ssrc: 1234, extensions: [{uri: " 224 "{rtp: {ssrc: 1234, extensions: [{uri: "
234 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time, id: 3}], " 225 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time, id: 3}], "
235 "nack: {rtp_history_ms: 0}, c_name: foo_name}, send_transport: nullptr, " 226 "nack: {rtp_history_ms: 0}, c_name: foo_name}, voe_channel_id: 1, "
236 "voe_channel_id: 1, min_bitrate_kbps: 12, max_bitrate_kbps: 34, " 227 "cng_payload_type: 42}",
237 "send_codec_spec: {nack_enabled: true, transport_cc_enabled: false, "
238 "enable_codec_fec: true, enable_opus_dtx: false, opus_max_playback_rate: "
239 "32000, cng_payload_type: 42, cng_plfreq: 56, codec_inst: {pltype: "
240 "103, plname: \"isac\", plfreq: 16000, pacsize: 320, channels: 1, rate: "
241 "32000}}}",
242 config.ToString()); 228 config.ToString());
243 } 229 }
244 230
245 TEST(AudioSendStreamTest, ConstructDestruct) { 231 TEST(AudioSendStreamTest, ConstructDestruct) {
246 ConfigHelper helper; 232 ConfigHelper helper;
247 internal::AudioSendStream send_stream( 233 internal::AudioSendStream send_stream(
248 helper.config(), helper.audio_state(), helper.worker_queue(), 234 helper.config(), helper.audio_state(), helper.worker_queue(),
249 helper.congestion_controller(), helper.bitrate_allocator(), 235 helper.congestion_controller(), helper.bitrate_allocator(),
250 helper.event_log()); 236 helper.event_log());
251 } 237 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _)) 351 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _))
366 .WillOnce(Return(0)); 352 .WillOnce(Return(0));
367 internal::AudioSendStream send_stream( 353 internal::AudioSendStream send_stream(
368 stream_config, helper.audio_state(), helper.worker_queue(), 354 stream_config, helper.audio_state(), helper.worker_queue(),
369 helper.congestion_controller(), helper.bitrate_allocator(), 355 helper.congestion_controller(), helper.bitrate_allocator(),
370 helper.event_log()); 356 helper.event_log());
371 } 357 }
372 358
373 } // namespace test 359 } // namespace test
374 } // namespace webrtc 360 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_send_stream.cc ('k') | webrtc/config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698