OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // the bitrate is not specified, i.e. is <= zero, we set it to the | 244 // the bitrate is not specified, i.e. is <= zero, we set it to the |
245 // appropriate default value for mono or stereo Opus. | 245 // appropriate default value for mono or stereo Opus. |
246 | 246 |
247 voe_codec->channels = IsCodecFeatureEnabled(codec, kCodecParamStereo) ? 2 : 1; | 247 voe_codec->channels = IsCodecFeatureEnabled(codec, kCodecParamStereo) ? 2 : 1; |
248 voe_codec->rate = GetOpusBitrate(codec, *max_playback_rate); | 248 voe_codec->rate = GetOpusBitrate(codec, *max_playback_rate); |
249 } | 249 } |
250 | 250 |
251 webrtc::AudioState::Config MakeAudioStateConfig(VoEWrapper* voe_wrapper) { | 251 webrtc::AudioState::Config MakeAudioStateConfig(VoEWrapper* voe_wrapper) { |
252 webrtc::AudioState::Config config; | 252 webrtc::AudioState::Config config; |
253 config.voice_engine = voe_wrapper->engine(); | 253 config.voice_engine = voe_wrapper->engine(); |
| 254 config.audio_device_module = voe_wrapper->base()->audio_device_module(); |
254 return config; | 255 return config; |
255 } | 256 } |
256 | 257 |
257 class WebRtcVoiceCodecs final { | 258 class WebRtcVoiceCodecs final { |
258 public: | 259 public: |
259 // TODO(solenberg): Do this filtering once off-line, add a simple AudioCodec | 260 // TODO(solenberg): Do this filtering once off-line, add a simple AudioCodec |
260 // list and add a test which verifies VoE supports the listed codecs. | 261 // list and add a test which verifies VoE supports the listed codecs. |
261 static std::vector<AudioCodec> SupportedSendCodecs() { | 262 static std::vector<AudioCodec> SupportedSendCodecs() { |
262 std::vector<AudioCodec> result; | 263 std::vector<AudioCodec> result; |
263 // Iterate first over our preferred codecs list, so that the results are | 264 // Iterate first over our preferred codecs list, so that the results are |
(...skipping 2397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2661 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2662 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2662 const auto it = send_streams_.find(ssrc); | 2663 const auto it = send_streams_.find(ssrc); |
2663 if (it != send_streams_.end()) { | 2664 if (it != send_streams_.end()) { |
2664 return it->second->channel(); | 2665 return it->second->channel(); |
2665 } | 2666 } |
2666 return -1; | 2667 return -1; |
2667 } | 2668 } |
2668 } // namespace cricket | 2669 } // namespace cricket |
2669 | 2670 |
2670 #endif // HAVE_WEBRTC_VOICE | 2671 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |