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

Unified Diff: webrtc/call/flexfec_receive_stream_impl.cc

Issue 2886993005: Introduce RtpStreamReceiver and RtpStreamReceiverControllerInterface. (Closed)
Patch Set: Return DELIVERY_UNKNOWN_SSRC, not DELIVERY_PACKET_ERROR, when receive_rtp_config_ lookup fails. Created 3 years, 6 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/flexfec_receive_stream_impl.cc
diff --git a/webrtc/call/flexfec_receive_stream_impl.cc b/webrtc/call/flexfec_receive_stream_impl.cc
index f01043349892574f5d240cacd27583173c68ad71..68c6cae0e164130d42785c2134f6c9a1b02570d9 100644
--- a/webrtc/call/flexfec_receive_stream_impl.cc
+++ b/webrtc/call/flexfec_receive_stream_impl.cc
@@ -15,6 +15,7 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/location.h"
#include "webrtc/base/logging.h"
+#include "webrtc/call/rtp_stream_receiver_controller_interface.h"
#include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h"
#include "webrtc/modules/rtp_rtcp/include/receive_statistics.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
@@ -122,6 +123,7 @@ std::unique_ptr<RtpRtcp> CreateRtpRtcpModule(
} // namespace
FlexfecReceiveStreamImpl::FlexfecReceiveStreamImpl(
+ RtpStreamReceiverControllerInterface* receiver_controller,
const Config& config,
RecoveredPacketReceiver* recovered_packet_receiver,
RtcpRttStats* rtt_stats,
@@ -141,6 +143,16 @@ FlexfecReceiveStreamImpl::FlexfecReceiveStreamImpl(
rtp_rtcp_->SetRTCPStatus(config_.rtcp_mode);
rtp_rtcp_->SetSSRC(config_.local_ssrc);
process_thread_->RegisterModule(rtp_rtcp_.get(), RTC_FROM_HERE);
+
+ // Register with transport.
+ // TODO(nisse): OnRtpPacket in this class delegates all real work to
+ // |receiver_|. So maybe we don't need to implement RtpPacketSinkInterface
+ // here at all, we'd then delete the OnRtpPacket method and instead register
+ // |receiver_| as the RtpPacketSinkInterface for this stream.
+ rtp_stream_receiver_ =
+ receiver_controller->CreateReceiver(config_.remote_ssrc, this);
+ for (uint32_t ssrc : config.protected_media_ssrcs)
+ receiver_controller->AddSink(ssrc, this);
}
FlexfecReceiveStreamImpl::~FlexfecReceiveStreamImpl() {

Powered by Google App Engine
This is Rietveld 408576698