Remove dependency from RtpRtcp on the Module interface.

The 'Module' part of the implementation must not be
called via the RtpRtcp interface, but is rather a part of
the contract with ProcessThread. That in turn is an
implementation detail for how timers are currently implemented
in the default implementation.

Along the way I'm deprecating away the factory function which
was inside the interface and tied it to one specific implementation.
Instead, I'm moving that to the implementation itself and down the
line, we don't have to go through it if we just want to create an
instance of the class.

The key change is in rtp_rtcp.h and the new rtp_rtcp_interface.h
header file (things moved from rtp_rtcp.h), the rest falls from that.

Change-Id: I294f13e947b9e3e4e649400ee94a11a81e8071ce
Bug: webrtc:11581
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176419
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31440}
diff --git a/audio/audio_send_stream.h b/audio/audio_send_stream.h
index 5f8a936..13166d4 100644
--- a/audio/audio_send_stream.h
+++ b/audio/audio_send_stream.h
@@ -20,7 +20,7 @@
 #include "call/audio_send_stream.h"
 #include "call/audio_state.h"
 #include "call/bitrate_allocator.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "rtc_base/constructor_magic.h"
 #include "rtc_base/experiments/struct_parameters_parser.h"
 #include "rtc_base/race_checker.h"
@@ -175,7 +175,7 @@
       RTC_GUARDED_BY(worker_queue_);
   RtpTransportControllerSendInterface* const rtp_transport_;
 
-  RtpRtcp* const rtp_rtcp_module_;
+  RtpRtcpInterface* const rtp_rtcp_module_;
   absl::optional<RtpState> const suspended_rtp_state_;
 
   // RFC 5285: Each distinct extension MUST have a unique ID. The value 0 is
diff --git a/audio/audio_send_stream_unittest.cc b/audio/audio_send_stream_unittest.cc
index 89f94cd..a7087b0 100644
--- a/audio/audio_send_stream_unittest.cc
+++ b/audio/audio_send_stream_unittest.cc
@@ -203,7 +203,7 @@
     return *static_cast<MockAudioEncoderFactory*>(
         stream_config_.encoder_factory.get());
   }
-  MockRtpRtcp* rtp_rtcp() { return &rtp_rtcp_; }
+  MockRtpRtcpInterface* rtp_rtcp() { return &rtp_rtcp_; }
   MockChannelSend* channel_send() { return channel_send_; }
   RtpTransportControllerSendInterface* transport() { return &rtp_transport_; }
 
@@ -332,7 +332,7 @@
   ::testing::StrictMock<MockRtcpBandwidthObserver> bandwidth_observer_;
   ::testing::NiceMock<MockRtcEventLog> event_log_;
   ::testing::NiceMock<MockRtpTransportControllerSend> rtp_transport_;
-  ::testing::NiceMock<MockRtpRtcp> rtp_rtcp_;
+  ::testing::NiceMock<MockRtpRtcpInterface> rtp_rtcp_;
   ::testing::NiceMock<MockLimitObserver> limit_observer_;
   BitrateAllocator bitrate_allocator_;
   // |worker_queue| is defined last to ensure all pending tasks are cancelled
diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc
index c427844..34b6d09 100644
--- a/audio/channel_receive.cc
+++ b/audio/channel_receive.cc
@@ -216,7 +216,7 @@
   std::map<uint8_t, int> payload_type_frequencies_;
 
   std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
-  std::unique_ptr<RtpRtcp> _rtpRtcpModule;
+  std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_;
   const uint32_t remote_ssrc_;
 
   // Info for GetSyncInfo is updated on network or worker thread, and queried on
@@ -297,7 +297,7 @@
   }
 
   int64_t round_trip_time = 0;
