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

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

Issue 2770233003: Implemented the GetSources() in native code. (Closed)
Patch Set: Add a direct dependency to the webrtc/voice_engine/BUILD.gn Created 3 years, 8 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
Index: webrtc/media/engine/webrtcvoiceengine.cc
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc
index 8fcda89962ee768153b9d6337a862309b7e67aab..a0d3cec9135cada17f88ec00ea9ce875a396c124 100644
--- a/webrtc/media/engine/webrtcvoiceengine.cc
+++ b/webrtc/media/engine/webrtcvoiceengine.cc
@@ -1581,6 +1581,12 @@ class WebRtcVoiceMediaChannel::WebRtcAudioReceiveStream {
playout_ = playout;
}
+ std::vector<webrtc::RtpSource> GetSources() {
+ RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
+ RTC_DCHECK(stream_);
+ return stream_->GetSources();
+ }
+
private:
void RecreateAudioReceiveStream() {
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
@@ -2600,6 +2606,15 @@ void WebRtcVoiceMediaChannel::SetRawAudioSink(
it->second->SetRawAudioSink(std::move(sink));
}
+std::vector<webrtc::RtpSource> WebRtcVoiceMediaChannel::GetSources(
+ uint32_t ssrc) const {
+ auto it = recv_streams_.find(ssrc);
+ RTC_DCHECK(it != recv_streams_.end())
+ << "Attempting to get contributing sources for SSRC:" << ssrc
+ << " which doesn't exist.";
+ return it->second->GetSources();
+}
+
int WebRtcVoiceMediaChannel::GetReceiveChannelId(uint32_t ssrc) const {
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
const auto it = recv_streams_.find(ssrc);

Powered by Google App Engine
This is Rietveld 408576698