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

Unified Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 1728503002: Replace scoped_ptr with unique_ptr in webrtc/media/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up1
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.h ('k') | webrtc/media/engine/webrtcvoiceengine_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvoiceengine.cc
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc
index 70f7f3a4b4c5a79e93a3dde73ab1e9858701c054..d2db76a7bdba63347740116c18984f428e073d28 100644
--- a/webrtc/media/engine/webrtcvoiceengine.cc
+++ b/webrtc/media/engine/webrtcvoiceengine.cc
@@ -1336,9 +1336,9 @@ class WebRtcVoiceMediaChannel::WebRtcAudioReceiveStream {
return config_.voe_channel_id;
}
- void SetRawAudioSink(rtc::scoped_ptr<webrtc::AudioSinkInterface> sink) {
+ void SetRawAudioSink(std::unique_ptr<webrtc::AudioSinkInterface> sink) {
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
- stream_->SetSink(rtc::ScopedToUnique(std::move(sink)));
+ stream_->SetSink(std::move(sink));
}
private:
@@ -2262,7 +2262,7 @@ void WebRtcVoiceMediaChannel::OnPacketReceived(
default_recv_ssrc_ = ssrc;
SetOutputVolume(default_recv_ssrc_, default_recv_volume_);
if (default_sink_) {
- rtc::scoped_ptr<webrtc::AudioSinkInterface> proxy_sink(
+ std::unique_ptr<webrtc::AudioSinkInterface> proxy_sink(
new ProxySink(default_sink_.get()));
SetRawAudioSink(default_recv_ssrc_, std::move(proxy_sink));
}
@@ -2492,13 +2492,13 @@ bool WebRtcVoiceMediaChannel::GetStats(VoiceMediaInfo* info) {
void WebRtcVoiceMediaChannel::SetRawAudioSink(
uint32_t ssrc,
- rtc::scoped_ptr<webrtc::AudioSinkInterface> sink) {
+ std::unique_ptr<webrtc::AudioSinkInterface> sink) {
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
LOG(LS_VERBOSE) << "WebRtcVoiceMediaChannel::SetRawAudioSink: ssrc:" << ssrc
<< " " << (sink ? "(ptr)" : "NULL");
if (ssrc == 0) {
if (default_recv_ssrc_ != -1) {
- rtc::scoped_ptr<webrtc::AudioSinkInterface> proxy_sink(
+ std::unique_ptr<webrtc::AudioSinkInterface> proxy_sink(
sink ? new ProxySink(sink.get()) : nullptr);
SetRawAudioSink(default_recv_ssrc_, std::move(proxy_sink));
}
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.h ('k') | webrtc/media/engine/webrtcvoiceengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698