-  _rtpRtcpModule->RTT(remote_ssrc_, &round_trip_time, NULL, NULL, NULL);
+  rtp_rtcp_->RTT(remote_ssrc_, &round_trip_time, NULL, NULL, NULL);
 
   std::vector<uint16_t> nack_list = acm_receiver_.GetNackList(round_trip_time);
   if (!nack_list.empty()) {
@@ -495,7 +495,7 @@
   _outputAudioLevel.ResetLevelFullRange();
 
   rtp_receive_statistics_->EnableRetransmitDetection(remote_ssrc_, true);
-  RtpRtcp::Configuration configuration;
+  RtpRtcpInterface::Configuration configuration;
   configuration.clock = clock;
   configuration.audio = true;
   configuration.receiver_only = true;
@@ -507,14 +507,14 @@
   if (frame_transformer)
     InitFrameTransformerDelegate(std::move(frame_transformer));
 
-  _rtpRtcpModule = ModuleRtpRtcpImpl2::Create(configuration);
-  _rtpRtcpModule->SetSendingMediaStatus(false);
-  _rtpRtcpModule->SetRemoteSSRC(remote_ssrc_);
+  rtp_rtcp_ = ModuleRtpRtcpImpl2::Create(configuration);
+  rtp_rtcp_->SetSendingMediaStatus(false);
+  rtp_rtcp_->SetRemoteSSRC(remote_ssrc_);
 
-  _moduleProcessThreadPtr->RegisterModule(_rtpRtcpModule.get(), RTC_FROM_HERE);
+  _moduleProcessThreadPtr->RegisterModule(rtp_rtcp_.get(), RTC_FROM_HERE);
 
   // Ensure that RTCP is enabled for the created channel.
-  _rtpRtcpModule->SetRTCPStatus(RtcpMode::kCompound);
+  rtp_rtcp_->SetRTCPStatus(RtcpMode::kCompound);
 }
 
 ChannelReceive::~ChannelReceive() {
@@ -527,7 +527,7 @@
   StopPlayout();
 
   if (_moduleProcessThreadPtr)
-    _moduleProcessThreadPtr->DeRegisterModule(_rtpRtcpModule.get());
+    _moduleProcessThreadPtr->DeRegisterModule(rtp_rtcp_.get());
 }
 
 void ChannelReceive::SetSink(AudioSinkInterface* sink) {
@@ -659,7 +659,7 @@
   UpdatePlayoutTimestamp(true, rtc::TimeMillis());
 
   // Deliver RTCP packet to RTP/RTCP module for parsing
-  _rtpRtcpModule->IncomingRtcpPacket(data, length);
+  rtp_rtcp_->IncomingRtcpPacket(data, length);
 
   int64_t rtt = GetRTT();
   if (rtt == 0) {
@@ -670,8 +670,8 @@
   uint32_t ntp_secs = 0;
   uint32_t ntp_frac = 0;
   uint32_t rtp_timestamp = 0;
-  if (0 != _rtpRtcpModule->RemoteNTP(&ntp_secs, &ntp_frac, NULL, NULL,
-                                     &rtp_timestamp)) {
+  if (0 !=
+      rtp_rtcp_->RemoteNTP(&ntp_secs, &ntp_frac, NULL, NULL, &rtp_timestamp)) {
     // Waiting for RTCP.
     return;
   }
@@ -709,14 +709,14 @@
   RTC_DCHECK(packet_router);
   RTC_DCHECK(!packet_router_);
   constexpr bool remb_candidate = false;
-  packet_router->AddReceiveRtpModule(_rtpRtcpModule.get(), remb_candidate);
+  packet_router->AddReceiveRtpModule(rtp_rtcp_.get(), remb_candidate);
   packet_router_ = packet_router;
 }
 
 void ChannelReceive::ResetReceiverCongestionControlObjects() {
   RTC_DCHECK(worker_thread_checker_.IsCurrent());
   RTC_DCHECK(packet_router_);
-  packet_router_->RemoveReceiveRtpModule(_rtpRtcpModule.get());
+  packet_router_->RemoveReceiveRtpModule(rtp_rtcp_.get());
   packet_router_ = nullptr;
 }
 
@@ -781,7 +781,7 @@
 // Called when we are missing one or more packets.
 int ChannelReceive::ResendPackets(const uint16_t* sequence_numbers,
                                   int length) {
-  return _rtpRtcpModule->SendNACK(sequence_numbers, length);
+  return rtp_rtcp_->SendNACK(sequence_numbers, length);
 }
 
 void ChannelReceive::SetAssociatedSendChannel(
@@ -877,9 +877,9 @@
 absl::optional<Syncable::Info> ChannelReceive::GetSyncInfo() const {
   RTC_DCHECK(module_process_thread_checker_.IsCurrent());
   Syncable::Info info;
-  if (_rtpRtcpModule->RemoteNTP(&info.capture_time_ntp_secs,
-                                &info.capture_time_ntp_frac, nullptr, nullptr,
-                                &info.capture_time_source_clock) != 0) {
+  if (rtp_rtcp_->RemoteNTP(&info.capture_time_ntp_secs,
+                           &info.capture_time_ntp_frac, nullptr, nullptr,
+                           &info.capture_time_source_clock) != 0) {
     return absl::nullopt;
   }
   {
@@ -942,7 +942,7 @@
 
 int64_t ChannelReceive::GetRTT() const {
   std::vector<RTCPReportBlock> report_blocks;
-  _rtpRtcpModule->RemoteRTCPStat(&report_blocks);
+  rtp_rtcp_->RemoteRTCPStat(&report_blocks);
 
   // TODO(nisse): Could we check the return value from the ->RTT() call below,
   // instead of checking if we have any report blocks?
@@ -961,8 +961,7 @@
   int64_t min_rtt = 0;
   // TODO(nisse): This method computes RTT based on sender reports, even though
   // a receive stream is not supposed to do that.
-  if (_rtpRtcpModule->RTT(remote_ssrc_, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
-      0) {
+  if (rtp_rtcp_->RTT(remote_ssrc_, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 0) {
     return 0;
   }
   return rtt;
diff --git a/audio/channel_send.cc b/audio/channel_send.cc
index 1c18a8b..16d1da6 100644
--- a/audio/channel_send.cc
+++ b/audio/channel_send.cc
@@ -107,7 +107,7 @@
   ANAStats GetANAStatistics() const override;
 
   // Used by AudioSendStream.
-  RtpRtcp* GetRtpRtcp() const override;
+  RtpRtcpInterface* GetRtpRtcp() const override;
 
   void RegisterCngPayloadType(int payload_type, int payload_frequency) override;
 
@@ -192,7 +192,7 @@
 
   RtcEventLog* const event_log_;
 
-  std::unique_ptr<RtpRtcp> _rtpRtcpModule;
+  std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_;
   std::unique_ptr<RTPSenderAudio> rtp_sender_audio_;
 
   std::unique_ptr<AudioCodingModule> audio_coding_;
@@ -389,9 +389,9 @@
     // Asynchronously transform the payload before sending it. After the payload
     // is transformed, the delegate will call SendRtpAudio to send it.
     frame_transformer_delegate_->Transform(
-        frameType, payloadType, rtp_timestamp, _rtpRtcpModule->StartTimestamp(),
+        frameType, payloadType, rtp_timestamp, rtp_rtcp_->StartTimestamp(),
         payloadData, payloadSize, absolute_capture_timestamp_ms,
-        _rtpRtcpModule->SSRC());
+        rtp_rtcp_->SSRC());
     return 0;
   }
   return SendRtpAudio(frameType, payloadType, rtp_timestamp, payload,
@@ -428,7 +428,7 @@
       // Encrypt the audio payload into the buffer.
       size_t bytes_written = 0;
       int encrypt_status = frame_encryptor_->Encrypt(
-          cricket::MEDIA_TYPE_AUDIO, _rtpRtcpModule->SSRC(),
+          cricket::MEDIA_TYPE_AUDIO, rtp_rtcp_->SSRC(),
           /*additional_data=*/nullptr, payload, encrypted_audio_payload,
           &bytes_written);
       if (encrypt_status != 0) {
@@ -450,12 +450,12 @@
 
   // Push data from ACM to RTP/RTCP-module to deliver audio frame for
   // packetization.
-  if (!_rtpRtcpModule->OnSendingRtpFrame(rtp_timestamp,
-                                         // Leaving the time when this frame was
-                                         // received from the capture device as
-                                         // undefined for voice for now.
-                                         -1, payloadType,
-                                         /*force_sender_report=*/false)) {
+  if (!rtp_rtcp_->OnSendingRtpFrame(rtp_timestamp,
+                                    // Leaving the time when this frame was
+                                    // received from the capture device as
+                                    // undefined for voice for now.
+                                    -1, payloadType,
+                                    /*force_sender_report=*/false)) {
     return -1;
   }
 
@@ -467,9 +467,8 @@
 
   // This call will trigger Transport::SendPacket() from the RTP/RTCP module.
   if (!rtp_sender_audio_->SendAudio(
-          frameType, payloadType,
-          rtp_timestamp + _rtpRtcpModule->StartTimestamp(), payload.data(),
-          payload.size(), absolute_capture_timestamp_ms)) {
+          frameType, payloadType, rtp_timestamp + rtp_rtcp_->StartTimestamp(),
+          payload.data(), payload.size(), absolute_capture_timestamp_ms)) {
     RTC_DLOG(LS_ERROR)
         << "ChannelSend::SendData() failed to send data to RTP/RTCP module";
     return -1;
@@ -513,7 +512,7 @@
 
   audio_coding_.reset(AudioCodingModule::Create(AudioCodingModule::Config()));
 
-  RtpRtcp::Configuration configuration;
+  RtpRtcpInterface::Configuration configuration;
   configuration.bandwidth_callback = rtcp_observer_.get();
   configuration.transport_feedback_callback = feedback_observer_proxy_.get();
   configuration.clock = (clock ? clock : Clock::GetRealTimeClock());
@@ -531,16 +530,16 @@
 
   configuration.local_media_ssrc = ssrc;
 
-  _rtpRtcpModule = ModuleRtpRtcpImpl2::Create(configuration);
-  _rtpRtcpModule->SetSendingMediaStatus(false);
+  rtp_rtcp_ = ModuleRtpRtcpImpl2::Create(configuration);
+  rtp_rtcp_->SetSendingMediaStatus(false);
 
-  rtp_sender_audio_ = std::make_unique<RTPSenderAudio>(
-      configuration.clock, _rtpRtcpModule->RtpSender());
+  rtp_sender_audio_ = std::make_unique<RTPSenderAudio>(configuration.clock,
+                                                       rtp_rtcp_->RtpSender());
 
-  _moduleProcessThreadPtr->RegisterModule(_rtpRtcpModule.get(), RTC_FROM_HERE);
+  _moduleProcessThreadPtr->RegisterModule(rtp_rtcp_.get(), RTC_FROM_HERE);
 
   // Ensure that RTCP is enabled by default for the created channel.
-  _rtpRtcpModule->SetRTCPStatus(RtcpMode::kCompound);
+  rtp_rtcp_->SetRTCPStatus(RtcpMode::kCompound);
 
   int error = audio_coding_->RegisterTransportCallback(this);
   RTC_DCHECK_EQ(0, error);
@@ -560,7 +559,7 @@
   RTC_DCHECK_EQ(0, error);
 
   if (_moduleProcessThreadPtr)
-    _moduleProcessThreadPtr->DeRegisterModule(_rtpRtcpModule.get());
+    _moduleProcessThreadPtr->DeRegisterModule(rtp_rtcp_.get());
 }
 
 void ChannelSend::StartSend() {
@@ -568,8 +567,8 @@
   RTC_DCHECK(!sending_);
   sending_ = true;
 
-  _rtpRtcpModule->SetSendingMediaStatus(true);
-  int ret = _rtpRtcpModule->SetSendingStatus(true);
+  rtp_rtcp_->SetSendingMediaStatus(true);
+  int ret = rtp_rtcp_->SetSendingStatus(true);
   RTC_DCHECK_EQ(0, ret);
   // It is now OK to start processing on the encoder task queue.
   encoder_queue_.PostTask([this] {
@@ -595,10 +594,10 @@
 
   // Reset sending SSRC and sequence number and triggers direct transmission
   // of RTCP BYE
-  if (_rtpRtcpModule->SetSendingStatus(false) == -1) {
+  if (rtp_rtcp_->SetSendingStatus(false) == -1) {
     RTC_DLOG(LS_ERROR) << "StartSend() RTP/RTCP failed to stop sending";
   }
-  _rtpRtcpModule->SetSendingMediaStatus(false);
+  rtp_rtcp_->SetSendingMediaStatus(false);
 }
 
 void ChannelSend::SetEncoder(int payload_type,
@@ -609,8 +608,8 @@
 
   // The RTP/RTCP module needs to know the RTP timestamp rate (i.e. clockrate)
   // as well as some other things, so we collect this info and send it along.
-  _rtpRtcpModule->RegisterSendPayloadFrequency(payload_type,
-                                               encoder->RtpTimestampRateHz());
+  rtp_rtcp_->RegisterSendPayloadFrequency(payload_type,
+                                          encoder->RtpTimestampRateHz());
   rtp_sender_audio_->RegisterAudioPayload("audio", payload_type,
                                           encoder->RtpTimestampRateHz(),
                                           encoder->NumChannels(), 0);
@@ -665,7 +664,7 @@
 
 void ChannelSend::ReceivedRTCPPacket(const uint8_t* data, size_t length) {
   // Deliver RTCP packet to RTP/RTCP module for parsing
-  _rtpRtcpModule->IncomingRtcpPacket(data, length);
+  rtp_rtcp_->IncomingRtcpPacket(data, length);
 
   int64_t rtt = GetRTT();
   if (rtt == 0) {
@@ -714,7 +713,7 @@
 
 void ChannelSend::RegisterCngPayloadType(int payload_type,
                                          int payload_frequency) {
-  _rtpRtcpModule->RegisterSendPayloadFrequency(payload_type, payload_frequency);
+  rtp_rtcp_->RegisterSendPayloadFrequency(payload_type, payload_frequency);
   rtp_sender_audio_->RegisterAudioPayload("CN", payload_type, payload_frequency,
                                           1, 0);
 }
@@ -724,7 +723,7 @@
   RTC_DCHECK_RUN_ON(&worker_thread_checker_);
   RTC_DCHECK_LE(0, payload_type);
   RTC_DCHECK_GE(127, payload_type);
-  _rtpRtcpModule->RegisterSendPayloadFrequency(payload_type, payload_frequency);
+  rtp_rtcp_->RegisterSendPayloadFrequency(payload_type, payload_frequency);
   rtp_sender_audio_->RegisterAudioPayload("telephone-event", payload_type,
                                           payload_frequency, 0, 0);
 }
@@ -733,9 +732,9 @@
   RTC_DCHECK_RUN_ON(&worker_thread_checker_);
   _includeAudioLevelIndication = enable;
   if (enable) {
-    _rtpRtcpModule->RegisterRtpHeaderExtension(AudioLevel::kUri, id);
+    rtp_rtcp_->RegisterRtpHeaderExtension(AudioLevel::kUri, id);
   } else {
-    _rtpRtcpModule->DeregisterSendRtpHeaderExtension(AudioLevel::kUri);
+    rtp_rtcp_->DeregisterSendRtpHeaderExtension(AudioLevel::kUri);
   }
 }
 
@@ -756,19 +755,19 @@
   feedback_observer_proxy_->SetTransportFeedbackObserver(
       transport_feedback_observer);
   rtp_packet_pacer_proxy_->SetPacketPacer(rtp_packet_pacer);
-  _rtpRtcpModule->SetStorePacketsStatus(true, 600);
+  rtp_rtcp_->SetStorePacketsStatus(true, 600);
   constexpr bool remb_candidate = false;
-  packet_router->AddSendRtpModule(_rtpRtcpModule.get(), remb_candidate);
+  packet_router->AddSendRtpModule(rtp_rtcp_.get(), remb_candidate);
   packet_router_ = packet_router;
 }
 
 void ChannelSend::ResetSenderCongestionControlObjects() {
   RTC_DCHECK_RUN_ON(&worker_thread_checker_);
   RTC_DCHECK(packet_router_);
-  _rtpRtcpModule->SetStorePacketsStatus(false, 600);
+  rtp_rtcp_->SetStorePacketsStatus(false, 600);
   rtcp_observer_->SetBandwidthObserver(nullptr);
   feedback_observer_proxy_->SetTransportFeedbackObserver(nullptr);
-  packet_router_->RemoveSendRtpModule(_rtpRtcpModule.get());
+  packet_router_->RemoveSendRtpModule(rtp_rtcp_.get());
   packet_router_ = nullptr;
   rtp_packet_pacer_proxy_->SetPacketPacer(nullptr);
 }
@@ -777,7 +776,7 @@
   RTC_DCHECK_RUN_ON(&worker_thread_checker_);
   // Note: SetCNAME() accepts a c string of length at most 255.
   const std::string c_name_limited(c_name.substr(0, 255));
-  int ret = _rtpRtcpModule->SetCNAME(c_name_limited.c_str()) != 0;
+  int ret = rtp_rtcp_->SetCNAME(c_name_limited.c_str()) != 0;
   RTC_DCHECK_EQ(0, ret) << "SetRTCP_CNAME() failed to set RTCP CNAME";
 }
 
@@ -788,7 +787,7 @@
   // report block according to RFC 3550.
   std::vector<RTCPReportBlock> rtcp_report_blocks;
 
-  int ret = _rtpRtcpModule->RemoteRTCPStat(&rtcp_report_blocks);
+  int ret = rtp_rtcp_->RemoteRTCPStat(&rtcp_report_blocks);
   RTC_DCHECK_EQ(0, ret);
 
   std::vector<ReportBlock> report_blocks;
@@ -817,7 +816,7 @@
 
   StreamDataCounters rtp_stats;
   StreamDataCounters rtx_stats;
-  _rtpRtcpModule->GetSendStreamDataCounters(&rtp_stats, &rtx_stats);
+  rtp_rtcp_->GetSendStreamDataCounters(&rtp_stats, &rtx_stats);
   stats.payload_bytes_sent =
       rtp_stats.transmitted.payload_bytes + rtx_stats.transmitted.payload_bytes;
   stats.header_and_padding_bytes_sent =
@@ -830,7 +829,7 @@
   stats.packetsSent =
       rtp_stats.transmitted.packets + rtx_stats.transmitted.packets;
   stats.retransmitted_packets_sent = rtp_stats.retransmitted.packets;
-  stats.report_block_datas = _rtpRtcpModule->GetLatestReportBlockData();
+  stats.report_block_datas = rtp_rtcp_->GetLatestReportBlockData();
 
   return stats;
 }
@@ -895,14 +894,14 @@
   return audio_coding_->GetANAStats();
 }
 
-RtpRtcp* ChannelSend::GetRtpRtcp() const {
+RtpRtcpInterface* ChannelSend::GetRtpRtcp() const {
   RTC_DCHECK(module_process_thread_checker_.IsCurrent());
-  return _rtpRtcpModule.get();
+  return rtp_rtcp_.get();
 }
 
 int64_t ChannelSend::GetRTT() const {
   std::vector<RTCPReportBlock> report_blocks;
-  _rtpRtcpModule->RemoteRTCPStat(&report_blocks);
+  rtp_rtcp_->RemoteRTCPStat(&report_blocks);
 
   if (report_blocks.empty()) {
     return 0;
@@ -914,8 +913,8 @@
   int64_t min_rtt = 0;
   // We don't know in advance the remote ssrc used by the other end's receiver
   // reports, so use the SSRC of the first report block for calculating the RTT.
-  if (_rtpRtcpModule->RTT(report_blocks[0].sender_ssrc, &rtt, &avg_rtt,
-                          &min_rtt, &max_rtt) != 0) {
+  if (rtp_rtcp_->RTT(report_blocks[0].sender_ssrc, &rtt, &avg_rtt, &min_rtt,
+                     &max_rtt) != 0) {
     return 0;
   }
   return rtt;
diff --git a/audio/channel_send.h b/audio/channel_send.h
index cb3b992..56fea97 100644
--- a/audio/channel_send.h
+++ b/audio/channel_send.h
@@ -22,7 +22,7 @@
 #include "api/function_view.h"
 #include "api/task_queue/task_queue_factory.h"
 #include "modules/rtp_rtcp/include/report_block_data.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "modules/rtp_rtcp/source/rtp_sender_audio.h"
 
 namespace webrtc {
@@ -30,7 +30,6 @@
 class FrameEncryptorInterface;
 class ProcessThread;
 class RtcEventLog;
-class RtpRtcp;
 class RtpTransportControllerSendInterface;
 
 struct CallSendStatistics {
@@ -97,7 +96,7 @@
 
   virtual void ProcessAndEncodeAudio(
       std::unique_ptr<AudioFrame> audio_frame) = 0;
-  virtual RtpRtcp* GetRtpRtcp() const = 0;
+  virtual RtpRtcpInterface* GetRtpRtcp() const = 0;
 
   // In RTP we currently rely on RTCP packets (|ReceivedRTCPPacket|) to inform
   // about RTT.
diff --git a/audio/mock_voe_channel_proxy.h b/audio/mock_voe_channel_proxy.h
index c0fcbc4..542358f 100644
--- a/audio/mock_voe_channel_proxy.h
+++ b/audio/mock_voe_channel_proxy.h
@@ -152,7 +152,7 @@
               ProcessAndEncodeAudio,
               (std::unique_ptr<AudioFrame>),
               (override));
-  MOCK_METHOD(RtpRtcp*, GetRtpRtcp, (), (const, override));
+  MOCK_METHOD(RtpRtcpInterface*, GetRtpRtcp, (), (const, override));
   MOCK_METHOD(int, GetBitrate, (), (const, override));
   MOCK_METHOD(int64_t, GetRTT, (), (const, override));
   MOCK_METHOD(void, StartSend, (), (override));
diff --git a/audio/voip/audio_channel.cc b/audio/voip/audio_channel.cc
index 455c43c..ee08e05 100644
--- a/audio/voip/audio_channel.cc
+++ b/audio/voip/audio_channel.cc
@@ -44,7 +44,7 @@
   Clock* clock = Clock::GetRealTimeClock();
   receive_statistics_ = ReceiveStatistics::Create(clock);
 
-  RtpRtcp::Configuration rtp_config;
+  RtpRtcpInterface::Configuration rtp_config;
   rtp_config.clock = clock;
   rtp_config.audio = true;
   rtp_config.receive_statistics = receive_statistics_.get();
diff --git a/audio/voip/audio_channel.h b/audio/voip/audio_channel.h
index 8b6f1a8..b305215 100644
--- a/audio/voip/audio_channel.h
+++ b/audio/voip/audio_channel.h
@@ -20,7 +20,7 @@
 #include "api/voip/voip_base.h"
 #include "audio/voip/audio_egress.h"
 #include "audio/voip/audio_ingress.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_impl2.h"
 #include "modules/utility/include/process_thread.h"
 #include "rtc_base/critical_section.h"
 #include "rtc_base/ref_count.h"
@@ -88,7 +88,7 @@
   // Listed in order for safe destruction of AudioChannel object.
   // Synchronization for these are handled internally.
   std::unique_ptr<ReceiveStatistics> receive_statistics_;
-  std::unique_ptr<RtpRtcp> rtp_rtcp_;
+  std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_;
   std::unique_ptr<AudioIngress> ingress_;
   std::unique_ptr<AudioEgress> egress_;
 };
diff --git a/audio/voip/audio_egress.cc b/audio/voip/audio_egress.cc
index a7bc202..305f712 100644
--- a/audio/voip/audio_egress.cc
+++ b/audio/voip/audio_egress.cc
@@ -17,7 +17,7 @@
 
 namespace webrtc {
 
-AudioEgress::AudioEgress(RtpRtcp* rtp_rtcp,
+AudioEgress::AudioEgress(RtpRtcpInterface* rtp_rtcp,
                          Clock* clock,
                          TaskQueueFactory* task_queue_factory)
     : rtp_rtcp_(rtp_rtcp),
diff --git a/audio/voip/audio_egress.h b/audio/voip/audio_egress.h
index e5632cd..20b0bac 100644
--- a/audio/voip/audio_egress.h
+++ b/audio/voip/audio_egress.h
@@ -20,7 +20,7 @@
 #include "call/audio_sender.h"
 #include "modules/audio_coding/include/audio_coding_module.h"
 #include "modules/rtp_rtcp/include/report_block_data.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "modules/rtp_rtcp/source/rtp_sender_audio.h"
 #include "rtc_base/task_queue.h"
 #include "rtc_base/thread_checker.h"
@@ -43,7 +43,7 @@
 // smaller footprint.
 class AudioEgress : public AudioSender, public AudioPacketizationCallback {
  public:
-  AudioEgress(RtpRtcp* rtp_rtcp,
+  AudioEgress(RtpRtcpInterface* rtp_rtcp,
               Clock* clock,
               TaskQueueFactory* task_queue_factory);
   ~AudioEgress() override;
@@ -109,7 +109,7 @@
   absl::optional<SdpAudioFormat> encoder_format_ RTC_GUARDED_BY(lock_);
 
   // Synchronization is handled internally by RtpRtcp.
-  RtpRtcp* const rtp_rtcp_;
+  RtpRtcpInterface* const rtp_rtcp_;
 
   // Synchronization is handled internally by RTPSenderAudio.
   RTPSenderAudio rtp_sender_audio_;
diff --git a/audio/voip/audio_ingress.cc b/audio/voip/audio_ingress.cc
index fb43fcd..68864eb 100644
--- a/audio/voip/audio_ingress.cc
+++ b/audio/voip/audio_ingress.cc
@@ -36,7 +36,7 @@
 }  // namespace
 
 AudioIngress::AudioIngress(
-    RtpRtcp* rtp_rtcp,
+    RtpRtcpInterface* rtp_rtcp,
     Clock* clock,
     ReceiveStatistics* receive_statistics,
     rtc::scoped_refptr<AudioDecoderFactory> decoder_factory)
diff --git a/audio/voip/audio_ingress.h b/audio/voip/audio_ingress.h
index 9976674..15f7900 100644
--- a/audio/voip/audio_ingress.h
+++ b/audio/voip/audio_ingress.h
@@ -26,8 +26,8 @@
 #include "modules/audio_coding/include/audio_coding_module.h"
 #include "modules/rtp_rtcp/include/receive_statistics.h"
 #include "modules/rtp_rtcp/include/remote_ntp_time_estimator.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "modules/rtp_rtcp/source/rtp_packet_received.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "rtc_base/critical_section.h"
 #include "rtc_base/time_utils.h"
 
@@ -44,7 +44,7 @@
 // smaller footprint.
 class AudioIngress : public AudioMixer::Source {
  public:
-  AudioIngress(RtpRtcp* rtp_rtcp,
+  AudioIngress(RtpRtcpInterface* rtp_rtcp,
                Clock* clock,
                ReceiveStatistics* receive_statistics,
                rtc::scoped_refptr<AudioDecoderFactory> decoder_factory);
@@ -122,8 +122,8 @@
   // Synchronizaton is handled internally by ReceiveStatistics.
   ReceiveStatistics* const rtp_receive_statistics_;
 
-  // Synchronizaton is handled internally by RtpRtcp.
-  RtpRtcp* const rtp_rtcp_;
+  // Synchronizaton is handled internally by RtpRtcpInterface.
+  RtpRtcpInterface* const rtp_rtcp_;
 
   // Synchronizaton is handled internally by acm2::AcmReceiver.
   acm2::AcmReceiver acm_receiver_;
diff --git a/audio/voip/test/audio_egress_unittest.cc b/audio/voip/test/audio_egress_unittest.cc
index ebb1772..70fb6dc 100644
--- a/audio/voip/test/audio_egress_unittest.cc
+++ b/audio/voip/test/audio_egress_unittest.cc
@@ -28,10 +28,10 @@
 using ::testing::NiceMock;
 using ::testing::Unused;
 
-std::unique_ptr<RtpRtcp> CreateRtpStack(Clock* clock,
-                                        Transport* transport,
-                                        uint32_t remote_ssrc) {
-  RtpRtcp::Configuration rtp_config;
+std::unique_ptr<ModuleRtpRtcpImpl2> CreateRtpStack(Clock* clock,
+                                                   Transport* transport,
+                                                   uint32_t remote_ssrc) {
+  RtpRtcpInterface::Configuration rtp_config;
   rtp_config.clock = clock;
   rtp_config.audio = true;
   rtp_config.rtcp_report_interval_ms = 5000;
@@ -101,7 +101,7 @@
   SimulatedClock fake_clock_;
   NiceMock<MockTransport> transport_;
   SineWaveGenerator wave_generator_;
-  std::unique_ptr<RtpRtcp> rtp_rtcp_;
+  std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_;
   std::unique_ptr<TaskQueueFactory> task_queue_factory_;
   rtc::scoped_refptr<AudioEncoderFactory> encoder_factory_;
   std::unique_ptr<AudioEgress> egress_;
diff --git a/audio/voip/test/audio_ingress_unittest.cc b/audio/voip/test/audio_ingress_unittest.cc
index 91d114c..3a2a66a 100644
--- a/audio/voip/test/audio_ingress_unittest.cc
+++ b/audio/voip/test/audio_ingress_unittest.cc
@@ -39,7 +39,7 @@
       : fake_clock_(123456789), wave_generator_(1000.0, kAudioLevel) {
     receive_statistics_ = ReceiveStatistics::Create(&fake_clock_);
 
-    RtpRtcp::Configuration rtp_config;
+    RtpRtcpInterface::Configuration rtp_config;
     rtp_config.clock = &fake_clock_;
     rtp_config.audio = true;
     rtp_config.receive_statistics = receive_statistics_.get();
@@ -95,7 +95,7 @@
   SineWaveGenerator wave_generator_;
   NiceMock<MockTransport> transport_;
   std::unique_ptr<ReceiveStatistics> receive_statistics_;
-  std::unique_ptr<RtpRtcp> rtp_rtcp_;
+  std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_;
   rtc::scoped_refptr<AudioEncoderFactory> encoder_factory_;
   rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
   std::unique_ptr<TaskQueueFactory> task_queue_factory_;
diff --git a/call/call_unittest.cc b/call/call_unittest.cc
index 0b05379..f5cc51f 100644
--- a/call/call_unittest.cc
+++ b/call/call_unittest.cc
@@ -26,7 +26,7 @@
 #include "call/audio_state.h"
 #include "modules/audio_device/include/mock_audio_device.h"
 #include "modules/audio_processing/include/mock_audio_processing.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "test/fake_encoder.h"
 #include "test/gtest.h"
 #include "test/mock_audio_decoder_factory.h"
diff --git a/call/flexfec_receive_stream_impl.cc b/call/flexfec_receive_stream_impl.cc
index 2689195..e629bca 100644
--- a/call/flexfec_receive_stream_impl.cc
+++ b/call/flexfec_receive_stream_impl.cc
@@ -23,7 +23,6 @@
 #include "modules/rtp_rtcp/include/flexfec_receiver.h"
 #include "modules/rtp_rtcp/include/receive_statistics.h"
 #include "modules/rtp_rtcp/source/rtp_packet_received.h"
-#include "modules/rtp_rtcp/source/rtp_rtcp_impl2.h"
 #include "modules/utility/include/process_thread.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/location.h"
@@ -119,12 +118,12 @@
       recovered_packet_receiver));
 }
 
-std::unique_ptr<RtpRtcp> CreateRtpRtcpModule(
+std::unique_ptr<ModuleRtpRtcpImpl2> CreateRtpRtcpModule(
     Clock* clock,
     ReceiveStatistics* receive_statistics,
     const FlexfecReceiveStreamImpl::Config& config,
     RtcpRttStats* rtt_stats) {
-  RtpRtcp::Configuration configuration;
+  RtpRtcpInterface::Configuration configuration;
   configuration.audio = false;
   configuration.receiver_only = true;
   configuration.clock = clock;
diff --git a/call/flexfec_receive_stream_impl.h b/call/flexfec_receive_stream_impl.h
index d4fdc74..888dae9 100644
--- a/call/flexfec_receive_stream_impl.h
+++ b/call/flexfec_receive_stream_impl.h
@@ -15,6 +15,7 @@
 
 #include "call/flexfec_receive_stream.h"
 #include "call/rtp_packet_sink_interface.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_impl2.h"
 #include "system_wrappers/include/clock.h"
 
 namespace webrtc {
@@ -55,7 +56,7 @@
 
   // RTCP reporting.
   const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
-  const std::unique_ptr<RtpRtcp> rtp_rtcp_;
+  const std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_;
   ProcessThread* process_thread_;
 
   std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_;
diff --git a/call/rtp_video_sender.cc b/call/rtp_video_sender.cc
index e7dbb20..5f8d2df 100644
--- a/call/rtp_video_sender.cc
+++ b/call/rtp_video_sender.cc
@@ -37,7 +37,7 @@
 namespace webrtc_internal_rtp_video_sender {
 
 RtpStreamSender::RtpStreamSender(
-    std::unique_ptr<RtpRtcp> rtp_rtcp,
+    std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp,
     std::unique_ptr<RTPSenderVideo> sender_video,
     std::unique_ptr<VideoFecGenerator> fec_generator)
     : rtp_rtcp(std::move(rtp_rtcp)),
@@ -200,7 +200,7 @@
     const WebRtcKeyValueConfig& trials) {
   RTC_DCHECK_GT(rtp_config.ssrcs.size(), 0);
 
-  RtpRtcp::Configuration configuration;
+  RtpRtcpInterface::Configuration configuration;
   configuration.clock = clock;
   configuration.audio = false;
   configuration.receiver_only = false;
@@ -253,7 +253,8 @@
 
     configuration.need_rtp_packet_infos = rtp_config.lntf.enabled;
 
-    auto rtp_rtcp = ModuleRtpRtcpImpl2::Create(configuration);
+    std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp(
+        ModuleRtpRtcpImpl2::Create(configuration));
     rtp_rtcp->SetSendingStatus(false);
     rtp_rtcp->SetSendingMediaStatus(false);
     rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound);
@@ -628,7 +629,7 @@
   RTC_CHECK(ssrc_to_rtp_module_.empty());
   for (size_t i = 0; i < rtp_config_.ssrcs.size(); ++i) {
     uint32_t ssrc = rtp_config_.ssrcs[i];
-    RtpRtcp* const rtp_rtcp = rtp_streams_[i].rtp_rtcp.get();
+    RtpRtcpInterface* const rtp_rtcp = rtp_streams_[i].rtp_rtcp.get();
 
     // Restore RTP state if previous existed.
     auto it = suspended_ssrcs_.find(ssrc);
@@ -645,7 +646,7 @@
   RTC_DCHECK_EQ(rtp_config_.rtx.ssrcs.size(), rtp_config_.ssrcs.size());
   for (size_t i = 0; i < rtp_config_.rtx.ssrcs.size(); ++i) {
     uint32_t ssrc = rtp_config_.rtx.ssrcs[i];
-    RtpRtcp* const rtp_rtcp = rtp_streams_[i].rtp_rtcp.get();
+    RtpRtcpInterface* const rtp_rtcp = rtp_streams_[i].rtp_rtcp.get();
     auto it = suspended_ssrcs_.find(ssrc);
     if (it != suspended_ssrcs_.end())
       rtp_rtcp->SetRtxState(it->second);
diff --git a/call/rtp_video_sender.h b/call/rtp_video_sender.h
index 58bb7f4..0c277d6 100644
--- a/call/rtp_video_sender.h
+++ b/call/rtp_video_sender.h
@@ -29,6 +29,7 @@
 #include "call/rtp_transport_controller_send_interface.h"
 #include "call/rtp_video_sender_interface.h"
 #include "modules/rtp_rtcp/include/flexfec_sender.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_impl2.h"
 #include "modules/rtp_rtcp/source/rtp_sender.h"
 #include "modules/rtp_rtcp/source/rtp_sender_video.h"
 #include "modules/rtp_rtcp/source/rtp_sequence_number_map.h"
@@ -44,14 +45,13 @@
 
 class FrameEncryptorInterface;
 class RTPFragmentationHeader;
-class RtpRtcp;
 class RtpTransportControllerSendInterface;
 
 namespace webrtc_internal_rtp_video_sender {
 // RTP state for a single simulcast stream. Internal to the implementation of
 // RtpVideoSender.
 struct RtpStreamSender {
-  RtpStreamSender(std::unique_ptr<RtpRtcp> rtp_rtcp,
+  RtpStreamSender(std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp,
                   std::unique_ptr<RTPSenderVideo> sender_video,
                   std::unique_ptr<VideoFecGenerator> fec_generator);
   ~RtpStreamSender();
@@ -60,7 +60,7 @@
   RtpStreamSender& operator=(RtpStreamSender&&) = default;
 
   // Note: Needs pointer stability.
-  std::unique_ptr<RtpRtcp> rtp_rtcp;
+  std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp;
   std::unique_ptr<RTPSenderVideo> sender_video;
   std::unique_ptr<VideoFecGenerator> fec_generator;
 };
@@ -215,7 +215,7 @@
   // Effectively const map from SSRC to RtpRtcp, for all media SSRCs.
   // This map is set at construction time and never changed, but it's
   // non-trivial to make it properly const.
-  std::map<uint32_t, RtpRtcp*> ssrc_to_rtp_module_;
+  std::map<uint32_t, RtpRtcpInterface*> ssrc_to_rtp_module_;
 
   RTC_DISALLOW_COPY_AND_ASSIGN(RtpVideoSender);
 };
diff --git a/modules/pacing/packet_router.cc b/modules/pacing/packet_router.cc
index 36b1e8e..c4ea5df 100644
--- a/modules/pacing/packet_router.cc
+++ b/modules/pacing/packet_router.cc
@@ -17,10 +17,10 @@
 #include <utility>
 
 #include "absl/types/optional.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/rtcp_packet.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/time_utils.h"
@@ -53,7 +53,8 @@
   RTC_DCHECK(active_remb_module_ == nullptr);
 }
 
-void PacketRouter::AddSendRtpModule(RtpRtcp* rtp_module, bool remb_candidate) {
+void PacketRouter::AddSendRtpModule(RtpRtcpInterface* rtp_module,
+                                    bool remb_candidate) {
   rtc::CritScope cs(&modules_crit_);
 
   AddSendRtpModuleToMap(rtp_module, rtp_module->SSRC());
@@ -73,7 +74,8 @@
   }
 }
 
-void PacketRouter::AddSendRtpModuleToMap(RtpRtcp* rtp_module, uint32_t ssrc) {
+void PacketRouter::AddSendRtpModuleToMap(RtpRtcpInterface* rtp_module,
+                                         uint32_t ssrc) {
   RTC_DCHECK(send_modules_map_.find(ssrc) == send_modules_map_.end());
   // Always keep the audio modules at the back of the list, so that when we
   // iterate over the modules in order to find one that can send padding we
@@ -94,7 +96,7 @@
   send_modules_map_.erase(kv);
 }
 
-void PacketRouter::RemoveSendRtpModule(RtpRtcp* rtp_module) {
+void PacketRouter::RemoveSendRtpModule(RtpRtcpInterface* rtp_module) {
   rtc::CritScope cs(&modules_crit_);
   MaybeRemoveRembModuleCandidate(rtp_module, /* media_sender = */ true);
 
@@ -158,7 +160,7 @@
     return;
   }
 
-  RtpRtcp* rtp_module = kv->second;
+  RtpRtcpInterface* rtp_module = kv->second;
   if (!rtp_module->TrySendPacket(packet.get(), cluster_info)) {
     RTC_LOG(LS_WARNING) << "Failed to send packet, rejected by RTP module.";
     return;
@@ -193,7 +195,7 @@
     // Iterate over all modules send module. Video modules will be at the front
     // and so will be prioritized. This is important since audio packets may not
     // be taken into account by the bandwidth estimator, e.g. in FF.
-    for (RtpRtcp* rtp_module : send_modules_list_) {
+    for (RtpRtcpInterface* rtp_module : send_modules_list_) {
       if (rtp_module->SupportsPadding()) {
         padding_packets = rtp_module->GeneratePadding(size.bytes());
         if (!padding_packets.empty()) {
@@ -296,7 +298,7 @@
   rtc::CritScope cs(&modules_crit_);
 
   // Prefer send modules.
-  for (RtpRtcp* rtp_module : send_modules_list_) {
+  for (RtpRtcpInterface* rtp_module : send_modules_list_) {
     if (rtp_module->RTCP() == RtcpMode::kOff) {
       continue;
     }
diff --git a/modules/pacing/packet_router.h b/modules/pacing/packet_router.h
index 2c03e96..4c716dd 100644
--- a/modules/pacing/packet_router.h
+++ b/modules/pacing/packet_router.h
@@ -32,7 +32,7 @@
 
 namespace webrtc {
 
-class RtpRtcp;
+class RtpRtcpInterface;
 
 // PacketRouter keeps track of rtp send modules to support the pacer.
 // In addition, it handles feedback messages, which are sent on a send
@@ -47,8 +47,8 @@
   explicit PacketRouter(uint16_t start_transport_seq);
   ~PacketRouter() override;
 
-  void AddSendRtpModule(RtpRtcp* rtp_module, bool remb_candidate);
-  void RemoveSendRtpModule(RtpRtcp* rtp_module);
+  void AddSendRtpModule(RtpRtcpInterface* rtp_module, bool remb_candidate);
+  void RemoveSendRtpModule(RtpRtcpInterface* rtp_module);
 
   void AddReceiveRtpModule(RtcpFeedbackSenderInterface* rtcp_sender,
                            bool remb_candidate);
@@ -89,18 +89,18 @@
       bool media_sender) RTC_EXCLUSIVE_LOCKS_REQUIRED(modules_crit_);
   void UnsetActiveRembModule() RTC_EXCLUSIVE_LOCKS_REQUIRED(modules_crit_);
   void DetermineActiveRembModule() RTC_EXCLUSIVE_LOCKS_REQUIRED(modules_crit_);
-  void AddSendRtpModuleToMap(RtpRtcp* rtp_module, uint32_t ssrc)
+  void AddSendRtpModuleToMap(RtpRtcpInterface* rtp_module, uint32_t ssrc)
       RTC_EXCLUSIVE_LOCKS_REQUIRED(modules_crit_);
   void RemoveSendRtpModuleFromMap(uint32_t ssrc)
       RTC_EXCLUSIVE_LOCKS_REQUIRED(modules_crit_);
 
   rtc::CriticalSection modules_crit_;
-  // Ssrc to RtpRtcp module;
-  std::unordered_map<uint32_t, RtpRtcp*> send_modules_map_
+  // Ssrc to RtpRtcpInterface module;
+  std::unordered_map<uint32_t, RtpRtcpInterface*> send_modules_map_
       RTC_GUARDED_BY(modules_crit_);
-  std::list<RtpRtcp*> send_modules_list_ RTC_GUARDED_BY(modules_crit_);
+  std::list<RtpRtcpInterface*> send_modules_list_ RTC_GUARDED_BY(modules_crit_);
   // The last module used to send media.
-  RtpRtcp* last_send_module_ RTC_GUARDED_BY(modules_crit_);
+  RtpRtcpInterface* last_send_module_ RTC_GUARDED_BY(modules_crit_);
   // Rtcp modules of the rtp receivers.
   std::vector<RtcpFeedbackSenderInterface*> rtcp_feedback_senders_
       RTC_GUARDED_BY(modules_crit_);
diff --git a/modules/pacing/packet_router_unittest.cc b/modules/pacing/packet_router_unittest.cc
index 79092ea..10cf98b 100644
--- a/modules/pacing/packet_router_unittest.cc
+++ b/modules/pacing/packet_router_unittest.cc
@@ -101,12 +101,12 @@
   const uint16_t kSsrc1 = 1234;
   const uint16_t kSsrc2 = 4567;
 
-  NiceMock<MockRtpRtcp> rtp_1;
+  NiceMock<MockRtpRtcpInterface> rtp_1;
   ON_CALL(rtp_1, RtxSendStatus()).WillByDefault(Return(kRtxRedundantPayloads));
   ON_CALL(rtp_1, SSRC()).WillByDefault(Return(kSsrc1));
   ON_CALL(rtp_1, SupportsPadding).WillByDefault(Return(false));
 
-  NiceMock<MockRtpRtcp> rtp_2;
+  NiceMock<MockRtpRtcpInterface> rtp_2;
   ON_CALL(rtp_2, RtxSendStatus()).WillByDefault(Return(kRtxOff));
   ON_CALL(rtp_2, SSRC()).WillByDefault(Return(kSsrc2));
   ON_CALL(rtp_2, SupportsPadding).WillByDefault(Return(true));
@@ -143,13 +143,13 @@
         kExpectedPaddingPackets);
   };
 
-  NiceMock<MockRtpRtcp> audio_module;
+  NiceMock<MockRtpRtcpInterface> audio_module;
   ON_CALL(audio_module, RtxSendStatus()).WillByDefault(Return(kRtxOff));
   ON_CALL(audio_module, SSRC()).WillByDefault(Return(kSsrc1));
   ON_CALL(audio_module, SupportsPadding).WillByDefault(Return(true));
   ON_CALL(audio_module, IsAudioConfigured).WillByDefault(Return(true));
 
-  NiceMock<MockRtpRtcp> video_module;
+  NiceMock<MockRtpRtcpInterface> video_module;
   ON_CALL(video_module, RtxSendStatus()).WillByDefault(Return(kRtxOff));
   ON_CALL(video_module, SSRC()).WillByDefault(Return(kSsrc2));
   ON_CALL(video_module, SupportsPadding).WillByDefault(Return(true));
@@ -195,7 +195,7 @@
   const uint16_t kSsrc3 = 8901;
 
   // First two rtp modules send media and have rtx.
-  NiceMock<MockRtpRtcp> rtp_1;
+  NiceMock<MockRtpRtcpInterface> rtp_1;
   EXPECT_CALL(rtp_1, SSRC()).WillRepeatedly(Return(kSsrc1));
   EXPECT_CALL(rtp_1, SupportsPadding).WillRepeatedly(Return(true));
   EXPECT_CALL(rtp_1, SupportsRtxPayloadPadding).WillRepeatedly(Return(true));
@@ -206,7 +206,7 @@
           ::testing::Pointee(Property(&RtpPacketToSend::Ssrc, kSsrc1)), _))
       .WillRepeatedly(Return(true));
 
-  NiceMock<MockRtpRtcp> rtp_2;
+  NiceMock<MockRtpRtcpInterface> rtp_2;
   EXPECT_CALL(rtp_2, SSRC()).WillRepeatedly(Return(kSsrc2));
   EXPECT_CALL(rtp_2, SupportsPadding).WillRepeatedly(Return(true));
   EXPECT_CALL(rtp_2, SupportsRtxPayloadPadding).WillRepeatedly(Return(true));
@@ -218,7 +218,7 @@
       .WillRepeatedly(Return(true));
 
   // Third module is sending media, but does not support rtx.
-  NiceMock<MockRtpRtcp> rtp_3;
+  NiceMock<MockRtpRtcpInterface> rtp_3;
   EXPECT_CALL(rtp_3, SSRC()).WillRepeatedly(Return(kSsrc3));
   EXPECT_CALL(rtp_3, SupportsPadding).WillRepeatedly(Return(true));
   EXPECT_CALL(rtp_3, SupportsRtxPayloadPadding).WillRepeatedly(Return(false));
@@ -266,7 +266,7 @@
   packet_router_.RemoveSendRtpModule(&rtp_2);
 
   // Send on and then remove all remaining modules.
-  RtpRtcp* last_send_module;
+  RtpRtcpInterface* last_send_module;
   EXPECT_CALL(rtp_1, GeneratePadding(kPaddingBytes))
       .Times(1)
       .WillOnce([&](size_t target_size_bytes) {
@@ -298,7 +298,7 @@
   const uint16_t kSsrc1 = 1234;
 
   PacketRouter packet_router(kStartSeq - 1);
-  NiceMock<MockRtpRtcp> rtp_1;
+  NiceMock<MockRtpRtcpInterface> rtp_1;
   EXPECT_CALL(rtp_1, SSRC()).WillRepeatedly(Return(kSsrc1));
   EXPECT_CALL(rtp_1, TrySendPacket).WillRepeatedly(Return(true));
   packet_router.AddSendRtpModule(&rtp_1, false);
@@ -316,8 +316,8 @@
 }
 
 TEST_F(PacketRouterTest, SendTransportFeedback) {
-  NiceMock<MockRtpRtcp> rtp_1;
-  NiceMock<MockRtpRtcp> rtp_2;
+  NiceMock<MockRtpRtcpInterface> rtp_1;
+  NiceMock<MockRtpRtcpInterface> rtp_2;
 
   ON_CALL(rtp_1, RTCP()).WillByDefault(Return(RtcpMode::kCompound));
   ON_CALL(rtp_2, RTCP()).WillByDefault(Return(RtcpMode::kCompound));
@@ -339,7 +339,7 @@
 
 TEST_F(PacketRouterTest, SendPacketWithoutTransportSequenceNumbers) {
   const uint16_t kSsrc1 = 1234;
-  NiceMock<MockRtpRtcp> rtp_1;
+  NiceMock<MockRtpRtcpInterface> rtp_1;
   ON_CALL(rtp_1, SendingMedia).WillByDefault(Return(true));
   ON_CALL(rtp_1, SSRC).WillByDefault(Return(kSsrc1));
   packet_router_.AddSendRtpModule(&rtp_1, false);
@@ -362,8 +362,8 @@
 }
 
 TEST_F(PacketRouterTest, SendPacketAssignsTransportSequenceNumbers) {
-  NiceMock<MockRtpRtcp> rtp_1;
-  NiceMock<MockRtpRtcp> rtp_2;
+  NiceMock<MockRtpRtcpInterface> rtp_1;
+  NiceMock<MockRtpRtcpInterface> rtp_2;
 
   const uint16_t kSsrc1 = 1234;
   const uint16_t kSsrc2 = 2345;
@@ -408,7 +408,7 @@
 #if RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID)
 using PacketRouterDeathTest = PacketRouterTest;
 TEST_F(PacketRouterDeathTest, DoubleRegistrationOfSendModuleDisallowed) {
-  NiceMock<MockRtpRtcp> module;
+  NiceMock<MockRtpRtcpInterface> module;
 
   constexpr bool remb_candidate = false;  // Value irrelevant.
   packet_router_.AddSendRtpModule(&module, remb_candidate);
@@ -419,7 +419,7 @@
 }
 
 TEST_F(PacketRouterDeathTest, DoubleRegistrationOfReceiveModuleDisallowed) {
-  NiceMock<MockRtpRtcp> module;
+  NiceMock<MockRtpRtcpInterface> module;
 
   constexpr bool remb_candidate = false;  // Value irrelevant.
   packet_router_.AddReceiveRtpModule(&module, remb_candidate);
@@ -430,13 +430,13 @@
 }
 
 TEST_F(PacketRouterDeathTest, RemovalOfNeverAddedSendModuleDisallowed) {
-  NiceMock<MockRtpRtcp> module;
+  NiceMock<MockRtpRtcpInterface> module;
 
   EXPECT_DEATH(packet_router_.RemoveSendRtpModule(&module), "");
 }
 
 TEST_F(PacketRouterDeathTest, RemovalOfNeverAddedReceiveModuleDisallowed) {
-  NiceMock<MockRtpRtcp> module;
+  NiceMock<MockRtpRtcpInterface> module;
 
   EXPECT_DEATH(packet_router_.RemoveReceiveRtpModule(&module), "");
 }
@@ -444,7 +444,7 @@
 
 TEST(PacketRouterRembTest, LowerEstimateToSendRemb) {
   rtc::ScopedFakeClock clock;
-  NiceMock<MockRtpRtcp> rtp;
+  NiceMock<MockRtpRtcpInterface> rtp;
   PacketRouter packet_router;
 
   packet_router.AddSendRtpModule(&rtp, true);
@@ -470,7 +470,7 @@
 
 TEST(PacketRouterRembTest, VerifyIncreasingAndDecreasing) {
   rtc::ScopedFakeClock clock;
-  NiceMock<MockRtpRtcp> rtp;
+  NiceMock<MockRtpRtcpInterface> rtp;
   PacketRouter packet_router;
   packet_router.AddSendRtpModule(&rtp, true);
 
@@ -495,7 +495,7 @@
 
 TEST(PacketRouterRembTest, NoRembForIncreasedBitrate) {
   rtc::ScopedFakeClock clock;
-  NiceMock<MockRtpRtcp> rtp;
+  NiceMock<MockRtpRtcpInterface> rtp;
   PacketRouter packet_router;
   packet_router.AddSendRtpModule(&rtp, true);
 
@@ -523,8 +523,8 @@
 
 TEST(PacketRouterRembTest, ChangeSendRtpModule) {
   rtc::ScopedFakeClock clock;
-  NiceMock<MockRtpRtcp> rtp_send;
-  NiceMock<MockRtpRtcp> rtp_recv;
+  NiceMock<MockRtpRtcpInterface> rtp_send;
+  NiceMock<MockRtpRtcpInterface> rtp_recv;
   PacketRouter packet_router;
   packet_router.AddSendRtpModule(&rtp_send, true);
   packet_router.AddReceiveRtpModule(&rtp_recv, true);
@@ -558,7 +558,7 @@
 
 TEST(PacketRouterRembTest, OnlyOneRembForRepeatedOnReceiveBitrateChanged) {
   rtc::ScopedFakeClock clock;
-  NiceMock<MockRtpRtcp> rtp;
+  NiceMock<MockRtpRtcpInterface> rtp;
   PacketRouter packet_router;
   packet_router.AddSendRtpModule(&rtp, true);
 
@@ -587,7 +587,7 @@
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
   clock.AdvanceTime(TimeDelta::Millis(1000));
-  NiceMock<MockRtpRtcp> remb_sender;
+  NiceMock<MockRtpRtcpInterface> remb_sender;
   constexpr bool remb_candidate = true;
   packet_router.AddSendRtpModule(&remb_sender, remb_candidate);
 
@@ -610,7 +610,7 @@
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
   clock.AdvanceTime(TimeDelta::Millis(1000));
-  NiceMock<MockRtpRtcp> remb_sender;
+  NiceMock<MockRtpRtcpInterface> remb_sender;
   constexpr bool remb_candidate = true;
   packet_router.AddSendRtpModule(&remb_sender, remb_candidate);
 
@@ -632,7 +632,7 @@
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
   clock.AdvanceTime(TimeDelta::Millis(1000));
-  NiceMock<MockRtpRtcp> remb_sender;
+  NiceMock<MockRtpRtcpInterface> remb_sender;
   constexpr bool remb_candidate = true;
   packet_router.AddSendRtpModule(&remb_sender, remb_candidate);
 
@@ -654,7 +654,7 @@
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
   clock.AdvanceTime(TimeDelta::Millis(1000));
-  NiceMock<MockRtpRtcp> remb_sender;
+  NiceMock<MockRtpRtcpInterface> remb_sender;
   constexpr bool remb_candidate = true;
   packet_router.AddSendRtpModule(&remb_sender, remb_candidate);
 
@@ -676,7 +676,7 @@
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
   clock.AdvanceTime(TimeDelta::Millis(1000));
-  NiceMock<MockRtpRtcp> remb_sender;
+  NiceMock<MockRtpRtcpInterface> remb_sender;
   constexpr bool remb_candidate = true;
   packet_router.AddSendRtpModule(&remb_sender, remb_candidate);
 
@@ -699,7 +699,7 @@
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
   clock.AdvanceTime(TimeDelta::Millis(1000));
-  NiceMock<MockRtpRtcp> remb_sender;
+  NiceMock<MockRtpRtcpInterface> remb_sender;
   constexpr bool remb_candidate = true;
   packet_router.AddSendRtpModule(&remb_sender, remb_candidate);
 
@@ -721,7 +721,7 @@
 // packet on this one.
 TEST(PacketRouterRembTest, NoSendingRtpModule) {
   rtc::ScopedFakeClock clock;
-  NiceMock<MockRtpRtcp> rtp;
+  NiceMock<MockRtpRtcpInterface> rtp;
   PacketRouter packet_router;
 
   packet_router.AddReceiveRtpModule(&rtp, true);
@@ -747,7 +747,7 @@
 TEST(PacketRouterRembTest, NonCandidateSendRtpModuleNotUsedForRemb) {
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
-  NiceMock<MockRtpRtcp> module;
+  NiceMock<MockRtpRtcpInterface> module;
 
   constexpr bool remb_candidate = false;
 
@@ -766,7 +766,7 @@
 TEST(PacketRouterRembTest, CandidateSendRtpModuleUsedForRemb) {
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
-  NiceMock<MockRtpRtcp> module;
+  NiceMock<MockRtpRtcpInterface> module;
 
   constexpr bool remb_candidate = true;
 
@@ -785,7 +785,7 @@
 TEST(PacketRouterRembTest, NonCandidateReceiveRtpModuleNotUsedForRemb) {
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
-  NiceMock<MockRtpRtcp> module;
+  NiceMock<MockRtpRtcpInterface> module;
 
   constexpr bool remb_candidate = false;
 
@@ -804,7 +804,7 @@
 TEST(PacketRouterRembTest, CandidateReceiveRtpModuleUsedForRemb) {
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
-  NiceMock<MockRtpRtcp> module;
+  NiceMock<MockRtpRtcpInterface> module;
 
   constexpr bool remb_candidate = true;
 
@@ -824,8 +824,8 @@
      SendCandidatePreferredOverReceiveCandidate_SendModuleAddedFirst) {
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
-  NiceMock<MockRtpRtcp> send_module;
-  NiceMock<MockRtpRtcp> receive_module;
+  NiceMock<MockRtpRtcpInterface> send_module;
+  NiceMock<MockRtpRtcpInterface> receive_module;
 
   constexpr bool remb_candidate = true;
 
@@ -852,8 +852,8 @@
      SendCandidatePreferredOverReceiveCandidate_ReceiveModuleAddedFirst) {
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
-  NiceMock<MockRtpRtcp> send_module;
-  NiceMock<MockRtpRtcp> receive_module;
+  NiceMock<MockRtpRtcpInterface> send_module;
+  NiceMock<MockRtpRtcpInterface> receive_module;
 
   constexpr bool remb_candidate = true;
 
@@ -879,8 +879,8 @@
 TEST(PacketRouterRembTest, ReceiveModuleTakesOverWhenLastSendModuleRemoved) {
   rtc::ScopedFakeClock clock;
   PacketRouter packet_router;
-  NiceMock<MockRtpRtcp> send_module;
-  NiceMock<MockRtpRtcp> receive_module;
+  NiceMock<MockRtpRtcpInterface> send_module;
+  NiceMock<MockRtpRtcpInterface> receive_module;
 
   constexpr bool remb_candidate = true;
 
diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn
index eda27ba..710e535 100644
--- a/modules/rtp_rtcp/BUILD.gn
+++ b/modules/rtp_rtcp/BUILD.gn
@@ -132,7 +132,7 @@
     "include/flexfec_sender.h",
     "include/receive_statistics.h",
     "include/remote_ntp_time_estimator.h",
-    "include/rtp_rtcp.h",
+    "include/rtp_rtcp.h",  # deprecated
     "include/ulpfec_receiver.h",
     "source/absolute_capture_time_receiver.cc",
     "source/absolute_capture_time_receiver.h",
@@ -188,6 +188,7 @@
     "source/rtp_rtcp_impl.h",
     "source/rtp_rtcp_impl2.cc",
     "source/rtp_rtcp_impl2.h",
+    "source/rtp_rtcp_interface.h",
     "source/rtp_sender.cc",
     "source/rtp_sender.h",
     "source/rtp_sender_audio.cc",
diff --git a/modules/rtp_rtcp/include/rtp_rtcp.h b/modules/rtp_rtcp/include/rtp_rtcp.h
index be36ec8..0e2bbe6 100644
--- a/modules/rtp_rtcp/include/rtp_rtcp.h
+++ b/modules/rtp_rtcp/include/rtp_rtcp.h
@@ -12,155 +12,19 @@
 #define MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_
 
 #include <memory>
-#include <set>
 #include <string>
-#include <utility>
 #include <vector>
 
-#include "absl/strings/string_view.h"
-#include "absl/types/optional.h"
-#include "api/frame_transformer_interface.h"
-#include "api/scoped_refptr.h"
-#include "api/transport/webrtc_key_value_config.h"
-#include "api/video/video_bitrate_allocation.h"
 #include "modules/include/module.h"
-#include "modules/rtp_rtcp/include/receive_statistics.h"
-#include "modules/rtp_rtcp/include/report_block_data.h"
-#include "modules/rtp_rtcp/include/rtp_packet_sender.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
-#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
-#include "modules/rtp_rtcp/source/rtp_sequence_number_map.h"
-#include "modules/rtp_rtcp/source/video_fec_generator.h"
-#include "rtc_base/constructor_magic.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "rtc_base/deprecation.h"
 
 namespace webrtc {
 
-// Forward declarations.
-class FrameEncryptorInterface;
-class RateLimiter;
-class ReceiveStatisticsProvider;
-class RemoteBitrateEstimator;
-class RtcEventLog;
-class RTPSender;
-class Transport;
-class VideoBitrateAllocationObserver;
-
-namespace rtcp {
-class TransportFeedback;
-}
-
-// TODO(tommi): See if we can remove Module.
-class RtpRtcp : public Module, public RtcpFeedbackSenderInterface {
+// DEPRECATED. Do not use.
+class RtpRtcp : public Module, public RtpRtcpInterface {
  public:
-  struct Configuration {
-    Configuration() = default;
-    Configuration(Configuration&& rhs) = default;
-
-    // True for a audio version of the RTP/RTCP module object false will create
-    // a video version.
-    bool audio = false;
-    bool receiver_only = false;
-
-    // The clock to use to read time. If nullptr then system clock will be used.
-    Clock* clock = nullptr;
-
-    ReceiveStatisticsProvider* receive_statistics = nullptr;
-
-    // Transport object that will be called when packets are ready to be sent
-    // out on the network.
-    Transport* outgoing_transport = nullptr;
-
-    // Called when the receiver requests an intra frame.
-    RtcpIntraFrameObserver* intra_frame_callback = nullptr;
-
-    // Called when the receiver sends a loss notification.
-    RtcpLossNotificationObserver* rtcp_loss_notification_observer = nullptr;
-
-    // Called when we receive a changed estimate from the receiver of out
-    // stream.
-    RtcpBandwidthObserver* bandwidth_callback = nullptr;
-
-    NetworkStateEstimateObserver* network_state_estimate_observer = nullptr;
-    TransportFeedbackObserver* transport_feedback_callback = nullptr;
-    VideoBitrateAllocationObserver* bitrate_allocation_observer = nullptr;
-    RtcpRttStats* rtt_stats = nullptr;
-    RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer = nullptr;
-    // Called on receipt of RTCP report block from remote side.
-    // TODO(bugs.webrtc.org/10678): Remove RtcpStatisticsCallback in
-    // favor of ReportBlockDataObserver.
-    // TODO(bugs.webrtc.org/10679): Consider whether we want to use
-    // only getters or only callbacks. If we decide on getters, the
-    // ReportBlockDataObserver should also be removed in favor of
-    // GetLatestReportBlockData().
-    RtcpStatisticsCallback* rtcp_statistics_callback = nullptr;
-    RtcpCnameCallback* rtcp_cname_callback = nullptr;
-    ReportBlockDataObserver* report_block_data_observer = nullptr;
-
-    // Estimates the bandwidth available for a set of streams from the same
-    // client.
-    RemoteBitrateEstimator* remote_bitrate_estimator = nullptr;
-
-    // Spread any bursts of packets into smaller bursts to minimize packet loss.
-    RtpPacketSender* paced_sender = nullptr;
-
-    // Generates FEC packets.
-    // TODO(sprang): Wire up to RtpSenderEgress.
-    VideoFecGenerator* fec_generator = nullptr;
-
-    BitrateStatisticsObserver* send_bitrate_observer = nullptr;
-    SendSideDelayObserver* send_side_delay_observer = nullptr;
-    RtcEventLog* event_log = nullptr;
-    SendPacketObserver* send_packet_observer = nullptr;
-    RateLimiter* retransmission_rate_limiter = nullptr;
-    StreamDataCountersCallback* rtp_stats_callback = nullptr;
-
-    int rtcp_report_interval_ms = 0;
-
-    // Update network2 instead of pacer_exit field of video timing extension.
-    bool populate_network2_timestamp = false;
-
-    rtc::scoped_refptr<FrameTransformerInterface> frame_transformer;
-
-    // E2EE Custom Video Frame Encryption
-    FrameEncryptorInterface* frame_encryptor = nullptr;
-    // Require all outgoing frames to be encrypted with a FrameEncryptor.
-    bool require_frame_encryption = false;
-
-    // Corresponds to extmap-allow-mixed in SDP negotiation.
-    bool extmap_allow_mixed = false;
-
-    // If true, the RTP sender will always annotate outgoing packets with
-    // MID and RID header extensions, if provided and negotiated.
-    // If false, the RTP sender will stop sending MID and RID header extensions,
-    // when it knows that the receiver is ready to demux based on SSRC. This is
-    // done by RTCP RR acking.
-    bool always_send_mid_and_rid = false;
-
-    // If set, field trials are read from |field_trials|, otherwise
-    // defaults to  webrtc::FieldTrialBasedConfig.
-    const WebRtcKeyValueConfig* field_trials = nullptr;
-
-    // SSRCs for media and retransmission, respectively.
-    // FlexFec SSRC is fetched from |flexfec_sender|.
-    uint32_t local_media_ssrc = 0;
-    absl::optional<uint32_t> rtx_send_ssrc;
-
-    bool need_rtp_packet_infos = false;
-
-    // If true, the RTP packet history will select RTX packets based on
-    // heuristics such as send time, retransmission count etc, in order to
-    // make padding potentially more useful.
-    // If false, the last packet will always be picked. This may reduce CPU
-    // overhead.
-    bool enable_rtx_padding_prioritization = true;
-
-   private:
-    RTC_DISALLOW_COPY_AND_ASSIGN(Configuration);
-  };
-
-  // DEPRECATED. Do not use. Currently instantiates a deprecated version of the
-  // RtpRtcp module.
+  // Instantiates a deprecated version of the RtpRtcp module.
   static std::unique_ptr<RtpRtcp> RTC_DEPRECATED
   Create(const Configuration& configuration) {
     return DEPRECATED_Create(configuration);
@@ -169,307 +33,17 @@
   static std::unique_ptr<RtpRtcp> DEPRECATED_Create(
       const Configuration& configuration);
 
-  // **************************************************************************
-  // Receiver functions
-  // **************************************************************************
-
-  virtual void IncomingRtcpPacket(const uint8_t* incoming_packet,
-                                  size_t incoming_packet_length) = 0;
-
-  virtual void SetRemoteSSRC(uint32_t ssrc) = 0;
-
-  // **************************************************************************
-  // Sender
-  // **************************************************************************
-
-  // Sets the maximum size of an RTP packet, including RTP headers.
-  virtual void SetMaxRtpPacketSize(size_t size) = 0;
-
-  // Returns max RTP packet size. Takes into account RTP headers and
-  // FEC/ULP/RED overhead (when FEC is enabled).
-  virtual size_t MaxRtpPacketSize() const = 0;
-
-  virtual void RegisterSendPayloadFrequency(int payload_type,
-                                            int payload_frequency) = 0;
-
-  // Unregisters a send payload.
-  // |payload_type| - payload type of codec
-  // Returns -1 on failure else 0.
-  virtual int32_t DeRegisterSendPayload(int8_t payload_type) = 0;
-
-  virtual void SetExtmapAllowMixed(bool extmap_allow_mixed) = 0;
-
   // (De)registers RTP header extension type and id.
   // Returns -1 on failure else 0.
   RTC_DEPRECATED virtual int32_t RegisterSendRtpHeaderExtension(
       RTPExtensionType type,
       uint8_t id) = 0;
-  // Register extension by uri, triggers CHECK on falure.
-  virtual void RegisterRtpHeaderExtension(absl::string_view uri, int id) = 0;
-
-  virtual int32_t DeregisterSendRtpHeaderExtension(RTPExtensionType type) = 0;
-  virtual void DeregisterSendRtpHeaderExtension(absl::string_view uri) = 0;
-
-  // Returns true if RTP module is send media, and any of the extensions
-  // required for bandwidth estimation is registered.
-  virtual bool SupportsPadding() const = 0;
-  // Same as SupportsPadding(), but additionally requires that
-  // SetRtxSendStatus() has been called with the kRtxRedundantPayloads option
-  // enabled.
-  virtual bool SupportsRtxPayloadPadding() const = 0;
-
-  // Returns start timestamp.
-  virtual uint32_t StartTimestamp() const = 0;
-
-  // Sets start timestamp. Start timestamp is set to a random value if this
-  // function is never called.
-  virtual void SetStartTimestamp(uint32_t timestamp) = 0;
-
-  // Returns SequenceNumber.
-  virtual uint16_t SequenceNumber() const = 0;
-
-  // Sets SequenceNumber, default is a random number.
-  virtual void SetSequenceNumber(uint16_t seq) = 0;
-
-  virtual void SetRtpState(const RtpState& rtp_state) = 0;
-  virtual void SetRtxState(const RtpState& rtp_state) = 0;
-  virtual RtpState GetRtpState() const = 0;
-  virtual RtpState GetRtxState() const = 0;
-
-  // 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.
-  virtual void SetRid(const std::string& 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.
-  virtual void SetMid(const std::string& mid) = 0;
-
-  // Sets CSRC.
-  // |csrcs| - vector of CSRCs
-  virtual void SetCsrcs(const std::vector<uint32_t>& csrcs) = 0;
-
-  // Turns on/off sending RTX (RFC 4588). The modes can be set as a combination
-  // of values of the enumerator RtxMode.
-  virtual void SetRtxSendStatus(int modes) = 0;
-
-  // Returns status of sending RTX (RFC 4588). The returned value can be
-  // a combination of values of the enumerator RtxMode.
-  virtual int RtxSendStatus() const = 0;
-
-  // Returns the SSRC used for RTX if set, otherwise a nullopt.
-  virtual absl::optional<uint32_t> RtxSsrc() const = 0;
-
-  // Sets the payload type to use when sending RTX packets. Note that this
-  // doesn't enable RTX, only the payload type is set.
-  virtual void SetRtxSendPayloadType(int payload_type,
-                                     int associated_payload_type) = 0;
-
-  // Returns the FlexFEC SSRC, if there is one.
-  virtual absl::optional<uint32_t> FlexfecSsrc() const = 0;
-
-  // Sets sending status. Sends kRtcpByeCode when going from true to false.
-  // Returns -1 on failure else 0.
-  virtual int32_t SetSendingStatus(bool sending) = 0;
-
-  // Returns current sending status.
-  virtual bool Sending() const = 0;
-
-  // Starts/Stops media packets. On by default.
-  virtual void SetSendingMediaStatus(bool sending) = 0;
-
-  // Returns current media sending status.
-  virtual bool SendingMedia() const = 0;
-
-  // Returns whether audio is configured (i.e. Configuration::audio = true).
-  virtual bool IsAudioConfigured() const = 0;
-
-  // Indicate that the packets sent by this module should be counted towards the
-  // bitrate estimate since the stream participates in the bitrate allocation.
-  virtual void SetAsPartOfAllocation(bool part_of_allocation) = 0;
-
-  // TODO(sprang): Remove when all call sites have been moved to
-  // GetSendRates(). Fetches the current send bitrates in bits/s.
-  virtual void BitrateSent(uint32_t* total_rate,
-                           uint32_t* video_rate,
-                           uint32_t* fec_rate,
-                           uint32_t* nack_rate) const = 0;
-
-  // Returns bitrate sent (post-pacing) per packet type.
-  virtual RtpSendRates GetSendRates() const = 0;
-
-  virtual RTPSender* RtpSender() = 0;
-  virtual const RTPSender* RtpSender() const = 0;
-
-  // Record that a frame is about to be sent. Returns true on success, and false
-  // if the module isn't ready to send.
-  virtual bool OnSendingRtpFrame(uint32_t timestamp,
-                                 int64_t capture_time_ms,
-                                 int payload_type,
-                                 bool force_sender_report) = 0;
-
-  // Try to send the provided packet. Returns true iff packet matches any of
-  // the SSRCs for this module (media/rtx/fec etc) and was forwarded to the
-  // transport.
-  virtual bool TrySendPacket(RtpPacketToSend* packet,
-                             const PacedPacketInfo& pacing_info) = 0;
-
-  virtual void OnPacketsAcknowledged(
-      rtc::ArrayView<const uint16_t> sequence_numbers) = 0;
-
-  virtual std::vector<std::unique_ptr<RtpPacketToSend>> GeneratePadding(
-      size_t target_size_bytes) = 0;
-
-  virtual std::vector<RtpSequenceNumberMap::Info> GetSentRtpPacketInfos(
-      rtc::ArrayView<const uint16_t> sequence_numbers) const = 0;
-
-  // Returns an expected per packet overhead representing the main RTP header,
-  // any CSRCs, and the registered header extensions that are expected on all
-  // packets (i.e. disregarding things like abs capture time which is only
-  // populated on a subset of packets, but counting MID/RID type extensions
-  // when we expect to send them).
-  virtual size_t ExpectedPerPacketOverhead() const = 0;
-
-  // **************************************************************************
-  // RTCP
-  // **************************************************************************
-
-  // Returns RTCP status.
-  virtual RtcpMode RTCP() const = 0;
-
-  // Sets RTCP status i.e on(compound or non-compound)/off.
-  // |method| - RTCP method to use.
-  virtual void SetRTCPStatus(RtcpMode method) = 0;
-
-  // Sets RTCP CName (i.e unique identifier).
-  // Returns -1 on failure else 0.
-  virtual int32_t SetCNAME(const char* cname) = 0;
-
-  // Returns remote CName.
-  // Returns -1 on failure else 0.
-  virtual int32_t RemoteCNAME(uint32_t remote_ssrc,
-                              char cname[RTCP_CNAME_SIZE]) const = 0;
-
-  // Returns remote NTP.
-  // Returns -1 on failure else 0.
-  virtual int32_t RemoteNTP(uint32_t* received_ntp_secs,
-                            uint32_t* received_ntp_frac,
-                            uint32_t* rtcp_arrival_time_secs,
-                            uint32_t* rtcp_arrival_time_frac,
-                            uint32_t* rtcp_timestamp) const = 0;
-
-  // Returns -1 on failure else 0.
-  virtual int32_t AddMixedCNAME(uint32_t ssrc, const char* cname) = 0;
-
-  // Returns -1 on failure else 0.
-  virtual int32_t RemoveMixedCNAME(uint32_t ssrc) = 0;
-
-  // Returns current RTT (round-trip time) estimate.
-  // Returns -1 on failure else 0.
-  virtual int32_t RTT(uint32_t remote_ssrc,
-                      int64_t* rtt,
-                      int64_t* avg_rtt,
-                      int64_t* min_rtt,
-                      int64_t* max_rtt) const = 0;
-
-  // Returns the estimated RTT, with fallback to a default value.
-  virtual int64_t ExpectedRetransmissionTimeMs() const = 0;
-
-  // Forces a send of a RTCP packet. Periodic SR and RR are triggered via the
-  // process function.
-  // Returns -1 on failure else 0.
-  virtual int32_t SendRTCP(RTCPPacketType rtcp_packet_type) = 0;
-
-  // Returns statistics of the amount of data sent.
-  // Returns -1 on failure else 0.
-  virtual int32_t DataCountersRTP(size_t* bytes_sent,
-                                  uint32_t* packets_sent) const = 0;
-
-  // Returns send statistics for the RTP and RTX stream.
-  virtual void GetSendStreamDataCounters(
-      StreamDataCounters* rtp_counters,
-      StreamDataCounters* rtx_counters) const = 0;
-
-  // Returns received RTCP report block.
-  // Returns -1 on failure else 0.
-  // TODO(https://crbug.com/webrtc/10678): Remove this in favor of
-  // GetLatestReportBlockData().
-  virtual int32_t RemoteRTCPStat(
-      std::vector<RTCPReportBlock>* receive_blocks) const = 0;
-  // A snapshot of Report Blocks with additional data of interest to statistics.
-  // Within this list, the sender-source SSRC pair is unique and per-pair the
-  // ReportBlockData represents the latest Report Block that was received for
-  // that pair.
-  virtual std::vector<ReportBlockData> GetLatestReportBlockData() const = 0;
-
-  // (APP) Sets application specific data.
-  // Returns -1 on failure else 0.
-  virtual int32_t SetRTCPApplicationSpecificData(uint8_t sub_type,
-                                                 uint32_t name,
-                                                 const uint8_t* data,
-                                                 uint16_t length) = 0;
-  // (XR) Sets Receiver Reference Time Report (RTTR) status.
-  virtual void SetRtcpXrRrtrStatus(bool enable) = 0;
-
-  // Returns current Receiver Reference Time Report (RTTR) status.
-  virtual bool RtcpXrRrtrStatus() const = 0;
-
-  // (REMB) Receiver Estimated Max Bitrate.
-  // Schedules sending REMB on next and following sender/receiver reports.
-  void SetRemb(int64_t bitrate_bps, std::vector<uint32_t> ssrcs) override = 0;
-  // Stops sending REMB on next and following sender/receiver reports.
-  void UnsetRemb() override = 0;
-
-  // (TMMBR) Temporary Max Media Bit Rate
-  virtual bool TMMBR() const = 0;
-
-  virtual void SetTMMBRStatus(bool enable) = 0;
-
-  // (NACK)
-
-  // Sends a Negative acknowledgement packet.
-  // Returns -1 on failure else 0.
-  // TODO(philipel): Deprecate this and start using SendNack instead, mostly
-  // because we want a function that actually send NACK for the specified
-  // packets.
-  virtual int32_t SendNACK(const uint16_t* nack_list, uint16_t size) = 0;
-
-  // Sends NACK for the packets specified.
-  // Note: This assumes the caller keeps track of timing and doesn't rely on
-  // the RTP module to do this.
-  virtual void SendNack(const std::vector<uint16_t>& sequence_numbers) = 0;
-
-  // Store the sent packets, needed to answer to a Negative acknowledgment
-  // requests.
-  virtual void SetStorePacketsStatus(bool enable, uint16_t numberToStore) = 0;
-
-  // Returns true if the module is configured to store packets.
-  virtual bool StorePackets() const = 0;
-
-  virtual void SetVideoBitrateAllocation(
-      const VideoBitrateAllocation& bitrate) = 0;
-
-  // **************************************************************************
-  // Video
-  // **************************************************************************
 
   // Requests new key frame.
   // using PLI, https://tools.ietf.org/html/rfc4585#section-6.3.1.1
   void SendPictureLossIndication() { SendRTCP(kRtcpPli); }
   // using FIR, https://tools.ietf.org/html/rfc5104#section-4.3.1.2
   void SendFullIntraRequest() { SendRTCP(kRtcpFir); }
-
-  // Sends a LossNotification RTCP message.
-  // Returns -1 on failure else 0.
-  virtual int32_t SendLossNotification(uint16_t last_decoded_seq_num,
-                                       uint16_t last_received_seq_num,
-                                       bool decodability_flag,
-                                       bool buffering_allowed) = 0;
 };
 
 }  // namespace webrtc
diff --git a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
index 1b6417d..42baf1d 100644
--- a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
+++ b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
@@ -20,14 +20,14 @@
 #include "absl/types/optional.h"
 #include "api/video/video_bitrate_allocation.h"
 #include "modules/include/module.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "test/gmock.h"
 
 namespace webrtc {
 
-class MockRtpRtcp : public RtpRtcp {
+class MockRtpRtcpInterface : public RtpRtcpInterface {
  public:
   MOCK_METHOD(void,
               IncomingRtcpPacket,
@@ -45,10 +45,6 @@
               (int8_t payload_type),
               (override));
   MOCK_METHOD(void, SetExtmapAllowMixed, (bool extmap_allow_mixed), (override));
-  MOCK_METHOD(int32_t,
-              RegisterSendRtpHeaderExtension,
-              (RTPExtensionType type, uint8_t id),
-              (override));
   MOCK_METHOD(void,
               RegisterRtpHeaderExtension,
               (absl::string_view uri, int id),
@@ -202,20 +198,12 @@
                bool decodability_flag,
                bool buffering_allowed),
               (override));
-  MOCK_METHOD(void, Process, (), (override));
   MOCK_METHOD(void,
               SetVideoBitrateAllocation,
               (const VideoBitrateAllocation&),
               (override));
   MOCK_METHOD(RTPSender*, RtpSender, (), (override));
   MOCK_METHOD(const RTPSender*, RtpSender, (), (const, override));
-
- private:
-  // Mocking this method is currently not required and having a default
-  // implementation like
-  // MOCK_METHOD(int64_t, TimeUntilNextProcess, (), (override))
-  // can be dangerous since it can cause a tight loop on a process thread.
-  int64_t TimeUntilNextProcess() override { return 0xffffffff; }
 };
 
 }  // namespace webrtc
diff --git a/modules/rtp_rtcp/source/nack_rtx_unittest.cc b/modules/rtp_rtcp/source/nack_rtx_unittest.cc
index 0bfd18e..c30eb32 100644
--- a/modules/rtp_rtcp/source/nack_rtx_unittest.cc
+++ b/modules/rtp_rtcp/source/nack_rtx_unittest.cc
@@ -63,7 +63,9 @@
         count_rtx_ssrc_(0),
         module_(NULL) {}
 
-  void SetSendModule(RtpRtcp* rtpRtcpModule) { module_ = rtpRtcpModule; }
+  void SetSendModule(RtpRtcpInterface* rtpRtcpModule) {
+    module_ = rtpRtcpModule;
+  }
 
   void DropEveryNthPacket(int n) { packet_loss_ = n; }
 
@@ -109,7 +111,7 @@
   int consecutive_drop_end_;
   uint32_t rtx_ssrc_;
   int count_rtx_ssrc_;
-  RtpRtcp* module_;
+  RtpRtcpInterface* module_;
   RtpStreamReceiverController stream_receiver_controller_;
   std::set<uint16_t> expected_sequence_numbers_;
 };
@@ -125,7 +127,7 @@
   ~RtpRtcpRtxNackTest() override {}
 
   void SetUp() override {
-    RtpRtcp::Configuration configuration;
+    RtpRtcpInterface::Configuration configuration;
     configuration.audio = false;
     configuration.clock = &fake_clock;
     receive_statistics_ = ReceiveStatistics::Create(&fake_clock);
@@ -224,7 +226,7 @@
   }
 
   std::unique_ptr<ReceiveStatistics> receive_statistics_;
-  std::unique_ptr<RtpRtcp> rtp_rtcp_module_;
+  std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_module_;
   std::unique_ptr<RTPSenderVideo> rtp_sender_video_;
   RtxLoopBackTransport transport_;
   const std::map<int, int> rtx_associated_payload_types_ = {
diff --git a/modules/rtp_rtcp/source/rtcp_receiver.cc b/modules/rtp_rtcp/source/rtcp_receiver.cc
index bfe2667..da51a50 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver.cc
+++ b/modules/rtp_rtcp/source/rtcp_receiver.cc
@@ -66,7 +66,8 @@
 constexpr int32_t kDefaultVideoReportInterval = 1000;
 constexpr int32_t kDefaultAudioReportInterval = 5000;
 
-std::set<uint32_t> GetRegisteredSsrcs(const RtpRtcp::Configuration& config) {
+std::set<uint32_t> GetRegisteredSsrcs(
+    const RtpRtcpInterface::Configuration& config) {
   std::set<uint32_t> ssrcs;
   ssrcs.insert(config.local_media_ssrc);
   if (config.rtx_send_ssrc) {
@@ -136,7 +137,7 @@
   uint8_t sequence_number;
 };
 
-RTCPReceiver::RTCPReceiver(const RtpRtcp::Configuration& config,
+RTCPReceiver::RTCPReceiver(const RtpRtcpInterface::Configuration& config,
                            ModuleRtpRtcp* owner)
     : clock_(config.clock),
       receiver_only_(config.receiver_only),
diff --git a/modules/rtp_rtcp/source/rtcp_receiver.h b/modules/rtp_rtcp/source/rtcp_receiver.h
index ef41476..f7fb607 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver.h
+++ b/modules/rtp_rtcp/source/rtcp_receiver.h
@@ -20,10 +20,10 @@
 #include "api/array_view.h"
 #include "modules/rtp_rtcp/include/report_block_data.h"
 #include "modules/rtp_rtcp/include/rtcp_statistics.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/rtcp_nack_stats.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/dlrr.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "rtc_base/critical_section.h"
 #include "rtc_base/thread_annotations.h"
 #include "system_wrappers/include/ntp_time.h"
@@ -53,7 +53,8 @@
     virtual ~ModuleRtpRtcp() = default;
   };
 
-  RTCPReceiver(const RtpRtcp::Configuration& config, ModuleRtpRtcp* owner);
+  RTCPReceiver(const RtpRtcpInterface::Configuration& config,
+               ModuleRtpRtcp* owner);
   ~RTCPReceiver();
 
   void IncomingPacket(const uint8_t* packet, size_t packet_size) {
diff --git a/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc b/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
index f952196..960f8d3 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
@@ -161,8 +161,8 @@
   StrictMock<MockModuleRtpRtcp> rtp_rtcp_impl;
 };
 
-RtpRtcp::Configuration DefaultConfiguration(ReceiverMocks* mocks) {
-  RtpRtcp::Configuration config;
+RtpRtcpInterface::Configuration DefaultConfiguration(ReceiverMocks* mocks) {
+  RtpRtcpInterface::Configuration config;
   config.clock = &mocks->clock;
   config.receiver_only = false;
   config.rtcp_packet_type_counter_observer =
@@ -636,7 +636,7 @@
 TEST(RtcpReceiverTest, InjectSdesWithOneChunk) {
   ReceiverMocks mocks;
   MockCnameCallbackImpl callback;
-  RtpRtcp::Configuration config = DefaultConfiguration(&mocks);
+  RtpRtcpInterface::Configuration config = DefaultConfiguration(&mocks);
   config.rtcp_cname_callback = &callback;
   RTCPReceiver receiver(config, &mocks.rtp_rtcp_impl);
   receiver.SetRemoteSSRC(kSenderSsrc);
@@ -1310,7 +1310,7 @@
 TEST(RtcpReceiverTest, Callbacks) {
   ReceiverMocks mocks;
   MockRtcpCallbackImpl callback;
-  RtpRtcp::Configuration config = DefaultConfiguration(&mocks);
+  RtpRtcpInterface::Configuration config = DefaultConfiguration(&mocks);
   config.rtcp_statistics_callback = &callback;
   RTCPReceiver receiver(config, &mocks.rtp_rtcp_impl);
   receiver.SetRemoteSSRC(kSenderSsrc);
@@ -1348,7 +1348,7 @@
      VerifyBlockAndTimestampObtainedFromReportBlockDataObserver) {
   ReceiverMocks mocks;
   MockReportBlockDataObserverImpl observer;
-  RtpRtcp::Configuration config = DefaultConfiguration(&mocks);
+  RtpRtcpInterface::Configuration config = DefaultConfiguration(&mocks);
   config.report_block_data_observer = &observer;
   RTCPReceiver receiver(config, &mocks.rtp_rtcp_impl);
   receiver.SetRemoteSSRC(kSenderSsrc);
@@ -1397,7 +1397,7 @@
 TEST(RtcpReceiverTest, VerifyRttObtainedFromReportBlockDataObserver) {
   ReceiverMocks mocks;
   MockReportBlockDataObserverImpl observer;
-  RtpRtcp::Configuration config = DefaultConfiguration(&mocks);
+  RtpRtcpInterface::Configuration config = DefaultConfiguration(&mocks);
   config.report_block_data_observer = &observer;
   RTCPReceiver receiver(config, &mocks.rtp_rtcp_impl);
   receiver.SetRemoteSSRC(kSenderSsrc);
diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc
index c12fb68..2ae49f3 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -148,7 +148,7 @@
   const int64_t now_us_;
 };
 
-RTCPSender::RTCPSender(const RtpRtcp::Configuration& config)
+RTCPSender::RTCPSender(const RtpRtcpInterface::Configuration& config)
     : audio_(config.audio),
       ssrc_(config.local_media_ssrc),
       clock_(config.clock),
diff --git a/modules/rtp_rtcp/source/rtcp_sender.h b/modules/rtp_rtcp/source/rtcp_sender.h
index 61081d4..df91807 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.h
+++ b/modules/rtp_rtcp/source/rtcp_sender.h
@@ -23,7 +23,6 @@
 #include "modules/remote_bitrate_estimator/include/bwe_defines.h"
 #include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
 #include "modules/rtp_rtcp/include/receive_statistics.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/rtcp_nack_stats.h"
 #include "modules/rtp_rtcp/source/rtcp_packet.h"
@@ -31,6 +30,7 @@
 #include "modules/rtp_rtcp/source/rtcp_packet/dlrr.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "rtc_base/constructor_magic.h"
 #include "rtc_base/critical_section.h"
 #include "rtc_base/random.h"
@@ -64,7 +64,7 @@
     RTCPReceiver* receiver;
   };
 
-  explicit RTCPSender(const RtpRtcp::Configuration& config);
+  explicit RTCPSender(const RtpRtcpInterface::Configuration& config);
   virtual ~RTCPSender();
 
   RtcpMode Status() const RTC_LOCKS_EXCLUDED(critical_section_rtcp_sender_);
diff --git a/modules/rtp_rtcp/source/rtcp_sender_unittest.cc b/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
index d187b16..d7cc622 100644
--- a/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
@@ -76,7 +76,7 @@
       : clock_(1335900000),
         receive_statistics_(ReceiveStatistics::Create(&clock_)),
         retransmission_rate_limiter_(&clock_, 1000) {
-    RtpRtcp::Configuration configuration = GetDefaultConfig();
+    RtpRtcpInterface::Configuration configuration = GetDefaultConfig();
     rtp_rtcp_impl_.reset(new ModuleRtpRtcpImpl2(configuration));
     rtcp_sender_.reset(new RTCPSender(configuration));
     rtcp_sender_->SetRemoteSSRC(kRemoteSsrc);
@@ -85,8 +85,8 @@
                                  /*payload_type=*/0);
   }
 
-  RtpRtcp::Configuration GetDefaultConfig() {
-    RtpRtcp::Configuration configuration;
+  RtpRtcpInterface::Configuration GetDefaultConfig() {
+    RtpRtcpInterface::Configuration configuration;
     configuration.audio = false;
     configuration.clock = &clock_;
     configuration.outgoing_transport = &test_transport_;
@@ -191,7 +191,7 @@
 }
 
 TEST_F(RtcpSenderTest, DoNotSendSrBeforeRtp) {
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &clock_;
   config.receive_statistics = receive_statistics_.get();
   config.outgoing_transport = &test_transport_;
@@ -213,7 +213,7 @@
 }
 
 TEST_F(RtcpSenderTest, DoNotSendCompundBeforeRtp) {
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &clock_;
   config.receive_statistics = receive_statistics_.get();
   config.outgoing_transport = &test_transport_;
@@ -563,7 +563,7 @@
 
 TEST_F(RtcpSenderTest, TestRegisterRtcpPacketTypeObserver) {
   RtcpPacketTypeCounterObserverImpl observer;
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &clock_;
   config.receive_statistics = receive_statistics_.get();
   config.outgoing_transport = &test_transport_;
@@ -691,7 +691,7 @@
       }));
 
   // Re-configure rtcp_sender_ with mock_transport_
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &clock_;
   config.receive_statistics = receive_statistics_.get();
   config.outgoing_transport = &mock_transport;
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index 795ac29..690101d 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -39,7 +39,7 @@
 }  // namespace
 
 ModuleRtpRtcpImpl::RtpSenderContext::RtpSenderContext(
-    const RtpRtcp::Configuration& config)
+    const RtpRtcpInterface::Configuration& config)
     : packet_history(config.clock, config.enable_rtx_padding_prioritization),
       packet_sender(config, &packet_history),
       non_paced_sender(&packet_sender),
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
index 2d07060..0e8a760 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
@@ -45,7 +45,8 @@
 // DEPRECATED.
 class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
  public:
-  explicit ModuleRtpRtcpImpl(const RtpRtcp::Configuration& configuration);
+  explicit ModuleRtpRtcpImpl(
+      const RtpRtcpInterface::Configuration& configuration);
   ~ModuleRtpRtcpImpl() override;
 
   // Returns the number of milliseconds until the module want a worker thread to
@@ -304,7 +305,7 @@
   FRIEND_TEST_ALL_PREFIXES(RtpRtcpImplTest, RttForReceiverOnly);
 
   struct RtpSenderContext {
-    explicit RtpSenderContext(const RtpRtcp::Configuration& config);
+    explicit RtpSenderContext(const RtpRtcpInterface::Configuration& config);
     // Storage of packets, for retransmissions and padding, if applicable.
     RtpPacketHistory packet_history;
     // Handles final time timestamping/stats/etc and handover to Transport.
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
index 76335f7..eed90e7 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
@@ -39,7 +39,7 @@
 }  // namespace
 
 ModuleRtpRtcpImpl2::RtpSenderContext::RtpSenderContext(
-    const RtpRtcp::Configuration& config)
+    const RtpRtcpInterface::Configuration& config)
     : packet_history(config.clock, config.enable_rtx_padding_prioritization),
       packet_sender(config, &packet_history),
       non_paced_sender(&packet_sender),
@@ -82,7 +82,7 @@
 }
 
 // static
-std::unique_ptr<RtpRtcp> ModuleRtpRtcpImpl2::Create(
+std::unique_ptr<ModuleRtpRtcpImpl2> ModuleRtpRtcpImpl2::Create(
     const Configuration& configuration) {
   RTC_DCHECK(configuration.clock);
   RTC_DCHECK(TaskQueueBase::Current());
@@ -595,12 +595,6 @@
   rtp_sender_->packet_generator.SetExtmapAllowMixed(extmap_allow_mixed);
 }
 
-int32_t ModuleRtpRtcpImpl2::RegisterSendRtpHeaderExtension(
-    const RTPExtensionType type,
-    const uint8_t id) {
-  return rtp_sender_->packet_generator.RegisterRtpHeaderExtension(type, id);
-}
-
 void ModuleRtpRtcpImpl2::RegisterRtpHeaderExtension(absl::string_view uri,
                                                     int id) {
   bool registered =
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.h b/modules/rtp_rtcp/source/rtp_rtcp_impl2.h
index 87a8107..7ae05ce 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.h
@@ -43,17 +43,20 @@
 struct PacedPacketInfo;
 struct RTPVideoHeader;
 
-class ModuleRtpRtcpImpl2 final : public RtpRtcp,
+class ModuleRtpRtcpImpl2 final : public RtpRtcpInterface,
+                                 public Module,
                                  public RTCPReceiver::ModuleRtpRtcp {
  public:
-  explicit ModuleRtpRtcpImpl2(const RtpRtcp::Configuration& configuration);
+  explicit ModuleRtpRtcpImpl2(
+      const RtpRtcpInterface::Configuration& configuration);
   ~ModuleRtpRtcpImpl2() override;
 
   // This method is provided to easy with migrating away from the
   // RtpRtcp::Create factory method. Since this is an internal implementation
   // detail though, creating an instance of ModuleRtpRtcpImpl2 directly should
   // be fine.
-  static std::unique_ptr<RtpRtcp> Create(const Configuration& configuration);
+  static std::unique_ptr<ModuleRtpRtcpImpl2> Create(
+      const Configuration& configuration);
 
   // TODO(tommi): Make implementation private?
 
@@ -80,9 +83,6 @@
 
   void SetExtmapAllowMixed(bool extmap_allow_mixed) override;
 
-  // Register RTP header extension.
-  int32_t RegisterSendRtpHeaderExtension(RTPExtensionType type,
-                                         uint8_t id) override;
   void RegisterRtpHeaderExtension(absl::string_view uri, int id) override;
   int32_t DeregisterSendRtpHeaderExtension(RTPExtensionType type) override;
   void DeregisterSendRtpHeaderExtension(absl::string_view uri) override;
@@ -313,7 +313,7 @@
   FRIEND_TEST_ALL_PREFIXES(RtpRtcpImpl2Test, RttForReceiverOnly);
 
   struct RtpSenderContext {
-    explicit RtpSenderContext(const RtpRtcp::Configuration& config);
+    explicit RtpSenderContext(const RtpRtcpInterface::Configuration& config);
     // Storage of packets, for retransmissions and padding, if applicable.
     RtpPacketHistory packet_history;
     // Handles final time timestamping/stats/etc and handover to Transport.
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2_unittest.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl2_unittest.cc
index 7627283..5861ae9 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl2_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2_unittest.cc
@@ -143,7 +143,7 @@
 
  private:
   void CreateModuleImpl() {
-    RtpRtcp::Configuration config;
+    RtpRtcpInterface::Configuration config;
     config.audio = false;
     config.clock = clock_;
     config.outgoing_transport = &transport_;
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
index e259566..dd7b512 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
@@ -143,7 +143,7 @@
 
  private:
   void CreateModuleImpl() {
-    RtpRtcp::Configuration config;
+    RtpRtcpInterface::Configuration config;
     config.audio = false;
     config.clock = clock_;
     config.outgoing_transport = &transport_;
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_interface.h b/modules/rtp_rtcp/source/rtp_rtcp_interface.h
new file mode 100644
index 0000000..2bf1a08
--- /dev/null
+++ b/modules/rtp_rtcp/source/rtp_rtcp_interface.h
@@ -0,0 +1,451 @@
+/*
+ *  Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef MODULES_RTP_RTCP_SOURCE_RTP_RTCP_INTERFACE_H_
+#define MODULES_RTP_RTCP_SOURCE_RTP_RTCP_INTERFACE_H_
+
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "absl/types/optional.h"
+#include "api/frame_transformer_interface.h"
+#include "api/scoped_refptr.h"
+#include "api/transport/webrtc_key_value_config.h"
+#include "api/video/video_bitrate_allocation.h"
+#include "modules/rtp_rtcp/include/receive_statistics.h"
+#include "modules/rtp_rtcp/include/report_block_data.h"
+#include "modules/rtp_rtcp/include/rtp_packet_sender.h"
+#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
+#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
+#include "modules/rtp_rtcp/source/rtp_sequence_number_map.h"
+#include "modules/rtp_rtcp/source/video_fec_generator.h"
+#include "rtc_base/constructor_magic.h"
+
+namespace webrtc {
+
+// Forward declarations.
+class FrameEncryptorInterface;
+class RateLimiter;
+class RemoteBitrateEstimator;
+class RtcEventLog;
+class RTPSender;
+class Transport;
+class VideoBitrateAllocationObserver;
+
+class RtpRtcpInterface : public RtcpFeedbackSenderInterface {
+ public:
+  struct Configuration {
+    Configuration() = default;
+    Configuration(Configuration&& rhs) = default;
+
+    // True for a audio version of the RTP/RTCP module object false will create
+    // a video version.
+    bool audio = false;
+    bool receiver_only = false;
+
+    // The clock to use to read time. If nullptr then system clock will be used.
+    Clock* clock = nullptr;
+
+    ReceiveStatisticsProvider* receive_statistics = nullptr;
+
+    // Transport object that will be called when packets are ready to be sent
+    // out on the network.
+    Transport* outgoing_transport = nullptr;
+
+    // Called when the receiver requests an intra frame.
+    RtcpIntraFrameObserver* intra_frame_callback = nullptr;
+
+    // Called when the receiver sends a loss notification.
+    RtcpLossNotificationObserver* rtcp_loss_notification_observer = nullptr;
+
+    // Called when we receive a changed estimate from the receiver of out
+    // stream.
+    RtcpBandwidthObserver* bandwidth_callback = nullptr;
+
+    NetworkStateEstimateObserver* network_state_estimate_observer = nullptr;
+    TransportFeedbackObserver* transport_feedback_callback = nullptr;
+    VideoBitrateAllocationObserver* bitrate_allocation_observer = nullptr;
+    RtcpRttStats* rtt_stats = nullptr;
+    RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer = nullptr;
+    // Called on receipt of RTCP report block from remote side.
+    // TODO(bugs.webrtc.org/10678): Remove RtcpStatisticsCallback in
+    // favor of ReportBlockDataObserver.
+    // TODO(bugs.webrtc.org/10679): Consider whether we want to use
+    // only getters or only callbacks. If we decide on getters, the
+    // ReportBlockDataObserver should also be removed in favor of
+    // GetLatestReportBlockData().
+    RtcpStatisticsCallback* rtcp_statistics_callback = nullptr;
+    RtcpCnameCallback* rtcp_cname_callback = nullptr;
+    ReportBlockDataObserver* report_block_data_observer = nullptr;
+
+    // Estimates the bandwidth available for a set of streams from the same
+    // client.
+    RemoteBitrateEstimator* remote_bitrate_estimator = nullptr;
+
+    // Spread any bursts of packets into smaller bursts to minimize packet loss.
+    RtpPacketSender* paced_sender = nullptr;
+
+    // Generates FEC packets.
+    // TODO(sprang): Wire up to RtpSenderEgress.
+    VideoFecGenerator* fec_generator = nullptr;
+
+    BitrateStatisticsObserver* send_bitrate_observer = nullptr;
+    SendSideDelayObserver* send_side_delay_observer = nullptr;
+    RtcEventLog* event_log = nullptr;
+    SendPacketObserver* send_packet_observer = nullptr;
+    RateLimiter* retransmission_rate_limiter = nullptr;
+    StreamDataCountersCallback* rtp_stats_callback = nullptr;
+
+    int rtcp_report_interval_ms = 0;
+
+    // Update network2 instead of pacer_exit field of video timing extension.
+    bool populate_network2_timestamp = false;
+
+    rtc::scoped_refptr<FrameTransformerInterface> frame_transformer;
+
+    // E2EE Custom Video Frame Encryption
+    FrameEncryptorInterface* frame_encryptor = nullptr;
+    // Require all outgoing frames to be encrypted with a FrameEncryptor.
+    bool require_frame_encryption = false;
+
+    // Corresponds to extmap-allow-mixed in SDP negotiation.
+    bool extmap_allow_mixed = false;
+
+    // If true, the RTP sender will always annotate outgoing packets with
+    // MID and RID header extensions, if provided and negotiated.
+    // If false, the RTP sender will stop sending MID and RID header extensions,
+    // when it knows that the receiver is ready to demux based on SSRC. This is
+    // done by RTCP RR acking.
+    bool always_send_mid_and_rid = false;
+
+    // If set, field trials are read from |field_trials|, otherwise
+    // defaults to  webrtc::FieldTrialBasedConfig.
+    const WebRtcKeyValueConfig* field_trials = nullptr;
+
+    // SSRCs for media and retransmission, respectively.
+    // FlexFec SSRC is fetched from |flexfec_sender|.
+    uint32_t local_media_ssrc = 0;
+    absl::optional<uint32_t> rtx_send_ssrc;
+
+    bool need_rtp_packet_infos = false;
+
+    // If true, the RTP packet history will select RTX packets based on
+    // heuristics such as send time, retransmission count etc, in order to
+    // make padding potentially more useful.
+    // If false, the last packet will always be picked. This may reduce CPU
+    // overhead.
+    bool enable_rtx_padding_prioritization = true;
+
+   private:
+    RTC_DISALLOW_COPY_AND_ASSIGN(Configuration);
+  };
+
+  // **************************************************************************
+  // Receiver functions
+  // **************************************************************************
+
+  virtual void IncomingRtcpPacket(const uint8_t* incoming_packet,
+                                  size_t incoming_packet_length) = 0;
+
+  virtual void SetRemoteSSRC(uint32_t ssrc) = 0;
+
+  // **************************************************************************
+  // Sender
+  // **************************************************************************
+
+  // Sets the maximum size of an RTP packet, including RTP headers.
+  virtual void SetMaxRtpPacketSize(size_t size) = 0;
+
+  // Returns max RTP packet size. Takes into account RTP headers and
+  // FEC/ULP/RED overhead (when FEC is enabled).
+  virtual size_t MaxRtpPacketSize() const = 0;
+
+  virtual void RegisterSendPayloadFrequency(int payload_type,
+                                            int payload_frequency) = 0;
+
+  // Unregisters a send payload.
+  // |payload_type| - payload type of codec
+  // Returns -1 on failure else 0.
+  virtual int32_t DeRegisterSendPayload(int8_t payload_type) = 0;
+
+  virtual void SetExtmapAllowMixed(bool extmap_allow_mixed) = 0;
+
+  // Register extension by uri, triggers CHECK on falure.
+  virtual void RegisterRtpHeaderExtension(absl::string_view uri, int id) = 0;
+
+  virtual int32_t DeregisterSendRtpHeaderExtension(RTPExtensionType type) = 0;
+  virtual void DeregisterSendRtpHeaderExtension(absl::string_view uri) = 0;
+
+  // Returns true if RTP module is send media, and any of the extensions
+  // required for bandwidth estimation is registered.
+  virtual bool SupportsPadding() const = 0;
+  // Same as SupportsPadding(), but additionally requires that
+  // SetRtxSendStatus() has been called with the kRtxRedundantPayloads option
+  // enabled.
+  virtual bool SupportsRtxPayloadPadding() const = 0;
+
+  // Returns start timestamp.
+  virtual uint32_t StartTimestamp() const = 0;
+
+  // Sets start timestamp. Start timestamp is set to a random value if this
+  // function is never called.
+  virtual void SetStartTimestamp(uint32_t timestamp) = 0;
+
+  // Returns SequenceNumber.
+  virtual uint16_t SequenceNumber() const = 0;
+
+  // Sets SequenceNumber, default is a random number.
+  virtual void SetSequenceNumber(uint16_t seq) = 0;
+
+  virtual void SetRtpState(const RtpState& rtp_state) = 0;
+  virtual void SetRtxState(const RtpState& rtp_state) = 0;
+  virtual RtpState GetRtpState() const = 0;
+  virtual RtpState GetRtxState() const = 0;
+
+  // 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.
+  virtual void SetRid(const std::string& 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.
+  virtual void SetMid(const std::string& mid) = 0;
+
+  // Sets CSRC.
+  // |csrcs| - vector of CSRCs
+  virtual void SetCsrcs(const std::vector<uint32_t>& csrcs) = 0;
+
+  // Turns on/off sending RTX (RFC 4588). The modes can be set as a combination
+  // of values of the enumerator RtxMode.
+  virtual void SetRtxSendStatus(int modes) = 0;
+
+  // Returns status of sending RTX (RFC 4588). The returned value can be
+  // a combination of values of the enumerator RtxMode.
+  virtual int RtxSendStatus() const = 0;
+
+  // Returns the SSRC used for RTX if set, otherwise a nullopt.
+  virtual absl::optional<uint32_t> RtxSsrc() const = 0;
+
+  // Sets the payload type to use when sending RTX packets. Note that this
+  // doesn't enable RTX, only the payload type is set.
+  virtual void SetRtxSendPayloadType(int payload_type,
+                                     int associated_payload_type) = 0;
+
+  // Returns the FlexFEC SSRC, if there is one.
+  virtual absl::optional<uint32_t> FlexfecSsrc() const = 0;
+
+  // Sets sending status. Sends kRtcpByeCode when going from true to false.
+  // Returns -1 on failure else 0.
+  virtual int32_t SetSendingStatus(bool sending) = 0;
+
+  // Returns current sending status.
+  virtual bool Sending() const = 0;
+
+  // Starts/Stops media packets. On by default.
+  virtual void SetSendingMediaStatus(bool sending) = 0;
+
+  // Returns current media sending status.
+  virtual bool SendingMedia() const = 0;
+
+  // Returns whether audio is configured (i.e. Configuration::audio = true).
+  virtual bool IsAudioConfigured() const = 0;
+
+  // Indicate that the packets sent by this module should be counted towards the
+  // bitrate estimate since the stream participates in the bitrate allocation.
+  virtual void SetAsPartOfAllocation(bool part_of_allocation) = 0;
+
+  // TODO(sprang): Remove when all call sites have been moved to
+  // GetSendRates(). Fetches the current send bitrates in bits/s.
+  virtual void BitrateSent(uint32_t* total_rate,
+                           uint32_t* video_rate,
+                           uint32_t* fec_rate,
+                           uint32_t* nack_rate) const = 0;
+
+  // Returns bitrate sent (post-pacing) per packet type.
+  virtual RtpSendRates GetSendRates() const = 0;
+
+  virtual RTPSender* RtpSender() = 0;
+  virtual const RTPSender* RtpSender() const = 0;
+
+  // Record that a frame is about to be sent. Returns true on success, and false
+  // if the module isn't ready to send.
+  virtual bool OnSendingRtpFrame(uint32_t timestamp,
+                                 int64_t capture_time_ms,
+                                 int payload_type,
+                                 bool force_sender_report) = 0;
+
+  // Try to send the provided packet. Returns true iff packet matches any of
+  // the SSRCs for this module (media/rtx/fec etc) and was forwarded to the
+  // transport.
+  virtual bool TrySendPacket(RtpPacketToSend* packet,
+                             const PacedPacketInfo& pacing_info) = 0;
+
+  virtual void OnPacketsAcknowledged(
+      rtc::ArrayView<const uint16_t> sequence_numbers) = 0;
+
+  virtual std::vector<std::unique_ptr<RtpPacketToSend>> GeneratePadding(
+      size_t target_size_bytes) = 0;
+
+  virtual std::vector<RtpSequenceNumberMap::Info> GetSentRtpPacketInfos(
+      rtc::ArrayView<const uint16_t> sequence_numbers) const = 0;
+
+  // Returns an expected per packet overhead representing the main RTP header,
+  // any CSRCs, and the registered header extensions that are expected on all
+  // packets (i.e. disregarding things like abs capture time which is only
+  // populated on a subset of packets, but counting MID/RID type extensions
+  // when we expect to send them).
+  virtual size_t ExpectedPerPacketOverhead() const = 0;
+
+  // **************************************************************************
+  // RTCP
+  // **************************************************************************
+
+  // Returns RTCP status.
+  virtual RtcpMode RTCP() const = 0;
+
+  // Sets RTCP status i.e on(compound or non-compound)/off.
+  // |method| - RTCP method to use.
+  virtual void SetRTCPStatus(RtcpMode method) = 0;
+
+  // Sets RTCP CName (i.e unique identifier).
+  // Returns -1 on failure else 0.
+  virtual int32_t SetCNAME(const char* cname) = 0;
+
+  // Returns remote CName.
+  // Returns -1 on failure else 0.
+  virtual int32_t RemoteCNAME(uint32_t remote_ssrc,
+                              char cname[RTCP_CNAME_SIZE]) const = 0;
+
+  // Returns remote NTP.
+  // Returns -1 on failure else 0.
+  virtual int32_t RemoteNTP(uint32_t* received_ntp_secs,
+                            uint32_t* received_ntp_frac,
+                            uint32_t* rtcp_arrival_time_secs,
+                            uint32_t* rtcp_arrival_time_frac,
+                            uint32_t* rtcp_timestamp) const = 0;
+
+  // Returns -1 on failure else 0.
+  virtual int32_t AddMixedCNAME(uint32_t ssrc, const char* cname) = 0;
+
+  // Returns -1 on failure else 0.
+  virtual int32_t RemoveMixedCNAME(uint32_t ssrc) = 0;
+
+  // Returns current RTT (round-trip time) estimate.
+  // Returns -1 on failure else 0.
+  virtual int32_t RTT(uint32_t remote_ssrc,
+                      int64_t* rtt,
+                      int64_t* avg_rtt,
+                      int64_t* min_rtt,
+                      int64_t* max_rtt) const = 0;
+
+  // Returns the estimated RTT, with fallback to a default value.
+  virtual int64_t ExpectedRetransmissionTimeMs() const = 0;
+
+  // Forces a send of a RTCP packet. Periodic SR and RR are triggered via the
+  // process function.
+  // Returns -1 on failure else 0.
+  virtual int32_t SendRTCP(RTCPPacketType rtcp_packet_type) = 0;
+
+  // Returns statistics of the amount of data sent.
+  // Returns -1 on failure else 0.
+  virtual int32_t DataCountersRTP(size_t* bytes_sent,
+                                  uint32_t* packets_sent) const = 0;
+
+  // Returns send statistics for the RTP and RTX stream.
+  virtual void GetSendStreamDataCounters(
+      StreamDataCounters* rtp_counters,
+      StreamDataCounters* rtx_counters) const = 0;
+
+  // Returns received RTCP report block.
+  // Returns -1 on failure else 0.
+  // TODO(https://crbug.com/webrtc/10678): Remove this in favor of
+  // GetLatestReportBlockData().
+  virtual int32_t RemoteRTCPStat(
+      std::vector<RTCPReportBlock>* receive_blocks) const = 0;
+  // A snapshot of Report Blocks with additional data of interest to statistics.
+  // Within this list, the sender-source SSRC pair is unique and per-pair the
+  // ReportBlockData represents the latest Report Block that was received for
+  // that pair.
+  virtual std::vector<ReportBlockData> GetLatestReportBlockData() const = 0;
+
+  // (APP) Sets application specific data.
+  // Returns -1 on failure else 0.
+  virtual int32_t SetRTCPApplicationSpecificData(uint8_t sub_type,
+                                                 uint32_t name,
+                                                 const uint8_t* data,
+                                                 uint16_t length) = 0;
+  // (XR) Sets Receiver Reference Time Report (RTTR) status.
+  virtual void SetRtcpXrRrtrStatus(bool enable) = 0;
+
+  // Returns current Receiver Reference Time Report (RTTR) status.
+  virtual bool RtcpXrRrtrStatus() const = 0;
+
+  // (REMB) Receiver Estimated Max Bitrate.
+  // Schedules sending REMB on next and following sender/receiver reports.
+  void SetRemb(int64_t bitrate_bps, std::vector<uint32_t> ssrcs) override = 0;
+  // Stops sending REMB on next and following sender/receiver reports.
+  void UnsetRemb() override = 0;
+
+  // (TMMBR) Temporary Max Media Bit Rate
+  virtual bool TMMBR() const = 0;
+
+  virtual void SetTMMBRStatus(bool enable) = 0;
+
+  // (NACK)
+
+  // Sends a Negative acknowledgement packet.
+  // Returns -1 on failure else 0.
+  // TODO(philipel): Deprecate this and start using SendNack instead, mostly
+  // because we want a function that actually send NACK for the specified
+  // packets.
+  virtual int32_t SendNACK(const uint16_t* nack_list, uint16_t size) = 0;
+
+  // Sends NACK for the packets specified.
+  // Note: This assumes the caller keeps track of timing and doesn't rely on
+  // the RTP module to do this.
+  virtual void SendNack(const std::vector<uint16_t>& sequence_numbers) = 0;
+
+  // Store the sent packets, needed to answer to a Negative acknowledgment
+  // requests.
+  virtual void SetStorePacketsStatus(bool enable, uint16_t numberToStore) = 0;
+
+  // Returns true if the module is configured to store packets.
+  virtual bool StorePackets() const = 0;
+
+  virtual void SetVideoBitrateAllocation(
+      const VideoBitrateAllocation& bitrate) = 0;
+
+  // **************************************************************************
+  // Video
+  // **************************************************************************
+
+  // Requests new key frame.
+  // using PLI, https://tools.ietf.org/html/rfc4585#section-6.3.1.1
+  void SendPictureLossIndication() { SendRTCP(kRtcpPli); }
+  // using FIR, https://tools.ietf.org/html/rfc5104#section-4.3.1.2
+  void SendFullIntraRequest() { SendRTCP(kRtcpFir); }
+
+  // Sends a LossNotification RTCP message.
+  // Returns -1 on failure else 0.
+  virtual int32_t SendLossNotification(uint16_t last_decoded_seq_num,
+                                       uint16_t last_received_seq_num,
+                                       bool decodability_flag,
+                                       bool buffering_allowed) = 0;
+};
+
+}  // namespace webrtc
+
+#endif  // MODULES_RTP_RTCP_SOURCE_RTP_RTCP_INTERFACE_H_
diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc
index 764df2b..c0960c2 100644
--- a/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/modules/rtp_rtcp/source/rtp_sender.cc
@@ -154,7 +154,7 @@
 
 }  // namespace
 
-RTPSender::RTPSender(const RtpRtcp::Configuration& config,
+RTPSender::RTPSender(const RtpRtcpInterface::Configuration& config,
                      RtpPacketHistory* packet_history,
                      RtpPacketSender* packet_sender)
     : clock_(config.clock),
diff --git a/modules/rtp_rtcp/source/rtp_sender.h b/modules/rtp_rtcp/source/rtp_sender.h
index bc4cd11..dd291f8 100644
--- a/modules/rtp_rtcp/source/rtp_sender.h
+++ b/modules/rtp_rtcp/source/rtp_sender.h
@@ -25,10 +25,10 @@
 #include "modules/rtp_rtcp/include/flexfec_sender.h"
 #include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
 #include "modules/rtp_rtcp/include/rtp_packet_sender.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/rtp_packet_history.h"
 #include "modules/rtp_rtcp/source/rtp_rtcp_config.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "rtc_base/constructor_magic.h"
 #include "rtc_base/critical_section.h"
 #include "rtc_base/deprecation.h"
@@ -45,7 +45,7 @@
 
 class RTPSender {
  public:
-  RTPSender(const RtpRtcp::Configuration& config,
+  RTPSender(const RtpRtcpInterface::Configuration& config,
             RtpPacketHistory* packet_history,
             RtpPacketSender* packet_sender);
 
diff --git a/modules/rtp_rtcp/source/rtp_sender_audio_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_audio_unittest.cc
index e406b53..1583ab0 100644
--- a/modules/rtp_rtcp/source/rtp_sender_audio_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_audio_unittest.cc
@@ -69,7 +69,7 @@
   RtpSenderAudioTest()
       : fake_clock_(kStartTime),
         rtp_module_(ModuleRtpRtcpImpl2::Create([&] {
-          RtpRtcp::Configuration config;
+          RtpRtcpInterface::Configuration config;
           config.audio = true;
           config.clock = &fake_clock_;
           config.outgoing_transport = &transport_;
@@ -82,7 +82,7 @@
 
   SimulatedClock fake_clock_;
   LoopbackTransportTest transport_;
-  std::unique_ptr<RtpRtcp> rtp_module_;
+  std::unique_ptr<ModuleRtpRtcpImpl2> rtp_module_;
   RTPSenderAudio rtp_sender_audio_;
 };
 
diff --git a/modules/rtp_rtcp/source/rtp_sender_egress.cc b/modules/rtp_rtcp/source/rtp_sender_egress.cc
index 6d5477b..6b54920 100644
--- a/modules/rtp_rtcp/source/rtp_sender_egress.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_egress.cc
@@ -53,7 +53,7 @@
   }
 }
 
-RtpSenderEgress::RtpSenderEgress(const RtpRtcp::Configuration& config,
+RtpSenderEgress::RtpSenderEgress(const RtpRtcpInterface::Configuration& config,
                                  RtpPacketHistory* packet_history)
     : ssrc_(config.local_media_ssrc),
       rtx_ssrc_(config.rtx_send_ssrc),
diff --git a/modules/rtp_rtcp/source/rtp_sender_egress.h b/modules/rtp_rtcp/source/rtp_sender_egress.h
index c9ecde3..a8e033c 100644
--- a/modules/rtp_rtcp/source/rtp_sender_egress.h
+++ b/modules/rtp_rtcp/source/rtp_sender_egress.h
@@ -19,10 +19,10 @@
 #include "api/call/transport.h"
 #include "api/rtc_event_log/rtc_event_log.h"
 #include "api/units/data_rate.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/rtp_packet_history.h"
 #include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "modules/rtp_rtcp/source/rtp_sequence_number_map.h"
 #include "rtc_base/critical_section.h"
 #include "rtc_base/rate_statistics.h"
@@ -47,7 +47,7 @@
     RtpSenderEgress* const sender_;
   };
 
-  RtpSenderEgress(const RtpRtcp::Configuration& config,
+  RtpSenderEgress(const RtpRtcpInterface::Configuration& config,
                   RtpPacketHistory* packet_history);
   ~RtpSenderEgress() = default;
 
diff --git a/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
index b880699..12055b5 100644
--- a/modules/rtp_rtcp/source/rtp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
@@ -212,7 +212,7 @@
 // TODO(sprang): Split up unit tests and test these components individually
 // wherever possible.
 struct RtpSenderContext {
-  explicit RtpSenderContext(const RtpRtcp::Configuration& config)
+  explicit RtpSenderContext(const RtpRtcpInterface::Configuration& config)
       : packet_history_(config.clock, config.enable_rtx_padding_prioritization),
         packet_sender_(config, &packet_history_),
         non_paced_sender_(&packet_sender_),
@@ -285,7 +285,7 @@
   void SetUpRtpSender(bool pacer,
                       bool populate_network2,
                       bool always_send_mid_and_rid) {
-    RtpRtcp::Configuration config;
+    RtpRtcpInterface::Configuration config;
     config.clock = &fake_clock_;
     config.outgoing_transport = &transport_;
     config.local_media_ssrc = kSsrc;
@@ -481,7 +481,7 @@
 
 TEST_P(RtpSenderTest, AssignSequenceNumberAllowsPaddingOnAudio) {
   MockTransport transport;
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.audio = true;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport;
@@ -531,7 +531,7 @@
        TransportFeedbackObserverGetsCorrectByteCount) {
   constexpr size_t kRtpOverheadBytesPerPacket = 12 + 8;
 
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.local_media_ssrc = kSsrc;
@@ -566,7 +566,7 @@
 }
 
 TEST_P(RtpSenderTestWithoutPacer, SendsPacketsWithTransportSequenceNumber) {
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.local_media_ssrc = kSsrc;
@@ -605,7 +605,7 @@
 }
 
 TEST_P(RtpSenderTestWithoutPacer, PacketOptionsNoRetransmission) {
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.local_media_ssrc = kSsrc;
@@ -660,7 +660,7 @@
 TEST_P(RtpSenderTestWithoutPacer, OnSendSideDelayUpdated) {
   StrictMock<MockSendSideDelayObserver> send_side_delay_observer_;
 
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.local_media_ssrc = kSsrc;
@@ -747,7 +747,7 @@
 }
 
 TEST_P(RtpSenderTest, SendsPacketsWithTransportSequenceNumber) {
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.paced_sender = &mock_paced_sender_;
@@ -1239,7 +1239,7 @@
                                nullptr /* rtp_state */, &fake_clock_);
 
   // Reset |rtp_sender_| to use FlexFEC.
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.paced_sender = &mock_paced_sender_;
@@ -1328,7 +1328,7 @@
                                nullptr /* rtp_state */, &fake_clock_);
 
   // Reset |rtp_sender_| to use FlexFEC.
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.local_media_ssrc = kSsrc;
@@ -1661,7 +1661,7 @@
                                nullptr /* rtp_state */, &fake_clock_);
 
   // Reset |rtp_sender_| to use FlexFEC.
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.paced_sender = &mock_paced_sender_;
@@ -1742,7 +1742,7 @@
     uint32_t retransmit_bitrate_;
   } callback;
 
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.local_media_ssrc = kSsrc;
@@ -1970,7 +1970,7 @@
 }
 
 TEST_P(RtpSenderTest, UpdatingCsrcsUpdatedOverhead) {
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.local_media_ssrc = kSsrc;
@@ -1986,7 +1986,7 @@
 }
 
 TEST_P(RtpSenderTest, OnOverheadChanged) {
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.local_media_ssrc = kSsrc;
@@ -2005,7 +2005,7 @@
 }
 
 TEST_P(RtpSenderTest, CountMidOnlyUntilAcked) {
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.local_media_ssrc = kSsrc;
@@ -2032,7 +2032,7 @@
 }
 
 TEST_P(RtpSenderTest, DontCountVolatileExtensionsIntoOverhead) {
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.local_media_ssrc = kSsrc;
@@ -2250,7 +2250,7 @@
 
   StrictMock<MockSendSideDelayObserver> send_side_delay_observer;
 
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &fake_clock_;
   config.outgoing_transport = &transport_;
   config.local_media_ssrc = kSsrc;
diff --git a/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc
index 2dbb2e7..4dd880a 100644
--- a/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc
@@ -170,7 +170,7 @@
         fake_clock_(kStartTime),
         retransmission_rate_limiter_(&fake_clock_, 1000),
         rtp_module_(ModuleRtpRtcpImpl2::Create([&] {
-          RtpRtcp::Configuration config;
+          RtpRtcpInterface::Configuration config;
           config.clock = &fake_clock_;
           config.outgoing_transport = &transport_;
           config.retransmission_rate_limiter = &retransmission_rate_limiter_;
@@ -190,12 +190,12 @@
       int version);
 
  protected:
-  const RtpRtcp::Configuration config_;
+  const RtpRtcpInterface::Configuration config_;
   FieldTrials field_trials_;
   SimulatedClock fake_clock_;
   LoopbackTransportTest transport_;
   RateLimiter retransmission_rate_limiter_;
-  std::unique_ptr<RtpRtcp> rtp_module_;
+  std::unique_ptr<ModuleRtpRtcpImpl2> rtp_module_;
   TestRtpSenderVideo rtp_sender_video_;
 };
 
@@ -921,7 +921,7 @@
       : fake_clock_(kStartTime),
         retransmission_rate_limiter_(&fake_clock_, 1000),
         rtp_module_(ModuleRtpRtcpImpl2::Create([&] {
-          RtpRtcp::Configuration config;
+          RtpRtcpInterface::Configuration config;
           config.clock = &fake_clock_;
           config.outgoing_transport = &transport_;
           config.retransmission_rate_limiter = &retransmission_rate_limiter_;
@@ -948,7 +948,7 @@
   SimulatedClock fake_clock_;
   LoopbackTransportTest transport_;
   RateLimiter retransmission_rate_limiter_;
-  std::unique_ptr<RtpRtcp> rtp_module_;
+  std::unique_ptr<ModuleRtpRtcpImpl2> rtp_module_;
 };
 
 std::unique_ptr<EncodedImage> CreateDefaultEncodedImage() {
diff --git a/rtc_tools/rtc_event_log_visualizer/analyzer.cc b/rtc_tools/rtc_event_log_visualizer/analyzer.cc
index a0e441c..cb270c1 100644
--- a/rtc_tools/rtc_event_log_visualizer/analyzer.cc
+++ b/rtc_tools/rtc_event_log_visualizer/analyzer.cc
@@ -45,7 +45,6 @@
 #include "modules/pacing/paced_sender.h"
 #include "modules/pacing/packet_router.h"
 #include "modules/remote_bitrate_estimator/include/bwe_defines.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/rtcp_packet.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/common_header.h"
@@ -54,6 +53,7 @@
 #include "modules/rtp_rtcp/source/rtcp_packet/sender_report.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
 #include "modules/rtp_rtcp/source/rtp_header_extensions.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "modules/rtp_rtcp/source/rtp_utility.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/format_macros.h"
diff --git a/test/fuzzers/rtcp_receiver_fuzzer.cc b/test/fuzzers/rtcp_receiver_fuzzer.cc
index 38213c3..8bad9e4 100644
--- a/test/fuzzers/rtcp_receiver_fuzzer.cc
+++ b/test/fuzzers/rtcp_receiver_fuzzer.cc
@@ -7,9 +7,9 @@
  *  in the file PATENTS.  All contributing project authors may
  *  be found in the AUTHORS file in the root of the source tree.
  */
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h"
 #include "modules/rtp_rtcp/source/rtcp_receiver.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "rtc_base/checks.h"
 #include "system_wrappers/include/clock.h"
 
@@ -40,7 +40,7 @@
   NullModuleRtpRtcp rtp_rtcp_module;
   SimulatedClock clock(1234);
 
-  RtpRtcp::Configuration config;
+  RtpRtcpInterface::Configuration config;
   config.clock = &clock;
   config.rtcp_report_interval_ms = kRtcpIntervalMs;
   config.local_media_ssrc = 1;
diff --git a/video/end_to_end_tests/bandwidth_tests.cc b/video/end_to_end_tests/bandwidth_tests.cc
index d0c2c27..1938494 100644
--- a/video/end_to_end_tests/bandwidth_tests.cc
+++ b/video/end_to_end_tests/bandwidth_tests.cc
@@ -238,7 +238,7 @@
       encoder_config->max_bitrate_bps = 2000000;
 
       ASSERT_EQ(1u, receive_configs->size());
-      RtpRtcp::Configuration config;
+      RtpRtcpInterface::Configuration config;
       config.receiver_only = true;
       config.clock = clock_;
       config.outgoing_transport = receive_transport_;
@@ -303,7 +303,7 @@
     Clock* const clock_;
     uint32_t sender_ssrc_;
     int remb_bitrate_bps_;
-    std::unique_ptr<RtpRtcp> rtp_rtcp_;
+    std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_;
     test::PacketTransport* receive_transport_;
     TestState state_;
     RateLimiter retransmission_rate_limiter_;
diff --git a/video/receive_statistics_proxy2.cc b/video/receive_statistics_proxy2.cc
index 15d08c4..3cce3c8 100644
--- a/video/receive_statistics_proxy2.cc
+++ b/video/receive_statistics_proxy2.cc
@@ -782,10 +782,10 @@
     return;
 
   if (!IsCurrentTaskQueueOrThread(worker_thread_)) {
-    // RtpRtcp::Configuration has a single RtcpPacketTypeCounterObserver and
-    // that same configuration may be used for both receiver and sender
-    // (see ModuleRtpRtcpImpl::ModuleRtpRtcpImpl).
-    // The RTCPSender implementation currently makes calls to this function on a
+    // RtpRtcpInterface::Configuration has a single
+    // RtcpPacketTypeCounterObserver and that same configuration may be used for
+    // both receiver and sender (see ModuleRtpRtcpImpl::ModuleRtpRtcpImpl). The
+    // RTCPSender implementation currently makes calls to this function on a
     // process thread whereas the RTCPReceiver implementation calls back on the
     // [main] worker thread.
     // So until the sender implementation has been updated, we work around this
diff --git a/video/rtp_video_stream_receiver.cc b/video/rtp_video_stream_receiver.cc
index a4c102e..4544a12 100644
--- a/video/rtp_video_stream_receiver.cc
+++ b/video/rtp_video_stream_receiver.cc
@@ -85,7 +85,7 @@
     RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer,
     RtcpCnameCallback* rtcp_cname_callback,
     uint32_t local_ssrc) {
-  RtpRtcp::Configuration configuration;
+  RtpRtcpInterface::Configuration configuration;
   configuration.clock = clock;
   configuration.audio = false;
   configuration.receiver_only = true;
diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc
index 54a25d2..481b83e 100644
--- a/video/rtp_video_stream_receiver2.cc
+++ b/video/rtp_video_stream_receiver2.cc
@@ -34,7 +34,6 @@
 #include "modules/rtp_rtcp/source/rtp_header_extensions.h"
 #include "modules/rtp_rtcp/source/rtp_packet_received.h"
 #include "modules/rtp_rtcp/source/rtp_rtcp_config.h"
-#include "modules/rtp_rtcp/source/rtp_rtcp_impl2.h"
 #include "modules/rtp_rtcp/source/video_rtp_depacketizer.h"
 #include "modules/rtp_rtcp/source/video_rtp_depacketizer_raw.h"
 #include "modules/utility/include/process_thread.h"
@@ -77,7 +76,7 @@
   return packet_buffer_max_size;
 }
 
-std::unique_ptr<RtpRtcp> CreateRtpRtcpModule(
+std::unique_ptr<ModuleRtpRtcpImpl2> CreateRtpRtcpModule(
     Clock* clock,
     ReceiveStatistics* receive_statistics,
     Transport* outgoing_transport,
@@ -85,7 +84,7 @@
     RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer,
     RtcpCnameCallback* rtcp_cname_callback,
     uint32_t local_ssrc) {
-  RtpRtcp::Configuration configuration;
+  RtpRtcpInterface::Configuration configuration;
   configuration.clock = clock;
   configuration.audio = false;
   configuration.receiver_only = true;
@@ -97,7 +96,8 @@
   configuration.rtcp_cname_callback = rtcp_cname_callback;
   configuration.local_media_ssrc = local_ssrc;
 
-  std::unique_ptr<RtpRtcp> rtp_rtcp = ModuleRtpRtcpImpl2::Create(configuration);
+  std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp =
+      ModuleRtpRtcpImpl2::Create(configuration);
   rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound);
 
   return rtp_rtcp;
diff --git a/video/rtp_video_stream_receiver2.h b/video/rtp_video_stream_receiver2.h
index 287bb4f..d82a7ab 100644
--- a/video/rtp_video_stream_receiver2.h
+++ b/video/rtp_video_stream_receiver2.h
@@ -26,11 +26,12 @@
 #include "modules/rtp_rtcp/include/receive_statistics.h"
 #include "modules/rtp_rtcp/include/remote_ntp_time_estimator.h"
 #include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
-#include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/absolute_capture_time_receiver.h"
 #include "modules/rtp_rtcp/source/rtp_dependency_descriptor_extension.h"
 #include "modules/rtp_rtcp/source/rtp_packet_received.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_impl2.h"
+#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "modules/rtp_rtcp/source/rtp_video_header.h"
 #include "modules/rtp_rtcp/source/video_rtp_depacketizer.h"
 #include "modules/video_coding/h264_sps_pps_tracker.h"
@@ -289,7 +290,7 @@
   bool receiving_ RTC_GUARDED_BY(worker_task_checker_);
   int64_t last_packet_log_ms_ RTC_GUARDED_BY(worker_task_checker_);
 
-  const std::unique_ptr<RtpRtcp> rtp_rtcp_;
+  const std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_;
 
   video_coding::OnCompleteFrameCallback* complete_frame_callback_;
   KeyFrameRequestSender* const keyframe_request_sender_;
diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc
index cb77f13..09d7abc 100644
--- a/video/video_send_stream_tests.cc
+++ b/video/video_send_stream_tests.cc
@@ -948,7 +948,7 @@
             non_padding_sequence_numbers_.end() - kNackedPacketsAtOnceCount,
             non_padding_sequence_numbers_.end());
 
-        RtpRtcp::Configuration config;
+        RtpRtcpInterface::Configuration config;
         config.clock = Clock::GetRealTimeClock();
         config.outgoing_transport = transport_adapter_.get();
         config.rtcp_report_interval_ms = kRtcpIntervalMs;
@@ -1164,7 +1164,7 @@
             kVideoSendSsrcs[0], rtp_packet.SequenceNumber(),
             packets_lost_,  // Cumulative lost.
             loss_ratio);    // Loss percent.
-        RtpRtcp::Configuration config;
+        RtpRtcpInterface::Configuration config;
         config.clock = Clock::GetRealTimeClock();
         config.receive_statistics = &lossy_receive_stats;
         config.outgoing_transport = transport_adapter_.get();
@@ -1416,7 +1416,7 @@
         RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_) {
       FakeReceiveStatistics receive_stats(kVideoSendSsrcs[0],
                                           last_sequence_number_, rtp_count_, 0);
-      RtpRtcp::Configuration config;
+      RtpRtcpInterface::Configuration config;
       config.clock = clock_;
       config.receive_statistics = &receive_stats;
       config.outgoing_transport = transport_adapter_.get();
@@ -1673,7 +1673,7 @@
         VideoSendStream* send_stream,
         const std::vector<VideoReceiveStream*>& receive_streams) override {
       stream_ = send_stream;
-      RtpRtcp::Configuration config;
+      RtpRtcpInterface::Configuration config;
       config.clock = Clock::GetRealTimeClock();
       config.outgoing_transport = feedback_transport_.get();
       config.retransmission_rate_limiter = &retranmission_rate_limiter_;
@@ -1697,7 +1697,7 @@
     }
 
     TaskQueueBase* const task_queue_;
-    std::unique_ptr<RtpRtcp> rtp_rtcp_;
+    std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_;
     std::unique_ptr<internal::TransportAdapter> feedback_transport_;
     RateLimiter retranmission_rate_limiter_;
     VideoSendStream* stream_;