| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 ConfigureStream(this, config, true); | 114 ConfigureStream(this, config, true); |
| 115 | 115 |
| 116 pacer_thread_checker_.DetachFromThread(); | 116 pacer_thread_checker_.DetachFromThread(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 AudioSendStream::~AudioSendStream() { | 119 AudioSendStream::~AudioSendStream() { |
| 120 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 120 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 121 LOG(LS_INFO) << "~AudioSendStream: " << config_.ToString(); | 121 LOG(LS_INFO) << "~AudioSendStream: " << config_.ToString(); |
| 122 transport_->send_side_cc()->DeRegisterPacketFeedbackObserver(this); | 122 transport_->send_side_cc()->DeRegisterPacketFeedbackObserver(this); |
| 123 channel_proxy_->DeRegisterExternalTransport(); | 123 channel_proxy_->RegisterTransport(nullptr); |
| 124 channel_proxy_->ResetSenderCongestionControlObjects(); | 124 channel_proxy_->ResetSenderCongestionControlObjects(); |
| 125 channel_proxy_->SetRtcEventLog(nullptr); | 125 channel_proxy_->SetRtcEventLog(nullptr); |
| 126 channel_proxy_->SetRtcpRttStats(nullptr); | 126 channel_proxy_->SetRtcpRttStats(nullptr); |
| 127 } | 127 } |
| 128 | 128 |
| 129 const webrtc::AudioSendStream::Config& AudioSendStream::GetConfig() const { | 129 const webrtc::AudioSendStream::Config& AudioSendStream::GetConfig() const { |
| 130 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 130 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 131 return config_; | 131 return config_; |
| 132 } | 132 } |
| 133 | 133 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 157 // using the actual packet size for the configured codec. | 157 // using the actual packet size for the configured codec. |
| 158 if (first_time || old_config.rtp.nack.rtp_history_ms != | 158 if (first_time || old_config.rtp.nack.rtp_history_ms != |
| 159 new_config.rtp.nack.rtp_history_ms) { | 159 new_config.rtp.nack.rtp_history_ms) { |
| 160 channel_proxy->SetNACKStatus(new_config.rtp.nack.rtp_history_ms != 0, | 160 channel_proxy->SetNACKStatus(new_config.rtp.nack.rtp_history_ms != 0, |
| 161 new_config.rtp.nack.rtp_history_ms / 20); | 161 new_config.rtp.nack.rtp_history_ms / 20); |
| 162 } | 162 } |
| 163 | 163 |
| 164 if (first_time || | 164 if (first_time || |
| 165 new_config.send_transport != old_config.send_transport) { | 165 new_config.send_transport != old_config.send_transport) { |
| 166 if (old_config.send_transport) { | 166 if (old_config.send_transport) { |
| 167 channel_proxy->DeRegisterExternalTransport(); | 167 channel_proxy->RegisterTransport(nullptr); |
| 168 } | 168 } |
| 169 if (new_config.send_transport) { | 169 if (new_config.send_transport) { |
| 170 stream->timed_send_transport_adapter_.reset(new TimedTransport( | 170 stream->timed_send_transport_adapter_.reset(new TimedTransport( |
| 171 new_config.send_transport, &stream->active_lifetime_)); | 171 new_config.send_transport, &stream->active_lifetime_)); |
| 172 } else { | 172 } else { |
| 173 stream->timed_send_transport_adapter_.reset(nullptr); | 173 stream->timed_send_transport_adapter_.reset(nullptr); |
| 174 } | 174 } |
| 175 channel_proxy->RegisterExternalTransport( | 175 channel_proxy->RegisterTransport( |
| 176 stream->timed_send_transport_adapter_.get()); | 176 stream->timed_send_transport_adapter_.get()); |
| 177 } | 177 } |
| 178 | 178 |
| 179 // RFC 5285: Each distinct extension MUST have a unique ID. The value 0 is | 179 // RFC 5285: Each distinct extension MUST have a unique ID. The value 0 is |
| 180 // reserved for padding and MUST NOT be used as a local identifier. | 180 // reserved for padding and MUST NOT be used as a local identifier. |
| 181 // So it should be safe to use 0 here to indicate "not configured". | 181 // So it should be safe to use 0 here to indicate "not configured". |
| 182 struct ExtensionIds { | 182 struct ExtensionIds { |
| 183 int audio_level = 0; | 183 int audio_level = 0; |
| 184 int transport_sequence_number = 0; | 184 int transport_sequence_number = 0; |
| 185 }; | 185 }; |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 if (rtp_rtcp_module_->RegisterSendPayload(codec) != 0) { | 650 if (rtp_rtcp_module_->RegisterSendPayload(codec) != 0) { |
| 651 LOG(LS_ERROR) << "RegisterCngPayloadType() failed to register CN to " | 651 LOG(LS_ERROR) << "RegisterCngPayloadType() failed to register CN to " |
| 652 "RTP/RTCP module"; | 652 "RTP/RTCP module"; |
| 653 } | 653 } |
| 654 } | 654 } |
| 655 } | 655 } |
| 656 | 656 |
| 657 | 657 |
| 658 } // namespace internal | 658 } // namespace internal |
| 659 } // namespace webrtc | 659 } // namespace webrtc |
| OLD | NEW |