| 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 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 int receive_channel_id; | 63 int receive_channel_id; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 void CreateVoiceEngine(VoiceEngineState* voe, | 66 void CreateVoiceEngine(VoiceEngineState* voe, |
| 67 rtc::scoped_refptr<webrtc::AudioDecoderFactory> | 67 rtc::scoped_refptr<webrtc::AudioDecoderFactory> |
| 68 decoder_factory) { | 68 decoder_factory) { |
| 69 voe->voice_engine = webrtc::VoiceEngine::Create(); | 69 voe->voice_engine = webrtc::VoiceEngine::Create(); |
| 70 voe->base = webrtc::VoEBase::GetInterface(voe->voice_engine); | 70 voe->base = webrtc::VoEBase::GetInterface(voe->voice_engine); |
| 71 voe->codec = webrtc::VoECodec::GetInterface(voe->voice_engine); | 71 voe->codec = webrtc::VoECodec::GetInterface(voe->voice_engine); |
| 72 EXPECT_EQ(0, voe->base->Init(nullptr, nullptr, decoder_factory)); | 72 EXPECT_EQ(0, voe->base->Init(nullptr, nullptr, decoder_factory)); |
| 73 webrtc::Config voe_config; | 73 webrtc::VoEBase::ChannelConfig config; |
| 74 voe_config.Set<webrtc::VoicePacing>(new webrtc::VoicePacing(true)); | 74 config.enable_voice_pacing = true; |
| 75 voe->send_channel_id = voe->base->CreateChannel(voe_config); | 75 voe->send_channel_id = voe->base->CreateChannel(config); |
| 76 EXPECT_GE(voe->send_channel_id, 0); | 76 EXPECT_GE(voe->send_channel_id, 0); |
| 77 voe->receive_channel_id = voe->base->CreateChannel(); | 77 voe->receive_channel_id = voe->base->CreateChannel(); |
| 78 EXPECT_GE(voe->receive_channel_id, 0); | 78 EXPECT_GE(voe->receive_channel_id, 0); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void DestroyVoiceEngine(VoiceEngineState* voe) { | 81 void DestroyVoiceEngine(VoiceEngineState* voe) { |
| 82 voe->base->DeleteChannel(voe->send_channel_id); | 82 voe->base->DeleteChannel(voe->send_channel_id); |
| 83 voe->send_channel_id = -1; | 83 voe->send_channel_id = -1; |
| 84 voe->base->DeleteChannel(voe->receive_channel_id); | 84 voe->base->DeleteChannel(voe->receive_channel_id); |
| 85 voe->receive_channel_id = -1; | 85 voe->receive_channel_id = -1; |
| (...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 call->DestroyAudioSendStream(audio_send_stream_); | 1301 call->DestroyAudioSendStream(audio_send_stream_); |
| 1302 call->DestroyAudioReceiveStream(audio_receive_stream); | 1302 call->DestroyAudioReceiveStream(audio_receive_stream); |
| 1303 } | 1303 } |
| 1304 | 1304 |
| 1305 transport.StopSending(); | 1305 transport.StopSending(); |
| 1306 if (params_.audio) | 1306 if (params_.audio) |
| 1307 DestroyVoiceEngine(&voe); | 1307 DestroyVoiceEngine(&voe); |
| 1308 } | 1308 } |
| 1309 | 1309 |
| 1310 } // namespace webrtc | 1310 } // namespace webrtc |
| OLD | NEW |