OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
11 #include "webrtc/voice_engine/channel.h" | 11 #include "webrtc/voice_engine/channel.h" |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
16 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
17 #include "webrtc/base/criticalsection.h" | 17 #include "webrtc/base/criticalsection.h" |
18 #include "webrtc/base/format_macros.h" | 18 #include "webrtc/base/format_macros.h" |
19 #include "webrtc/base/logging.h" | 19 #include "webrtc/base/logging.h" |
20 #include "webrtc/base/thread_checker.h" | 20 #include "webrtc/base/thread_checker.h" |
21 #include "webrtc/base/timeutils.h" | 21 #include "webrtc/base/timeutils.h" |
22 #include "webrtc/common.h" | 22 #include "webrtc/common.h" |
23 #include "webrtc/config.h" | 23 #include "webrtc/config.h" |
| 24 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" |
24 #include "webrtc/modules/audio_device/include/audio_device.h" | 25 #include "webrtc/modules/audio_device/include/audio_device.h" |
25 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 26 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
26 #include "webrtc/modules/include/module_common_types.h" | 27 #include "webrtc/modules/include/module_common_types.h" |
27 #include "webrtc/modules/pacing/packet_router.h" | 28 #include "webrtc/modules/pacing/packet_router.h" |
28 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" | 29 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" |
29 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" | 30 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" |
30 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" | 31 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" |
31 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h" | 32 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h" |
32 #include "webrtc/modules/utility/include/audio_frame_operations.h" | 33 #include "webrtc/modules/utility/include/audio_frame_operations.h" |
33 #include "webrtc/modules/utility/include/process_thread.h" | 34 #include "webrtc/modules/utility/include/process_thread.h" |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 acm_config.id = VoEModuleId(instanceId, channelId); | 819 acm_config.id = VoEModuleId(instanceId, channelId); |
819 if (config.Get<NetEqCapacityConfig>().enabled) { | 820 if (config.Get<NetEqCapacityConfig>().enabled) { |
820 // Clamping the buffer capacity at 20 packets. While going lower will | 821 // Clamping the buffer capacity at 20 packets. While going lower will |
821 // probably work, it makes little sense. | 822 // probably work, it makes little sense. |
822 acm_config.neteq_config.max_packets_in_buffer = | 823 acm_config.neteq_config.max_packets_in_buffer = |
823 std::max(20, config.Get<NetEqCapacityConfig>().capacity); | 824 std::max(20, config.Get<NetEqCapacityConfig>().capacity); |
824 } | 825 } |
825 acm_config.neteq_config.enable_fast_accelerate = | 826 acm_config.neteq_config.enable_fast_accelerate = |
826 config.Get<NetEqFastAccelerate>().enabled; | 827 config.Get<NetEqFastAccelerate>().enabled; |
827 acm_config.neteq_config.enable_muted_state = true; | 828 acm_config.neteq_config.enable_muted_state = true; |
| 829 acm_config.decoder_factory = CreateBuiltinAudioDecoderFactory(); |
828 audio_coding_.reset(AudioCodingModule::Create(acm_config)); | 830 audio_coding_.reset(AudioCodingModule::Create(acm_config)); |
829 | 831 |
830 _outputAudioLevel.Clear(); | 832 _outputAudioLevel.Clear(); |
831 | 833 |
832 RtpRtcp::Configuration configuration; | 834 RtpRtcp::Configuration configuration; |
833 configuration.audio = true; | 835 configuration.audio = true; |
834 configuration.outgoing_transport = this; | 836 configuration.outgoing_transport = this; |
835 configuration.receive_statistics = rtp_receive_statistics_.get(); | 837 configuration.receive_statistics = rtp_receive_statistics_.get(); |
836 configuration.bandwidth_callback = rtcp_observer_.get(); | 838 configuration.bandwidth_callback = rtcp_observer_.get(); |
837 if (pacing_enabled_) { | 839 if (pacing_enabled_) { |
(...skipping 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3559 int64_t min_rtt = 0; | 3561 int64_t min_rtt = 0; |
3560 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3562 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3561 0) { | 3563 0) { |
3562 return 0; | 3564 return 0; |
3563 } | 3565 } |
3564 return rtt; | 3566 return rtt; |
3565 } | 3567 } |
3566 | 3568 |
3567 } // namespace voe | 3569 } // namespace voe |
3568 } // namespace webrtc | 3570 } // namespace webrtc |
OLD | NEW |