Deprecate setter RtpRtcpInterface::SetRid This setter method is replaced by a construction-time config setting. Bug: None Change-Id: Iddffaeeb719a56328bccde3c4a1a0a852d2131b1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264501 Reviewed-by: Björn Terelius <terelius@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37060}
diff --git a/call/rtp_video_sender.cc b/call/rtp_video_sender.cc index 8dbb226..1930036 100644 --- a/call/rtp_video_sender.cc +++ b/call/rtp_video_sender.cc
@@ -238,6 +238,12 @@ RTC_DCHECK(rtp_config.rtx.ssrcs.empty() || rtp_config.rtx.ssrcs.size() == rtp_config.ssrcs.size()); + + // Some streams could have been disabled, but the rids are still there. + // This will occur when simulcast has been disabled for a codec (e.g. VP9) + RTC_DCHECK(rtp_config.rids.empty() || + rtp_config.rids.size() >= rtp_config.ssrcs.size()); + for (size_t i = 0; i < rtp_config.ssrcs.size(); ++i) { RTPSenderVideo::Config video_config; configuration.local_media_ssrc = rtp_config.ssrcs[i]; @@ -251,6 +257,8 @@ RTC_DCHECK_EQ(configuration.rtx_send_ssrc.has_value(), !rtp_config.rtx.ssrcs.empty()); + configuration.rid = (i < rtp_config.rids.size()) ? rtp_config.rids[i] : ""; + configuration.need_rtp_packet_infos = rtp_config.lntf.enabled; std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp( @@ -425,7 +433,6 @@ } ConfigureSsrcs(suspended_ssrcs); - ConfigureRids(); if (!rtp_config_.mid.empty()) { for (const RtpStreamSender& stream : rtp_streams_) { @@ -760,18 +767,6 @@ } } -void RtpVideoSender::ConfigureRids() { - if (rtp_config_.rids.empty()) - return; - - // Some streams could have been disabled, but the rids are still there. - // This will occur when simulcast has been disabled for a codec (e.g. VP9) - RTC_DCHECK(rtp_config_.rids.size() >= rtp_streams_.size()); - for (size_t i = 0; i < rtp_streams_.size(); ++i) { - rtp_streams_[i].rtp_rtcp->SetRid(rtp_config_.rids[i]); - } -} - void RtpVideoSender::OnNetworkAvailability(bool network_available) { for (const RtpStreamSender& stream : rtp_streams_) { stream.rtp_rtcp->SetRTCPStatus(network_available ? rtp_config_.rtcp_mode