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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 _externalMixing(false), | 907 _externalMixing(false), |
908 _mixFileWithMicrophone(false), | 908 _mixFileWithMicrophone(false), |
909 input_mute_(false), | 909 input_mute_(false), |
910 previous_frame_muted_(false), | 910 previous_frame_muted_(false), |
911 _panLeft(1.0f), | 911 _panLeft(1.0f), |
912 _panRight(1.0f), | 912 _panRight(1.0f), |
913 _outputGain(1.0f), | 913 _outputGain(1.0f), |
914 _lastLocalTimeStamp(0), | 914 _lastLocalTimeStamp(0), |
915 _lastPayloadType(0), | 915 _lastPayloadType(0), |
916 _includeAudioLevelIndication(false), | 916 _includeAudioLevelIndication(false), |
| 917 transport_overhead_per_packet_(0), |
| 918 rtp_overhead_per_packet_(0), |
917 _outputSpeechType(AudioFrame::kNormalSpeech), | 919 _outputSpeechType(AudioFrame::kNormalSpeech), |
918 restored_packet_in_use_(false), | 920 restored_packet_in_use_(false), |
919 rtcp_observer_(new VoERtcpObserver(this)), | 921 rtcp_observer_(new VoERtcpObserver(this)), |
920 associate_send_channel_(ChannelOwner(nullptr)), | 922 associate_send_channel_(ChannelOwner(nullptr)), |
921 pacing_enabled_(config.enable_voice_pacing), | 923 pacing_enabled_(config.enable_voice_pacing), |
922 feedback_observer_proxy_(new TransportFeedbackProxy()), | 924 feedback_observer_proxy_(new TransportFeedbackProxy()), |
923 seq_num_allocator_proxy_(new TransportSequenceNumberProxy()), | 925 seq_num_allocator_proxy_(new TransportSequenceNumberProxy()), |
924 rtp_packet_sender_proxy_(new RtpPacketSenderProxy()), | 926 rtp_packet_sender_proxy_(new RtpPacketSenderProxy()), |
925 retransmission_rate_limiter_(new RateLimiter(Clock::GetRealTimeClock(), | 927 retransmission_rate_limiter_(new RateLimiter(Clock::GetRealTimeClock(), |
926 kMaxRetransmissionWindowMs)), | 928 kMaxRetransmissionWindowMs)), |
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2871 } | 2873 } |
2872 | 2874 |
2873 void Channel::SetRtcEventLog(RtcEventLog* event_log) { | 2875 void Channel::SetRtcEventLog(RtcEventLog* event_log) { |
2874 event_log_proxy_->SetEventLog(event_log); | 2876 event_log_proxy_->SetEventLog(event_log); |
2875 } | 2877 } |
2876 | 2878 |
2877 void Channel::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { | 2879 void Channel::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { |
2878 rtcp_rtt_stats_proxy_->SetRtcpRttStats(rtcp_rtt_stats); | 2880 rtcp_rtt_stats_proxy_->SetRtcpRttStats(rtcp_rtt_stats); |
2879 } | 2881 } |
2880 | 2882 |
2881 void Channel::SetTransportOverhead(int transport_overhead_per_packet) { | 2883 void Channel::UpdateOverheadForEncoder() { |
2882 _rtpRtcpModule->SetTransportOverhead(transport_overhead_per_packet); | 2884 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { |
| 2885 if (*encoder) { |
| 2886 (*encoder)->OnReceivedOverhead(transport_overhead_per_packet_ + |
| 2887 rtp_overhead_per_packet_); |
| 2888 } |
| 2889 }); |
| 2890 } |
| 2891 |
| 2892 void Channel::SetTransportOverhead(size_t transport_overhead_per_packet) { |
| 2893 transport_overhead_per_packet_ = transport_overhead_per_packet; |
| 2894 UpdateOverheadForEncoder(); |
2883 } | 2895 } |
2884 | 2896 |
2885 void Channel::OnOverheadChanged(size_t overhead_bytes_per_packet) { | 2897 void Channel::OnOverheadChanged(size_t overhead_bytes_per_packet) { |
2886 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { | 2898 rtp_overhead_per_packet_ = overhead_bytes_per_packet; |
2887 if (*encoder) { | 2899 UpdateOverheadForEncoder(); |
2888 (*encoder)->OnReceivedOverhead(overhead_bytes_per_packet); | |
2889 } | |
2890 }); | |
2891 } | 2900 } |
2892 | 2901 |
2893 int Channel::RegisterExternalMediaProcessing(ProcessingTypes type, | 2902 int Channel::RegisterExternalMediaProcessing(ProcessingTypes type, |
2894 VoEMediaProcess& processObject) { | 2903 VoEMediaProcess& processObject) { |
2895 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), | 2904 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), |
2896 "Channel::RegisterExternalMediaProcessing()"); | 2905 "Channel::RegisterExternalMediaProcessing()"); |
2897 | 2906 |
2898 rtc::CritScope cs(&_callbackCritSect); | 2907 rtc::CritScope cs(&_callbackCritSect); |
2899 | 2908 |
2900 if (kPlaybackPerChannel == type) { | 2909 if (kPlaybackPerChannel == type) { |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3288 int64_t min_rtt = 0; | 3297 int64_t min_rtt = 0; |
3289 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3298 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3290 0) { | 3299 0) { |
3291 return 0; | 3300 return 0; |
3292 } | 3301 } |
3293 return rtt; | 3302 return rtt; |
3294 } | 3303 } |
3295 | 3304 |
3296 } // namespace voe | 3305 } // namespace voe |
3297 } // namespace webrtc | 3306 } // namespace webrtc |
OLD | NEW |