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

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

Issue 1588693002: Revert of Storing raw audio sink for default audio track. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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 | « talk/media/webrtc/webrtcvoiceengine.h ('k') | talk/media/webrtc/webrtcvoiceengine_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvoiceengine.cc
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc
index a69c824fdf738af39380ce6195bd66a4af635a1c..9eee2af20219d710bfad79104c047ad905f33c76 100644
--- a/talk/media/webrtc/webrtcvoiceengine.cc
+++ b/talk/media/webrtc/webrtcvoiceengine.cc
@@ -1244,10 +1244,9 @@
return config_.voe_channel_id;
}
- void SetRawAudioSink(
- const rtc::scoped_refptr<webrtc::AudioSinkInterface>& sink) {
+ void SetRawAudioSink(rtc::scoped_ptr<webrtc::AudioSinkInterface> sink) {
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
- stream_->SetSink(sink);
+ stream_->SetSink(std::move(sink));
}
private:
@@ -2187,7 +2186,6 @@
}
default_recv_ssrc_ = ssrc;
SetOutputVolume(default_recv_ssrc_, default_recv_volume_);
- SetRawAudioSink(default_recv_ssrc_, default_sink_);
}
// Forward packet to Call. If the SSRC is unknown we'll return after this.
@@ -2414,22 +2412,15 @@
void WebRtcVoiceMediaChannel::SetRawAudioSink(
uint32_t ssrc,
- const rtc::scoped_refptr<webrtc::AudioSinkInterface>& sink) {
+ rtc::scoped_ptr<webrtc::AudioSinkInterface> sink) {
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
LOG(LS_VERBOSE) << "WebRtcVoiceMediaChannel::SetRawAudioSink";
- if (ssrc == 0) {
- default_sink_ = sink;
- if (default_recv_ssrc_ == -1) {
- return;
- }
- ssrc = static_cast<uint32_t>(default_recv_ssrc_);
- }
const auto it = recv_streams_.find(ssrc);
if (it == recv_streams_.end()) {
LOG(LS_WARNING) << "SetRawAudioSink: no recv stream" << ssrc;
return;
}
- it->second->SetRawAudioSink(sink);
+ it->second->SetRawAudioSink(std::move(sink));
}
int WebRtcVoiceMediaChannel::GetOutputLevel(int channel) {
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.h ('k') | talk/media/webrtc/webrtcvoiceengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698