OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2010 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 return transmit_mixer_; | 110 return transmit_mixer_; |
111 } | 111 } |
112 WEBRTC_FUNC(CreateChannel, ()) { | 112 WEBRTC_FUNC(CreateChannel, ()) { |
113 return CreateChannel(webrtc::VoEBase::ChannelConfig()); | 113 return CreateChannel(webrtc::VoEBase::ChannelConfig()); |
114 } | 114 } |
115 WEBRTC_FUNC(CreateChannel, (const webrtc::VoEBase::ChannelConfig& config)) { | 115 WEBRTC_FUNC(CreateChannel, (const webrtc::VoEBase::ChannelConfig& config)) { |
116 if (fail_create_channel_) { | 116 if (fail_create_channel_) { |
117 return -1; | 117 return -1; |
118 } | 118 } |
119 Channel* ch = new Channel(); | 119 Channel* ch = new Channel(); |
| 120 auto db = webrtc::acm2::RentACodec::Database(); |
| 121 ch->recv_codecs.assign(db.begin(), db.end()); |
120 ch->neteq_capacity = config.acm_config.neteq_config.max_packets_in_buffer; | 122 ch->neteq_capacity = config.acm_config.neteq_config.max_packets_in_buffer; |
121 ch->neteq_fast_accelerate = | 123 ch->neteq_fast_accelerate = |
122 config.acm_config.neteq_config.enable_fast_accelerate; | 124 config.acm_config.neteq_config.enable_fast_accelerate; |
123 channels_[++last_channel_] = ch; | 125 channels_[++last_channel_] = ch; |
124 return last_channel_; | 126 return last_channel_; |
125 } | 127 } |
126 WEBRTC_FUNC(DeleteChannel, (int channel)) { | 128 WEBRTC_FUNC(DeleteChannel, (int channel)) { |
127 WEBRTC_CHECK_CHANNEL(channel); | 129 WEBRTC_CHECK_CHANNEL(channel); |
128 delete channels_[channel]; | 130 delete channels_[channel]; |
129 channels_.erase(channel); | 131 channels_.erase(channel); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 bool fail_create_channel_ = false; | 220 bool fail_create_channel_ = false; |
219 webrtc::AudioProcessing* apm_ = nullptr; | 221 webrtc::AudioProcessing* apm_ = nullptr; |
220 webrtc::voe::TransmitMixer* transmit_mixer_ = nullptr; | 222 webrtc::voe::TransmitMixer* transmit_mixer_ = nullptr; |
221 | 223 |
222 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FakeWebRtcVoiceEngine); | 224 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FakeWebRtcVoiceEngine); |
223 }; | 225 }; |
224 | 226 |
225 } // namespace cricket | 227 } // namespace cricket |
226 | 228 |
227 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ | 229 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ |
OLD | NEW |