Cleanup RtcpTransceiver dependency on webrtc::Transport

Bug: webrtc:8239
Change-Id: I5740935044ba422a32b571eb9f559e83b915fe15
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306522
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40152}
diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn
index 2048cdb..f17567c 100644
--- a/modules/rtp_rtcp/BUILD.gn
+++ b/modules/rtp_rtcp/BUILD.gn
@@ -404,7 +404,6 @@
     ":rtp_rtcp_format",
     "../../api:array_view",
     "../../api:rtp_headers",
-    "../../api:transport_api",
     "../../api/task_queue",
     "../../api/units:data_rate",
     "../../api/units:time_delta",
diff --git a/modules/rtp_rtcp/source/rtcp_transceiver_config.h b/modules/rtp_rtcp/source/rtcp_transceiver_config.h
index 2906689..881666d 100644
--- a/modules/rtp_rtcp/source/rtcp_transceiver_config.h
+++ b/modules/rtp_rtcp/source/rtcp_transceiver_config.h
@@ -26,7 +26,6 @@
 
 namespace webrtc {
 class ReceiveStatisticsProvider;
-class Transport;
 
 // Interface to watch incoming rtcp packets by media (rtp) receiver.
 // All message handlers have default empty implementation. This way users only
@@ -114,10 +113,6 @@
   Clock* clock = nullptr;
 
   // Transport to send RTCP packets to.
-  union {
-    [[deprecated]] Transport* outgoing_transport = nullptr;
-    Transport* deprecated_outgoing_transport;
-  };
   std::function<void(rtc::ArrayView<const uint8_t>)> rtcp_transport;
 
   // Queue for scheduling delayed tasks, e.g. sending periodic compound packets.
diff --git a/modules/rtp_rtcp/source/rtcp_transceiver_impl.cc b/modules/rtp_rtcp/source/rtcp_transceiver_impl.cc
index b213131..69ecddc 100644
--- a/modules/rtp_rtcp/source/rtcp_transceiver_impl.cc
+++ b/modules/rtp_rtcp/source/rtcp_transceiver_impl.cc
@@ -15,7 +15,6 @@
 
 #include "absl/algorithm/container.h"
 #include "absl/memory/memory.h"
-#include "api/call/transport.h"
 #include "api/video/video_bitrate_allocation.h"
 #include "modules/rtp_rtcp/include/receive_statistics.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
@@ -54,13 +53,6 @@
     return config.rtcp_transport;
   }
 
-  if (config.deprecated_outgoing_transport != nullptr) {
-    Transport* transport = config.deprecated_outgoing_transport;
-    return [transport](rtc::ArrayView<const uint8_t> packet) {
-      transport->SendRtcp(packet.data(), packet.size());
-    };
-  }
-
   bool first = true;
   std::string log_prefix = config.debug_id;
   return [first, log_prefix](rtc::ArrayView<const uint8_t> packet) mutable {