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

Unified Diff: webrtc/call/rtp_stream_receiver_controller.cc

Issue 2968693002: SSRC and RSID may only refer to one sink each in RtpDemuxer (Closed)
Patch Set: Add expectations to OnlyOneSinkPerSsrcGetsOnRtpPacketTriggered. Created 3 years, 4 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/call/rtp_stream_receiver_controller.cc
diff --git a/webrtc/call/rtp_stream_receiver_controller.cc b/webrtc/call/rtp_stream_receiver_controller.cc
index 123866535299f3ce8d5104241bcb1c3b3164edea..94fa83b60e6699ae3c0cb1373a4c1143af43371e 100644
--- a/webrtc/call/rtp_stream_receiver_controller.cc
+++ b/webrtc/call/rtp_stream_receiver_controller.cc
@@ -9,6 +9,8 @@
*/
#include "webrtc/call/rtp_stream_receiver_controller.h"
+
+#include "webrtc/rtc_base/logging.h"
#include "webrtc/rtc_base/ptr_util.h"
namespace webrtc {
@@ -18,7 +20,11 @@ RtpStreamReceiverController::Receiver::Receiver(
uint32_t ssrc,
RtpPacketSinkInterface* sink)
: controller_(controller), sink_(sink) {
- controller_->AddSink(ssrc, sink_);
+ const bool sink_added = controller_->AddSink(ssrc, sink_);
+ if (!sink_added) {
+ LOG(LS_ERROR) << "RtpStreamReceiverController::Receiver::Receiver: Sink "
+ << "could not be added for SSRC=" << ssrc << ".";
+ }
}
RtpStreamReceiverController::Receiver::~Receiver() {
@@ -43,7 +49,7 @@ bool RtpStreamReceiverController::OnRtpPacket(const RtpPacketReceived& packet) {
return demuxer_.OnRtpPacket(packet);
}
-void RtpStreamReceiverController::AddSink(uint32_t ssrc,
+bool RtpStreamReceiverController::AddSink(uint32_t ssrc,
RtpPacketSinkInterface* sink) {
rtc::CritScope cs(&lock_);
return demuxer_.AddSink(ssrc, sink);
« no previous file with comments | « webrtc/call/rtp_stream_receiver_controller.h ('k') | webrtc/call/rtp_stream_receiver_controller_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698