Move MediaTransportInterface out of the libjingle_peerconnection_api target

And move related files into api/transport/ and api/transport/media/.
The moved files are unchanged, except that
congestion_control_interface.h and datagram_transport_interface.h
no longer include media_transport_interface.h, instead, they forward
declare the few MediaTransport* types they reference.

Bug: webrtc:8733
Change-Id: I4f4000d0d111f10d15a54c99af27ec26c46ae652
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152482
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29178}
diff --git a/api/BUILD.gn b/api/BUILD.gn
index a4cd2bc..fc7121c 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -114,7 +114,6 @@
     "crypto_params.h",
     "data_channel_interface.cc",
     "data_channel_interface.h",
-    "data_channel_transport_interface.cc",
     "data_channel_transport_interface.h",
     "datagram_transport_interface.h",
     "dtls_transport_interface.cc",
@@ -130,9 +129,7 @@
     "media_stream_interface.h",
     "media_stream_proxy.h",
     "media_stream_track_proxy.h",
-    "media_transport_config.cc",
     "media_transport_config.h",
-    "media_transport_interface.cc",
     "media_transport_interface.h",
     "notifier.h",
     "packet_socket_factory.h",
@@ -175,8 +172,10 @@
     "rtc_event_log",
     "task_queue",
     "transport:bitrate_settings",
+    "transport:datagram_transport_interface",
     "transport:network_control",
     "transport/media:audio_interfaces",
+    "transport/media:media_transport_interface",
     "transport/media:video_interfaces",
     "transport/rtp:rtp_source",
     "units:data_rate",
@@ -256,6 +255,7 @@
     "../test:test_common",
     "../test:video_test_common",
     "transport:network_control",
+    "transport/media:media_transport_interface",
     "video_codecs:video_codecs_api",
   ]
 }
@@ -350,6 +350,7 @@
     "rtc_event_log",
     "task_queue",
     "transport:network_control",
+    "transport/media:media_transport_interface",
     "units:time_delta",
     "video_codecs:video_codecs_api",
     "//third_party/abseil-cpp/absl/memory",
@@ -873,8 +874,9 @@
     ]
 
     deps = [
-      ":libjingle_peerconnection_api",
       "../rtc_base:checks",
+      "transport:datagram_transport_interface",
+      "transport/media:media_transport_interface",
       "//third_party/abseil-cpp/absl/algorithm:container",
       "//third_party/abseil-cpp/absl/memory",
     ]
@@ -889,9 +891,10 @@
     ]
 
     deps = [
-      ":libjingle_peerconnection_api",
       "../rtc_base",
       "../rtc_base:checks",
+      "transport:datagram_transport_interface",
+      "transport/media:media_transport_interface",
       "//third_party/abseil-cpp/absl/algorithm:container",
       "//third_party/abseil-cpp/absl/memory",
     ]
diff --git a/api/congestion_control_interface.h b/api/congestion_control_interface.h
index 2e822db..3666022 100644
--- a/api/congestion_control_interface.h
+++ b/api/congestion_control_interface.h
@@ -7,61 +7,11 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-// This is EXPERIMENTAL interface for media and datagram transports.
-
 #ifndef API_CONGESTION_CONTROL_INTERFACE_H_
 #define API_CONGESTION_CONTROL_INTERFACE_H_
 
-#include <memory>
-#include <string>
-#include <utility>
-
-#include "api/media_transport_interface.h"
-#include "api/units/data_rate.h"
-
-namespace webrtc {
-
-// Defines congestion control feedback interface for media and datagram
-// transports.
-class CongestionControlInterface {
- public:
-  virtual ~CongestionControlInterface() = default;
-
-  // Updates allocation limits.
-  virtual void SetAllocatedBitrateLimits(
-      const MediaTransportAllocatedBitrateLimits& limits) = 0;
-
-  // Sets starting rate.
-  virtual void SetTargetBitrateLimits(
-      const MediaTransportTargetRateConstraints& target_rate_constraints) = 0;
-
-  // Intended for receive side. AddRttObserver registers an observer to be
-  // called for each RTT measurement, typically once per ACK. Before media
-  // transport is destructed the observer must be unregistered.
-  //
-  // TODO(sukhanov): Looks like AddRttObserver and RemoveRttObserver were
-  // never implemented for media transport, so keeping noop implementation.
-  virtual void AddRttObserver(MediaTransportRttObserver* observer) {}
-  virtual void RemoveRttObserver(MediaTransportRttObserver* observer) {}
-
-  // Adds a target bitrate observer. Before media transport is destructed
-  // the observer must be unregistered (by calling
-  // RemoveTargetTransferRateObserver).
-  // A newly registered observer will be called back with the latest recorded
-  // target rate, if available.
-  virtual void AddTargetTransferRateObserver(
-      TargetTransferRateObserver* observer) = 0;
-
-  // Removes an existing |observer| from observers. If observer was never
-  // registered, an error is logged and method does nothing.
-  virtual void RemoveTargetTransferRateObserver(
-      TargetTransferRateObserver* observer) = 0;
-
-  // Returns the last known target transfer rate as reported to the above
-  // observers.
-  virtual absl::optional<TargetTransferRate> GetLatestTargetTransferRate() = 0;
-};
-
-}  // namespace webrtc
+// TODO(bugs.webrtc.org/8733): Delete once users are updated for the new
+// location.
+#include "api/transport/congestion_control_interface.h"
 
 #endif  // API_CONGESTION_CONTROL_INTERFACE_H_
diff --git a/api/data_channel_transport_interface.h b/api/data_channel_transport_interface.h
index a6825f6..dcb693c 100644
--- a/api/data_channel_transport_interface.h
+++ b/api/data_channel_transport_interface.h
@@ -7,119 +7,11 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-// This is an experimental interface and is subject to change without notice.
-
 #ifndef API_DATA_CHANNEL_TRANSPORT_INTERFACE_H_
 #define API_DATA_CHANNEL_TRANSPORT_INTERFACE_H_
 
-#include "absl/types/optional.h"
-#include "api/rtc_error.h"
-#include "rtc_base/copy_on_write_buffer.h"
-
-namespace webrtc {
-
-// Supported types of application data messages.
-enum class DataMessageType {
-  // Application data buffer with the binary bit unset.
-  kText,
-
-  // Application data buffer with the binary bit set.
-  kBinary,
-
-  // Transport-agnostic control messages, such as open or open-ack messages.
-  kControl,
-};
-
-// Parameters for sending data.  The parameters may change from message to
-// message, even within a single channel.  For example, control messages may be
-// sent reliably and in-order, even if the data channel is configured for
-// unreliable delivery.
-struct SendDataParams {
-  SendDataParams();
-  SendDataParams(const SendDataParams&);
-
-  DataMessageType type = DataMessageType::kText;
-
-  // Whether to deliver the message in order with respect to other ordered
-  // messages with the same channel_id.
-  bool ordered = false;
-
-  // If set, the maximum number of times this message may be
-  // retransmitted by the transport before it is dropped.
-  // Setting this value to zero disables retransmission.
-  // Must be non-negative. |max_rtx_count| and |max_rtx_ms| may not be set
-  // simultaneously.
-  absl::optional<int> max_rtx_count;
-
-  // If set, the maximum number of milliseconds for which the transport
-  // may retransmit this message before it is dropped.
-  // Setting this value to zero disables retransmission.
-  // Must be non-negative. |max_rtx_count| and |max_rtx_ms| may not be set
-  // simultaneously.
-  absl::optional<int> max_rtx_ms;
-};
-
-// Sink for callbacks related to a data channel.
-class DataChannelSink {
- public:
-  virtual ~DataChannelSink() = default;
-
-  // Callback issued when data is received by the transport.
-  virtual void OnDataReceived(int channel_id,
-                              DataMessageType type,
-                              const rtc::CopyOnWriteBuffer& buffer) = 0;
-
-  // Callback issued when a remote data channel begins the closing procedure.
-  // Messages sent after the closing procedure begins will not be transmitted.
-  virtual void OnChannelClosing(int channel_id) = 0;
-
-  // Callback issued when a (remote or local) data channel completes the closing
-  // procedure.  Closing channels become closed after all pending data has been
-  // transmitted.
-  virtual void OnChannelClosed(int channel_id) = 0;
-
-  // Callback issued when the data channel becomes ready to send.
-  // This callback will be issued immediately when the data channel sink is
-  // registered if the transport is ready at that time.  This callback may be
-  // invoked again following send errors (eg. due to the transport being
-  // temporarily blocked or unavailable).
-  // TODO(mellem):  Make pure virtual when downstream sinks override this.
-  virtual void OnReadyToSend();
-};
-
-// Transport for data channels.
-class DataChannelTransportInterface {
- public:
-  virtual ~DataChannelTransportInterface() = default;
-
-  // Opens a data |channel_id| for sending.  May return an error if the
-  // specified |channel_id| is unusable.  Must be called before |SendData|.
-  virtual RTCError OpenChannel(int channel_id);
-
-  // Sends a data buffer to the remote endpoint using the given send parameters.
-  // |buffer| may not be larger than 256 KiB. Returns an error if the send
-  // fails.
-  virtual RTCError SendData(int channel_id,
-                            const SendDataParams& params,
-                            const rtc::CopyOnWriteBuffer& buffer);
-
-  // Closes |channel_id| gracefully.  Returns an error if |channel_id| is not
-  // open.  Data sent after the closing procedure begins will not be
-  // transmitted. The channel becomes closed after pending data is transmitted.
-  virtual RTCError CloseChannel(int channel_id);
-
-  // Sets a sink for data messages and channel state callbacks. Before media
-  // transport is destroyed, the sink must be unregistered by setting it to
-  // nullptr.
-  virtual void SetDataSink(DataChannelSink* sink);
-
-  // Returns whether this data channel transport is ready to send.
-  // Note: the default implementation always returns false (as it assumes no one
-  // has implemented the interface).  This default implementation is temporary.
-  // TODO(mellem):  Change this to pure virtual.
-  virtual bool IsReadyToSend() const;
-};
-
-}  // namespace webrtc
+// TODO(bugs.webrtc.org/8733): Delete once users are updated for the new
+// location.
+#include "api/transport/data_channel_transport_interface.h"
 
 #endif  // API_DATA_CHANNEL_TRANSPORT_INTERFACE_H_
diff --git a/api/datagram_transport_interface.h b/api/datagram_transport_interface.h
index 38d6dd5..f36f5b3 100644
--- a/api/datagram_transport_interface.h
+++ b/api/datagram_transport_interface.h
@@ -7,143 +7,11 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-// This is EXPERIMENTAL interface for media and datagram transports.
-
 #ifndef API_DATAGRAM_TRANSPORT_INTERFACE_H_
 #define API_DATAGRAM_TRANSPORT_INTERFACE_H_
 
