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/rate_limiter.h" | 20 #include "webrtc/base/rate_limiter.h" |
21 #include "webrtc/base/thread_checker.h" | 21 #include "webrtc/base/thread_checker.h" |
22 #include "webrtc/base/timeutils.h" | 22 #include "webrtc/base/timeutils.h" |
23 #include "webrtc/call/rtc_event_log.h" | 23 #include "webrtc/call/rtc_event_log.h" |
24 #include "webrtc/common.h" | 24 #include "webrtc/common.h" |
25 #include "webrtc/config.h" | 25 #include "webrtc/config.h" |
26 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" | |
27 #include "webrtc/modules/audio_device/include/audio_device.h" | 26 #include "webrtc/modules/audio_device/include/audio_device.h" |
28 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 27 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
29 #include "webrtc/modules/include/module_common_types.h" | 28 #include "webrtc/modules/include/module_common_types.h" |
30 #include "webrtc/modules/pacing/packet_router.h" | 29 #include "webrtc/modules/pacing/packet_router.h" |
31 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" | 30 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" |
32 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" | 31 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" |
33 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" | 32 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" |
34 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h" | 33 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h" |
35 #include "webrtc/modules/utility/include/audio_frame_operations.h" | 34 #include "webrtc/modules/utility/include/audio_frame_operations.h" |
36 #include "webrtc/modules/utility/include/process_thread.h" | 35 #include "webrtc/modules/utility/include/process_thread.h" |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 if (_outputFilePlayerPtr) { | 744 if (_outputFilePlayerPtr) { |
746 if (_outputFilePlayerPtr->Frequency() > highestNeeded) { | 745 if (_outputFilePlayerPtr->Frequency() > highestNeeded) { |
747 highestNeeded = _outputFilePlayerPtr->Frequency(); | 746 highestNeeded = _outputFilePlayerPtr->Frequency(); |
748 } | 747 } |
749 } | 748 } |
750 } | 749 } |
751 | 750 |
752 return (highestNeeded); | 751 return (highestNeeded); |
753 } | 752 } |
754 | 753 |
755 int32_t Channel::CreateChannel(Channel*& channel, | |
756 int32_t channelId, | |
757 uint32_t instanceId, | |
758 const Config& config) { | |
759 return CreateChannel(channel, channelId, instanceId, config, | |
760 CreateBuiltinAudioDecoderFactory()); | |
761 } | |
762 | |
763 int32_t Channel::CreateChannel( | 754 int32_t Channel::CreateChannel( |
764 Channel*& channel, | 755 Channel*& channel, |
765 int32_t channelId, | 756 int32_t channelId, |
766 uint32_t instanceId, | 757 uint32_t instanceId, |
767 const Config& config, | 758 const Config& config, |
768 const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) { | 759 const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) { |
769 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, channelId), | 760 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, channelId), |
770 "Channel::CreateChannel(channelId=%d, instanceId=%d)", channelId, | 761 "Channel::CreateChannel(channelId=%d, instanceId=%d)", channelId, |
771 instanceId); | 762 instanceId); |
772 | 763 |
(...skipping 2818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3591 int64_t min_rtt = 0; | 3582 int64_t min_rtt = 0; |
3592 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3583 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3593 0) { | 3584 0) { |
3594 return 0; | 3585 return 0; |
3595 } | 3586 } |
3596 return rtt; | 3587 return rtt; |
3597 } | 3588 } |
3598 | 3589 |
3599 } // namespace voe | 3590 } // namespace voe |
3600 } // namespace webrtc | 3591 } // namespace webrtc |
OLD | NEW |