| 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/audio/utility/audio_frame_operations.h" | 16 #include "webrtc/audio/utility/audio_frame_operations.h" |
| 17 #include "webrtc/base/array_view.h" | 17 #include "webrtc/base/array_view.h" |
| 18 #include "webrtc/base/checks.h" | 18 #include "webrtc/base/checks.h" |
| 19 #include "webrtc/base/criticalsection.h" | 19 #include "webrtc/base/criticalsection.h" |
| 20 #include "webrtc/base/format_macros.h" | 20 #include "webrtc/base/format_macros.h" |
| 21 #include "webrtc/base/location.h" | 21 #include "webrtc/base/location.h" |
| 22 #include "webrtc/base/logging.h" | 22 #include "webrtc/base/logging.h" |
| 23 #include "webrtc/base/rate_limiter.h" | 23 #include "webrtc/base/rate_limiter.h" |
| 24 #include "webrtc/base/timeutils.h" | 24 #include "webrtc/base/timeutils.h" |
| 25 #include "webrtc/call/rtp_transport_controller_send.h" |
| 25 #include "webrtc/config.h" | 26 #include "webrtc/config.h" |
| 26 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" | 27 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
| 27 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h" | 28 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h" |
| 28 #include "webrtc/modules/audio_device/include/audio_device.h" | 29 #include "webrtc/modules/audio_device/include/audio_device.h" |
| 29 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 30 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| 30 #include "webrtc/modules/include/module_common_types.h" | 31 #include "webrtc/modules/include/module_common_types.h" |
| 31 #include "webrtc/modules/pacing/packet_router.h" | 32 #include "webrtc/modules/pacing/packet_router.h" |
| 32 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" | 33 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" |
| 33 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" | 34 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" |
| 34 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" | 35 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" |
| (...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2338 | 2339 |
| 2339 void Channel::EnableReceiveTransportSequenceNumber(int id) { | 2340 void Channel::EnableReceiveTransportSequenceNumber(int id) { |
| 2340 rtp_header_parser_->DeregisterRtpHeaderExtension( | 2341 rtp_header_parser_->DeregisterRtpHeaderExtension( |
| 2341 kRtpExtensionTransportSequenceNumber); | 2342 kRtpExtensionTransportSequenceNumber); |
| 2342 bool ret = rtp_header_parser_->RegisterRtpHeaderExtension( | 2343 bool ret = rtp_header_parser_->RegisterRtpHeaderExtension( |
| 2343 kRtpExtensionTransportSequenceNumber, id); | 2344 kRtpExtensionTransportSequenceNumber, id); |
| 2344 RTC_DCHECK(ret); | 2345 RTC_DCHECK(ret); |
| 2345 } | 2346 } |
| 2346 | 2347 |
| 2347 void Channel::RegisterSenderCongestionControlObjects( | 2348 void Channel::RegisterSenderCongestionControlObjects( |
| 2348 RtpPacketSender* rtp_packet_sender, | 2349 RtpTransportControllerSendInterface* transport, |
| 2349 TransportFeedbackObserver* transport_feedback_observer, | |
| 2350 PacketRouter* packet_router, | |
| 2351 RtcpBandwidthObserver* bandwidth_observer) { | 2350 RtcpBandwidthObserver* bandwidth_observer) { |
| 2351 RtpPacketSender* rtp_packet_sender = transport->packet_sender(); |
| 2352 TransportFeedbackObserver* transport_feedback_observer = |
| 2353 transport->transport_feedback_observer(); |
| 2354 PacketRouter* packet_router = transport->packet_router(); |
| 2355 |
| 2352 RTC_DCHECK(rtp_packet_sender); | 2356 RTC_DCHECK(rtp_packet_sender); |
| 2353 RTC_DCHECK(transport_feedback_observer); | 2357 RTC_DCHECK(transport_feedback_observer); |
| 2354 RTC_DCHECK(packet_router && !packet_router_); | 2358 RTC_DCHECK(packet_router && !packet_router_); |
| 2355 rtcp_observer_->SetBandwidthObserver(bandwidth_observer); | 2359 rtcp_observer_->SetBandwidthObserver(bandwidth_observer); |
| 2356 feedback_observer_proxy_->SetTransportFeedbackObserver( | 2360 feedback_observer_proxy_->SetTransportFeedbackObserver( |
| 2357 transport_feedback_observer); | 2361 transport_feedback_observer); |
| 2358 seq_num_allocator_proxy_->SetSequenceNumberAllocator(packet_router); | 2362 seq_num_allocator_proxy_->SetSequenceNumberAllocator(packet_router); |
| 2359 rtp_packet_sender_proxy_->SetPacketSender(rtp_packet_sender); | 2363 rtp_packet_sender_proxy_->SetPacketSender(rtp_packet_sender); |
| 2360 _rtpRtcpModule->SetStorePacketsStatus(true, 600); | 2364 _rtpRtcpModule->SetStorePacketsStatus(true, 600); |
| 2361 packet_router->AddRtpModule(_rtpRtcpModule.get()); | 2365 packet_router->AddRtpModule(_rtpRtcpModule.get()); |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3003 int64_t min_rtt = 0; | 3007 int64_t min_rtt = 0; |
| 3004 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3008 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
| 3005 0) { | 3009 0) { |
| 3006 return 0; | 3010 return 0; |
| 3007 } | 3011 } |
| 3008 return rtt; | 3012 return rtt; |
| 3009 } | 3013 } |
| 3010 | 3014 |
| 3011 } // namespace voe | 3015 } // namespace voe |
| 3012 } // namespace webrtc | 3016 } // namespace webrtc |
| OLD | NEW |