| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 const cricket::AudioCodec kCn16000Codec(105, "CN", 16000, 0, 1, 0); | 54 const cricket::AudioCodec kCn16000Codec(105, "CN", 16000, 0, 1, 0); |
| 55 const cricket::AudioCodec kTelephoneEventCodec(106, "telephone-event", 8000, 0, | 55 const cricket::AudioCodec kTelephoneEventCodec(106, "telephone-event", 8000, 0, |
| 56 1, 0); | 56 1, 0); |
| 57 const uint32_t kSsrc1 = 0x99; | 57 const uint32_t kSsrc1 = 0x99; |
| 58 const uint32_t kSsrc2 = 0x98; | 58 const uint32_t kSsrc2 = 0x98; |
| 59 const uint32_t kSsrcs4[] = { 1, 2, 3, 4 }; | 59 const uint32_t kSsrcs4[] = { 1, 2, 3, 4 }; |
| 60 | 60 |
| 61 class FakeVoEWrapper : public cricket::VoEWrapper { | 61 class FakeVoEWrapper : public cricket::VoEWrapper { |
| 62 public: | 62 public: |
| 63 explicit FakeVoEWrapper(cricket::FakeWebRtcVoiceEngine* engine) | 63 explicit FakeVoEWrapper(cricket::FakeWebRtcVoiceEngine* engine) |
| 64 : cricket::VoEWrapper(engine, // processing | 64 : cricket::VoEWrapper(engine, // processing |
| 65 engine, // base | 65 engine, // base |
| 66 engine, // codec | 66 engine, // codec |
| 67 engine, // hw | 67 engine, // hw |
| 68 engine, // network | 68 engine, // network |
| 69 engine, // rtp | 69 engine, // rtp |
| 70 engine) { // volume | 70 engine, // volume |
| 71 nullptr) { // external_media |
| 71 } | 72 } |
| 72 }; | 73 }; |
| 73 } // namespace | 74 } // namespace |
| 74 | 75 |
| 75 class WebRtcVoiceEngineTestFake : public testing::Test { | 76 class WebRtcVoiceEngineTestFake : public testing::Test { |
| 76 public: | 77 public: |
| 77 WebRtcVoiceEngineTestFake() | 78 WebRtcVoiceEngineTestFake() |
| 78 : call_(webrtc::Call::Config()), | 79 : call_(webrtc::Call::Config()), |
| 79 engine_(new FakeVoEWrapper(&voe_)), | 80 engine_(new FakeVoEWrapper(&voe_)), |
| 80 channel_(nullptr) { | 81 channel_(nullptr) { |
| (...skipping 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3238 cricket::WebRtcVoiceEngine engine; | 3239 cricket::WebRtcVoiceEngine engine; |
| 3239 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); | 3240 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); |
| 3240 rtc::scoped_ptr<webrtc::Call> call( | 3241 rtc::scoped_ptr<webrtc::Call> call( |
| 3241 webrtc::Call::Create(webrtc::Call::Config())); | 3242 webrtc::Call::Create(webrtc::Call::Config())); |
| 3242 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(), | 3243 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(), |
| 3243 call.get()); | 3244 call.get()); |
| 3244 cricket::AudioRecvParameters parameters; | 3245 cricket::AudioRecvParameters parameters; |
| 3245 parameters.codecs = engine.codecs(); | 3246 parameters.codecs = engine.codecs(); |
| 3246 EXPECT_TRUE(channel.SetRecvParameters(parameters)); | 3247 EXPECT_TRUE(channel.SetRecvParameters(parameters)); |
| 3247 } | 3248 } |
| OLD | NEW |