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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 // and deleted before any other members. | 208 // and deleted before any other members. |
209 rtc::TaskQueue worker_queue_; | 209 rtc::TaskQueue worker_queue_; |
210 }; | 210 }; |
211 } // namespace | 211 } // namespace |
212 | 212 |
213 TEST(AudioSendStreamTest, ConfigToString) { | 213 TEST(AudioSendStreamTest, ConfigToString) { |
214 AudioSendStream::Config config(nullptr); | 214 AudioSendStream::Config config(nullptr); |
215 config.rtp.ssrc = kSsrc; | 215 config.rtp.ssrc = kSsrc; |
216 config.rtp.c_name = kCName; | 216 config.rtp.c_name = kCName; |
217 config.voe_channel_id = kChannelId; | 217 config.voe_channel_id = kChannelId; |
218 config.min_bitrate_kbps = 12; | 218 config.min_bitrate_bps = 12000; |
219 config.max_bitrate_kbps = 34; | 219 config.max_bitrate_bps = 34000; |
220 config.send_codec_spec.nack_enabled = true; | 220 config.send_codec_spec.nack_enabled = true; |
221 config.send_codec_spec.transport_cc_enabled = false; | 221 config.send_codec_spec.transport_cc_enabled = false; |
222 config.send_codec_spec.enable_codec_fec = true; | 222 config.send_codec_spec.enable_codec_fec = true; |
223 config.send_codec_spec.enable_opus_dtx = false; | 223 config.send_codec_spec.enable_opus_dtx = false; |
224 config.send_codec_spec.opus_max_playback_rate = 32000; | 224 config.send_codec_spec.opus_max_playback_rate = 32000; |
225 config.send_codec_spec.cng_payload_type = 42; | 225 config.send_codec_spec.cng_payload_type = 42; |
226 config.send_codec_spec.cng_plfreq = 56; | 226 config.send_codec_spec.cng_plfreq = 56; |
227 config.send_codec_spec.min_ptime_ms = 20; | 227 config.send_codec_spec.min_ptime_ms = 20; |
228 config.send_codec_spec.max_ptime_ms = 60; | 228 config.send_codec_spec.max_ptime_ms = 60; |
229 config.send_codec_spec.codec_inst = kIsacCodec; | 229 config.send_codec_spec.codec_inst = kIsacCodec; |
230 config.rtp.extensions.push_back( | 230 config.rtp.extensions.push_back( |
231 RtpExtension(RtpExtension::kAudioLevelUri, kAudioLevelId)); | 231 RtpExtension(RtpExtension::kAudioLevelUri, kAudioLevelId)); |
232 EXPECT_EQ( | 232 EXPECT_EQ( |
233 "{rtp: {ssrc: 1234, extensions: [{uri: " | 233 "{rtp: {ssrc: 1234, extensions: [{uri: " |
234 "urn:ietf:params:rtp-hdrext:ssrc-audio-level, id: 2}], nack: " | 234 "urn:ietf:params:rtp-hdrext:ssrc-audio-level, id: 2}], nack: " |
235 "{rtp_history_ms: 0}, c_name: foo_name}, send_transport: nullptr, " | 235 "{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, min_ptime: 20, max_ptime: " | 239 "32000, cng_payload_type: 42, cng_plfreq: 56, min_ptime: 20, max_ptime: " |
240 "60, codec_inst: {pltype: 103, plname: \"isac\", plfreq: 16000, pacsize: " | 240 "60, codec_inst: {pltype: 103, plname: \"isac\", plfreq: 16000, pacsize: " |
241 "320, channels: 1, rate: 32000}}}", | 241 "320, channels: 1, rate: 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _)) | 376 EXPECT_CALL(*helper.voice_engine(), SetVADStatus(kChannelId, true, _, _)) |
377 .WillOnce(Return(0)); | 377 .WillOnce(Return(0)); |
378 internal::AudioSendStream send_stream( | 378 internal::AudioSendStream send_stream( |
379 stream_config, helper.audio_state(), helper.worker_queue(), | 379 stream_config, helper.audio_state(), helper.worker_queue(), |
380 helper.congestion_controller(), helper.bitrate_allocator(), | 380 helper.congestion_controller(), helper.bitrate_allocator(), |
381 helper.event_log()); | 381 helper.event_log()); |
382 } | 382 } |
383 | 383 |
384 } // namespace test | 384 } // namespace test |
385 } // namespace webrtc | 385 } // namespace webrtc |
OLD | NEW |