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 19 matching lines...) Expand all Loading... |
30 #include "webrtc/base/stringencode.h" | 30 #include "webrtc/base/stringencode.h" |
31 #include "webrtc/base/stringutils.h" | 31 #include "webrtc/base/stringutils.h" |
32 #include "webrtc/base/trace_event.h" | 32 #include "webrtc/base/trace_event.h" |
33 #include "webrtc/media/base/audiosource.h" | 33 #include "webrtc/media/base/audiosource.h" |
34 #include "webrtc/media/base/mediaconstants.h" | 34 #include "webrtc/media/base/mediaconstants.h" |
35 #include "webrtc/media/base/streamparams.h" | 35 #include "webrtc/media/base/streamparams.h" |
36 #include "webrtc/media/engine/payload_type_mapper.h" | 36 #include "webrtc/media/engine/payload_type_mapper.h" |
37 #include "webrtc/media/engine/webrtcmediaengine.h" | 37 #include "webrtc/media/engine/webrtcmediaengine.h" |
38 #include "webrtc/media/engine/webrtcvoe.h" | 38 #include "webrtc/media/engine/webrtcvoe.h" |
39 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" | 39 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" |
| 40 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" |
40 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 41 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
41 #include "webrtc/system_wrappers/include/field_trial.h" | 42 #include "webrtc/system_wrappers/include/field_trial.h" |
42 #include "webrtc/system_wrappers/include/trace.h" | 43 #include "webrtc/system_wrappers/include/trace.h" |
43 | 44 |
44 namespace cricket { | 45 namespace cricket { |
45 namespace { | 46 namespace { |
46 | 47 |
47 const int kDefaultTraceFilter = webrtc::kTraceNone | webrtc::kTraceTerseInfo | | 48 const int kDefaultTraceFilter = webrtc::kTraceNone | webrtc::kTraceTerseInfo | |
48 webrtc::kTraceWarning | webrtc::kTraceError | | 49 webrtc::kTraceWarning | webrtc::kTraceError | |
49 webrtc::kTraceCritical; | 50 webrtc::kTraceCritical; |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 // voe_codec.channels to 2 if "stereo=1" and 1 otherwise. If | 273 // voe_codec.channels to 2 if "stereo=1" and 1 otherwise. If |
273 // the bitrate is not specified, i.e. is <= zero, we set it to the | 274 // the bitrate is not specified, i.e. is <= zero, we set it to the |
274 // appropriate default value for mono or stereo Opus. | 275 // appropriate default value for mono or stereo Opus. |
275 voe_codec->channels = IsCodecFeatureEnabled(codec, kCodecParamStereo) ? 2 : 1; | 276 voe_codec->channels = IsCodecFeatureEnabled(codec, kCodecParamStereo) ? 2 : 1; |
276 voe_codec->rate = GetOpusBitrate(codec, *max_playback_rate); | 277 voe_codec->rate = GetOpusBitrate(codec, *max_playback_rate); |
277 } | 278 } |
278 | 279 |
279 webrtc::AudioState::Config MakeAudioStateConfig(VoEWrapper* voe_wrapper) { | 280 webrtc::AudioState::Config MakeAudioStateConfig(VoEWrapper* voe_wrapper) { |
280 webrtc::AudioState::Config config; | 281 webrtc::AudioState::Config config; |
281 config.voice_engine = voe_wrapper->engine(); | 282 config.voice_engine = voe_wrapper->engine(); |
| 283 config.audio_mixer = webrtc::AudioMixerImpl::Create(); |
282 return config; | 284 return config; |
283 } | 285 } |
284 | 286 |
285 class WebRtcVoiceCodecs final { | 287 class WebRtcVoiceCodecs final { |
286 public: | 288 public: |
287 // TODO(solenberg): Do this filtering once off-line, add a simple AudioCodec | 289 // TODO(solenberg): Do this filtering once off-line, add a simple AudioCodec |
288 // list and add a test which verifies VoE supports the listed codecs. | 290 // list and add a test which verifies VoE supports the listed codecs. |
289 static std::vector<AudioCodec> SupportedSendCodecs() { | 291 static std::vector<AudioCodec> SupportedSendCodecs() { |
290 std::vector<AudioCodec> result; | 292 std::vector<AudioCodec> result; |
291 // Iterate first over our preferred codecs list, so that the results are | 293 // Iterate first over our preferred codecs list, so that the results are |
(...skipping 2287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2579 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2581 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2580 const auto it = send_streams_.find(ssrc); | 2582 const auto it = send_streams_.find(ssrc); |
2581 if (it != send_streams_.end()) { | 2583 if (it != send_streams_.end()) { |
2582 return it->second->channel(); | 2584 return it->second->channel(); |
2583 } | 2585 } |
2584 return -1; | 2586 return -1; |
2585 } | 2587 } |
2586 } // namespace cricket | 2588 } // namespace cricket |
2587 | 2589 |
2588 #endif // HAVE_WEBRTC_VOICE | 2590 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |