Do not register VideoSendStream to PacketFeedbackObserver when the current FEC controller do not use Loss Vector Mask.
Bug: chromium:804865 Change-Id: Ib197ff05266a20b8358724e7d8bfe2b085a2de23 Reviewed-on: https://webrtc-review.googlesource.com/43123 Reviewed-by: Björn Terelius <terelius@webrtc.org> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Ying Wang <yinwa@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21742}
This commit is contained in:
@ -74,6 +74,9 @@ class FecController {
|
||||
|
||||
// Informs of encoded output.
|
||||
virtual void UpdateWithEncodedData(const EncodedImage& encoded_image) = 0;
|
||||
|
||||
// Returns whether this FEC Controller needs Loss Vector Mask as input.
|
||||
virtual bool UseLossVectorMask() = 0;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
@ -40,6 +40,7 @@ class FecControllerDefault : public FecController {
|
||||
std::vector<bool> loss_mask_vector,
|
||||
int64_t round_trip_time_ms) override;
|
||||
void UpdateWithEncodedData(const EncodedImage& encoded_image) override;
|
||||
bool UseLossVectorMask() override { return false; }
|
||||
|
||||
private:
|
||||
enum { kBitrateAverageWinMs = 1000 };
|
||||
|
@ -846,7 +846,9 @@ VideoSendStreamImpl::VideoSendStreamImpl(
|
||||
|
||||
fec_controller_->SetProtectionCallback(this);
|
||||
// Signal congestion controller this object is ready for OnPacket* callbacks.
|
||||
if (fec_controller_->UseLossVectorMask()) {
|
||||
transport_->send_side_cc()->RegisterPacketFeedbackObserver(this);
|
||||
}
|
||||
|
||||
RTC_DCHECK(config_->encoder_settings.encoder);
|
||||
RTC_DCHECK_GE(config_->encoder_settings.payload_type, 0);
|
||||
@ -890,7 +892,9 @@ VideoSendStreamImpl::~VideoSendStreamImpl() {
|
||||
RTC_DCHECK(!payload_router_.IsActive())
|
||||
<< "VideoSendStreamImpl::Stop not called";
|
||||
RTC_LOG(LS_INFO) << "~VideoSendStreamInternal: " << config_->ToString();
|
||||
if (fec_controller_->UseLossVectorMask()) {
|
||||
transport_->send_side_cc()->DeRegisterPacketFeedbackObserver(this);
|
||||
}
|
||||
for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
|
||||
transport_->packet_router()->RemoveSendRtpModule(rtp_rtcp);
|
||||
delete rtp_rtcp;
|
||||
|
Reference in New Issue
Block a user