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 |
(...skipping 2909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2920 void Channel::EnableSendTransportSequenceNumber(int id) { | 2920 void Channel::EnableSendTransportSequenceNumber(int id) { |
2921 int ret = | 2921 int ret = |
2922 SetSendRtpHeaderExtension(true, kRtpExtensionTransportSequenceNumber, id); | 2922 SetSendRtpHeaderExtension(true, kRtpExtensionTransportSequenceNumber, id); |
2923 RTC_DCHECK_EQ(0, ret); | 2923 RTC_DCHECK_EQ(0, ret); |
2924 } | 2924 } |
2925 | 2925 |
2926 void Channel::SetCongestionControlObjects( | 2926 void Channel::SetCongestionControlObjects( |
2927 RtpPacketSender* rtp_packet_sender, | 2927 RtpPacketSender* rtp_packet_sender, |
2928 TransportFeedbackObserver* transport_feedback_observer, | 2928 TransportFeedbackObserver* transport_feedback_observer, |
2929 PacketRouter* packet_router) { | 2929 PacketRouter* packet_router) { |
2930 RTC_DCHECK(feedback_observer_proxy_.get()); | |
2931 RTC_DCHECK(seq_num_allocator_proxy_.get()); | |
2932 RTC_DCHECK(rtp_packet_sender_proxy_.get()); | |
2933 RTC_DCHECK(packet_router != nullptr || packet_router_ != nullptr); | 2930 RTC_DCHECK(packet_router != nullptr || packet_router_ != nullptr); |
2934 feedback_observer_proxy_->SetTransportFeedbackObserver( | 2931 if (transport_feedback_observer) { |
2935 transport_feedback_observer); | 2932 RTC_DCHECK(feedback_observer_proxy_.get()); |
2936 seq_num_allocator_proxy_->SetSequenceNumberAllocator(packet_router); | 2933 feedback_observer_proxy_->SetTransportFeedbackObserver( |
2937 rtp_packet_sender_proxy_->SetPacketSender(rtp_packet_sender); | 2934 transport_feedback_observer); |
| 2935 } |
| 2936 if (rtp_packet_sender) { |
| 2937 RTC_DCHECK(rtp_packet_sender_proxy_.get()); |
| 2938 rtp_packet_sender_proxy_->SetPacketSender(rtp_packet_sender); |
| 2939 } |
| 2940 if (seq_num_allocator_proxy_.get()) { |
| 2941 seq_num_allocator_proxy_->SetSequenceNumberAllocator(packet_router); |
| 2942 } |
2938 _rtpRtcpModule->SetStorePacketsStatus(rtp_packet_sender != nullptr, 600); | 2943 _rtpRtcpModule->SetStorePacketsStatus(rtp_packet_sender != nullptr, 600); |
2939 if (packet_router != nullptr) { | 2944 if (packet_router != nullptr) { |
2940 packet_router->AddRtpModule(_rtpRtcpModule.get()); | 2945 packet_router->AddRtpModule(_rtpRtcpModule.get()); |
2941 } else { | 2946 } else { |
2942 packet_router_->RemoveRtpModule(_rtpRtcpModule.get()); | 2947 packet_router_->RemoveRtpModule(_rtpRtcpModule.get()); |
2943 } | 2948 } |
2944 packet_router_ = packet_router; | 2949 packet_router_ = packet_router; |
2945 } | 2950 } |
2946 | 2951 |
2947 void Channel::SetRTCPStatus(bool enable) { | 2952 void Channel::SetRTCPStatus(bool enable) { |
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4103 int64_t min_rtt = 0; | 4108 int64_t min_rtt = 0; |
4104 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) | 4109 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) |
4105 != 0) { | 4110 != 0) { |
4106 return 0; | 4111 return 0; |
4107 } | 4112 } |
4108 return rtt; | 4113 return rtt; |
4109 } | 4114 } |
4110 | 4115 |
4111 } // namespace voe | 4116 } // namespace voe |
4112 } // namespace webrtc | 4117 } // namespace webrtc |
OLD | NEW |