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

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

Issue 1702983002: Replace scoped_ptr with unique_ptr in webrtc/voice_engine/ (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
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/base/scoped_ptr.h » ('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 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_ = voe_impl->GetChannelProxy(config_.voe_channel_id); 70 channel_proxy_ =
71 rtc::UniqueToScoped(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);
78 79
79 for (const auto& extension : config.rtp.extensions) { 80 for (const auto& extension : config.rtp.extensions) {
80 if (extension.name == RtpExtension::kAbsSendTime) { 81 if (extension.name == RtpExtension::kAbsSendTime) {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 213
213 VoiceEngine* AudioSendStream::voice_engine() const { 214 VoiceEngine* AudioSendStream::voice_engine() const {
214 internal::AudioState* audio_state = 215 internal::AudioState* audio_state =
215 static_cast<internal::AudioState*>(audio_state_.get()); 216 static_cast<internal::AudioState*>(audio_state_.get());
216 VoiceEngine* voice_engine = audio_state->voice_engine(); 217 VoiceEngine* voice_engine = audio_state->voice_engine();
217 RTC_DCHECK(voice_engine); 218 RTC_DCHECK(voice_engine);
218 return voice_engine; 219 return voice_engine;
219 } 220 }
220 } // namespace internal 221 } // namespace internal
221 } // namespace webrtc 222 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/base/scoped_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698