-#include <memory>
-#include <string>
-#include <utility>
-
-#include "absl/types/optional.h"
-#include "api/array_view.h"
-#include "api/congestion_control_interface.h"
-#include "api/data_channel_transport_interface.h"
-#include "api/media_transport_interface.h"
-#include "api/rtc_error.h"
-#include "api/units/data_rate.h"
-#include "api/units/timestamp.h"
-
-namespace rtc {
-class PacketTransportInternal;
-}  // namespace rtc
-
-namespace webrtc {
-
-typedef int64_t DatagramId;
-
-struct DatagramAck {
-  // |datagram_id| is same as passed in
-  // DatagramTransportInterface::SendDatagram.
-  DatagramId datagram_id;
-
-  // The timestamp at which the remote peer received the identified datagram,
-  // according to that peer's clock.
-  Timestamp receive_timestamp = Timestamp::MinusInfinity();
-};
-
-// All sink methods are called on network thread.
-class DatagramSinkInterface {
- public:
-  virtual ~DatagramSinkInterface() {}
-
-  // Called when new packet is received.
-  virtual void OnDatagramReceived(rtc::ArrayView<const uint8_t> data) = 0;
-
-  // Called when datagram is actually sent (datragram can be delayed due
-  // to congestion control or fusing). |datagram_id| is same as passed in
-  // DatagramTransportInterface::SendDatagram.
-  virtual void OnDatagramSent(DatagramId datagram_id) = 0;
-
-  // Called when datagram is ACKed.
-  // TODO(sukhanov): Make pure virtual.
-  virtual void OnDatagramAcked(const DatagramAck& datagram_ack) {}
-
-  // Called when a datagram is lost.
-  virtual void OnDatagramLost(DatagramId datagram_id) {}
-};
-
-// Datagram transport allows to send and receive unreliable packets (datagrams)
-// and receive feedback from congestion control (via
-// CongestionControlInterface). The idea is to send RTP packets as datagrams and
-// have underlying implementation of datagram transport to use QUIC datagram
-// protocol.
-class DatagramTransportInterface : public DataChannelTransportInterface {
- public:
-  virtual ~DatagramTransportInterface() = default;
-
-  // Connect the datagram transport to the ICE transport.
-  // The implementation must be able to ignore incoming packets that don't
-  // belong to it.
-  virtual void Connect(rtc::PacketTransportInternal* packet_transport) = 0;
-
-  // Returns congestion control feedback interface or nullptr if datagram
-  // transport does not implement congestion control.
-  //
-  // Note that right now datagram transport is used without congestion control,
-  // but we plan to use it in the future.
-  virtual CongestionControlInterface* congestion_control() = 0;
-
-  // Sets a state observer callback. Before datagram transport is destroyed, the
-  // callback must be unregistered by setting it to nullptr.
-  // A newly registered callback will be called with the current state.
-  // Datagram transport does not invoke this callback concurrently.
-  virtual void SetTransportStateCallback(
-      MediaTransportStateCallback* callback) = 0;
-
-  // Start asynchronous send of datagram. The status returned by this method
-  // only pertains to the synchronous operations (e.g. serialization /
-  // packetization), not to the asynchronous operation.
-  //
-  // Datagrams larger than GetLargestDatagramSize() will fail and return error.
-  //
-  // Datagrams are sent in FIFO order.
-  //
-  // |datagram_id| is only used in ACK/LOST notifications in
-  // DatagramSinkInterface and does not need to be unique.
-  virtual RTCError SendDatagram(rtc::ArrayView<const uint8_t> data,
-                                DatagramId datagram_id) = 0;
-
-  // Returns maximum size of datagram message, does not change.
-  // TODO(sukhanov): Because value may be undefined before connection setup
-  // is complete, consider returning error when called before connection is
-  // established. Currently returns hardcoded const, because integration
-  // prototype may call before connection is established.
-  virtual size_t GetLargestDatagramSize() const = 0;
-
-  // Sets packet sink. Sink must be unset by calling
-  // SetDataTransportSink(nullptr) before the data transport is destroyed or
-  // before new sink is set.
-  virtual void SetDatagramSink(DatagramSinkInterface* sink) = 0;
-
-  // Retrieves callers config (i.e. media transport offer) that should be passed
-  // to the callee, before the call is connected. Such config is opaque to SDP
-  // (sdp just passes it through). The config is a binary blob, so SDP may
-  // choose to use base64 to serialize it (or any other approach that guarantees
-  // that the binary blob goes through). This should only be called for the
-  // caller's perspective.
-  //
-  // TODO(mellem): Delete.
-  virtual absl::optional<std::string> GetTransportParametersOffer() const {
-    return absl::nullopt;
-  }
-
-  // Retrieves transport parameters for this datagram transport.  May be called
-  // on either client- or server-perspective transports.
-  //
-  // For servers, the parameters represent what kind of connections and data the
-  // server is prepared to accept.  This is generally a superset of acceptable
-  // parameters.
-  //
-  // For clients, the parameters echo the server configuration used to create
-  // the client, possibly removing any fields or parameters which the client
-  // does not understand.
-  //
-  // TODO(mellem): Make pure virtual.
-  virtual std::string GetTransportParameters() const { return ""; }
-};
-
-}  // namespace webrtc
+// TODO(bugs.webrtc.org/8733): Delete once users are updated for the new
+// location.
+#include "api/transport/datagram_transport_interface.h"
 
 #endif  // API_DATAGRAM_TRANSPORT_INTERFACE_H_
diff --git a/api/media_transport_config.h b/api/media_transport_config.h
index 7c5104b..c74f38d 100644
--- a/api/media_transport_config.h
+++ b/api/media_transport_config.h
@@ -9,39 +9,8 @@
 #ifndef API_MEDIA_TRANSPORT_CONFIG_H_
 #define API_MEDIA_TRANSPORT_CONFIG_H_
 
-#include <memory>
-#include <string>
-#include <utility>
-
-#include "absl/types/optional.h"
-
-namespace webrtc {
-
-class MediaTransportInterface;
-
-// Media transport config is made available to both transport and audio / video
-// layers, but access to individual interfaces should not be open without
-// necessity.
-struct MediaTransportConfig {
-  // Default constructor for no-media transport scenarios.
-  MediaTransportConfig() = default;
-
-  // Constructor for media transport scenarios.
-  // Note that |media_transport| may not be nullptr.
-  explicit MediaTransportConfig(MediaTransportInterface* media_transport);
-
-  // Constructor for datagram transport scenarios.
-  explicit MediaTransportConfig(size_t rtp_max_packet_size);
-
-  std::string DebugString() const;
-
-  // If provided, all media is sent through media_transport.
-  MediaTransportInterface* media_transport = nullptr;
-
-  // If provided, limits RTP packet size (excludes ICE, IP or network overhead).
-  absl::optional<size_t> rtp_max_packet_size;
-};
-
-}  // namespace webrtc
+// TODO(bugs.webrtc.org/8733): Delete once users are updated for the new
+// location.
+#include "api/transport/media/media_transport_config.h"
 
 #endif  // API_MEDIA_TRANSPORT_CONFIG_H_
diff --git a/api/media_transport_interface.h b/api/media_transport_interface.h
index 609ae2c..867871b 100644
--- a/api/media_transport_interface.h
+++ b/api/media_transport_interface.h
@@ -7,322 +7,11 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-// This is EXPERIMENTAL interface for media transport.
-//
-// The goal is to refactor WebRTC code so that audio and video frames
-// are sent / received through the media transport interface. This will
-// enable different media transport implementations, including QUIC-based
-// media transport.
-
 #ifndef API_MEDIA_TRANSPORT_INTERFACE_H_
 #define API_MEDIA_TRANSPORT_INTERFACE_H_
 
-#include <memory>
-#include <string>
-#include <utility>
+// TODO(bugs.webrtc.org/8733): Delete once users are updated for the new
+// location.
+#include "api/transport/media/media_transport_interface.h"
 
