Properly mark RtpRtcp deprecated

The clang pragma have been added to ensure we can still test the code
until usage is gone, and that we can still have the one implementation
compiling without itself tripping on the deprecation errors.

Users of the code will have deprecation warnings or error as intended.

Bug: webrtc:14617
Change-Id: I21dae57c669557d4d218c235c811174a477be080
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281221
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38514}
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
index 0f4f004..cbe30dd 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
@@ -43,8 +43,12 @@
 struct PacedPacketInfo;
 struct RTPVideoHeader;
 
-// DEPRECATED.
-class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+class ABSL_DEPRECATED("") ModuleRtpRtcpImpl
+    : public RtpRtcp,
+      public RTCPReceiver::ModuleRtpRtcp {
+#pragma clang diagnostic pop
  public:
   explicit ModuleRtpRtcpImpl(
       const RtpRtcpInterface::Configuration& configuration);
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
index 9b9c1d8..96bef23 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
@@ -44,6 +44,9 @@
 const int kWidth = 320;
 const int kHeight = 100;
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
 class RtcpRttStatsTestImpl : public RtcpRttStats {
  public:
   RtcpRttStatsTestImpl() : rtt_ms_(0) {}
@@ -697,4 +700,6 @@
                              Field(&SenderReportStats::bytes_sent, Gt(0u)))));
 }
 
+#pragma clang diagnostic pop
+
 }  // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_sender_egress_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_egress_unittest.cc
index 22224f0..30e0c64 100644
--- a/modules/rtp_rtcp/source/rtp_sender_egress_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_egress_unittest.cc
@@ -154,8 +154,8 @@
     return std::make_unique<RtpSenderEgress>(DefaultConfig(), &packet_history_);
   }
 
-  RtpRtcp::Configuration DefaultConfig() {
-    RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration DefaultConfig() {
+    RtpRtcpInterface::Configuration config;
     config.clock = clock_;
     config.outgoing_transport = &transport_;
     config.local_media_ssrc = kSsrc;