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 20 matching lines...) Expand all Loading... |
31 #include "webrtc/voice_engine/voice_engine_impl.h" | 31 #include "webrtc/voice_engine/voice_engine_impl.h" |
32 | 32 |
33 namespace webrtc { | 33 namespace webrtc { |
34 namespace { | 34 namespace { |
35 | 35 |
36 bool UseSendSideBwe(const webrtc::AudioReceiveStream::Config& config) { | 36 bool UseSendSideBwe(const webrtc::AudioReceiveStream::Config& config) { |
37 if (!config.rtp.transport_cc) { | 37 if (!config.rtp.transport_cc) { |
38 return false; | 38 return false; |
39 } | 39 } |
40 for (const auto& extension : config.rtp.extensions) { | 40 for (const auto& extension : config.rtp.extensions) { |
41 if (extension.name == RtpExtension::kTransportSequenceNumber) { | 41 if (extension.uri == RtpExtension::kTransportSequenceNumberUri) { |
42 return true; | 42 return true; |
43 } | 43 } |
44 } | 44 } |
45 return false; | 45 return false; |
46 } | 46 } |
47 } // namespace | 47 } // namespace |
48 | 48 |
49 std::string AudioReceiveStream::Config::Rtp::ToString() const { | 49 std::string AudioReceiveStream::Config::Rtp::ToString() const { |
50 std::stringstream ss; | 50 std::stringstream ss; |
51 ss << "{remote_ssrc: " << remote_ssrc; | 51 ss << "{remote_ssrc: " << remote_ssrc; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 RTC_DCHECK(congestion_controller); | 90 RTC_DCHECK(congestion_controller); |
91 RTC_DCHECK(rtp_header_parser_); | 91 RTC_DCHECK(rtp_header_parser_); |
92 | 92 |
93 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); | 93 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); |
94 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); | 94 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); |
95 channel_proxy_->SetLocalSSRC(config.rtp.local_ssrc); | 95 channel_proxy_->SetLocalSSRC(config.rtp.local_ssrc); |
96 | 96 |
97 channel_proxy_->RegisterExternalTransport(config.rtcp_send_transport); | 97 channel_proxy_->RegisterExternalTransport(config.rtcp_send_transport); |
98 | 98 |
99 for (const auto& extension : config.rtp.extensions) { | 99 for (const auto& extension : config.rtp.extensions) { |
100 if (extension.name == RtpExtension::kAudioLevel) { | 100 if (extension.uri == RtpExtension::kAudioLevelUri) { |
101 channel_proxy_->SetReceiveAudioLevelIndicationStatus(true, extension.id); | 101 channel_proxy_->SetReceiveAudioLevelIndicationStatus(true, extension.id); |
102 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( | 102 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( |
103 kRtpExtensionAudioLevel, extension.id); | 103 kRtpExtensionAudioLevel, extension.id); |
104 RTC_DCHECK(registered); | 104 RTC_DCHECK(registered); |
105 } else if (extension.name == RtpExtension::kAbsSendTime) { | 105 } else if (extension.uri == RtpExtension::kAbsSendTimeUri) { |
106 channel_proxy_->SetReceiveAbsoluteSenderTimeStatus(true, extension.id); | 106 channel_proxy_->SetReceiveAbsoluteSenderTimeStatus(true, extension.id); |
107 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( | 107 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( |
108 kRtpExtensionAbsoluteSendTime, extension.id); | 108 kRtpExtensionAbsoluteSendTime, extension.id); |
109 RTC_DCHECK(registered); | 109 RTC_DCHECK(registered); |
110 } else if (extension.name == RtpExtension::kTransportSequenceNumber) { | 110 } else if (extension.uri == RtpExtension::kTransportSequenceNumberUri) { |
111 channel_proxy_->EnableReceiveTransportSequenceNumber(extension.id); | 111 channel_proxy_->EnableReceiveTransportSequenceNumber(extension.id); |
112 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( | 112 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( |
113 kRtpExtensionTransportSequenceNumber, extension.id); | 113 kRtpExtensionTransportSequenceNumber, extension.id); |
114 RTC_DCHECK(registered); | 114 RTC_DCHECK(registered); |
115 } else { | 115 } else { |
116 RTC_NOTREACHED() << "Unsupported RTP extension."; | 116 RTC_NOTREACHED() << "Unsupported RTP extension."; |
117 } | 117 } |
118 } | 118 } |
119 // Configure bandwidth estimation. | 119 // Configure bandwidth estimation. |
120 channel_proxy_->RegisterReceiverCongestionControlObjects( | 120 channel_proxy_->RegisterReceiverCongestionControlObjects( |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 243 |
244 VoiceEngine* AudioReceiveStream::voice_engine() const { | 244 VoiceEngine* AudioReceiveStream::voice_engine() const { |
245 internal::AudioState* audio_state = | 245 internal::AudioState* audio_state = |
246 static_cast<internal::AudioState*>(audio_state_.get()); | 246 static_cast<internal::AudioState*>(audio_state_.get()); |
247 VoiceEngine* voice_engine = audio_state->voice_engine(); | 247 VoiceEngine* voice_engine = audio_state->voice_engine(); |
248 RTC_DCHECK(voice_engine); | 248 RTC_DCHECK(voice_engine); |
249 return voice_engine; | 249 return voice_engine; |
250 } | 250 } |
251 } // namespace internal | 251 } // namespace internal |
252 } // namespace webrtc | 252 } // namespace webrtc |
OLD | NEW |