Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: webrtc/voice_engine/channel.cc

Issue 2565353002: Wire-up audio BWE with overhead. (Closed)
Patch Set: Response to comments. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« webrtc/voice_engine/channel.h ('K') | « webrtc/voice_engine/channel.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 AudioCodingModule::Config acm_config(config.acm_config); 933 AudioCodingModule::Config acm_config(config.acm_config);
934 acm_config.id = VoEModuleId(instanceId, channelId); 934 acm_config.id = VoEModuleId(instanceId, channelId);
935 acm_config.neteq_config.enable_muted_state = true; 935 acm_config.neteq_config.enable_muted_state = true;
936 audio_coding_.reset(AudioCodingModule::Create(acm_config)); 936 audio_coding_.reset(AudioCodingModule::Create(acm_config));
937 937
938 _outputAudioLevel.Clear(); 938 _outputAudioLevel.Clear();
939 939
940 RtpRtcp::Configuration configuration; 940 RtpRtcp::Configuration configuration;
941 configuration.audio = true; 941 configuration.audio = true;
942 configuration.outgoing_transport = this; 942 configuration.outgoing_transport = this;
943 configuration.overhead_observer = this;
943 configuration.receive_statistics = rtp_receive_statistics_.get(); 944 configuration.receive_statistics = rtp_receive_statistics_.get();
944 configuration.bandwidth_callback = rtcp_observer_.get(); 945 configuration.bandwidth_callback = rtcp_observer_.get();
945 if (pacing_enabled_) { 946 if (pacing_enabled_) {
946 configuration.paced_sender = rtp_packet_sender_proxy_.get(); 947 configuration.paced_sender = rtp_packet_sender_proxy_.get();
947 configuration.transport_sequence_number_allocator = 948 configuration.transport_sequence_number_allocator =
948 seq_num_allocator_proxy_.get(); 949 seq_num_allocator_proxy_.get();
949 configuration.transport_feedback_callback = feedback_observer_proxy_.get(); 950 configuration.transport_feedback_callback = feedback_observer_proxy_.get();
950 } 951 }
951 configuration.event_log = &(*event_log_proxy_); 952 configuration.event_log = &(*event_log_proxy_);
952 configuration.rtt_stats = &(*rtcp_rtt_stats_proxy_); 953 configuration.rtt_stats = &(*rtcp_rtt_stats_proxy_);
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
2874 } 2875 }
2875 2876
2876 void Channel::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { 2877 void Channel::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) {
2877 rtcp_rtt_stats_proxy_->SetRtcpRttStats(rtcp_rtt_stats); 2878 rtcp_rtt_stats_proxy_->SetRtcpRttStats(rtcp_rtt_stats);
2878 } 2879 }
2879 2880
2880 void Channel::SetTransportOverhead(int transport_overhead_per_packet) { 2881 void Channel::SetTransportOverhead(int transport_overhead_per_packet) {
2881 _rtpRtcpModule->SetTransportOverhead(transport_overhead_per_packet); 2882 _rtpRtcpModule->SetTransportOverhead(transport_overhead_per_packet);
2882 } 2883 }
2883 2884
2885 void Channel::OnOverheadChanged(size_t overhead_bytes_per_packet) {
2886 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) {
2887 if (*encoder) {
2888 (*encoder)->OnReceivedOverhead(overhead_bytes_per_packet);
2889 }
2890 });
2891 }
2892
2884 int Channel::RegisterExternalMediaProcessing(ProcessingTypes type, 2893 int Channel::RegisterExternalMediaProcessing(ProcessingTypes type,
2885 VoEMediaProcess& processObject) { 2894 VoEMediaProcess& processObject) {
2886 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), 2895 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
2887 "Channel::RegisterExternalMediaProcessing()"); 2896 "Channel::RegisterExternalMediaProcessing()");
2888 2897
2889 rtc::CritScope cs(&_callbackCritSect); 2898 rtc::CritScope cs(&_callbackCritSect);
2890 2899
2891 if (kPlaybackPerChannel == type) { 2900 if (kPlaybackPerChannel == type) {
2892 if (_outputExternalMediaCallbackPtr) { 2901 if (_outputExternalMediaCallbackPtr) {
2893 _engineStatisticsPtr->SetLastError( 2902 _engineStatisticsPtr->SetLastError(
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
3279 int64_t min_rtt = 0; 3288 int64_t min_rtt = 0;
3280 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3289 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3281 0) { 3290 0) {
3282 return 0; 3291 return 0;
3283 } 3292 }
3284 return rtt; 3293 return rtt;
3285 } 3294 }
3286 3295
3287 } // namespace voe 3296 } // namespace voe
3288 } // namespace webrtc 3297 } // namespace webrtc
OLDNEW
« webrtc/voice_engine/channel.h ('K') | « webrtc/voice_engine/channel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698