| OLD | NEW |
| 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 Loading... |
| 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 16 matching lines...) Expand all Loading... |
| 68 | 69 |
| 69 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); | 70 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); |
| 70 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); | 71 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); |
| 71 channel_proxy_->RegisterSenderCongestionControlObjects( | 72 channel_proxy_->RegisterSenderCongestionControlObjects( |
| 72 congestion_controller->pacer(), | 73 congestion_controller->pacer(), |
| 73 congestion_controller->GetTransportFeedbackObserver(), | 74 congestion_controller->GetTransportFeedbackObserver(), |
| 74 congestion_controller->packet_router()); | 75 congestion_controller->packet_router()); |
| 75 channel_proxy_->SetRTCPStatus(true); | 76 channel_proxy_->SetRTCPStatus(true); |
| 76 channel_proxy_->SetLocalSSRC(config.rtp.ssrc); | 77 channel_proxy_->SetLocalSSRC(config.rtp.ssrc); |
| 77 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name); | 78 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name); |
| 79 // TODO(solenberg): Config NACK history window (which is a packet count), |
| 80 // using the actual packet size for the configured codec. |
| 81 channel_proxy_->SetNACKStatus(config_.rtp.nack.rtp_history_ms != 0, |
| 82 config_.rtp.nack.rtp_history_ms / 20); |
| 78 | 83 |
| 79 channel_proxy_->RegisterExternalTransport(config.send_transport); | 84 channel_proxy_->RegisterExternalTransport(config.send_transport); |
| 80 | 85 |
| 81 for (const auto& extension : config.rtp.extensions) { | 86 for (const auto& extension : config.rtp.extensions) { |
| 82 if (extension.uri == RtpExtension::kAbsSendTimeUri) { | 87 if (extension.uri == RtpExtension::kAbsSendTimeUri) { |
| 83 channel_proxy_->SetSendAbsoluteSenderTimeStatus(true, extension.id); | 88 channel_proxy_->SetSendAbsoluteSenderTimeStatus(true, extension.id); |
| 84 } else if (extension.uri == RtpExtension::kAudioLevelUri) { | 89 } else if (extension.uri == RtpExtension::kAudioLevelUri) { |
| 85 channel_proxy_->SetSendAudioLevelIndicationStatus(true, extension.id); | 90 channel_proxy_->SetSendAudioLevelIndicationStatus(true, extension.id); |
| 86 } else if (extension.uri == RtpExtension::kTransportSequenceNumberUri) { | 91 } else if (extension.uri == RtpExtension::kTransportSequenceNumberUri) { |
| 87 channel_proxy_->EnableSendTransportSequenceNumber(extension.id); | 92 channel_proxy_->EnableSendTransportSequenceNumber(extension.id); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 230 |
| 226 VoiceEngine* AudioSendStream::voice_engine() const { | 231 VoiceEngine* AudioSendStream::voice_engine() const { |
| 227 internal::AudioState* audio_state = | 232 internal::AudioState* audio_state = |
| 228 static_cast<internal::AudioState*>(audio_state_.get()); | 233 static_cast<internal::AudioState*>(audio_state_.get()); |
| 229 VoiceEngine* voice_engine = audio_state->voice_engine(); | 234 VoiceEngine* voice_engine = audio_state->voice_engine(); |
| 230 RTC_DCHECK(voice_engine); | 235 RTC_DCHECK(voice_engine); |
| 231 return voice_engine; | 236 return voice_engine; |
| 232 } | 237 } |
| 233 } // namespace internal | 238 } // namespace internal |
| 234 } // namespace webrtc | 239 } // namespace webrtc |
| OLD | NEW |