| 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; | 222 config.min_bitrate_bps = 12000; |
| 223 config.max_bitrate_kbps = 34; | 223 config.max_bitrate_bps = 34000; |
| 224 config.send_codec_spec.nack_enabled = true; | 224 config.send_codec_spec.nack_enabled = true; |
| 225 config.send_codec_spec.transport_cc_enabled = false; | 225 config.send_codec_spec.transport_cc_enabled = false; |
| 226 config.send_codec_spec.enable_codec_fec = true; | 226 config.send_codec_spec.enable_codec_fec = true; |
| 227 config.send_codec_spec.enable_opus_dtx = false; | 227 config.send_codec_spec.enable_opus_dtx = false; |
| 228 config.send_codec_spec.opus_max_playback_rate = 32000; | 228 config.send_codec_spec.opus_max_playback_rate = 32000; |
| 229 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; | 230 config.send_codec_spec.cng_plfreq = 56; |
| 231 config.send_codec_spec.codec_inst = kIsacCodec; | 231 config.send_codec_spec.codec_inst = kIsacCodec; |
| 232 EXPECT_EQ( | 232 EXPECT_EQ( |
| 233 "{rtp: {ssrc: 1234, extensions: [{uri: " | 233 "{rtp: {ssrc: 1234, extensions: [{uri: " |
| 234 "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}], " |
| 235 "nack: {rtp_history_ms: 0}, c_name: foo_name}, send_transport: nullptr, " | 235 "nack: {rtp_history_ms: 0}, c_name: foo_name}, send_transport: nullptr, " |
| 236 "voe_channel_id: 1, min_bitrate_kbps: 12, max_bitrate_kbps: 34, " | 236 "voe_channel_id: 1, min_bitrate_bps: 12000, max_bitrate_bps: 34000, " |
| 237 "send_codec_spec: {nack_enabled: true, transport_cc_enabled: false, " | 237 "send_codec_spec: {nack_enabled: true, transport_cc_enabled: false, " |
| 238 "enable_codec_fec: true, enable_opus_dtx: false, opus_max_playback_rate: " | 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: " | 239 "32000, cng_payload_type: 42, cng_plfreq: 56, codec_inst: {pltype: " |
| 240 "103, plname: \"isac\", plfreq: 16000, pacsize: 320, channels: 1, rate: " | 240 "103, plname: \"isac\", plfreq: 16000, pacsize: 320, channels: 1, rate: " |
| 241 "32000}}}", | 241 "32000}}}", |
| 242 config.ToString()); | 242 config.ToString()); |
| 243 } | 243 } |
| 244 | 244 |
| 245 TEST(AudioSendStreamTest, ConstructDestruct) { | 245 TEST(AudioSendStreamTest, ConstructDestruct) { |
| 246 ConfigHelper helper; | 246 ConfigHelper helper; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _)) | 365 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _)) |
| 366 .WillOnce(Return(0)); | 366 .WillOnce(Return(0)); |
| 367 internal::AudioSendStream send_stream( | 367 internal::AudioSendStream send_stream( |
| 368 stream_config, helper.audio_state(), helper.worker_queue(), | 368 stream_config, helper.audio_state(), helper.worker_queue(), |
| 369 helper.congestion_controller(), helper.bitrate_allocator(), | 369 helper.congestion_controller(), helper.bitrate_allocator(), |
| 370 helper.event_log()); | 370 helper.event_log()); |
| 371 } | 371 } |
| 372 | 372 |
| 373 } // namespace test | 373 } // namespace test |
| 374 } // namespace webrtc | 374 } // namespace webrtc |
| OLD | NEW |