OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2008 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 3393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3404 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | 3404 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( |
3405 cricket::AudioCodec(96, "ISAC", 16000, 0, 1), nullptr)); | 3405 cricket::AudioCodec(96, "ISAC", 16000, 0, 1), nullptr)); |
3406 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | 3406 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( |
3407 cricket::AudioCodec(96, "ISAC", 32000, 0, 1), nullptr)); | 3407 cricket::AudioCodec(96, "ISAC", 32000, 0, 1), nullptr)); |
3408 // Check that name matching is case-insensitive. | 3408 // Check that name matching is case-insensitive. |
3409 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | 3409 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( |
3410 cricket::AudioCodec(96, "ILBC", 8000, 0, 1), nullptr)); | 3410 cricket::AudioCodec(96, "ILBC", 8000, 0, 1), nullptr)); |
3411 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | 3411 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( |
3412 cricket::AudioCodec(96, "iLBC", 8000, 0, 1), nullptr)); | 3412 cricket::AudioCodec(96, "iLBC", 8000, 0, 1), nullptr)); |
3413 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | 3413 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( |
3414 cricket::AudioCodec(96, "PCMU", 8000, 0, 1), nullptr)); | |
3415 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | |
3416 cricket::AudioCodec(96, "PCMA", 8000, 0, 1), nullptr)); | |
3417 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | |
3418 cricket::AudioCodec(96, "G722", 8000, 0, 1), nullptr)); | |
3419 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | |
3420 cricket::AudioCodec(96, "CN", 32000, 0, 1), nullptr)); | 3414 cricket::AudioCodec(96, "CN", 32000, 0, 1), nullptr)); |
3421 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | 3415 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( |
3422 cricket::AudioCodec(96, "CN", 16000, 0, 1), nullptr)); | 3416 cricket::AudioCodec(96, "CN", 16000, 0, 1), nullptr)); |
3423 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | 3417 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( |
3424 cricket::AudioCodec(96, "CN", 8000, 0, 1), nullptr)); | |
3425 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | |
3426 cricket::AudioCodec(96, "telephone-event", 8000, 0, 1), nullptr)); | 3418 cricket::AudioCodec(96, "telephone-event", 8000, 0, 1), nullptr)); |
3427 // Check codecs with an id by id. | 3419 // Check codecs with an id by id. |
3428 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | 3420 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( |
3429 cricket::AudioCodec(0, "", 8000, 0, 1), nullptr)); // PCMU | 3421 cricket::AudioCodec(0, "", 8000, 0, 1), nullptr)); // PCMU |
3430 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | 3422 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( |
3431 cricket::AudioCodec(8, "", 8000, 0, 1), nullptr)); // PCMA | 3423 cricket::AudioCodec(8, "", 8000, 0, 1), nullptr)); // PCMA |
3432 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | 3424 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( |
3433 cricket::AudioCodec(9, "", 8000, 0, 1), nullptr)); // G722 | 3425 cricket::AudioCodec(9, "", 8000, 0, 1), nullptr)); // G722 |
3434 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( | 3426 EXPECT_TRUE(cricket::WebRtcVoiceEngine::ToCodecInst( |
3435 cricket::AudioCodec(13, "", 8000, 0, 1), nullptr)); // CN | 3427 cricket::AudioCodec(13, "", 8000, 0, 1), nullptr)); // CN |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3517 nullptr, webrtc::CreateBuiltinAudioDecoderFactory()); | 3509 nullptr, webrtc::CreateBuiltinAudioDecoderFactory()); |
3518 webrtc::RtcEventLogNullImpl event_log; | 3510 webrtc::RtcEventLogNullImpl event_log; |
3519 std::unique_ptr<webrtc::Call> call( | 3511 std::unique_ptr<webrtc::Call> call( |
3520 webrtc::Call::Create(webrtc::Call::Config(&event_log))); | 3512 webrtc::Call::Create(webrtc::Call::Config(&event_log))); |
3521 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::MediaConfig(), | 3513 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::MediaConfig(), |
3522 cricket::AudioOptions(), call.get()); | 3514 cricket::AudioOptions(), call.get()); |
3523 cricket::AudioRecvParameters parameters; | 3515 cricket::AudioRecvParameters parameters; |
3524 parameters.codecs = engine.recv_codecs(); | 3516 parameters.codecs = engine.recv_codecs(); |
3525 EXPECT_TRUE(channel.SetRecvParameters(parameters)); | 3517 EXPECT_TRUE(channel.SetRecvParameters(parameters)); |
3526 } | 3518 } |
OLD | NEW |