-#include "absl/types/optional.h"
-#include "api/array_view.h"
-#include "api/data_channel_transport_interface.h"
-#include "api/rtc_error.h"
-#include "api/transport/media/audio_transport.h"
-#include "api/transport/media/video_transport.h"
-#include "api/transport/network_control.h"
-#include "api/units/data_rate.h"
-#include "common_types.h"  // NOLINT(build/include)
-#include "rtc_base/copy_on_write_buffer.h"
-#include "rtc_base/network_route.h"
-
-namespace rtc {
-class PacketTransportInternal;
-class Thread;
-}  // namespace rtc
-
-namespace webrtc {
-
-class DatagramTransportInterface;
-class RtcEventLog;
-
-class AudioPacketReceivedObserver {
- public:
-  virtual ~AudioPacketReceivedObserver() = default;
-
-  // Invoked for the first received audio packet on a given channel id.
-  // It will be invoked once for each channel id.
-  virtual void OnFirstAudioPacketReceived(int64_t channel_id) = 0;
-};
-
-// Used to configure stream allocations.
-struct MediaTransportAllocatedBitrateLimits {
-  DataRate min_pacing_rate = DataRate::Zero();
-  DataRate max_padding_bitrate = DataRate::Zero();
-  DataRate max_total_allocated_bitrate = DataRate::Zero();
-};
-
-// Used to configure target bitrate constraints.
-// If the value is provided, the constraint is updated.
-// If the value is omitted, the value is left unchanged.
-struct MediaTransportTargetRateConstraints {
-  absl::optional<DataRate> min_bitrate;
-  absl::optional<DataRate> max_bitrate;
-  absl::optional<DataRate> starting_bitrate;
-};
-
-// A collection of settings for creation of media transport.
-struct MediaTransportSettings final {
-  MediaTransportSettings();
-  MediaTransportSettings(const MediaTransportSettings&);
-  MediaTransportSettings& operator=(const MediaTransportSettings&);
-  ~MediaTransportSettings();
-
-  // Group calls are not currently supported, in 1:1 call one side must set
-  // is_caller = true and another is_caller = false.
-  bool is_caller;
-
-  // Must be set if a pre-shared key is used for the call.
-  // TODO(bugs.webrtc.org/9944): This should become zero buffer in the distant
-  // future.
-  absl::optional<std::string> pre_shared_key;
-
-  // If present, this is a config passed from the caller to the answerer in the
-  // offer. Each media transport knows how to understand its own parameters.
-  absl::optional<std::string> remote_transport_parameters;
-
-  // If present, provides the event log that media transport should use.
-  // Media transport does not own it. The lifetime of |event_log| will exceed
-  // the lifetime of the instance of MediaTransportInterface instance.
-  RtcEventLog* event_log = nullptr;
-};
-
-// Callback to notify about network route changes.
-class MediaTransportNetworkChangeCallback {
- public:
-  virtual ~MediaTransportNetworkChangeCallback() = default;
-
-  // Called when the network route is changed, with the new network route.
-  virtual void OnNetworkRouteChanged(
-      const rtc::NetworkRoute& new_network_route) = 0;
-};
-
-// State of the media transport.  Media transport begins in the pending state.
-// It transitions to writable when it is ready to send media.  It may transition
-// back to pending if the connection is blocked.  It may transition to closed at
-// any time.  Closed is terminal: a transport will never re-open once closed.
-enum class MediaTransportState {
-  kPending,
-  kWritable,
-  kClosed,
-};
-
-// Callback invoked whenever the state of the media transport changes.
-class MediaTransportStateCallback {
- public:
-  virtual ~MediaTransportStateCallback() = default;
-
-  // Invoked whenever the state of the media transport changes.
-  virtual void OnStateChanged(MediaTransportState state) = 0;
-};
-
-// Callback for RTT measurements on the receive side.
-// TODO(nisse): Related interfaces: CallStatsObserver and RtcpRttStats. It's
-// somewhat unclear what type of measurement is needed. It's used to configure
-// NACK generation and playout buffer. Either raw measurement values or recent
-// maximum would make sense for this use. Need consolidation of RTT signalling.
-class MediaTransportRttObserver {
- public:
-  virtual ~MediaTransportRttObserver() = default;
-
-  // Invoked when a new RTT measurement is available, typically once per ACK.
-  virtual void OnRttUpdated(int64_t rtt_ms) = 0;
-};
-
-// Media transport interface for sending / receiving encoded audio/video frames
-// and receiving bandwidth estimate update from congestion control.
-class MediaTransportInterface : public DataChannelTransportInterface {
- public:
-  MediaTransportInterface();
-  virtual ~MediaTransportInterface();
-
-  // Retrieves callers config (i.e. media transport offer) that should be passed
-  // to the callee, before the call is connected. Such config is opaque to SDP
-  // (sdp just passes it through). The config is a binary blob, so SDP may
-  // choose to use base64 to serialize it (or any other approach that guarantees
-  // that the binary blob goes through). This should only be called for the
-  // caller's perspective.
-  //
-  // This may return an unset optional, which means that the given media
-  // transport is not supported / disabled and shouldn't be reported in SDP.
-  //
-  // It may also return an empty string, in which case the media transport is
-  // supported, but without any extra settings.
-  // TODO(psla): Make abstract.
-  virtual absl::optional<std::string> GetTransportParametersOffer() const;
-
-  // Connect the media transport to the ICE transport.
-  // The implementation must be able to ignore incoming packets that don't
-  // belong to it.
-  // TODO(psla): Make abstract.
-  virtual void Connect(rtc::PacketTransportInternal* packet_transport);
-
-  // Start asynchronous send of audio frame. The status returned by this method
-  // only pertains to the synchronous operations (e.g.
-  // serialization/packetization), not to the asynchronous operation.
-
-  virtual RTCError SendAudioFrame(uint64_t channel_id,
-                                  MediaTransportEncodedAudioFrame frame) = 0;
-
-  // Start asynchronous send of video frame. The status returned by this method
-  // only pertains to the synchronous operations (e.g.
-  // serialization/packetization), not to the asynchronous operation.
-  virtual RTCError SendVideoFrame(
-      uint64_t channel_id,
-      const MediaTransportEncodedVideoFrame& frame) = 0;
-
-  // Used by video sender to be notified on key frame requests.
-  virtual void SetKeyFrameRequestCallback(
-      MediaTransportKeyFrameRequestCallback* callback);
-
-  // Requests a keyframe for the particular channel (stream). The caller should
-  // check that the keyframe is not present in a jitter buffer already (i.e.
-  // don't request a keyframe if there is one that you will get from the jitter
-  // buffer in a moment).
-  virtual RTCError RequestKeyFrame(uint64_t channel_id) = 0;
-
-  // Sets audio sink. Sink must be unset by calling SetReceiveAudioSink(nullptr)
-  // before the media transport is destroyed or before new sink is set.
-  virtual void SetReceiveAudioSink(MediaTransportAudioSinkInterface* sink) = 0;
-
-  // Registers a video sink. Before destruction of media transport, you must
-  // pass a nullptr.
-  virtual void SetReceiveVideoSink(MediaTransportVideoSinkInterface* sink) = 0;
-
-  // Adds a target bitrate observer. Before media transport is destructed
-  // the observer must be unregistered (by calling
-  // RemoveTargetTransferRateObserver).
-  // A newly registered observer will be called back with the latest recorded
-  // target rate, if available.
-  virtual void AddTargetTransferRateObserver(
-      TargetTransferRateObserver* observer);
-
-  // Removes an existing |observer| from observers. If observer was never
-  // registered, an error is logged and method does nothing.
-  virtual void RemoveTargetTransferRateObserver(
-      TargetTransferRateObserver* observer);
-
-  // Sets audio packets observer, which gets informed about incoming audio
-  // packets. Before destruction, the observer must be unregistered by setting
-  // nullptr.
-  //
-  // This method may be temporary, when the multiplexer is implemented (or
-  // multiplexer may use it to demultiplex channel ids).
-  virtual void SetFirstAudioPacketReceivedObserver(
-      AudioPacketReceivedObserver* observer);
-
-  // Intended for receive side. AddRttObserver registers an observer to be
-  // called for each RTT measurement, typically once per ACK. Before media
-  // transport is destructed the observer must be unregistered.
-  virtual void AddRttObserver(MediaTransportRttObserver* observer);
-  virtual void RemoveRttObserver(MediaTransportRttObserver* observer);
-
-  // Returns the last known target transfer rate as reported to the above
-  // observers.
-  virtual absl::optional<TargetTransferRate> GetLatestTargetTransferRate();
-
-  // Gets the audio packet overhead in bytes. Returned overhead does not include
-  // transport overhead (ipv4/6, turn channeldata, tcp/udp, etc.).
-  // If the transport is capable of fusing packets together, this overhead
-  // might not be a very accurate number.
-  // TODO(nisse): Deprecated.
-  virtual size_t GetAudioPacketOverhead() const;
-
-  // Corresponding observers for audio and video overhead. Before destruction,
-  // the observers must be unregistered by setting nullptr.
-
-  // TODO(nisse): Should move to per-stream objects, since packetization
-  // overhead can vary per stream, e.g., depending on negotiated extensions. In
-  // addition, we should move towards reporting total overhead including all
-  // layers. Currently, overhead of the lower layers is reported elsewhere,
-  // e.g., on route change between IPv4 and IPv6.
-  virtual void SetAudioOverheadObserver(OverheadObserver* observer) {}
-
-  // Registers an observer for network change events. If the network route is
-  // already established when the callback is added, |callback| will be called
-  // immediately with the current network route. Before media transport is
-  // destroyed, the callback must be removed.
-  virtual void AddNetworkChangeCallback(
-      MediaTransportNetworkChangeCallback* callback);
-  virtual void RemoveNetworkChangeCallback(
-      MediaTransportNetworkChangeCallback* callback);
-
-  // Sets a state observer callback. Before media transport is destroyed, the
-  // callback must be unregistered by setting it to nullptr.
-  // A newly registered callback will be called with the current state.
-  // Media transport does not invoke this callback concurrently.
-  virtual void SetMediaTransportStateCallback(
-      MediaTransportStateCallback* callback) = 0;
-
-  // Updates allocation limits.
-  // TODO(psla): Make abstract when downstream implementation implement it.
-  virtual void SetAllocatedBitrateLimits(
-      const MediaTransportAllocatedBitrateLimits& limits);
-
-  // Sets starting rate.
-  // TODO(psla): Make abstract when downstream implementation implement it.
-  virtual void SetTargetBitrateLimits(
-      const MediaTransportTargetRateConstraints& target_rate_constraints) {}
-
-  // TODO(sukhanov): RtcEventLogs.
-};
-
-// If media transport factory is set in peer connection factory, it will be
-// used to create media transport for sending/receiving encoded frames and
-// this transport will be used instead of default RTP/SRTP transport.
-//
-// Currently Media Transport negotiation is not supported in SDP.
-// If application is using media transport, it must negotiate it before
-// setting media transport factory in peer connection.
-class MediaTransportFactory {
- public:
-  virtual ~MediaTransportFactory() = default;
-
-  // Creates media transport.
-  // - Does not take ownership of packet_transport or network_thread.
-  // - Does not support group calls, in 1:1 call one side must set
-  //   is_caller = true and another is_caller = false.
-  virtual RTCErrorOr<std::unique_ptr<MediaTransportInterface>>
-  CreateMediaTransport(rtc::PacketTransportInternal* packet_transport,
-                       rtc::Thread* network_thread,
-                       const MediaTransportSettings& settings);
-
-  // Creates a new Media Transport in a disconnected state. If the media
-  // transport for the caller is created, one can then call
-  // MediaTransportInterface::GetTransportParametersOffer on that new instance.
-  // TODO(psla): Make abstract.
-  virtual RTCErrorOr<std::unique_ptr<webrtc::MediaTransportInterface>>
-  CreateMediaTransport(rtc::Thread* network_thread,
-                       const MediaTransportSettings& settings);
-
-  // Creates a new Datagram Transport in a disconnected state. If the datagram
-  // transport for the caller is created, one can then call
-  // DatagramTransportInterface::GetTransportParametersOffer on that new
-  // instance.
-  //
-  // TODO(sukhanov): Consider separating media and datagram transport factories.
-  // TODO(sukhanov): Move factory to a separate .h file.
-  virtual RTCErrorOr<std::unique_ptr<DatagramTransportInterface>>
-  CreateDatagramTransport(rtc::Thread* network_thread,
-                          const MediaTransportSettings& settings);
-
-  // Gets a transport name which is supported by the implementation.
-  // Different factories should return different transport names, and at runtime
-  // it will be checked that different names were used.
-  // For example, "rtp" or "generic" may be returned by two different
-  // implementations.
-  // The value returned by this method must never change in the lifetime of the
-  // factory.
-  // TODO(psla): Make abstract.
-  virtual std::string GetTransportName() const;
-};
-
-}  // namespace webrtc
 #endif  // API_MEDIA_TRANSPORT_INTERFACE_H_
diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h
index afa771f..835e9ae 100644
--- a/api/peer_connection_interface.h
+++ b/api/peer_connection_interface.h
@@ -84,7 +84,6 @@
 #include "api/fec_controller.h"
 #include "api/jsep.h"
 #include "api/media_stream_interface.h"
-#include "api/media_transport_interface.h"
 #include "api/network_state_predictor.h"
 #include "api/packet_socket_factory.h"
 #include "api/rtc_error.h"
@@ -98,6 +97,7 @@
 #include "api/stats_types.h"
 #include "api/task_queue/task_queue_factory.h"
 #include "api/transport/bitrate_settings.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "api/transport/network_control.h"
 #include "api/turn_customizer.h"
 #include "media/base/media_config.h"
diff --git a/api/test/fake_datagram_transport.h b/api/test/fake_datagram_transport.h
index 9a1ddef..8cb399c 100644
--- a/api/test/fake_datagram_transport.h
+++ b/api/test/fake_datagram_transport.h
@@ -14,7 +14,8 @@
 #include <cstddef>
 #include <string>
 
-#include "api/datagram_transport_interface.h"
+#include "api/transport/datagram_transport_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 
 namespace webrtc {
 
diff --git a/api/test/fake_media_transport.h b/api/test/fake_media_transport.h
index 025965b..3bd4eba 100644
--- a/api/test/fake_media_transport.h
+++ b/api/test/fake_media_transport.h
@@ -18,8 +18,8 @@
 
 #include "absl/algorithm/container.h"
 #include "absl/memory/memory.h"
-#include "api/media_transport_interface.h"
 #include "api/test/fake_datagram_transport.h"
+#include "api/transport/media/media_transport_interface.h"
 
 namespace webrtc {
 
diff --git a/api/test/loopback_media_transport.h b/api/test/loopback_media_transport.h
index cc66d62..e00cc23 100644
--- a/api/test/loopback_media_transport.h
+++ b/api/test/loopback_media_transport.h
@@ -17,8 +17,8 @@
 #include <vector>
 
 #include "absl/memory/memory.h"
-#include "api/datagram_transport_interface.h"
-#include "api/media_transport_interface.h"
+#include "api/transport/datagram_transport_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "rtc_base/async_invoker.h"
 #include "rtc_base/critical_section.h"
 #include "rtc_base/thread.h"
diff --git a/api/test/peerconnection_quality_test_fixture.h b/api/test/peerconnection_quality_test_fixture.h
index fa63ca0..3a654dd 100644
--- a/api/test/peerconnection_quality_test_fixture.h
+++ b/api/test/peerconnection_quality_test_fixture.h
@@ -21,7 +21,6 @@
 #include "api/call/call_factory_interface.h"
 #include "api/fec_controller.h"
 #include "api/function_view.h"
-#include "api/media_transport_interface.h"
 #include "api/peer_connection_interface.h"
 #include "api/rtc_event_log/rtc_event_log_factory_interface.h"
 #include "api/task_queue/task_queue_factory.h"
@@ -29,6 +28,7 @@
 #include "api/test/simulated_network.h"
 #include "api/test/stats_observer_interface.h"
 #include "api/test/video_quality_analyzer_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "api/transport/network_control.h"
 #include "api/units/time_delta.h"
 #include "api/video_codecs/video_decoder_factory.h"
diff --git a/api/transport/BUILD.gn b/api/transport/BUILD.gn
index 1b48555..b07021b 100644
--- a/api/transport/BUILD.gn
+++ b/api/transport/BUILD.gn
@@ -69,6 +69,25 @@
   ]
 }
 
