From bc6101459f3247aa8e663c8c31e8eb8f073f9570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Tue, 31 May 2022 16:17:21 +0200 Subject: [PATCH] Delete RtpRtcpInterface::SetRid. This setter method is replaced by a construction-time config setting. Bug: None Change-Id: I1a685e9b4065762b30698231c7f4d9c567459e29 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264446 Reviewed-by: Danil Chapovalov Commit-Queue: Niels Moller Cr-Commit-Position: refs/heads/main@{#37148} --- modules/rtp_rtcp/mocks/mock_rtp_rtcp.h | 1 - modules/rtp_rtcp/source/rtp_rtcp_impl.cc | 6 ------ modules/rtp_rtcp/source/rtp_rtcp_impl.h | 2 -- modules/rtp_rtcp/source/rtp_rtcp_impl2.cc | 6 ------ modules/rtp_rtcp/source/rtp_rtcp_impl2.h | 2 -- modules/rtp_rtcp/source/rtp_rtcp_interface.h | 7 ------- modules/rtp_rtcp/source/rtp_sender.cc | 8 -------- modules/rtp_rtcp/source/rtp_sender.h | 4 +--- 8 files changed, 1 insertion(+), 35 deletions(-) diff --git a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h index 6a4eba65a5..d10dab860b 100644 --- a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h +++ b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h @@ -66,7 +66,6 @@ class MockRtpRtcpInterface : public RtpRtcpInterface { MOCK_METHOD(RtpState, GetRtpState, (), (const, override)); MOCK_METHOD(RtpState, GetRtxState, (), (const, override)); MOCK_METHOD(uint32_t, SSRC, (), (const, override)); - MOCK_METHOD(void, SetRid, (absl::string_view rid), (override)); MOCK_METHOD(void, SetMid, (absl::string_view mid), (override)); MOCK_METHOD(void, SetCsrcs, (const std::vector& csrcs), (override)); MOCK_METHOD(void, SetRtxSendStatus, (int modes), (override)); diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc index c34cf9b683..0114c99edd 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc @@ -292,12 +292,6 @@ RtpState ModuleRtpRtcpImpl::GetRtxState() const { return state; } -void ModuleRtpRtcpImpl::SetRid(absl::string_view rid) { - if (rtp_sender_) { - rtp_sender_->packet_generator.SetRid(rid); - } -} - void ModuleRtpRtcpImpl::SetMid(absl::string_view mid) { if (rtp_sender_) { rtp_sender_->packet_generator.SetMid(mid); diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/modules/rtp_rtcp/source/rtp_rtcp_impl.h index 1750e3d173..c135858156 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl.h +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.h @@ -102,8 +102,6 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp { uint32_t SSRC() const override { return rtcp_sender_.SSRC(); } - void SetRid(absl::string_view rid) override; - void SetMid(absl::string_view mid) override; void SetCsrcs(const std::vector& csrcs) override; diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc index 919542919b..115727e1ef 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc @@ -228,12 +228,6 @@ uint32_t ModuleRtpRtcpImpl2::local_media_ssrc() const { return rtcp_receiver_.local_media_ssrc(); } -void ModuleRtpRtcpImpl2::SetRid(absl::string_view rid) { - if (rtp_sender_) { - rtp_sender_->packet_generator.SetRid(rid); - } -} - void ModuleRtpRtcpImpl2::SetMid(absl::string_view mid) { if (rtp_sender_) { rtp_sender_->packet_generator.SetMid(mid); diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.h b/modules/rtp_rtcp/source/rtp_rtcp_impl2.h index 2b1fd2ef5e..5f924e9606 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.h +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.h @@ -114,8 +114,6 @@ class ModuleRtpRtcpImpl2 final : public RtpRtcpInterface, // RtpRtcpInterface::Configuration::local_media_ssrc. uint32_t local_media_ssrc() const; - void SetRid(absl::string_view rid) override; - void SetMid(absl::string_view mid) override; void SetCsrcs(const std::vector& csrcs) override; diff --git a/modules/rtp_rtcp/source/rtp_rtcp_interface.h b/modules/rtp_rtcp/source/rtp_rtcp_interface.h index f3a0f39bf8..6158d95678 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_interface.h +++ b/modules/rtp_rtcp/source/rtp_rtcp_interface.h @@ -258,13 +258,6 @@ class RtpRtcpInterface : public RtcpFeedbackSenderInterface { // Returns SSRC. virtual uint32_t SSRC() const = 0; - // Sets the value for sending in the RID (and Repaired) RTP header extension. - // RIDs are used to identify an RTP stream if SSRCs are not negotiated. - // If the RID and Repaired RID extensions are not registered, the RID will - // not be sent. - [[deprecated("Use the rid member of config struct instead'")]] virtual void - SetRid(absl::string_view rid) = 0; - // Sets the value for sending in the MID RTP header extension. // The MID RTP header extension should be registered for this to do anything. // Once set, this value can not be changed or removed. diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc index 72e8c4cc10..5aed22d3b8 100644 --- a/modules/rtp_rtcp/source/rtp_sender.cc +++ b/modules/rtp_rtcp/source/rtp_sender.cc @@ -587,14 +587,6 @@ uint32_t RTPSender::TimestampOffset() const { return timestamp_offset_; } -void RTPSender::SetRid(absl::string_view rid) { - // RID is used in simulcast scenario when multiple layers share the same mid. - MutexLock lock(&send_mutex_); - RTC_DCHECK_LE(rid.length(), RtpStreamId::kMaxValueSizeBytes); - rid_ = std::string(rid); - UpdateHeaderSizes(); -} - void RTPSender::SetMid(absl::string_view mid) { // This is configured via the API. MutexLock lock(&send_mutex_); diff --git a/modules/rtp_rtcp/source/rtp_sender.h b/modules/rtp_rtcp/source/rtp_sender.h index a212fd85f7..48e55eb0c3 100644 --- a/modules/rtp_rtcp/source/rtp_sender.h +++ b/modules/rtp_rtcp/source/rtp_sender.h @@ -58,8 +58,6 @@ class RTPSender { uint32_t TimestampOffset() const RTC_LOCKS_EXCLUDED(send_mutex_); void SetTimestampOffset(uint32_t timestamp) RTC_LOCKS_EXCLUDED(send_mutex_); - void SetRid(absl::string_view rid) RTC_LOCKS_EXCLUDED(send_mutex_); - void SetMid(absl::string_view mid) RTC_LOCKS_EXCLUDED(send_mutex_); uint16_t SequenceNumber() const RTC_LOCKS_EXCLUDED(send_mutex_); @@ -196,7 +194,7 @@ class RTPSender { // RTP variables uint32_t timestamp_offset_ RTC_GUARDED_BY(send_mutex_); // RID value to send in the RID or RepairedRID header extension. - std::string rid_ RTC_GUARDED_BY(send_mutex_); + const std::string rid_; // MID value to send in the MID header extension. std::string mid_ RTC_GUARDED_BY(send_mutex_); // Should we send MID/RID even when ACKed? (see below).