OLD | NEW |
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 Loading... |
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; |
222 config.send_codec_spec.cng_payload_type = 42; | 229 config.send_codec_spec.cng_payload_type = 42; |
| 230 config.send_codec_spec.cng_plfreq = 56; |
| 231 config.send_codec_spec.codec_inst = kIsacCodec; |
223 EXPECT_EQ( | 232 EXPECT_EQ( |
224 "{rtp: {ssrc: 1234, extensions: [{uri: " | 233 "{rtp: {ssrc: 1234, extensions: [{uri: " |
225 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time, id: 3}], " | 234 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time, id: 3}], " |
226 "nack: {rtp_history_ms: 0}, c_name: foo_name}, voe_channel_id: 1, " | 235 "nack: {rtp_history_ms: 0}, c_name: foo_name}, send_transport: nullptr, " |
227 "cng_payload_type: 42}", | 236 "voe_channel_id: 1, min_bitrate_kbps: 12, max_bitrate_kbps: 34, " |
| 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}}}", |
228 config.ToString()); | 242 config.ToString()); |
229 } | 243 } |
230 | 244 |
231 TEST(AudioSendStreamTest, ConstructDestruct) { | 245 TEST(AudioSendStreamTest, ConstructDestruct) { |
232 ConfigHelper helper; | 246 ConfigHelper helper; |
233 internal::AudioSendStream send_stream( | 247 internal::AudioSendStream send_stream( |
234 helper.config(), helper.audio_state(), helper.worker_queue(), | 248 helper.config(), helper.audio_state(), helper.worker_queue(), |
235 helper.congestion_controller(), helper.bitrate_allocator(), | 249 helper.congestion_controller(), helper.bitrate_allocator(), |
236 helper.event_log()); | 250 helper.event_log()); |
237 } | 251 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _)) | 365 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _)) |
352 .WillOnce(Return(0)); | 366 .WillOnce(Return(0)); |
353 internal::AudioSendStream send_stream( | 367 internal::AudioSendStream send_stream( |
354 stream_config, helper.audio_state(), helper.worker_queue(), | 368 stream_config, helper.audio_state(), helper.worker_queue(), |
355 helper.congestion_controller(), helper.bitrate_allocator(), | 369 helper.congestion_controller(), helper.bitrate_allocator(), |
356 helper.event_log()); | 370 helper.event_log()); |
357 } | 371 } |
358 | 372 |
359 } // namespace test | 373 } // namespace test |
360 } // namespace webrtc | 374 } // namespace webrtc |
OLD | NEW |