+rtc_source_set("datagram_transport_interface") {
+  visibility = [ "*" ]
+  sources = [
+    "congestion_control_interface.h",
+    "data_channel_transport_interface.cc",
+    "data_channel_transport_interface.h",
+    "datagram_transport_interface.h",
+  ]
+  deps = [
+    ":network_control",
+    "..:array_view",
+    "..:rtc_error",
+    "../../rtc_base:rtc_base_approved",
+    "../units:data_rate",
+    "../units:timestamp",
+    "//third_party/abseil-cpp/absl/types:optional",
+  ]
+}
+
 rtc_static_library("goog_cc") {
   visibility = [ "*" ]
   sources = [
diff --git a/api/transport/congestion_control_interface.h b/api/transport/congestion_control_interface.h
new file mode 100644
index 0000000..40552cb
--- /dev/null
+++ b/api/transport/congestion_control_interface.h
@@ -0,0 +1,75 @@
+/* Copyright 2018 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.
+ */
+
+// This is EXPERIMENTAL interface for media and datagram transports.
+
+#ifndef API_TRANSPORT_CONGESTION_CONTROL_INTERFACE_H_
+#define API_TRANSPORT_CONGESTION_CONTROL_INTERFACE_H_
+
+#include <memory>
+#include <string>
+#include <utility>
+
+#include "api/transport/network_control.h"
+#include "api/units/data_rate.h"
+
+namespace webrtc {
+
+// TODO(nisse): Defined together with MediaTransportInterface. But we should use
+// types that aren't tied to media, so that MediaTransportInterface can depend
+// on CongestionControlInterface, but not the other way around.
+// api/transport/network_control.h may be a reasonable place.
+class MediaTransportRttObserver;
+struct MediaTransportAllocatedBitrateLimits;
+struct MediaTransportTargetRateConstraints;
+
+// Defines congestion control feedback interface for media and datagram
+// transports.
+class CongestionControlInterface {
+ public:
+  virtual ~CongestionControlInterface() = default;
+
+  // Updates allocation limits.
+  virtual void SetAllocatedBitrateLimits(
+      const MediaTransportAllocatedBitrateLimits& limits) = 0;
+
+  // Sets starting rate.
+  virtual void SetTargetBitrateLimits(
+      const MediaTransportTargetRateConstraints& target_rate_constraints) = 0;
+
+  // Intended for receive side. AddRttObserver registers an observer to be
+  // called for each RTT measurement, typically once per ACK. Before media
+  // transport is destructed the observer must be unregistered.
+  //
+  // TODO(sukhanov): Looks like AddRttObserver and RemoveRttObserver were
+  // never implemented for media transport, so keeping noop implementation.
+  virtual void AddRttObserver(MediaTransportRttObserver* observer) {}
+  virtual void RemoveRttObserver(MediaTransportRttObserver* observer) {}
+
+  // Adds a target bitrate observer. Before media transport is destructed
+  // the observer must be unregistered (by calling
+  // RemoveTargetTransferRateObserver).
+  // A newly registered observer will be called back with the latest recorded
+  // target rate, if available.
+  virtual void AddTargetTransferRateObserver(
+      TargetTransferRateObserver* observer) = 0;
+
+  // Removes an existing |observer| from observers. If observer was never
+  // registered, an error is logged and method does nothing.
+  virtual void RemoveTargetTransferRateObserver(
+      TargetTransferRateObserver* observer) = 0;
+
+  // Returns the last known target transfer rate as reported to the above
+  // observers.
+  virtual absl::optional<TargetTransferRate> GetLatestTargetTransferRate() = 0;
+};
+
+}  // namespace webrtc
+
+#endif  // API_TRANSPORT_CONGESTION_CONTROL_INTERFACE_H_
diff --git a/api/data_channel_transport_interface.cc b/api/transport/data_channel_transport_interface.cc
similarity index 95%
rename from api/data_channel_transport_interface.cc
rename to api/transport/data_channel_transport_interface.cc
index d9947e2..122e282 100644
--- a/api/data_channel_transport_interface.cc
+++ b/api/transport/data_channel_transport_interface.cc
@@ -7,7 +7,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "api/data_channel_transport_interface.h"
+#include "api/transport/data_channel_transport_interface.h"
 
 namespace webrtc {
 
diff --git a/api/transport/data_channel_transport_interface.h b/api/transport/data_channel_transport_interface.h
new file mode 100644
index 0000000..9b29323
--- /dev/null
+++ b/api/transport/data_channel_transport_interface.h
@@ -0,0 +1,125 @@
+/* Copyright 2019 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.
+ */
+
+// This is an experimental interface and is subject to change without notice.
+
+#ifndef API_TRANSPORT_DATA_CHANNEL_TRANSPORT_INTERFACE_H_
+#define API_TRANSPORT_DATA_CHANNEL_TRANSPORT_INTERFACE_H_
+
+#include "absl/types/optional.h"
+#include "api/rtc_error.h"
+#include "rtc_base/copy_on_write_buffer.h"
+
+namespace webrtc {
+
+// Supported types of application data messages.
+enum class DataMessageType {
+  // Application data buffer with the binary bit unset.
+  kText,
+
+  // Application data buffer with the binary bit set.
+  kBinary,
+
+  // Transport-agnostic control messages, such as open or open-ack messages.
+  kControl,
+};
+
+// Parameters for sending data.  The parameters may change from message to
+// message, even within a single channel.  For example, control messages may be
+// sent reliably and in-order, even if the data channel is configured for
+// unreliable delivery.
+struct SendDataParams {
+  SendDataParams();
+  SendDataParams(const SendDataParams&);
+
+  DataMessageType type = DataMessageType::kText;
+
+  // Whether to deliver the message in order with respect to other ordered
+  // messages with the same channel_id.
+  bool ordered = false;
+
+  // If set, the maximum number of times this message may be
+  // retransmitted by the transport before it is dropped.
+  // Setting this value to zero disables retransmission.
+  // Must be non-negative. |max_rtx_count| and |max_rtx_ms| may not be set
+  // simultaneously.
+  absl::optional<int> max_rtx_count;
+
+  // If set, the maximum number of milliseconds for which the transport
+  // may retransmit this message before it is dropped.
+  // Setting this value to zero disables retransmission.
+  // Must be non-negative. |max_rtx_count| and |max_rtx_ms| may not be set
+  // simultaneously.
+  absl::optional<int> max_rtx_ms;
+};
+
+// Sink for callbacks related to a data channel.
+class DataChannelSink {
+ public:
+  virtual ~DataChannelSink() = default;
+
+  // Callback issued when data is received by the transport.
+  virtual void OnDataReceived(int channel_id,
+                              DataMessageType type,
+                              const rtc::CopyOnWriteBuffer& buffer) = 0;
+
+  // Callback issued when a remote data channel begins the closing procedure.
+  // Messages sent after the closing procedure begins will not be transmitted.
+  virtual void OnChannelClosing(int channel_id) = 0;
+
+  // Callback issued when a (remote or local) data channel completes the closing
+  // procedure.  Closing channels become closed after all pending data has been
+  // transmitted.
+  virtual void OnChannelClosed(int channel_id) = 0;
+
+  // Callback issued when the data channel becomes ready to send.
+  // This callback will be issued immediately when the data channel sink is
+  // registered if the transport is ready at that time.  This callback may be
+  // invoked again following send errors (eg. due to the transport being
+  // temporarily blocked or unavailable).
+  // TODO(mellem):  Make pure virtual when downstream sinks override this.
+  virtual void OnReadyToSend();
+};
+
+// Transport for data channels.
+class DataChannelTransportInterface {
+ public:
+  virtual ~DataChannelTransportInterface() = default;
+
+  // Opens a data |channel_id| for sending.  May return an error if the
+  // specified |channel_id| is unusable.  Must be called before |SendData|.
+  virtual RTCError OpenChannel(int channel_id);
+
+  // Sends a data buffer to the remote endpoint using the given send parameters.
+  // |buffer| may not be larger than 256 KiB. Returns an error if the send
+  // fails.
+  virtual RTCError SendData(int channel_id,
+                            const SendDataParams& params,
+                            const rtc::CopyOnWriteBuffer& buffer);
+
+  // Closes |channel_id| gracefully.  Returns an error if |channel_id| is not
+  // open.  Data sent after the closing procedure begins will not be
+  // transmitted. The channel becomes closed after pending data is transmitted.
+  virtual RTCError CloseChannel(int channel_id);
+
+  // Sets a sink for data messages and channel state callbacks. Before media
+  // transport is destroyed, the sink must be unregistered by setting it to
+  // nullptr.
+  virtual void SetDataSink(DataChannelSink* sink);
+
+  // Returns whether this data channel transport is ready to send.
+  // Note: the default implementation always returns false (as it assumes no one
+  // has implemented the interface).  This default implementation is temporary.
+  // TODO(mellem):  Change this to pure virtual.
+  virtual bool IsReadyToSend() const;
+};
+
+}  // namespace webrtc
+
+#endif  // API_TRANSPORT_DATA_CHANNEL_TRANSPORT_INTERFACE_H_
diff --git a/api/transport/datagram_transport_interface.h b/api/transport/datagram_transport_interface.h
new file mode 100644
index 0000000..9820c75
--- /dev/null
+++ b/api/transport/datagram_transport_interface.h
@@ -0,0 +1,150 @@
+/* Copyright 2018 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.
+ */
+
+// This is EXPERIMENTAL interface for media and datagram transports.
+
+#ifndef API_TRANSPORT_DATAGRAM_TRANSPORT_INTERFACE_H_
+#define API_TRANSPORT_DATAGRAM_TRANSPORT_INTERFACE_H_
+
+#include <memory>
+#include <string>
+#include <utility>
+
+#include "absl/types/optional.h"
+#include "api/array_view.h"
+#include "api/rtc_error.h"
+#include "api/transport/congestion_control_interface.h"
+#include "api/transport/data_channel_transport_interface.h"
+#include "api/units/data_rate.h"
+#include "api/units/timestamp.h"
+
+namespace rtc {
+class PacketTransportInternal;
+}  // namespace rtc
+
+namespace webrtc {
+
+class MediaTransportStateCallback;
+
+typedef int64_t DatagramId;
+
+struct DatagramAck {
+  // |datagram_id| is same as passed in
+  // DatagramTransportInterface::SendDatagram.
+  DatagramId datagram_id;
+
+  // The timestamp at which the remote peer received the identified datagram,
+  // according to that peer's clock.
+  Timestamp receive_timestamp = Timestamp::MinusInfinity();
+};
+
+// All sink methods are called on network thread.
+class DatagramSinkInterface {
+ public:
+  virtual ~DatagramSinkInterface() {}
+
+  // Called when new packet is received.
+  virtual void OnDatagramReceived(rtc::ArrayView<const uint8_t> data) = 0;
+
+  // Called when datagram is actually sent (datragram can be delayed due
+  // to congestion control or fusing). |datagram_id| is same as passed in
+  // DatagramTransportInterface::SendDatagram.
+  virtual void OnDatagramSent(DatagramId datagram_id) = 0;
+
+  // Called when datagram is ACKed.
+  // TODO(sukhanov): Make pure virtual.
+  virtual void OnDatagramAcked(const DatagramAck& datagram_ack) {}
+
+  // Called when a datagram is lost.
+  virtual void OnDatagramLost(DatagramId datagram_id) {}
+};
+
+// Datagram transport allows to send and receive unreliable packets (datagrams)
+// and receive feedback from congestion control (via
+// CongestionControlInterface). The idea is to send RTP packets as datagrams and
+// have underlying implementation of datagram transport to use QUIC datagram
+// protocol.
+class DatagramTransportInterface : public DataChannelTransportInterface {
+ public:
+  virtual ~DatagramTransportInterface() = default;
+
+  // Connect the datagram transport to the ICE transport.
+  // The implementation must be able to ignore incoming packets that don't
+  // belong to it.
+  virtual void Connect(rtc::PacketTransportInternal* packet_transport) = 0;
+
+  // Returns congestion control feedback interface or nullptr if datagram
+  // transport does not implement congestion control.
+  //
+  // Note that right now datagram transport is used without congestion control,
+  // but we plan to use it in the future.
+  virtual CongestionControlInterface* congestion_control() = 0;
+
+  // Sets a state observer callback. Before datagram transport is destroyed, the
+  // callback must be unregistered by setting it to nullptr.
+  // A newly registered callback will be called with the current state.
+  // Datagram transport does not invoke this callback concurrently.
+  virtual void SetTransportStateCallback(
+      MediaTransportStateCallback* callback) = 0;
+
+  // Start asynchronous send of datagram. The status returned by this method
+  // only pertains to the synchronous operations (e.g. serialization /
+  // packetization), not to the asynchronous operation.
+  //
+  // Datagrams larger than GetLargestDatagramSize() will fail and return error.
+  //
+  // Datagrams are sent in FIFO order.
+  //
+  // |datagram_id| is only used in ACK/LOST notifications in
+  // DatagramSinkInterface and does not need to be unique.
+  virtual RTCError SendDatagram(rtc::ArrayView<const uint8_t> data,
+                                DatagramId datagram_id) = 0;
+
+  // Returns maximum size of datagram message, does not change.
+  // TODO(sukhanov): Because value may be undefined before connection setup
+  // is complete, consider returning error when called before connection is
+  // established. Currently returns hardcoded const, because integration
+  // prototype may call before connection is established.
+  virtual size_t GetLargestDatagramSize() const = 0;
+
+  // Sets packet sink. Sink must be unset by calling
+  // SetDataTransportSink(nullptr) before the data transport is destroyed or
+  // before new sink is set.
+  virtual void SetDatagramSink(DatagramSinkInterface* sink) = 0;
+
+  // Retrieves callers config (i.e. media transport offer) that should be passed
+  // to the callee, before the call is connected. Such config is opaque to SDP
+  // (sdp just passes it through). The config is a binary blob, so SDP may
+  // choose to use base64 to serialize it (or any other approach that guarantees
+  // that the binary blob goes through). This should only be called for the
+  // caller's perspective.
+  //
+  // TODO(mellem): Delete.
+  virtual absl::optional<std::string> GetTransportParametersOffer() const {
+    return absl::nullopt;
+  }
+
+  // Retrieves transport parameters for this datagram transport.  May be called
+  // on either client- or server-perspective transports.
+  //
+  // For servers, the parameters represent what kind of connections and data the
+  // server is prepared to accept.  This is generally a superset of acceptable
+  // parameters.
+  //
+  // For clients, the parameters echo the server configuration used to create
+  // the client, possibly removing any fields or parameters which the client
+  // does not understand.
+  //
+  // TODO(mellem): Make pure virtual.
+  virtual std::string GetTransportParameters() const { return ""; }
+};
+
+}  // namespace webrtc
+
+#endif  // API_TRANSPORT_DATAGRAM_TRANSPORT_INTERFACE_H_
diff --git a/api/transport/media/BUILD.gn b/api/transport/media/BUILD.gn
index f338021..fe8e4e4 100644
--- a/api/transport/media/BUILD.gn
+++ b/api/transport/media/BUILD.gn
@@ -8,6 +8,31 @@
 
 import("../../../webrtc.gni")
 
+rtc_source_set("media_transport_interface") {
+  visibility = [ "*" ]
+  sources = [
+    "media_transport_config.cc",
+    "media_transport_config.h",
+    "media_transport_interface.cc",
+    "media_transport_interface.h",
+  ]
+  deps = [
+    ":audio_interfaces",
+    ":video_interfaces",
+    "..:datagram_transport_interface",
+    "..:network_control",
+    "../..:array_view",
+    "../..:rtc_error",
+    "../../..:webrtc_common",
+    "../../../rtc_base",
+    "../../../rtc_base:checks",
+    "../../../rtc_base:rtc_base_approved",
+    "../../../rtc_base:stringutils",
+    "../../units:data_rate",
+    "//third_party/abseil-cpp/absl/types:optional",
+  ]
+}
+
 rtc_source_set("audio_interfaces") {
   visibility = [ "*" ]
   sources = [
diff --git a/api/media_transport_config.cc b/api/transport/media/media_transport_config.cc
similarity index 95%
rename from api/media_transport_config.cc
rename to api/transport/media/media_transport_config.cc
index 08a8756..cea3f16 100644
--- a/api/media_transport_config.cc
+++ b/api/transport/media/media_transport_config.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "api/media_transport_config.h"
+#include "api/transport/media/media_transport_config.h"
 
 #include "rtc_base/checks.h"
 #include "rtc_base/strings/string_builder.h"
diff --git a/api/transport/media/media_transport_config.h b/api/transport/media/media_transport_config.h
new file mode 100644
index 0000000..6a12630
--- /dev/null
+++ b/api/transport/media/media_transport_config.h
@@ -0,0 +1,46 @@
+/* Copyright 2018 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 API_TRANSPORT_MEDIA_MEDIA_TRANSPORT_CONFIG_H_
+#define API_TRANSPORT_MEDIA_MEDIA_TRANSPORT_CONFIG_H_
+
+#include <memory>
+#include <string>
+#include <utility>
+
+#include "absl/types/optional.h"
+#include "api/transport/media/media_transport_interface.h"
+
+namespace webrtc {
+
+// Media transport config is made available to both transport and audio / video
+// layers, but access to individual interfaces should not be open without
+// necessity.
+struct MediaTransportConfig {
+  // Default constructor for no-media transport scenarios.
+  MediaTransportConfig() = default;
+
+  // Constructor for media transport scenarios.
+  // Note that |media_transport| may not be nullptr.
+  explicit MediaTransportConfig(MediaTransportInterface* media_transport);
+
+  // Constructor for datagram transport scenarios.
+  explicit MediaTransportConfig(size_t rtp_max_packet_size);
+
+  std::string DebugString() const;
+
+  // If provided, all media is sent through media_transport.
+  MediaTransportInterface* media_transport = nullptr;
+
+  // If provided, limits RTP packet size (excludes ICE, IP or network overhead).
+  absl::optional<size_t> rtp_max_packet_size;
+};
+
+}  // namespace webrtc
+
+#endif  // API_TRANSPORT_MEDIA_MEDIA_TRANSPORT_CONFIG_H_
diff --git a/api/media_transport_interface.cc b/api/transport/media/media_transport_interface.cc
similarity index 96%
rename from api/media_transport_interface.cc
rename to api/transport/media/media_transport_interface.cc
index 69f993e..323ddca 100644
--- a/api/media_transport_interface.cc
+++ b/api/transport/media/media_transport_interface.cc
@@ -15,12 +15,12 @@
 // enable different media transport implementations, including QUIC-based
 // media transport.
 
-#include "api/media_transport_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 
 #include <cstdint>
 #include <utility>
 
-#include "api/datagram_transport_interface.h"
+#include "api/transport/datagram_transport_interface.h"
 
 namespace webrtc {
 
diff --git a/api/transport/media/media_transport_interface.h b/api/transport/media/media_transport_interface.h
new file mode 100644
index 0000000..04a8e50
--- /dev/null
+++ b/api/transport/media/media_transport_interface.h
@@ -0,0 +1,328 @@
+/* Copyright 2018 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.
+ */
+
+// This is EXPERIMENTAL interface for media transport.
+//
+// The goal is to refactor WebRTC code so that audio and video frames
+// are sent / received through the media transport interface. This will
+// enable different media transport implementations, including QUIC-based
+// media transport.
+
+#ifndef API_TRANSPORT_MEDIA_MEDIA_TRANSPORT_INTERFACE_H_
+#define API_TRANSPORT_MEDIA_MEDIA_TRANSPORT_INTERFACE_H_
+
+#include <memory>
+#include <string>
+#include <utility>
+
+#include "absl/types/optional.h"
+#include "api/array_view.h"
+#include "api/rtc_error.h"
+#include "api/transport/data_channel_transport_interface.h"
+#include "api/transport/media/audio_transport.h"
+#include "api/transport/media/video_transport.h"
+#include "api/transport/network_control.h"
+#include "api/units/data_rate.h"
+#include "common_types.h"  // NOLINT(build/include)
+#include "rtc_base/copy_on_write_buffer.h"
+#include "rtc_base/network_route.h"
+
+namespace rtc {
+class PacketTransportInternal;
+class Thread;
+}  // namespace rtc
+
+namespace webrtc {
+
+class DatagramTransportInterface;
+class RtcEventLog;
+
+class AudioPacketReceivedObserver {
+ public:
+  virtual ~AudioPacketReceivedObserver() = default;
+
+  // Invoked for the first received audio packet on a given channel id.
+  // It will be invoked once for each channel id.
+  virtual void OnFirstAudioPacketReceived(int64_t channel_id) = 0;
+};
+
+// Used to configure stream allocations.
+struct MediaTransportAllocatedBitrateLimits {
+  DataRate min_pacing_rate = DataRate::Zero();
+  DataRate max_padding_bitrate = DataRate::Zero();
+  DataRate max_total_allocated_bitrate = DataRate::Zero();
+};
+
+// Used to configure target bitrate constraints.
+// If the value is provided, the constraint is updated.
+// If the value is omitted, the value is left unchanged.
+struct MediaTransportTargetRateConstraints {
+  absl::optional<DataRate> min_bitrate;
+  absl::optional<DataRate> max_bitrate;
+  absl::optional<DataRate> starting_bitrate;
+};
+
+// A collection of settings for creation of media transport.
+struct MediaTransportSettings final {
+  MediaTransportSettings();
+  MediaTransportSettings(const MediaTransportSettings&);
+  MediaTransportSettings& operator=(const MediaTransportSettings&);
+  ~MediaTransportSettings();
+
+  // Group calls are not currently supported, in 1:1 call one side must set
+  // is_caller = true and another is_caller = false.
+  bool is_caller;
+
+  // Must be set if a pre-shared key is used for the call.
+  // TODO(bugs.webrtc.org/9944): This should become zero buffer in the distant
+  // future.
+  absl::optional<std::string> pre_shared_key;
+
+  // If present, this is a config passed from the caller to the answerer in the
+  // offer. Each media transport knows how to understand its own parameters.
+  absl::optional<std::string> remote_transport_parameters;
+
+  // If present, provides the event log that media transport should use.
+  // Media transport does not own it. The lifetime of |event_log| will exceed
+  // the lifetime of the instance of MediaTransportInterface instance.
+  RtcEventLog* event_log = nullptr;
+};
+
+// Callback to notify about network route changes.
+class MediaTransportNetworkChangeCallback {
+ public:
+  virtual ~MediaTransportNetworkChangeCallback() = default;
+
+  // Called when the network route is changed, with the new network route.
+  virtual void OnNetworkRouteChanged(
+      const rtc::NetworkRoute& new_network_route) = 0;
+};
+
+// State of the media transport.  Media transport begins in the pending state.
+// It transitions to writable when it is ready to send media.  It may transition
+// back to pending if the connection is blocked.  It may transition to closed at
+// any time.  Closed is terminal: a transport will never re-open once closed.
+enum class MediaTransportState {
+  kPending,
+  kWritable,
+  kClosed,
+};
+
+// Callback invoked whenever the state of the media transport changes.
+class MediaTransportStateCallback {
+ public:
+  virtual ~MediaTransportStateCallback() = default;
+
+  // Invoked whenever the state of the media transport changes.
+  virtual void OnStateChanged(MediaTransportState state) = 0;
+};
+
+// Callback for RTT measurements on the receive side.
+// TODO(nisse): Related interfaces: CallStatsObserver and RtcpRttStats. It's
+// somewhat unclear what type of measurement is needed. It's used to configure
+// NACK generation and playout buffer. Either raw measurement values or recent
+// maximum would make sense for this use. Need consolidation of RTT signalling.
+class MediaTransportRttObserver {
+ public:
+  virtual ~MediaTransportRttObserver() = default;
+
+  // Invoked when a new RTT measurement is available, typically once per ACK.
+  virtual void OnRttUpdated(int64_t rtt_ms) = 0;
+};
+
+// Media transport interface for sending / receiving encoded audio/video frames
+// and receiving bandwidth estimate update from congestion control.
+class MediaTransportInterface : public DataChannelTransportInterface {
+ public:
+  MediaTransportInterface();
+  virtual ~MediaTransportInterface();
+
+  // Retrieves callers config (i.e. media transport offer) that should be passed
+  // to the callee, before the call is connected. Such config is opaque to SDP
+  // (sdp just passes it through). The config is a binary blob, so SDP may
+  // choose to use base64 to serialize it (or any other approach that guarantees
+  // that the binary blob goes through). This should only be called for the
+  // caller's perspective.
+  //
+  // This may return an unset optional, which means that the given media
+  // transport is not supported / disabled and shouldn't be reported in SDP.
+  //
+  // It may also return an empty string, in which case the media transport is
+  // supported, but without any extra settings.
+  // TODO(psla): Make abstract.
+  virtual absl::optional<std::string> GetTransportParametersOffer() const;
+
+  // Connect the media transport to the ICE transport.
+  // The implementation must be able to ignore incoming packets that don't
+  // belong to it.
+  // TODO(psla): Make abstract.
+  virtual void Connect(rtc::PacketTransportInternal* packet_transport);
+
+  // Start asynchronous send of audio frame. The status returned by this method
+  // only pertains to the synchronous operations (e.g.
+  // serialization/packetization), not to the asynchronous operation.
+
+  virtual RTCError SendAudioFrame(uint64_t channel_id,
+                                  MediaTransportEncodedAudioFrame frame) = 0;
+
+  // Start asynchronous send of video frame. The status returned by this method
+  // only pertains to the synchronous operations (e.g.
+  // serialization/packetization), not to the asynchronous operation.
+  virtual RTCError SendVideoFrame(
+      uint64_t channel_id,
+      const MediaTransportEncodedVideoFrame& frame) = 0;
+
+  // Used by video sender to be notified on key frame requests.
+  virtual void SetKeyFrameRequestCallback(
+      MediaTransportKeyFrameRequestCallback* callback);
+
+  // Requests a keyframe for the particular channel (stream). The caller should
+  // check that the keyframe is not present in a jitter buffer already (i.e.
+  // don't request a keyframe if there is one that you will get from the jitter
+  // buffer in a moment).
+  virtual RTCError RequestKeyFrame(uint64_t channel_id) = 0;
+
+  // Sets audio sink. Sink must be unset by calling SetReceiveAudioSink(nullptr)
+  // before the media transport is destroyed or before new sink is set.
+  virtual void SetReceiveAudioSink(MediaTransportAudioSinkInterface* sink) = 0;
+
+  // Registers a video sink. Before destruction of media transport, you must
+  // pass a nullptr.
+  virtual void SetReceiveVideoSink(MediaTransportVideoSinkInterface* sink) = 0;
+
+  // Adds a target bitrate observer. Before media transport is destructed
+  // the observer must be unregistered (by calling
+  // RemoveTargetTransferRateObserver).
+  // A newly registered observer will be called back with the latest recorded
+  // target rate, if available.
+  virtual void AddTargetTransferRateObserver(
+      TargetTransferRateObserver* observer);
+
+  // Removes an existing |observer| from observers. If observer was never
+  // registered, an error is logged and method does nothing.
+  virtual void RemoveTargetTransferRateObserver(
+      TargetTransferRateObserver* observer);
+
+  // Sets audio packets observer, which gets informed about incoming audio
+  // packets. Before destruction, the observer must be unregistered by setting
+  // nullptr.
+  //
+  // This method may be temporary, when the multiplexer is implemented (or
+  // multiplexer may use it to demultiplex channel ids).
+  virtual void SetFirstAudioPacketReceivedObserver(
+      AudioPacketReceivedObserver* observer);
+
+  // Intended for receive side. AddRttObserver registers an observer to be
+  // called for each RTT measurement, typically once per ACK. Before media
+  // transport is destructed the observer must be unregistered.
+  virtual void AddRttObserver(MediaTransportRttObserver* observer);
+  virtual void RemoveRttObserver(MediaTransportRttObserver* observer);
+
+  // Returns the last known target transfer rate as reported to the above
+  // observers.
+  virtual absl::optional<TargetTransferRate> GetLatestTargetTransferRate();
+
+  // Gets the audio packet overhead in bytes. Returned overhead does not include
+  // transport overhead (ipv4/6, turn channeldata, tcp/udp, etc.).
+  // If the transport is capable of fusing packets together, this overhead
+  // might not be a very accurate number.
+  // TODO(nisse): Deprecated.
+  virtual size_t GetAudioPacketOverhead() const;
+
+  // Corresponding observers for audio and video overhead. Before destruction,
+  // the observers must be unregistered by setting nullptr.
+
+  // TODO(nisse): Should move to per-stream objects, since packetization
+  // overhead can vary per stream, e.g., depending on negotiated extensions. In
+  // addition, we should move towards reporting total overhead including all
+  // layers. Currently, overhead of the lower layers is reported elsewhere,
+  // e.g., on route change between IPv4 and IPv6.
+  virtual void SetAudioOverheadObserver(OverheadObserver* observer) {}
+
+  // Registers an observer for network change events. If the network route is
+  // already established when the callback is added, |callback| will be called
+  // immediately with the current network route. Before media transport is
+  // destroyed, the callback must be removed.
+  virtual void AddNetworkChangeCallback(
+      MediaTransportNetworkChangeCallback* callback);
+  virtual void RemoveNetworkChangeCallback(
+      MediaTransportNetworkChangeCallback* callback);
+
+  // Sets a state observer callback. Before media transport is destroyed, the
+  // callback must be unregistered by setting it to nullptr.
+  // A newly registered callback will be called with the current state.
+  // Media transport does not invoke this callback concurrently.
+  virtual void SetMediaTransportStateCallback(
+      MediaTransportStateCallback* callback) = 0;
+
+  // Updates allocation limits.
+  // TODO(psla): Make abstract when downstream implementation implement it.
+  virtual void SetAllocatedBitrateLimits(
+      const MediaTransportAllocatedBitrateLimits& limits);
+
+  // Sets starting rate.
+  // TODO(psla): Make abstract when downstream implementation implement it.
+  virtual void SetTargetBitrateLimits(
+      const MediaTransportTargetRateConstraints& target_rate_constraints) {}
+
+  // TODO(sukhanov): RtcEventLogs.
+};
+
+// If media transport factory is set in peer connection factory, it will be
+// used to create media transport for sending/receiving encoded frames and
+// this transport will be used instead of default RTP/SRTP transport.
+//
+// Currently Media Transport negotiation is not supported in SDP.
+// If application is using media transport, it must negotiate it before
+// setting media transport factory in peer connection.
+class MediaTransportFactory {
+ public:
+  virtual ~MediaTransportFactory() = default;
+
+  // Creates media transport.
+  // - Does not take ownership of packet_transport or network_thread.
+  // - Does not support group calls, in 1:1 call one side must set
+  //   is_caller = true and another is_caller = false.
+  virtual RTCErrorOr<std::unique_ptr<MediaTransportInterface>>
+  CreateMediaTransport(rtc::PacketTransportInternal* packet_transport,
+                       rtc::Thread* network_thread,
+                       const MediaTransportSettings& settings);
+
+  // Creates a new Media Transport in a disconnected state. If the media
+  // transport for the caller is created, one can then call
+  // MediaTransportInterface::GetTransportParametersOffer on that new instance.
+  // TODO(psla): Make abstract.
+  virtual RTCErrorOr<std::unique_ptr<webrtc::MediaTransportInterface>>
+  CreateMediaTransport(rtc::Thread* network_thread,
+                       const MediaTransportSettings& settings);
+
+  // Creates a new Datagram Transport in a disconnected state. If the datagram
+  // transport for the caller is created, one can then call
+  // DatagramTransportInterface::GetTransportParametersOffer on that new
+  // instance.
+  //
+  // TODO(sukhanov): Consider separating media and datagram transport factories.
+  // TODO(sukhanov): Move factory to a separate .h file.
+  virtual RTCErrorOr<std::unique_ptr<DatagramTransportInterface>>
+  CreateDatagramTransport(rtc::Thread* network_thread,
+                          const MediaTransportSettings& settings);
+
+  // Gets a transport name which is supported by the implementation.
+  // Different factories should return different transport names, and at runtime
+  // it will be checked that different names were used.
+  // For example, "rtp" or "generic" may be returned by two different
+  // implementations.
+  // The value returned by this method must never change in the lifetime of the
+  // factory.
+  // TODO(psla): Make abstract.
+  virtual std::string GetTransportName() const;
+};
+
+}  // namespace webrtc
+#endif  // API_TRANSPORT_MEDIA_MEDIA_TRANSPORT_INTERFACE_H_
diff --git a/audio/BUILD.gn b/audio/BUILD.gn
index abf4c67..dba7b58 100644
--- a/audio/BUILD.gn
+++ b/audio/BUILD.gn
@@ -54,6 +54,7 @@
     "../api/audio_codecs:audio_codecs_api",
     "../api/rtc_event_log",
     "../api/task_queue",
+    "../api/transport/media:media_transport_interface",
     "../api/transport/rtp:rtp_source",
     "../call:bitrate_allocator",
     "../call:call_interfaces",
@@ -139,6 +140,7 @@
       "../api/audio_codecs/opus:audio_encoder_opus",
       "../api/rtc_event_log",
       "../api/task_queue:default_task_queue_factory",
+      "../api/transport/media:media_transport_interface",
       "../api/units:time_delta",
       "../call:mock_bitrate_allocator",
       "../call:mock_call_interfaces",
diff --git a/audio/audio_send_stream.cc b/audio/audio_send_stream.cc
index 479216a..cd137d9 100644
--- a/audio/audio_send_stream.cc
+++ b/audio/audio_send_stream.cc
@@ -21,8 +21,8 @@
 #include "api/call/transport.h"
 #include "api/crypto/frame_encryptor_interface.h"
 #include "api/function_view.h"
-#include "api/media_transport_config.h"
 #include "api/rtc_event_log/rtc_event_log.h"
+#include "api/transport/media/media_transport_config.h"
 #include "audio/audio_state.h"
 #include "audio/channel_send.h"
 #include "audio/conversion.h"
diff --git a/audio/channel_receive.h b/audio/channel_receive.h
index a7151bc..7527ef2 100644
--- a/audio/channel_receive.h
+++ b/audio/channel_receive.h
@@ -22,8 +22,8 @@
 #include "api/call/audio_sink.h"
 #include "api/call/transport.h"
 #include "api/crypto/crypto_options.h"
-#include "api/media_transport_config.h"
-#include "api/media_transport_interface.h"
+#include "api/transport/media/media_transport_config.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "api/transport/rtp/rtp_source.h"
 #include "call/rtp_packet_sink_interface.h"
 #include "call/syncable.h"
diff --git a/audio/channel_send.h b/audio/channel_send.h
index 575f71f..6f94610 100644
--- a/audio/channel_send.h
+++ b/audio/channel_send.h
@@ -19,9 +19,9 @@
 #include "api/audio_codecs/audio_encoder.h"
 #include "api/crypto/crypto_options.h"
 #include "api/function_view.h"
-#include "api/media_transport_config.h"
-#include "api/media_transport_interface.h"
 #include "api/task_queue/task_queue_factory.h"
+#include "api/transport/media/media_transport_config.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "modules/rtp_rtcp/include/report_block_data.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "modules/rtp_rtcp/source/rtp_sender_audio.h"
diff --git a/audio/test/media_transport_test.cc b/audio/test/media_transport_test.cc
index cc360df..aacee1e 100644
--- a/audio/test/media_transport_test.cc
+++ b/audio/test/media_transport_test.cc
@@ -13,11 +13,11 @@
 #include "api/audio_codecs/audio_encoder_factory_template.h"
 #include "api/audio_codecs/opus/audio_decoder_opus.h"
 #include "api/audio_codecs/opus/audio_encoder_opus.h"
-#include "api/media_transport_config.h"
 #include "api/rtc_event_log/rtc_event_log.h"
 #include "api/task_queue/default_task_queue_factory.h"
 #include "api/test/loopback_media_transport.h"
 #include "api/test/mock_audio_mixer.h"
+#include "api/transport/media/media_transport_config.h"
 #include "audio/audio_receive_stream.h"
 #include "audio/audio_send_stream.h"
 #include "call/rtp_transport_controller_send.h"
diff --git a/call/BUILD.gn b/call/BUILD.gn
index 912abc2..f35c1f0 100644
--- a/call/BUILD.gn
+++ b/call/BUILD.gn
@@ -33,7 +33,7 @@
     "../api:fec_controller_api",
     "../api:rtc_error",
 
-    # For api/media_transport_config.h
+    # For api/crypto/crypto_options.h
     "../api:libjingle_peerconnection_api",
     "../api:network_state_predictor_api",
     "../api:rtp_headers",
@@ -44,6 +44,7 @@
     "../api/audio_codecs:audio_codecs_api",
     "../api/task_queue",
     "../api/transport:network_control",
+    "../api/transport/media:media_transport_interface",
     "../api/transport/rtp:rtp_source",
     "../modules/audio_device",
     "../modules/audio_processing",
@@ -286,6 +287,7 @@
     "../api:rtp_headers",
     "../api:rtp_parameters",
     "../api:transport_api",
+    "../api/transport/media:media_transport_interface",
     "../api/transport/rtp:rtp_source",
     "../api/video:video_frame",
     "../api/video:video_rtp_headers",
diff --git a/call/audio_receive_stream.h b/call/audio_receive_stream.h
index 0b764a1..935aaed 100644
--- a/call/audio_receive_stream.h
+++ b/call/audio_receive_stream.h
@@ -21,9 +21,9 @@
 #include "api/call/transport.h"
 #include "api/crypto/crypto_options.h"
 #include "api/crypto/frame_decryptor_interface.h"
-#include "api/media_transport_config.h"
 #include "api/rtp_parameters.h"
 #include "api/scoped_refptr.h"
+#include "api/transport/media/media_transport_config.h"
 #include "api/transport/rtp/rtp_source.h"
 #include "call/rtp_config.h"
 
diff --git a/call/audio_send_stream.h b/call/audio_send_stream.h
index 1f3d1d0..fb711c4 100644
--- a/call/audio_send_stream.h
+++ b/call/audio_send_stream.h
@@ -23,10 +23,10 @@
 #include "api/call/transport.h"
 #include "api/crypto/crypto_options.h"
 #include "api/crypto/frame_encryptor_interface.h"
-#include "api/media_transport_config.h"
-#include "api/media_transport_interface.h"
 #include "api/rtp_parameters.h"
 #include "api/scoped_refptr.h"
+#include "api/transport/media/media_transport_config.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "call/rtp_config.h"
 #include "modules/audio_processing/include/audio_processing_statistics.h"
 #include "modules/rtp_rtcp/include/report_block_data.h"
diff --git a/call/video_receive_stream.h b/call/video_receive_stream.h
index 3869c81..b1d45ac 100644
--- a/call/video_receive_stream.h
+++ b/call/video_receive_stream.h
@@ -20,10 +20,10 @@
 #include "api/call/transport.h"
 #include "api/crypto/crypto_options.h"
 #include "api/crypto/frame_decryptor_interface.h"
-#include "api/media_transport_config.h"
-#include "api/media_transport_interface.h"
 #include "api/rtp_headers.h"
 #include "api/rtp_parameters.h"
+#include "api/transport/media/media_transport_config.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "api/transport/rtp/rtp_source.h"
 #include "api/video/video_content_type.h"
 #include "api/video/video_frame.h"
diff --git a/call/video_send_stream.h b/call/video_send_stream.h
index 2c31de0..478d73c 100644
--- a/call/video_send_stream.h
+++ b/call/video_send_stream.h
@@ -20,8 +20,8 @@
 #include "absl/types/optional.h"
 #include "api/call/transport.h"
 #include "api/crypto/crypto_options.h"
-#include "api/media_transport_interface.h"
 #include "api/rtp_parameters.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "api/video/video_content_type.h"
 #include "api/video/video_frame.h"
 #include "api/video/video_sink_interface.h"
diff --git a/media/BUILD.gn b/media/BUILD.gn
index 24cf303..be5b2b3 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -79,6 +79,7 @@
     "../api:rtp_parameters",
     "../api:scoped_refptr",
     "../api/audio_codecs:audio_codecs_api",
+    "../api/transport/media:media_transport_interface",
     "../api/transport/rtp:rtp_source",
     "../api/video:video_bitrate_allocation",
     "../api/video:video_bitrate_allocator_factory",
@@ -266,6 +267,8 @@
     "../api/audio:audio_mixer_api",
     "../api/audio_codecs:audio_codecs_api",
     "../api/task_queue",
+    "../api/transport:datagram_transport_interface",
+    "../api/transport/media:media_transport_interface",
     "../api/transport/rtp:rtp_source",
     "../api/video:video_bitrate_allocation",
     "../api/video:video_bitrate_allocator_factory",
@@ -530,6 +533,7 @@
       "../api/task_queue",
       "../api/task_queue:default_task_queue_factory",
       "../api/test/video:function_video_factory",
+      "../api/transport/media:media_transport_interface",
       "../api/units:time_delta",
       "../api/video:builtin_video_bitrate_allocator_factory",
       "../api/video:video_bitrate_allocation",
diff --git a/media/base/media_channel.h b/media/base/media_channel.h
index 9cc7876..da4f0d2 100644
--- a/media/base/media_channel.h
+++ b/media/base/media_channel.h
@@ -22,9 +22,9 @@
 #include "api/audio_options.h"
 #include "api/crypto/frame_decryptor_interface.h"
 #include "api/crypto/frame_encryptor_interface.h"
-#include "api/media_transport_config.h"
 #include "api/rtc_error.h"
 #include "api/rtp_parameters.h"
+#include "api/transport/media/media_transport_config.h"
 #include "api/transport/rtp/rtp_source.h"
 #include "api/video/video_content_type.h"
 #include "api/video/video_sink_interface.h"
diff --git a/media/base/rtp_data_engine_unittest.cc b/media/base/rtp_data_engine_unittest.cc
index cd11eb5..79fb2b2 100644
--- a/media/base/rtp_data_engine_unittest.cc
+++ b/media/base/rtp_data_engine_unittest.cc
@@ -15,7 +15,7 @@
 #include <memory>
 #include <string>
 
-#include "api/media_transport_config.h"
+#include "api/transport/media/media_transport_config.h"
 #include "media/base/fake_network_interface.h"
 #include "media/base/media_constants.h"
 #include "media/base/rtp_utils.h"
diff --git a/media/engine/webrtc_video_engine.cc b/media/engine/webrtc_video_engine.cc
index 4fbb2c8..f31d69f 100644
--- a/media/engine/webrtc_video_engine.cc
+++ b/media/engine/webrtc_video_engine.cc
@@ -19,7 +19,7 @@
 
 #include "absl/algorithm/container.h"
 #include "absl/strings/match.h"
-#include "api/datagram_transport_interface.h"
+#include "api/transport/datagram_transport_interface.h"
 #include "api/video/video_codec_constants.h"
 #include "api/video/video_codec_type.h"
 #include "api/video_codecs/sdp_video_format.h"
diff --git a/media/engine/webrtc_video_engine_unittest.cc b/media/engine/webrtc_video_engine_unittest.cc
index ba1f671..50dd8d8 100644
--- a/media/engine/webrtc_video_engine_unittest.cc
+++ b/media/engine/webrtc_video_engine_unittest.cc
@@ -19,7 +19,6 @@
 #include "absl/algorithm/container.h"
 #include "absl/memory/memory.h"
 #include "absl/strings/match.h"
-#include "api/media_transport_config.h"
 #include "api/rtc_event_log/rtc_event_log.h"
 #include "api/rtp_parameters.h"
 #include "api/task_queue/default_task_queue_factory.h"
@@ -28,6 +27,7 @@
 #include "api/test/mock_video_bitrate_allocator_factory.h"
 #include "api/test/mock_video_decoder_factory.h"
 #include "api/test/mock_video_encoder_factory.h"
+#include "api/transport/media/media_transport_config.h"
 #include "api/units/time_delta.h"
 #include "api/video/builtin_video_bitrate_allocator_factory.h"
 #include "api/video/i420_buffer.h"
diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc
index 5ac32c4..1125780b 100644
--- a/media/engine/webrtc_voice_engine.cc
+++ b/media/engine/webrtc_voice_engine.cc
@@ -21,7 +21,7 @@
 #include "absl/strings/match.h"
 #include "api/audio_codecs/audio_codec_pair_id.h"
 #include "api/call/audio_sink.h"
-#include "api/media_transport_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "media/base/audio_source.h"
 #include "media/base/media_constants.h"
 #include "media/base/stream_params.h"
diff --git a/media/engine/webrtc_voice_engine_unittest.cc b/media/engine/webrtc_voice_engine_unittest.cc
index 909cdaf..2ecf89e 100644
--- a/media/engine/webrtc_voice_engine_unittest.cc
+++ b/media/engine/webrtc_voice_engine_unittest.cc
@@ -17,11 +17,11 @@
 #include "absl/strings/match.h"
 #include "api/audio_codecs/builtin_audio_decoder_factory.h"
 #include "api/audio_codecs/builtin_audio_encoder_factory.h"
-#include "api/media_transport_config.h"
 #include "api/rtc_event_log/rtc_event_log.h"
 #include "api/rtp_parameters.h"
 #include "api/scoped_refptr.h"
 #include "api/task_queue/default_task_queue_factory.h"
+#include "api/transport/media/media_transport_config.h"
 #include "call/call.h"
 #include "media/base/fake_media_engine.h"
 #include "media/base/fake_network_interface.h"
diff --git a/pc/BUILD.gn b/pc/BUILD.gn
index 7e1d53f..e75188d 100644
--- a/pc/BUILD.gn
+++ b/pc/BUILD.gn
@@ -88,6 +88,8 @@
     "../api:rtp_parameters",
     "../api:scoped_refptr",
     "../api/rtc_event_log",
+    "../api/transport:datagram_transport_interface",
+    "../api/transport/media:media_transport_interface",
     "../api/video:builtin_video_bitrate_allocator_factory",
     "../api/video:video_frame",
     "../api/video:video_rtp_headers",
@@ -227,6 +229,8 @@
     "../api:scoped_refptr",
     "../api/rtc_event_log",
     "../api/task_queue",
+    "../api/transport:datagram_transport_interface",
+    "../api/transport/media:media_transport_interface",
     "../api/units:data_rate",
     "../api/video:builtin_video_bitrate_allocator_factory",
     "../api/video:video_frame",
@@ -314,6 +318,7 @@
       "../api:rtc_error",
       "../api:rtp_headers",
       "../api:rtp_parameters",
+      "../api/transport/media:media_transport_interface",
       "../api/video:builtin_video_bitrate_allocator_factory",
       "../call:rtp_interfaces",
       "../call:rtp_receiver",
@@ -547,6 +552,7 @@
       "../api/rtc_event_log",
       "../api/rtc_event_log:rtc_event_log_factory",
       "../api/task_queue:default_task_queue_factory",
+      "../api/transport/media:media_transport_interface",
       "../api/transport/rtp:rtp_source",
       "../api/units:time_delta",
       "../api/video:builtin_video_bitrate_allocator_factory",
diff --git a/pc/channel.cc b/pc/channel.cc
index 95be5b6..5966951 100644
--- a/pc/channel.cc
+++ b/pc/channel.cc
@@ -16,7 +16,7 @@
 #include "absl/algorithm/container.h"
 #include "absl/memory/memory.h"
 #include "api/call/audio_sink.h"
-#include "api/media_transport_config.h"
+#include "api/transport/media/media_transport_config.h"
 #include "media/base/media_constants.h"
 #include "media/base/rtp_utils.h"
 #include "modules/rtp_rtcp/source/rtp_packet_received.h"
diff --git a/pc/channel.h b/pc/channel.h
index 5222d98..6774f7e 100644
--- a/pc/channel.h
+++ b/pc/channel.h
@@ -20,8 +20,8 @@
 
 #include "api/call/audio_sink.h"
 #include "api/jsep.h"
-#include "api/media_transport_config.h"
 #include "api/rtp_receiver_interface.h"
+#include "api/transport/media/media_transport_config.h"
 #include "api/video/video_sink_interface.h"
 #include "api/video/video_source_interface.h"
 #include "call/rtp_packet_sink_interface.h"
diff --git a/pc/channel_manager.h b/pc/channel_manager.h
index cae812f..661ab4b 100644
--- a/pc/channel_manager.h
+++ b/pc/channel_manager.h
@@ -19,7 +19,7 @@
 
 #include "api/audio_options.h"
 #include "api/crypto/crypto_options.h"
-#include "api/media_transport_config.h"
+#include "api/transport/media/media_transport_config.h"
 #include "call/call.h"
 #include "media/base/codec.h"
 #include "media/base/media_channel.h"
diff --git a/pc/channel_manager_unittest.cc b/pc/channel_manager_unittest.cc
index c721614..e88b09c 100644
--- a/pc/channel_manager_unittest.cc
+++ b/pc/channel_manager_unittest.cc
@@ -13,9 +13,9 @@
 #include <memory>
 
 #include "absl/memory/memory.h"
-#include "api/media_transport_config.h"
 #include "api/rtc_error.h"
 #include "api/test/fake_media_transport.h"
+#include "api/transport/media/media_transport_config.h"
 #include "api/video/builtin_video_bitrate_allocator_factory.h"
 #include "media/base/fake_media_engine.h"
 #include "media/base/test_utils.h"
diff --git a/pc/channel_unittest.cc b/pc/channel_unittest.cc
index db0e8a8..5b388ea 100644
--- a/pc/channel_unittest.cc
+++ b/pc/channel_unittest.cc
@@ -17,8 +17,8 @@
 #include "absl/memory/memory.h"
 #include "api/array_view.h"
 #include "api/audio_options.h"
-#include "api/media_transport_config.h"
 #include "api/rtp_parameters.h"
+#include "api/transport/media/media_transport_config.h"
 #include "media/base/codec.h"
 #include "media/base/fake_media_engine.h"
 #include "media/base/fake_rtp.h"
diff --git a/pc/datagram_rtp_transport.h b/pc/datagram_rtp_transport.h
index 1dfa37b..8aadf97 100644
--- a/pc/datagram_rtp_transport.h
+++ b/pc/datagram_rtp_transport.h
@@ -17,7 +17,7 @@
 #include <vector>
 
 #include "api/crypto/crypto_options.h"
-#include "api/datagram_transport_interface.h"
+#include "api/transport/datagram_transport_interface.h"
 #include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
 #include "modules/rtp_rtcp/source/rtp_header_extensions.h"
 #include "p2p/base/ice_transport_internal.h"
diff --git a/pc/jsep_transport.h b/pc/jsep_transport.h
index 1a0e7b4..7bd0b07 100644
--- a/pc/jsep_transport.h
+++ b/pc/jsep_transport.h
@@ -18,9 +18,9 @@
 
 #include "absl/types/optional.h"
 #include "api/candidate.h"
-#include "api/datagram_transport_interface.h"
 #include "api/jsep.h"
-#include "api/media_transport_interface.h"
+#include "api/transport/datagram_transport_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "p2p/base/dtls_transport.h"
 #include "p2p/base/p2p_constants.h"
 #include "p2p/base/transport_info.h"
diff --git a/pc/jsep_transport_controller.cc b/pc/jsep_transport_controller.cc
index cfb971a..10250ce 100644
--- a/pc/jsep_transport_controller.cc
+++ b/pc/jsep_transport_controller.cc
@@ -15,8 +15,8 @@
 
 #include "absl/algorithm/container.h"
 #include "absl/memory/memory.h"
-#include "api/datagram_transport_interface.h"
-#include "api/media_transport_interface.h"
+#include "api/transport/datagram_transport_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "p2p/base/ice_transport_internal.h"
 #include "p2p/base/no_op_dtls_transport.h"
 #include "p2p/base/port.h"
diff --git a/pc/jsep_transport_controller.h b/pc/jsep_transport_controller.h
index de75db9..bad1315 100644
--- a/pc/jsep_transport_controller.h
+++ b/pc/jsep_transport_controller.h
@@ -19,10 +19,10 @@
 
 #include "api/candidate.h"
 #include "api/crypto/crypto_options.h"
-#include "api/media_transport_config.h"
-#include "api/media_transport_interface.h"
 #include "api/peer_connection_interface.h"
 #include "api/rtc_event_log/rtc_event_log.h"
+#include "api/transport/media/media_transport_config.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "media/sctp/sctp_transport_internal.h"
 #include "p2p/base/dtls_transport.h"
 #include "p2p/base/p2p_transport_channel.h"
diff --git a/pc/jsep_transport_controller_unittest.cc b/pc/jsep_transport_controller_unittest.cc
index 887f12b..35ebb87 100644
--- a/pc/jsep_transport_controller_unittest.cc
+++ b/pc/jsep_transport_controller_unittest.cc
@@ -14,9 +14,9 @@
 #include <memory>
 
 #include "absl/memory/memory.h"
-#include "api/media_transport_interface.h"
 #include "api/test/fake_media_transport.h"
 #include "api/test/loopback_media_transport.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "p2p/base/fake_dtls_transport.h"
 #include "p2p/base/fake_ice_transport.h"
 #include "p2p/base/no_op_dtls_transport.h"
diff --git a/pc/peer_connection.h b/pc/peer_connection.h
index b6da82a..3da8658 100644
--- a/pc/peer_connection.h
+++ b/pc/peer_connection.h
@@ -18,9 +18,9 @@
 #include <utility>
 #include <vector>
 
-#include "api/data_channel_transport_interface.h"
-#include "api/media_transport_interface.h"
 #include "api/peer_connection_interface.h"
+#include "api/transport/data_channel_transport_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "api/turn_customizer.h"
 #include "pc/ice_server_parsing.h"
 #include "pc/jsep_transport_controller.h"
diff --git a/pc/peer_connection_data_channel_unittest.cc b/pc/peer_connection_data_channel_unittest.cc
index 787e5ba..609a718 100644
--- a/pc/peer_connection_data_channel_unittest.cc
+++ b/pc/peer_connection_data_channel_unittest.cc
@@ -17,13 +17,13 @@
 #include "absl/types/optional.h"
 #include "api/call/call_factory_interface.h"
 #include "api/jsep.h"
-#include "api/media_transport_interface.h"
 #include "api/media_types.h"
 #include "api/peer_connection_interface.h"
 #include "api/peer_connection_proxy.h"
 #include "api/scoped_refptr.h"
 #include "api/task_queue/default_task_queue_factory.h"
 #include "api/test/fake_media_transport.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "media/base/codec.h"
 #include "media/base/fake_media_engine.h"
 #include "media/base/media_constants.h"
diff --git a/pc/peer_connection_factory.cc b/pc/peer_connection_factory.cc
index 1052b3b..16fb928 100644
--- a/pc/peer_connection_factory.cc
+++ b/pc/peer_connection_factory.cc
@@ -18,11 +18,11 @@
 #include "api/fec_controller.h"
 #include "api/media_stream_proxy.h"
 #include "api/media_stream_track_proxy.h"
-#include "api/media_transport_interface.h"
 #include "api/network_state_predictor.h"
 #include "api/peer_connection_factory_proxy.h"
 #include "api/peer_connection_proxy.h"
 #include "api/rtc_event_log/rtc_event_log.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "api/turn_customizer.h"
 #include "api/units/data_rate.h"
 #include "api/video_track_source_proxy.h"
diff --git a/pc/peer_connection_factory.h b/pc/peer_connection_factory.h
index 9160730..648a3af 100644
--- a/pc/peer_connection_factory.h
+++ b/pc/peer_connection_factory.h
@@ -16,9 +16,9 @@
 #include <string>
 
 #include "api/media_stream_interface.h"
-#include "api/media_transport_interface.h"
 #include "api/peer_connection_interface.h"
 #include "api/scoped_refptr.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "media/sctp/sctp_transport_internal.h"
 #include "pc/channel_manager.h"
 #include "rtc_base/rtc_certificate_generator.h"
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 1158229..125c6cb 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -929,6 +929,7 @@
         "../api/audio_codecs:builtin_audio_encoder_factory",
         "../api/rtc_event_log:rtc_event_log_factory",
         "../api/task_queue:default_task_queue_factory",
+        "../api/transport/media:media_transport_interface",
         "../api/video:video_frame",
         "../api/video:video_rtp_headers",
         "../api/video_codecs:video_codecs_api",
@@ -1203,6 +1204,7 @@
           "../api/audio_codecs:audio_codecs_api",
           "../api/audio_codecs:builtin_audio_decoder_factory",
           "../api/audio_codecs:builtin_audio_encoder_factory",
+          "../api/transport/media:media_transport_interface",
           "../api/video_codecs:video_codecs_api",
           "../media:rtc_media_base",
           "../modules:module_api",
diff --git a/sdk/objc/api/peerconnection/RTCPeerConnection.mm b/sdk/objc/api/peerconnection/RTCPeerConnection.mm
index f3e91c4..097eeb4 100644
--- a/sdk/objc/api/peerconnection/RTCPeerConnection.mm
+++ b/sdk/objc/api/peerconnection/RTCPeerConnection.mm
@@ -28,8 +28,8 @@
 #include <memory>
 
 #include "api/jsep_ice_candidate.h"
-#include "api/media_transport_interface.h"
 #include "api/rtc_event_log_output_file.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/numerics/safe_conversions.h"
 
diff --git a/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm b/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
index bb695b5..d63c08e 100644
--- a/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
+++ b/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
@@ -52,7 +52,7 @@
 // TODO(zhihuang): Remove nogncheck once MediaEngineInterface is moved to C++
 // API layer.
 #include "absl/memory/memory.h"
-#include "api/media_transport_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "media/engine/webrtc_media_engine.h"  // nogncheck
 
 @implementation RTCPeerConnectionFactory {
diff --git a/sdk/objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm b/sdk/objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm
index 0adaa30..af3d259 100644
--- a/sdk/objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm
+++ b/sdk/objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm
@@ -13,7 +13,7 @@
 
 #include "api/audio_codecs/audio_decoder_factory.h"
 #include "api/audio_codecs/audio_encoder_factory.h"
-#include "api/media_transport_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "api/video_codecs/video_decoder_factory.h"
 #include "api/video_codecs/video_encoder_factory.h"
 #include "modules/audio_device/include/audio_device.h"
diff --git a/sdk/objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm b/sdk/objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm
index 5f889a6..40b3aa0 100644
--- a/sdk/objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm
+++ b/sdk/objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm
@@ -22,7 +22,7 @@
 
 #include "api/audio_codecs/builtin_audio_decoder_factory.h"
 #include "api/audio_codecs/builtin_audio_encoder_factory.h"
-#include "api/media_transport_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "api/video_codecs/video_decoder_factory.h"
 #include "api/video_codecs/video_encoder_factory.h"
 #include "modules/audio_device/include/audio_device.h"
diff --git a/test/pc/e2e/BUILD.gn b/test/pc/e2e/BUILD.gn
index a718589..497fbe2 100644
--- a/test/pc/e2e/BUILD.gn
+++ b/test/pc/e2e/BUILD.gn
@@ -57,6 +57,7 @@
     "../../../api/rtc_event_log",
     "../../../api/task_queue",
     "../../../api/transport:network_control",
+    "../../../api/transport/media:media_transport_interface",
     "../../../api/video_codecs:video_codecs_api",
     "../../../rtc_base",
     "//third_party/abseil-cpp/absl/memory",
diff --git a/test/pc/e2e/peer_connection_quality_test_params.h b/test/pc/e2e/peer_connection_quality_test_params.h
index ea011f8..cb6add8 100644
--- a/test/pc/e2e/peer_connection_quality_test_params.h
+++ b/test/pc/e2e/peer_connection_quality_test_params.h
@@ -18,10 +18,10 @@
 #include "api/async_resolver_factory.h"
 #include "api/call/call_factory_interface.h"
 #include "api/fec_controller.h"
-#include "api/media_transport_interface.h"
 #include "api/rtc_event_log/rtc_event_log_factory_interface.h"
 #include "api/task_queue/task_queue_factory.h"
 #include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "api/transport/network_control.h"
 #include "api/video_codecs/video_decoder_factory.h"
 #include "api/video_codecs/video_encoder_factory.h"
diff --git a/video/BUILD.gn b/video/BUILD.gn
index 8edb069..af34436 100644
--- a/video/BUILD.gn
+++ b/video/BUILD.gn
@@ -60,6 +60,7 @@
     "../api:transport_api",
     "../api/rtc_event_log",
     "../api/task_queue",
+    "../api/transport/media:media_transport_interface",
     "../api/video:encoded_image",
     "../api/video:video_bitrate_allocation",
     "../api/video:video_bitrate_allocator",
@@ -266,6 +267,7 @@
       "../api/rtc_event_log:rtc_event_log_factory",
       "../api/task_queue",
       "../api/task_queue:default_task_queue_factory",
+      "../api/transport/media:media_transport_interface",
       "../api/video:builtin_video_bitrate_allocator_factory",
       "../api/video:video_bitrate_allocator_factory",
       "../api/video:video_frame",
diff --git a/video/encoder_rtcp_feedback.h b/video/encoder_rtcp_feedback.h
index 8f10442..21624db 100644
--- a/video/encoder_rtcp_feedback.h
+++ b/video/encoder_rtcp_feedback.h
@@ -12,7 +12,7 @@
 
 #include <vector>
 
-#include "api/media_transport_interface.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "api/video/video_stream_encoder_interface.h"
 #include "call/rtp_video_sender_interface.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
diff --git a/video/video_quality_test.cc b/video/video_quality_test.cc
index 663452a..1511254 100644
--- a/video/video_quality_test.cc
+++ b/video/video_quality_test.cc
@@ -19,9 +19,9 @@
 
 #include "absl/memory/memory.h"
 #include "api/fec_controller_override.h"
-#include "api/media_transport_config.h"
 #include "api/rtc_event_log_output_file.h"
 #include "api/task_queue/default_task_queue_factory.h"
+#include "api/transport/media/media_transport_config.h"
 #include "api/video/builtin_video_bitrate_allocator_factory.h"
 #include "api/video_codecs/video_encoder.h"
 #include "call/fake_network_pipe.h"
diff --git a/video/video_receive_stream.h b/video/video_receive_stream.h
index 87a40e9..0d0c66a 100644
--- a/video/video_receive_stream.h
+++ b/video/video_receive_stream.h
@@ -14,8 +14,8 @@
 #include <memory>
 #include <vector>
 
-#include "api/media_transport_interface.h"
 #include "api/task_queue/task_queue_factory.h"
+#include "api/transport/media/media_transport_interface.h"
 #include "call/rtp_packet_sink_interface.h"
 #include "call/syncable.h"
 #include "call/video_receive_stream.h"