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

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

Issue 1706183002: Replace scoped_ptr with unique_ptr in webrtc/audio/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const webrtc::AudioSendStream::Config& config, 60 const webrtc::AudioSendStream::Config& config,
61 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, 61 const rtc::scoped_refptr<webrtc::AudioState>& audio_state,
62 CongestionController* congestion_controller) 62 CongestionController* congestion_controller)
63 : config_(config), audio_state_(audio_state) { 63 : config_(config), audio_state_(audio_state) {
64 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString(); 64 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString();
65 RTC_DCHECK_NE(config_.voe_channel_id, -1); 65 RTC_DCHECK_NE(config_.voe_channel_id, -1);
66 RTC_DCHECK(audio_state_.get()); 66 RTC_DCHECK(audio_state_.get());
67 RTC_DCHECK(congestion_controller); 67 RTC_DCHECK(congestion_controller);
68 68
69 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); 69 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine());
70 channel_proxy_ = 70 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id);
71 rtc::UniqueToScoped(voe_impl->GetChannelProxy(config_.voe_channel_id));
72 channel_proxy_->RegisterSenderCongestionControlObjects( 71 channel_proxy_->RegisterSenderCongestionControlObjects(
73 congestion_controller->pacer(), 72 congestion_controller->pacer(),
74 congestion_controller->GetTransportFeedbackObserver(), 73 congestion_controller->GetTransportFeedbackObserver(),
75 congestion_controller->packet_router()); 74 congestion_controller->packet_router());
76 channel_proxy_->SetRTCPStatus(true); 75 channel_proxy_->SetRTCPStatus(true);
77 channel_proxy_->SetLocalSSRC(config.rtp.ssrc); 76 channel_proxy_->SetLocalSSRC(config.rtp.ssrc);
78 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name); 77 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name);
79 78
80 for (const auto& extension : config.rtp.extensions) { 79 for (const auto& extension : config.rtp.extensions) {
81 if (extension.name == RtpExtension::kAbsSendTime) { 80 if (extension.name == RtpExtension::kAbsSendTime) {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 212
214 VoiceEngine* AudioSendStream::voice_engine() const { 213 VoiceEngine* AudioSendStream::voice_engine() const {
215 internal::AudioState* audio_state = 214 internal::AudioState* audio_state =
216 static_cast<internal::AudioState*>(audio_state_.get()); 215 static_cast<internal::AudioState*>(audio_state_.get());
217 VoiceEngine* voice_engine = audio_state->voice_engine(); 216 VoiceEngine* voice_engine = audio_state->voice_engine();
218 RTC_DCHECK(voice_engine); 217 RTC_DCHECK(voice_engine);
219 return voice_engine; 218 return voice_engine;
220 } 219 }
221 } // namespace internal 220 } // namespace internal
222 } // namespace webrtc 221 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698