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 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2735 } | 2735 } |
2736 | 2736 |
2737 void Channel::SetRtcEventLog(RtcEventLog* event_log) { | 2737 void Channel::SetRtcEventLog(RtcEventLog* event_log) { |
2738 event_log_proxy_->SetEventLog(event_log); | 2738 event_log_proxy_->SetEventLog(event_log); |
2739 } | 2739 } |
2740 | 2740 |
2741 void Channel::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { | 2741 void Channel::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { |
2742 rtcp_rtt_stats_proxy_->SetRtcpRttStats(rtcp_rtt_stats); | 2742 rtcp_rtt_stats_proxy_->SetRtcpRttStats(rtcp_rtt_stats); |
2743 } | 2743 } |
2744 | 2744 |
2745 void Channel::UpdateOverheadForEncoder() { | 2745 void Channel::UpdateOverheadForEncoder(size_t overhead_per_packet) { |
2746 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { | 2746 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { |
2747 if (*encoder) { | 2747 if (*encoder) { |
2748 (*encoder)->OnReceivedOverhead(transport_overhead_per_packet_ + | 2748 (*encoder)->OnReceivedOverhead(overhead_per_packet); |
2749 rtp_overhead_per_packet_); | |
2750 } | 2749 } |
2751 }); | 2750 }); |
2752 } | 2751 } |
2753 | 2752 |
2754 void Channel::SetTransportOverhead(size_t transport_overhead_per_packet) { | 2753 void Channel::SetTransportOverhead(size_t transport_overhead_per_packet) { |
2754 rtc::CritScope cs(&overhead_per_packet_lock_); | |
2755 transport_overhead_per_packet_ = transport_overhead_per_packet; | 2755 transport_overhead_per_packet_ = transport_overhead_per_packet; |
2756 UpdateOverheadForEncoder(); | 2756 UpdateOverheadForEncoder(transport_overhead_per_packet_ + |
2757 rtp_overhead_per_packet_); | |
2757 } | 2758 } |
2758 | 2759 |
2759 void Channel::OnOverheadChanged(size_t overhead_bytes_per_packet) { | 2760 void Channel::OnOverheadChanged(size_t overhead_bytes_per_packet) { |
the sun
2017/02/28 11:13:10
Please add:
// TODO(solenberg): Make AudioSendStre
hbos
2017/02/28 11:44:55
Done.
| |
2761 rtc::CritScope cs(&overhead_per_packet_lock_); | |
2760 rtp_overhead_per_packet_ = overhead_bytes_per_packet; | 2762 rtp_overhead_per_packet_ = overhead_bytes_per_packet; |
2761 UpdateOverheadForEncoder(); | 2763 UpdateOverheadForEncoder(transport_overhead_per_packet_ + |
2764 rtp_overhead_per_packet_); | |
2762 } | 2765 } |
2763 | 2766 |
2764 int Channel::GetNetworkStatistics(NetworkStatistics& stats) { | 2767 int Channel::GetNetworkStatistics(NetworkStatistics& stats) { |
2765 return audio_coding_->GetNetworkStatistics(&stats); | 2768 return audio_coding_->GetNetworkStatistics(&stats); |
2766 } | 2769 } |
2767 | 2770 |
2768 void Channel::GetDecodingCallStatistics(AudioDecodingCallStats* stats) const { | 2771 void Channel::GetDecodingCallStatistics(AudioDecodingCallStats* stats) const { |
2769 audio_coding_->GetDecodingCallStatistics(stats); | 2772 audio_coding_->GetDecodingCallStatistics(stats); |
2770 } | 2773 } |
2771 | 2774 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3040 int64_t min_rtt = 0; | 3043 int64_t min_rtt = 0; |
3041 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3044 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3042 0) { | 3045 0) { |
3043 return 0; | 3046 return 0; |
3044 } | 3047 } |
3045 return rtt; | 3048 return rtt; |
3046 } | 3049 } |
3047 | 3050 |
3048 } // namespace voe | 3051 } // namespace voe |
3049 } // namespace webrtc | 3052 } // namespace webrtc |
OLD | NEW |