diff --git a/call/rtp_stream_receiver_controller.cc b/call/rtp_stream_receiver_controller.cc index 7150b34bdb..8cefa2dffc 100644 --- a/call/rtp_stream_receiver_controller.cc +++ b/call/rtp_stream_receiver_controller.cc @@ -31,9 +31,7 @@ RtpStreamReceiverController::Receiver::Receiver( } RtpStreamReceiverController::Receiver::~Receiver() { - // Don't require return value > 0, since for RTX we currently may - // have multiple Receiver objects with the same sink. - // TODO(nisse): Consider adding a DCHECK when RtxReceiveStream is wired up. + // This may fail, if corresponding AddSink in the constructor failed. controller_->RemoveSink(sink_); } @@ -58,7 +56,7 @@ bool RtpStreamReceiverController::AddSink(uint32_t ssrc, return demuxer_.AddSink(ssrc, sink); } -size_t RtpStreamReceiverController::RemoveSink( +bool RtpStreamReceiverController::RemoveSink( const RtpPacketSinkInterface* sink) { RTC_DCHECK_RUN_ON(&demuxer_sequence_); return demuxer_.RemoveSink(sink); diff --git a/call/rtp_stream_receiver_controller.h b/call/rtp_stream_receiver_controller.h index 38b2f11d9e..46d04f73f8 100644 --- a/call/rtp_stream_receiver_controller.h +++ b/call/rtp_stream_receiver_controller.h @@ -35,10 +35,6 @@ class RtpStreamReceiverController uint32_t ssrc, RtpPacketSinkInterface* sink) override; - // Thread-safe wrappers for the corresponding RtpDemuxer methods. - bool AddSink(uint32_t ssrc, RtpPacketSinkInterface* sink) override; - size_t RemoveSink(const RtpPacketSinkInterface* sink) override; - // TODO(bugs.webrtc.org/7135): Not yet responsible for parsing. bool OnRtpPacket(const RtpPacketReceived& packet); @@ -56,6 +52,10 @@ class RtpStreamReceiverController RtpPacketSinkInterface* const sink_; }; + // Thread-safe wrappers for the corresponding RtpDemuxer methods. + bool AddSink(uint32_t ssrc, RtpPacketSinkInterface* sink); + bool RemoveSink(const RtpPacketSinkInterface* sink); + // TODO(bugs.webrtc.org/11993): We expect construction and all methods to be // called on the same thread/tq. Currently this is the worker thread // (including OnRtpPacket) but a more natural fit would be the network thread. diff --git a/call/rtp_stream_receiver_controller_interface.h b/call/rtp_stream_receiver_controller_interface.h index 68a9e7daa9..793d0bc145 100644 --- a/call/rtp_stream_receiver_controller_interface.h +++ b/call/rtp_stream_receiver_controller_interface.h @@ -36,9 +36,6 @@ class RtpStreamReceiverControllerInterface { virtual std::unique_ptr CreateReceiver( uint32_t ssrc, RtpPacketSinkInterface* sink) = 0; - // For registering additional sinks, needed for FlexFEC. - virtual bool AddSink(uint32_t ssrc, RtpPacketSinkInterface* sink) = 0; - virtual size_t RemoveSink(const RtpPacketSinkInterface* sink) = 0; }; } // namespace webrtc