OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2008 Google Inc. | 3 * Copyright 2008 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 3244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3255 EXPECT_TRUE(channel != nullptr); | 3255 EXPECT_TRUE(channel != nullptr); |
3256 delete channel; | 3256 delete channel; |
3257 engine.Terminate(); | 3257 engine.Terminate(); |
3258 | 3258 |
3259 // Reinit to catch regression where VoiceEngineObserver reference is lost | 3259 // Reinit to catch regression where VoiceEngineObserver reference is lost |
3260 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); | 3260 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); |
3261 engine.Terminate(); | 3261 engine.Terminate(); |
3262 } | 3262 } |
3263 | 3263 |
3264 // Tests that the library is configured with the codecs we want. | 3264 // Tests that the library is configured with the codecs we want. |
3265 TEST(WebRtcVoiceEngineTest, HasCorrectCodecs) { | 3265 TEST(WebRtcVoiceEngineTest, DISABLED_HasCorrectCodecs) { |
3266 cricket::WebRtcVoiceEngine engine; | 3266 cricket::WebRtcVoiceEngine engine; |
3267 // Check codecs by name. | 3267 // Check codecs by name. |
3268 EXPECT_TRUE(engine.FindCodec( | 3268 EXPECT_TRUE(engine.FindCodec( |
3269 cricket::AudioCodec(96, "OPUS", 48000, 0, 2, 0))); | 3269 cricket::AudioCodec(96, "OPUS", 48000, 0, 2, 0))); |
3270 EXPECT_TRUE(engine.FindCodec( | 3270 EXPECT_TRUE(engine.FindCodec( |
3271 cricket::AudioCodec(96, "ISAC", 16000, 0, 1, 0))); | 3271 cricket::AudioCodec(96, "ISAC", 16000, 0, 1, 0))); |
3272 EXPECT_TRUE(engine.FindCodec( | 3272 EXPECT_TRUE(engine.FindCodec( |
3273 cricket::AudioCodec(96, "ISAC", 32000, 0, 1, 0))); | 3273 cricket::AudioCodec(96, "ISAC", 32000, 0, 1, 0))); |
3274 // Check that name matching is case-insensitive. | 3274 // Check that name matching is case-insensitive. |
3275 EXPECT_TRUE(engine.FindCodec( | 3275 EXPECT_TRUE(engine.FindCodec( |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3373 cricket::WebRtcVoiceEngine engine; | 3373 cricket::WebRtcVoiceEngine engine; |
3374 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); | 3374 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); |
3375 rtc::scoped_ptr<webrtc::Call> call( | 3375 rtc::scoped_ptr<webrtc::Call> call( |
3376 webrtc::Call::Create(webrtc::Call::Config())); | 3376 webrtc::Call::Create(webrtc::Call::Config())); |
3377 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(), | 3377 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(), |
3378 call.get()); | 3378 call.get()); |
3379 cricket::AudioRecvParameters parameters; | 3379 cricket::AudioRecvParameters parameters; |
3380 parameters.codecs = engine.codecs(); | 3380 parameters.codecs = engine.codecs(); |
3381 EXPECT_TRUE(channel.SetRecvParameters(parameters)); | 3381 EXPECT_TRUE(channel.SetRecvParameters(parameters)); |
3382 } | 3382 } |
OLD | NEW |