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

Unified Diff: webrtc/pc/rtpreceiver.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/pc/rtpreceiver.cc
diff --git a/webrtc/pc/rtpreceiver.cc b/webrtc/pc/rtpreceiver.cc
index 6073b15a9739872fa89fbdb212722d35238e6519..537ebd4b56afd03b4f480ee27207d4fa79132f68 100644
--- a/webrtc/pc/rtpreceiver.cc
+++ b/webrtc/pc/rtpreceiver.cc
@@ -12,7 +12,9 @@
#include "webrtc/api/mediastreamtrackproxy.h"
#include "webrtc/api/videosourceproxy.h"
+#include "webrtc/base/ptr_util.h"
#include "webrtc/base/trace_event.h"
+#include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h"
#include "webrtc/pc/audiotrack.h"
#include "webrtc/pc/videotrack.h"
@@ -97,6 +99,18 @@ void AudioRtpReceiver::Stop() {
stopped_ = true;
}
+std::vector<std::unique_ptr<RtpContributingSourceInterface>>
+AudioRtpReceiver::GetContributingSources() {
+ std::vector<std::unique_ptr<RtpContributingSourceInterface>>
+ contributing_sources;
+ auto sources = channel_->GetContributingSources(ssrc_);
the sun 2017/03/30 11:31:42 Note, you can add the ssrc entry here and avoid pr
Taylor Brandstetter 2017/03/30 22:55:38 But the AudioRtpReceiver only knows about the SSRC
the sun 2017/03/31 07:05:42 Hmm. Thanks for bringing this up. When does it hap
+ for (auto source : sources) {
+ contributing_sources.push_back(
+ rtc::MakeUnique<RtpContributingSource>(*source));
+ }
+ return contributing_sources;
+}
+
void AudioRtpReceiver::Reconfigure() {
RTC_DCHECK(!stopped_);
if (!channel_) {

Powered by Google App Engine
This is Rietveld 408576698