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

Side by Side Diff: webrtc/audio/audio_send_stream.cc

Issue 1955363003: Configure VoE NACK through AudioSendStream::Config. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase again Created 4 years, 6 months 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
« no previous file with comments | « no previous file | webrtc/audio/audio_send_stream_unittest.cc » ('j') | 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 21 matching lines...) Expand all
32 std::stringstream ss; 32 std::stringstream ss;
33 ss << "{ssrc: " << ssrc; 33 ss << "{ssrc: " << ssrc;
34 ss << ", extensions: ["; 34 ss << ", extensions: [";
35 for (size_t i = 0; i < extensions.size(); ++i) { 35 for (size_t i = 0; i < extensions.size(); ++i) {
36 ss << extensions[i].ToString(); 36 ss << extensions[i].ToString();
37 if (i != extensions.size() - 1) { 37 if (i != extensions.size() - 1) {
38 ss << ", "; 38 ss << ", ";
39 } 39 }
40 } 40 }
41 ss << ']'; 41 ss << ']';
42 ss << ", nack: " << nack.ToString();
42 ss << ", c_name: " << c_name; 43 ss << ", c_name: " << c_name;
43 ss << '}'; 44 ss << '}';
44 return ss.str(); 45 return ss.str();
45 } 46 }
46 47
47 std::string AudioSendStream::Config::ToString() const { 48 std::string AudioSendStream::Config::ToString() const {
48 std::stringstream ss; 49 std::stringstream ss;
49 ss << "{rtp: " << rtp.ToString(); 50 ss << "{rtp: " << rtp.ToString();
50 ss << ", voe_channel_id: " << voe_channel_id; 51 ss << ", voe_channel_id: " << voe_channel_id;
51 // TODO(solenberg): Encoder config. 52 // TODO(solenberg): Encoder config.
(...skipping 15 matching lines...) Expand all
67 68
68 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); 69 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine());
69 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); 70 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id);
70 channel_proxy_->RegisterSenderCongestionControlObjects( 71 channel_proxy_->RegisterSenderCongestionControlObjects(
71 congestion_controller->pacer(), 72 congestion_controller->pacer(),
72 congestion_controller->GetTransportFeedbackObserver(), 73 congestion_controller->GetTransportFeedbackObserver(),
73 congestion_controller->packet_router()); 74 congestion_controller->packet_router());
74 channel_proxy_->SetRTCPStatus(true); 75 channel_proxy_->SetRTCPStatus(true);
75 channel_proxy_->SetLocalSSRC(config.rtp.ssrc); 76 channel_proxy_->SetLocalSSRC(config.rtp.ssrc);
76 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name); 77 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name);
78 // TODO(solenberg): Config NACK history window (which is a packet count),
79 // using the actual packet size for the configured codec.
80 channel_proxy_->SetNACKStatus(config_.rtp.nack.rtp_history_ms != 0,
81 config_.rtp.nack.rtp_history_ms / 20);
77 82
78 channel_proxy_->RegisterExternalTransport(config.send_transport); 83 channel_proxy_->RegisterExternalTransport(config.send_transport);
79 84
80 for (const auto& extension : config.rtp.extensions) { 85 for (const auto& extension : config.rtp.extensions) {
81 if (extension.uri == RtpExtension::kAbsSendTimeUri) { 86 if (extension.uri == RtpExtension::kAbsSendTimeUri) {
82 channel_proxy_->SetSendAbsoluteSenderTimeStatus(true, extension.id); 87 channel_proxy_->SetSendAbsoluteSenderTimeStatus(true, extension.id);
83 } else if (extension.uri == RtpExtension::kAudioLevelUri) { 88 } else if (extension.uri == RtpExtension::kAudioLevelUri) {
84 channel_proxy_->SetSendAudioLevelIndicationStatus(true, extension.id); 89 channel_proxy_->SetSendAudioLevelIndicationStatus(true, extension.id);
85 } else if (extension.uri == RtpExtension::kTransportSequenceNumberUri) { 90 } else if (extension.uri == RtpExtension::kTransportSequenceNumberUri) {
86 channel_proxy_->EnableSendTransportSequenceNumber(extension.id); 91 channel_proxy_->EnableSendTransportSequenceNumber(extension.id);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 229
225 VoiceEngine* AudioSendStream::voice_engine() const { 230 VoiceEngine* AudioSendStream::voice_engine() const {
226 internal::AudioState* audio_state = 231 internal::AudioState* audio_state =
227 static_cast<internal::AudioState*>(audio_state_.get()); 232 static_cast<internal::AudioState*>(audio_state_.get());
228 VoiceEngine* voice_engine = audio_state->voice_engine(); 233 VoiceEngine* voice_engine = audio_state->voice_engine();
229 RTC_DCHECK(voice_engine); 234 RTC_DCHECK(voice_engine);
230 return voice_engine; 235 return voice_engine;
231 } 236 }
232 } // namespace internal 237 } // namespace internal
233 } // namespace webrtc 238 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698