Piotr (Peter) Slatala | e0c2e97 | 2018-10-08 09:43:21 -0700 | [diff] [blame] | 1 | /* Copyright 2018 The WebRTC project authors. All Rights Reserved. |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 2 | * |
| 3 | * Use of this source code is governed by a BSD-style license |
| 4 | * that can be found in the LICENSE file in the root of the source |
| 5 | * tree. An additional intellectual property rights grant can be found |
| 6 | * in the file PATENTS. All contributing project authors may |
| 7 | * be found in the AUTHORS file in the root of the source tree. |
| 8 | */ |
| 9 | |
| 10 | // This is EXPERIMENTAL interface for media transport. |
| 11 | // |
| 12 | // The goal is to refactor WebRTC code so that audio and video frames |
| 13 | // are sent / received through the media transport interface. This will |
| 14 | // enable different media transport implementations, including QUIC-based |
| 15 | // media transport. |
| 16 | |
| 17 | #ifndef API_MEDIA_TRANSPORT_INTERFACE_H_ |
| 18 | #define API_MEDIA_TRANSPORT_INTERFACE_H_ |
| 19 | |
| 20 | #include <memory> |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 21 | #include <string> |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 22 | #include <utility> |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 23 | |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 24 | #include "absl/types/optional.h" |
Yves Gerey | 988cc08 | 2018-10-23 12:03:01 +0200 | [diff] [blame] | 25 | #include "api/array_view.h" |
Bjorn A Mellem | 05497f2 | 2019-08-01 10:48:20 -0700 | [diff] [blame] | 26 | #include "api/data_channel_transport_interface.h" |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 27 | #include "api/rtc_error.h" |
Niels Möller | ec3b9ff | 2019-02-08 00:28:39 +0100 | [diff] [blame] | 28 | #include "api/transport/media/audio_transport.h" |
Niels Möller | 7e0e44f | 2019-02-12 14:04:11 +0100 | [diff] [blame] | 29 | #include "api/transport/media/video_transport.h" |
Oleh Prypin | 4d69516 | 2019-06-26 10:19:20 +0200 | [diff] [blame] | 30 | #include "api/transport/network_control.h" |
Piotr (Peter) Slatala | 48c5493 | 2019-01-28 06:50:38 -0800 | [diff] [blame] | 31 | #include "api/units/data_rate.h" |
Niels Möller | d5af402 | 2019-03-05 08:56:48 +0100 | [diff] [blame] | 32 | #include "common_types.h" // NOLINT(build/include) |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 33 | #include "rtc_base/copy_on_write_buffer.h" |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 34 | #include "rtc_base/network_route.h" |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 35 | |
| 36 | namespace rtc { |
| 37 | class PacketTransportInternal; |
| 38 | class Thread; |
| 39 | } // namespace rtc |
| 40 | |
| 41 | namespace webrtc { |
| 42 | |
Anton Sukhanov | 6b319e6 | 2019-05-17 14:48:23 -0700 | [diff] [blame] | 43 | class DatagramTransportInterface; |
Piotr (Peter) Slatala | 0c02250 | 2018-12-28 10:39:39 -0800 | [diff] [blame] | 44 | class RtcEventLog; |
| 45 | |
Piotr (Peter) Slatala | 309aafe | 2019-01-15 14:24:34 -0800 | [diff] [blame] | 46 | class AudioPacketReceivedObserver { |
| 47 | public: |
| 48 | virtual ~AudioPacketReceivedObserver() = default; |
| 49 | |
| 50 | // Invoked for the first received audio packet on a given channel id. |
| 51 | // It will be invoked once for each channel id. |
| 52 | virtual void OnFirstAudioPacketReceived(int64_t channel_id) = 0; |
| 53 | }; |
| 54 | |
Piotr (Peter) Slatala | 946b968 | 2019-03-18 10:25:02 -0700 | [diff] [blame] | 55 | // Used to configure stream allocations. |
Piotr (Peter) Slatala | 48c5493 | 2019-01-28 06:50:38 -0800 | [diff] [blame] | 56 | struct MediaTransportAllocatedBitrateLimits { |
| 57 | DataRate min_pacing_rate = DataRate::Zero(); |
| 58 | DataRate max_padding_bitrate = DataRate::Zero(); |
| 59 | DataRate max_total_allocated_bitrate = DataRate::Zero(); |
| 60 | }; |
| 61 | |
Piotr (Peter) Slatala | 946b968 | 2019-03-18 10:25:02 -0700 | [diff] [blame] | 62 | // Used to configure target bitrate constraints. |
| 63 | // If the value is provided, the constraint is updated. |
| 64 | // If the value is omitted, the value is left unchanged. |
| 65 | struct MediaTransportTargetRateConstraints { |
| 66 | absl::optional<DataRate> min_bitrate; |
| 67 | absl::optional<DataRate> max_bitrate; |
| 68 | absl::optional<DataRate> starting_bitrate; |
| 69 | }; |
| 70 | |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 71 | // A collection of settings for creation of media transport. |
| 72 | struct MediaTransportSettings final { |
| 73 | MediaTransportSettings(); |
Piotr (Peter) Slatala | ed7b8b1 | 2018-10-29 10:43:16 -0700 | [diff] [blame] | 74 | MediaTransportSettings(const MediaTransportSettings&); |
| 75 | MediaTransportSettings& operator=(const MediaTransportSettings&); |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 76 | ~MediaTransportSettings(); |
| 77 | |
| 78 | // Group calls are not currently supported, in 1:1 call one side must set |
| 79 | // is_caller = true and another is_caller = false. |
| 80 | bool is_caller; |
| 81 | |
| 82 | // Must be set if a pre-shared key is used for the call. |
Piotr (Peter) Slatala | 9f95625 | 2018-10-31 08:25:26 -0700 | [diff] [blame] | 83 | // TODO(bugs.webrtc.org/9944): This should become zero buffer in the distant |
| 84 | // future. |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 85 | absl::optional<std::string> pre_shared_key; |
Piotr (Peter) Slatala | 0c02250 | 2018-12-28 10:39:39 -0800 | [diff] [blame] | 86 | |
Piotr (Peter) Slatala | d6f61dd | 2019-02-26 12:08:27 -0800 | [diff] [blame] | 87 | // If present, this is a config passed from the caller to the answerer in the |
| 88 | // offer. Each media transport knows how to understand its own parameters. |
| 89 | absl::optional<std::string> remote_transport_parameters; |
| 90 | |
Piotr (Peter) Slatala | 0c02250 | 2018-12-28 10:39:39 -0800 | [diff] [blame] | 91 | // If present, provides the event log that media transport should use. |
| 92 | // Media transport does not own it. The lifetime of |event_log| will exceed |
| 93 | // the lifetime of the instance of MediaTransportInterface instance. |
| 94 | RtcEventLog* event_log = nullptr; |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 95 | }; |
| 96 | |
Piotr (Peter) Slatala | ada077f | 2018-11-08 07:43:31 -0800 | [diff] [blame] | 97 | // Callback to notify about network route changes. |
| 98 | class MediaTransportNetworkChangeCallback { |
| 99 | public: |
| 100 | virtual ~MediaTransportNetworkChangeCallback() = default; |
| 101 | |
| 102 | // Called when the network route is changed, with the new network route. |
| 103 | virtual void OnNetworkRouteChanged( |
| 104 | const rtc::NetworkRoute& new_network_route) = 0; |
| 105 | }; |
| 106 | |
Bjorn Mellem | c78b0ea | 2018-10-29 15:21:31 -0700 | [diff] [blame] | 107 | // State of the media transport. Media transport begins in the pending state. |
| 108 | // It transitions to writable when it is ready to send media. It may transition |
| 109 | // back to pending if the connection is blocked. It may transition to closed at |
| 110 | // any time. Closed is terminal: a transport will never re-open once closed. |
| 111 | enum class MediaTransportState { |
| 112 | kPending, |
| 113 | kWritable, |
| 114 | kClosed, |
| 115 | }; |
| 116 | |
| 117 | // Callback invoked whenever the state of the media transport changes. |
| 118 | class MediaTransportStateCallback { |
| 119 | public: |
| 120 | virtual ~MediaTransportStateCallback() = default; |
| 121 | |
| 122 | // Invoked whenever the state of the media transport changes. |
| 123 | virtual void OnStateChanged(MediaTransportState state) = 0; |
| 124 | }; |
| 125 | |
Niels Möller | 4687915 | 2019-01-07 15:54:47 +0100 | [diff] [blame] | 126 | // Callback for RTT measurements on the receive side. |
| 127 | // TODO(nisse): Related interfaces: CallStatsObserver and RtcpRttStats. It's |
| 128 | // somewhat unclear what type of measurement is needed. It's used to configure |
| 129 | // NACK generation and playout buffer. Either raw measurement values or recent |
| 130 | // maximum would make sense for this use. Need consolidation of RTT signalling. |
| 131 | class MediaTransportRttObserver { |
| 132 | public: |
| 133 | virtual ~MediaTransportRttObserver() = default; |
| 134 | |
| 135 | // Invoked when a new RTT measurement is available, typically once per ACK. |
| 136 | virtual void OnRttUpdated(int64_t rtt_ms) = 0; |
| 137 | }; |
| 138 | |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 139 | // Media transport interface for sending / receiving encoded audio/video frames |
| 140 | // and receiving bandwidth estimate update from congestion control. |
Bjorn A Mellem | 05497f2 | 2019-08-01 10:48:20 -0700 | [diff] [blame] | 141 | class MediaTransportInterface : public DataChannelTransportInterface { |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 142 | public: |
Piotr (Peter) Slatala | 309aafe | 2019-01-15 14:24:34 -0800 | [diff] [blame] | 143 | MediaTransportInterface(); |
| 144 | virtual ~MediaTransportInterface(); |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 145 | |
Piotr (Peter) Slatala | d6f61dd | 2019-02-26 12:08:27 -0800 | [diff] [blame] | 146 | // Retrieves callers config (i.e. media transport offer) that should be passed |
| 147 | // to the callee, before the call is connected. Such config is opaque to SDP |
| 148 | // (sdp just passes it through). The config is a binary blob, so SDP may |
| 149 | // choose to use base64 to serialize it (or any other approach that guarantees |
| 150 | // that the binary blob goes through). This should only be called for the |
| 151 | // caller's perspective. |
| 152 | // |
| 153 | // This may return an unset optional, which means that the given media |
| 154 | // transport is not supported / disabled and shouldn't be reported in SDP. |
| 155 | // |
| 156 | // It may also return an empty string, in which case the media transport is |
| 157 | // supported, but without any extra settings. |
| 158 | // TODO(psla): Make abstract. |
| 159 | virtual absl::optional<std::string> GetTransportParametersOffer() const; |
| 160 | |
| 161 | // Connect the media transport to the ICE transport. |
| 162 | // The implementation must be able to ignore incoming packets that don't |
| 163 | // belong to it. |
| 164 | // TODO(psla): Make abstract. |
| 165 | virtual void Connect(rtc::PacketTransportInternal* packet_transport); |
| 166 | |
Piotr (Peter) Slatala | e804f92 | 2018-09-25 08:40:30 -0700 | [diff] [blame] | 167 | // Start asynchronous send of audio frame. The status returned by this method |
| 168 | // only pertains to the synchronous operations (e.g. |
| 169 | // serialization/packetization), not to the asynchronous operation. |
Sergey Silkin | e049eba | 2019-02-18 09:52:26 +0000 | [diff] [blame] | 170 | |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 171 | virtual RTCError SendAudioFrame(uint64_t channel_id, |
| 172 | MediaTransportEncodedAudioFrame frame) = 0; |
| 173 | |
Piotr (Peter) Slatala | e804f92 | 2018-09-25 08:40:30 -0700 | [diff] [blame] | 174 | // Start asynchronous send of video frame. The status returned by this method |
| 175 | // only pertains to the synchronous operations (e.g. |
| 176 | // serialization/packetization), not to the asynchronous operation. |
| 177 | virtual RTCError SendVideoFrame( |
| 178 | uint64_t channel_id, |
| 179 | const MediaTransportEncodedVideoFrame& frame) = 0; |
| 180 | |
Niels Möller | 1c7f5f6 | 2018-12-10 11:06:02 +0100 | [diff] [blame] | 181 | // Used by video sender to be notified on key frame requests. |
| 182 | virtual void SetKeyFrameRequestCallback( |
| 183 | MediaTransportKeyFrameRequestCallback* callback); |
| 184 | |
Piotr (Peter) Slatala | e804f92 | 2018-09-25 08:40:30 -0700 | [diff] [blame] | 185 | // Requests a keyframe for the particular channel (stream). The caller should |
| 186 | // check that the keyframe is not present in a jitter buffer already (i.e. |
| 187 | // don't request a keyframe if there is one that you will get from the jitter |
| 188 | // buffer in a moment). |
| 189 | virtual RTCError RequestKeyFrame(uint64_t channel_id) = 0; |
| 190 | |
| 191 | // Sets audio sink. Sink must be unset by calling SetReceiveAudioSink(nullptr) |
| 192 | // before the media transport is destroyed or before new sink is set. |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 193 | virtual void SetReceiveAudioSink(MediaTransportAudioSinkInterface* sink) = 0; |
| 194 | |
Piotr (Peter) Slatala | e804f92 | 2018-09-25 08:40:30 -0700 | [diff] [blame] | 195 | // Registers a video sink. Before destruction of media transport, you must |
| 196 | // pass a nullptr. |
| 197 | virtual void SetReceiveVideoSink(MediaTransportVideoSinkInterface* sink) = 0; |
| 198 | |
Piotr (Peter) Slatala | ada077f | 2018-11-08 07:43:31 -0800 | [diff] [blame] | 199 | // Adds a target bitrate observer. Before media transport is destructed |
| 200 | // the observer must be unregistered (by calling |
| 201 | // RemoveTargetTransferRateObserver). |
| 202 | // A newly registered observer will be called back with the latest recorded |
| 203 | // target rate, if available. |
| 204 | virtual void AddTargetTransferRateObserver( |
Niels Möller | 4687915 | 2019-01-07 15:54:47 +0100 | [diff] [blame] | 205 | TargetTransferRateObserver* observer); |
Piotr (Peter) Slatala | ada077f | 2018-11-08 07:43:31 -0800 | [diff] [blame] | 206 | |
| 207 | // Removes an existing |observer| from observers. If observer was never |
| 208 | // registered, an error is logged and method does nothing. |
| 209 | virtual void RemoveTargetTransferRateObserver( |
Niels Möller | 4687915 | 2019-01-07 15:54:47 +0100 | [diff] [blame] | 210 | TargetTransferRateObserver* observer); |
| 211 | |
Piotr (Peter) Slatala | 309aafe | 2019-01-15 14:24:34 -0800 | [diff] [blame] | 212 | // Sets audio packets observer, which gets informed about incoming audio |
| 213 | // packets. Before destruction, the observer must be unregistered by setting |
| 214 | // nullptr. |
| 215 | // |
| 216 | // This method may be temporary, when the multiplexer is implemented (or |
| 217 | // multiplexer may use it to demultiplex channel ids). |
| 218 | virtual void SetFirstAudioPacketReceivedObserver( |
| 219 | AudioPacketReceivedObserver* observer); |
| 220 | |
Niels Möller | 4687915 | 2019-01-07 15:54:47 +0100 | [diff] [blame] | 221 | // Intended for receive side. AddRttObserver registers an observer to be |
| 222 | // called for each RTT measurement, typically once per ACK. Before media |
| 223 | // transport is destructed the observer must be unregistered. |
| 224 | virtual void AddRttObserver(MediaTransportRttObserver* observer); |
| 225 | virtual void RemoveRttObserver(MediaTransportRttObserver* observer); |
Piotr (Peter) Slatala | ada077f | 2018-11-08 07:43:31 -0800 | [diff] [blame] | 226 | |
| 227 | // Returns the last known target transfer rate as reported to the above |
| 228 | // observers. |
| 229 | virtual absl::optional<TargetTransferRate> GetLatestTargetTransferRate(); |
| 230 | |
| 231 | // Gets the audio packet overhead in bytes. Returned overhead does not include |
| 232 | // transport overhead (ipv4/6, turn channeldata, tcp/udp, etc.). |
| 233 | // If the transport is capable of fusing packets together, this overhead |
| 234 | // might not be a very accurate number. |
Niels Möller | d5af402 | 2019-03-05 08:56:48 +0100 | [diff] [blame] | 235 | // TODO(nisse): Deprecated. |
Piotr (Peter) Slatala | ada077f | 2018-11-08 07:43:31 -0800 | [diff] [blame] | 236 | virtual size_t GetAudioPacketOverhead() const; |
| 237 | |
Niels Möller | d5af402 | 2019-03-05 08:56:48 +0100 | [diff] [blame] | 238 | // Corresponding observers for audio and video overhead. Before destruction, |
| 239 | // the observers must be unregistered by setting nullptr. |
| 240 | |
| 241 | // TODO(nisse): Should move to per-stream objects, since packetization |
| 242 | // overhead can vary per stream, e.g., depending on negotiated extensions. In |
| 243 | // addition, we should move towards reporting total overhead including all |
| 244 | // layers. Currently, overhead of the lower layers is reported elsewhere, |
| 245 | // e.g., on route change between IPv4 and IPv6. |
| 246 | virtual void SetAudioOverheadObserver(OverheadObserver* observer) {} |
| 247 | |
Niels Möller | d70a114 | 2019-02-06 17:36:29 +0100 | [diff] [blame] | 248 | // Registers an observer for network change events. If the network route is |
| 249 | // already established when the callback is added, |callback| will be called |
| 250 | // immediately with the current network route. Before media transport is |
| 251 | // destroyed, the callback must be removed. |
Niels Möller | 30b182a | 2019-02-05 00:59:35 +0100 | [diff] [blame] | 252 | virtual void AddNetworkChangeCallback( |
| 253 | MediaTransportNetworkChangeCallback* callback); |
| 254 | virtual void RemoveNetworkChangeCallback( |
| 255 | MediaTransportNetworkChangeCallback* callback); |
Piotr (Peter) Slatala | 6b9d823 | 2018-10-26 07:59:46 -0700 | [diff] [blame] | 256 | |
Bjorn Mellem | c78b0ea | 2018-10-29 15:21:31 -0700 | [diff] [blame] | 257 | // Sets a state observer callback. Before media transport is destroyed, the |
| 258 | // callback must be unregistered by setting it to nullptr. |
| 259 | // A newly registered callback will be called with the current state. |
| 260 | // Media transport does not invoke this callback concurrently. |
Bjorn Mellem | c78b0ea | 2018-10-29 15:21:31 -0700 | [diff] [blame] | 261 | virtual void SetMediaTransportStateCallback( |
Bjorn Mellem | eb2c641 | 2018-10-31 15:25:32 -0700 | [diff] [blame] | 262 | MediaTransportStateCallback* callback) = 0; |
Bjorn Mellem | c78b0ea | 2018-10-29 15:21:31 -0700 | [diff] [blame] | 263 | |
Piotr (Peter) Slatala | 48c5493 | 2019-01-28 06:50:38 -0800 | [diff] [blame] | 264 | // Updates allocation limits. |
| 265 | // TODO(psla): Make abstract when downstream implementation implement it. |
| 266 | virtual void SetAllocatedBitrateLimits( |
| 267 | const MediaTransportAllocatedBitrateLimits& limits); |
| 268 | |
Piotr (Peter) Slatala | 946b968 | 2019-03-18 10:25:02 -0700 | [diff] [blame] | 269 | // Sets starting rate. |
| 270 | // TODO(psla): Make abstract when downstream implementation implement it. |
| 271 | virtual void SetTargetBitrateLimits( |
| 272 | const MediaTransportTargetRateConstraints& target_rate_constraints) {} |
| 273 | |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 274 | // TODO(sukhanov): RtcEventLogs. |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 275 | }; |
| 276 | |
| 277 | // If media transport factory is set in peer connection factory, it will be |
| 278 | // used to create media transport for sending/receiving encoded frames and |
| 279 | // this transport will be used instead of default RTP/SRTP transport. |
| 280 | // |
| 281 | // Currently Media Transport negotiation is not supported in SDP. |
| 282 | // If application is using media transport, it must negotiate it before |
| 283 | // setting media transport factory in peer connection. |
| 284 | class MediaTransportFactory { |
| 285 | public: |
| 286 | virtual ~MediaTransportFactory() = default; |
| 287 | |
| 288 | // Creates media transport. |
| 289 | // - Does not take ownership of packet_transport or network_thread. |
| 290 | // - Does not support group calls, in 1:1 call one side must set |
| 291 | // is_caller = true and another is_caller = false. |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 292 | virtual RTCErrorOr<std::unique_ptr<MediaTransportInterface>> |
| 293 | CreateMediaTransport(rtc::PacketTransportInternal* packet_transport, |
| 294 | rtc::Thread* network_thread, |
Piotr (Peter) Slatala | ed7b8b1 | 2018-10-29 10:43:16 -0700 | [diff] [blame] | 295 | const MediaTransportSettings& settings); |
Piotr (Peter) Slatala | d6f61dd | 2019-02-26 12:08:27 -0800 | [diff] [blame] | 296 | |
| 297 | // Creates a new Media Transport in a disconnected state. If the media |
| 298 | // transport for the caller is created, one can then call |
| 299 | // MediaTransportInterface::GetTransportParametersOffer on that new instance. |
| 300 | // TODO(psla): Make abstract. |
| 301 | virtual RTCErrorOr<std::unique_ptr<webrtc::MediaTransportInterface>> |
| 302 | CreateMediaTransport(rtc::Thread* network_thread, |
| 303 | const MediaTransportSettings& settings); |
| 304 | |
Anton Sukhanov | 6b319e6 | 2019-05-17 14:48:23 -0700 | [diff] [blame] | 305 | // Creates a new Datagram Transport in a disconnected state. If the datagram |
| 306 | // transport for the caller is created, one can then call |
| 307 | // DatagramTransportInterface::GetTransportParametersOffer on that new |
| 308 | // instance. |
| 309 | // |
| 310 | // TODO(sukhanov): Consider separating media and datagram transport factories. |
| 311 | // TODO(sukhanov): Move factory to a separate .h file. |
| 312 | virtual RTCErrorOr<std::unique_ptr<DatagramTransportInterface>> |
| 313 | CreateDatagramTransport(rtc::Thread* network_thread, |
| 314 | const MediaTransportSettings& settings); |
| 315 | |
Piotr (Peter) Slatala | d6f61dd | 2019-02-26 12:08:27 -0800 | [diff] [blame] | 316 | // Gets a transport name which is supported by the implementation. |
| 317 | // Different factories should return different transport names, and at runtime |
| 318 | // it will be checked that different names were used. |
| 319 | // For example, "rtp" or "generic" may be returned by two different |
| 320 | // implementations. |
| 321 | // The value returned by this method must never change in the lifetime of the |
| 322 | // factory. |
| 323 | // TODO(psla): Make abstract. |
| 324 | virtual std::string GetTransportName() const; |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 325 | }; |
| 326 | |
| 327 | } // namespace webrtc |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 328 | #endif // API_MEDIA_TRANSPORT_INTERFACE_H_ |