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

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

Issue 2770233003: Implemented the GetSources() in native code. (Closed)
Patch Set: Merge and add the tests. Created 3 years, 9 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..70110c0e3c54d58e1d3cf1e2cf2b79fcad9788b5 100644
--- a/webrtc/media/engine/webrtcvoiceengine.cc
+++ b/webrtc/media/engine/webrtcvoiceengine.cc
@@ -1581,6 +1581,12 @@ class WebRtcVoiceMediaChannel::WebRtcAudioReceiveStream {
playout_ = playout;
}
+ const std::vector<webrtc::RtpContributingSource*>& GetContributingSources() {
+ RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
+ RTC_DCHECK(stream_);
+ return stream_->GetContributingSources();
+ }
+
private:
void RecreateAudioReceiveStream() {
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
@@ -2600,6 +2606,15 @@ void WebRtcVoiceMediaChannel::SetRawAudioSink(
it->second->SetRawAudioSink(std::move(sink));
}
+const std::vector<webrtc::RtpContributingSource*>&
+WebRtcVoiceMediaChannel::GetContributingSources(uint32_t ssrc) {
+ auto it = recv_streams_.find(ssrc);
+ RTC_DCHECK(it != recv_streams_.end())
+ << "Attempting to get contribing sources with ssrc:" << ssrc
+ << " which is not exist.";
Taylor Brandstetter 2017/03/30 22:55:37 nit: Minor grammar/spelling issues; I'd suggest ch
Zhi Huang 2017/03/31 06:44:04 Oh, my silly mistake.
+ return it->second->GetContributingSources();
+}
+
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