| 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 18 matching lines...) Expand all Loading... |
| 29 #include "webrtc/base/gunit.h" | 29 #include "webrtc/base/gunit.h" |
| 30 #include "webrtc/call.h" | 30 #include "webrtc/call.h" |
| 31 #include "talk/media/base/constants.h" | 31 #include "talk/media/base/constants.h" |
| 32 #include "talk/media/base/fakemediaengine.h" | 32 #include "talk/media/base/fakemediaengine.h" |
| 33 #include "talk/media/base/fakemediaprocessor.h" | 33 #include "talk/media/base/fakemediaprocessor.h" |
| 34 #include "talk/media/base/fakenetworkinterface.h" | 34 #include "talk/media/base/fakenetworkinterface.h" |
| 35 #include "talk/media/base/fakertp.h" | 35 #include "talk/media/base/fakertp.h" |
| 36 #include "talk/media/webrtc/fakewebrtccall.h" | 36 #include "talk/media/webrtc/fakewebrtccall.h" |
| 37 #include "talk/media/webrtc/fakewebrtcvoiceengine.h" | 37 #include "talk/media/webrtc/fakewebrtcvoiceengine.h" |
| 38 #include "talk/media/webrtc/webrtcvoiceengine.h" | 38 #include "talk/media/webrtc/webrtcvoiceengine.h" |
| 39 #include "webrtc/p2p/base/fakesession.h" | 39 #include "webrtc/p2p/base/faketransportcontroller.h" |
| 40 #include "talk/session/media/channel.h" | 40 #include "talk/session/media/channel.h" |
| 41 | 41 |
| 42 // Tests for the WebRtcVoiceEngine/VoiceChannel code. | 42 // Tests for the WebRtcVoiceEngine/VoiceChannel code. |
| 43 | 43 |
| 44 using cricket::kRtpAudioLevelHeaderExtension; | 44 using cricket::kRtpAudioLevelHeaderExtension; |
| 45 using cricket::kRtpAbsoluteSenderTimeHeaderExtension; | 45 using cricket::kRtpAbsoluteSenderTimeHeaderExtension; |
| 46 | 46 |
| 47 static const cricket::AudioCodec kPcmuCodec(0, "PCMU", 8000, 64000, 1, 0); | 47 static const cricket::AudioCodec kPcmuCodec(0, "PCMU", 8000, 64000, 1, 0); |
| 48 static const cricket::AudioCodec kIsacCodec(103, "ISAC", 16000, 32000, 1, 0); | 48 static const cricket::AudioCodec kIsacCodec(103, "ISAC", 16000, 32000, 1, 0); |
| 49 static const cricket::AudioCodec kOpusCodec(111, "opus", 48000, 64000, 2, 0); | 49 static const cricket::AudioCodec kOpusCodec(111, "opus", 48000, 64000, 2, 0); |
| (...skipping 3475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3525 cricket::WebRtcVoiceEngine engine; | 3525 cricket::WebRtcVoiceEngine engine; |
| 3526 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); | 3526 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); |
| 3527 rtc::scoped_ptr<webrtc::Call> call( | 3527 rtc::scoped_ptr<webrtc::Call> call( |
| 3528 webrtc::Call::Create(webrtc::Call::Config())); | 3528 webrtc::Call::Create(webrtc::Call::Config())); |
| 3529 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(), | 3529 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(), |
| 3530 call.get()); | 3530 call.get()); |
| 3531 cricket::AudioRecvParameters parameters; | 3531 cricket::AudioRecvParameters parameters; |
| 3532 parameters.codecs = engine.codecs(); | 3532 parameters.codecs = engine.codecs(); |
| 3533 EXPECT_TRUE(channel.SetRecvParameters(parameters)); | 3533 EXPECT_TRUE(channel.SetRecvParameters(parameters)); |
| 3534 } | 3534 } |
| OLD | NEW |