Reland "Reland "Propagate media transport to media channel.""

This is a reland of da65ed2adcfa57ff3288ce01c1602c973fcab00d

Original change's description:
> Reland "Propagate media transport to media channel."
>
> This reverts commit 37cf2455a420124b341ad06ac27fa3c4dbd29d3c.
>
> Reason for revert: <INSERT REASONING HERE>
>
> Original change's description:
> > Revert "Propagate media transport to media channel."
> >
> > This reverts commit 8c16f745ab92cb6d305283e87fa8a661ae500ce4.
> >
> > Reason for revert: Breaks downstream project
> >
> > Original change's description:
> > > Propagate media transport to media channel.
> > >
> > > 1. Pass media transport factory to JSEP transport controller.
> > > 2. Pass media transport to voice media channel.
> > > 3. Add basic unit test that make sure if peer connection is created with media transport, it is propagated to voice media channel.
> > >
> > > Change-Id: Ie922db78ade0efd893e019cd2b4441a9947a2f71
> > > Bug: webrtc:9719
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/105542
> > > Reviewed-by: Steve Anton <steveanton@webrtc.org>
> > > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > > Reviewed-by: Peter Slatala <psla@webrtc.org>
> > > Commit-Queue: Anton Sukhanov <sukhanov@google.com>
> > > Cr-Commit-Position: refs/heads/master@{#25152}
> >
> > TBR=steveanton@webrtc.org,nisse@webrtc.org,psla@webrtc.org,sukhanov@google.com
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:9719
> > Change-Id: Ic78cdc142a2145682ad74eac8b72c71c50f0a5c1
> > Reviewed-on: https://webrtc-review.googlesource.com/c/105840
> > Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
> > Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#25154}
>
> TBR=steveanton@webrtc.org,oprypin@webrtc.org,nisse@webrtc.org,sukhanov@webrtc.org,psla@webrtc.org,sukhanov@google.com
>
> Change-Id: I505ff3451eae81573531faef155ff35d7f894022
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9719
> Reviewed-on: https://webrtc-review.googlesource.com/c/106500
> Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
> Commit-Queue: Anton Sukhanov <sukhanov@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25220}

Bug: webrtc:9719
Tbr: Steve Anton <steveanton@webrtc.org>
Tbr: Niels Moller <nisse@webrtc.org>
Change-Id: Ib45691ba8be9abb89ff8c6dac1861bdf59be4c8d
Reviewed-on: https://webrtc-review.googlesource.com/c/106561
Commit-Queue: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25240}
diff --git a/media/base/mediachannel.h b/media/base/mediachannel.h
index ff3368c..9948d96 100644
--- a/media/base/mediachannel.h
+++ b/media/base/mediachannel.h
@@ -22,6 +22,7 @@
 #include "api/audio_options.h"
 #include "api/crypto/framedecryptorinterface.h"
 #include "api/crypto/frameencryptorinterface.h"
+#include "api/media_transport_interface.h"
 #include "api/rtcerror.h"
 #include "api/rtpparameters.h"
 #include "api/rtpreceiverinterface.h"
@@ -183,8 +184,14 @@
   MediaChannel();
   ~MediaChannel() override;
 
-  // Sets the abstract interface class for sending RTP/RTCP data.
-  virtual void SetInterface(NetworkInterface* iface);
+  // Sets the abstract interface class for sending RTP/RTCP data and
+  // interface for media transport (experimental). If media transport is
+  // provided, it should be used instead of RTP/RTCP.
+  // TODO(sukhanov): Currently media transport can co-exist with RTP/RTCP, but
+  // in the future we will refactor code to send all frames with media
+  // transport.
+  virtual void SetInterface(NetworkInterface* iface,
+                            webrtc::MediaTransportInterface* media_transport);
   // Called when a RTP packet is received.
   virtual void OnPacketReceived(rtc::CopyOnWriteBuffer* packet,
                                 const rtc::PacketTime& packet_time) = 0;
@@ -251,6 +258,10 @@
     return network_interface_->SetOption(type, opt, option);
   }
 
+  webrtc::MediaTransportInterface* media_transport() {
+    return media_transport_;
+  }
+
  protected:
   virtual rtc::DiffServCodePoint PreferredDscp() const;
 
@@ -283,7 +294,8 @@
   // from any MediaEngine threads. This critical section is to protect accessing
   // of network_interface_ object.
   rtc::CriticalSection network_interface_crit_;
-  NetworkInterface* network_interface_;
+  NetworkInterface* network_interface_ = nullptr;
+  webrtc::MediaTransportInterface* media_transport_ = nullptr;
 };
 
 // The stats information is structured as follows: