blob: 6f2ec60f6d39df294626b8123323210c00a1fc42 [file] [log] [blame]
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -07001/* Copyright 2018 The WebRTC project authors. All Rights Reserved.
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -04002 *
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
Piotr (Peter) Slatala6b9d8232018-10-26 07:59:46 -070020#include <api/transport/network_control.h>
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -040021#include <memory>
Piotr (Peter) Slatalaa0677d12018-10-29 07:31:42 -070022#include <string>
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -040023#include <utility>
24#include <vector>
25
Piotr (Peter) Slatalaa0677d12018-10-29 07:31:42 -070026#include "absl/types/optional.h"
Yves Gerey988cc082018-10-23 12:03:01 +020027#include "api/array_view.h"
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -040028#include "api/rtcerror.h"
Niels Möller3a742392018-10-08 11:13:58 +020029#include "api/video/encoded_image.h"
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -070030#include "rtc_base/copyonwritebuffer.h"
Niels Möllerd8a1b7a2018-12-06 13:00:27 +010031#include "rtc_base/deprecation.h"
Piotr (Peter) Slatalaada077f2018-11-08 07:43:31 -080032#include "rtc_base/networkroute.h"
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -040033
34namespace rtc {
35class PacketTransportInternal;
36class Thread;
37} // namespace rtc
38
39namespace webrtc {
40
Piotr (Peter) Slatalaa0677d12018-10-29 07:31:42 -070041// A collection of settings for creation of media transport.
42struct MediaTransportSettings final {
43 MediaTransportSettings();
Piotr (Peter) Slatalaed7b8b12018-10-29 10:43:16 -070044 MediaTransportSettings(const MediaTransportSettings&);
45 MediaTransportSettings& operator=(const MediaTransportSettings&);
Piotr (Peter) Slatalaa0677d12018-10-29 07:31:42 -070046 ~MediaTransportSettings();
47
48 // Group calls are not currently supported, in 1:1 call one side must set
49 // is_caller = true and another is_caller = false.
50 bool is_caller;
51
52 // Must be set if a pre-shared key is used for the call.
Piotr (Peter) Slatala9f956252018-10-31 08:25:26 -070053 // TODO(bugs.webrtc.org/9944): This should become zero buffer in the distant
54 // future.
Piotr (Peter) Slatalaa0677d12018-10-29 07:31:42 -070055 absl::optional<std::string> pre_shared_key;
56};
57
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -040058// Represents encoded audio frame in any encoding (type of encoding is opaque).
59// To avoid copying of encoded data use move semantics when passing by value.
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -070060class MediaTransportEncodedAudioFrame final {
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -040061 public:
62 enum class FrameType {
63 // Normal audio frame (equivalent to webrtc::kAudioFrameSpeech).
64 kSpeech,
65
66 // DTX frame (equivalent to webrtc::kAudioFrameCN).
Niels Möller7d76a312018-10-26 12:57:07 +020067 // DTX frame (equivalent to webrtc::kAudioFrameCN).
68 kDiscontinuousTransmission,
69 // TODO(nisse): Mis-spelled version, update users, then delete.
70 kDiscountinuousTransmission = kDiscontinuousTransmission,
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -040071 };
72
73 MediaTransportEncodedAudioFrame(
74 // Audio sampling rate, for example 48000.
75 int sampling_rate_hz,
76
77 // Starting sample index of the frame, i.e. how many audio samples were
78 // before this frame since the beginning of the call or beginning of time
79 // in one channel (the starting point should not matter for NetEq). In
80 // WebRTC it is used as a timestamp of the frame.
81 // TODO(sukhanov): Starting_sample_index is currently adjusted on the
82 // receiver side in RTP path. Non-RTP implementations should preserve it.
83 // For NetEq initial offset should not matter so we should consider fixing
84 // RTP path.
85 int starting_sample_index,
86
87 // Number of audio samples in audio frame in 1 channel.
88 int samples_per_channel,
89
90 // Sequence number of the frame in the order sent, it is currently
91 // required by NetEq, but we can fix NetEq, because starting_sample_index
92 // should be enough.
93 int sequence_number,
94
95 // If audio frame is a speech or discontinued transmission.
96 FrameType frame_type,
97
98 // Opaque payload type. In RTP codepath payload type is stored in RTP
99 // header. In other implementations it should be simply passed through the
100 // wire -- it's needed for decoder.
Niels Möllerd8a1b7a2018-12-06 13:00:27 +0100101 int payload_type,
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400102
103 // Vector with opaque encoded data.
Niels Möller3a742392018-10-08 11:13:58 +0200104 std::vector<uint8_t> encoded_data);
105
106 ~MediaTransportEncodedAudioFrame();
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -0700107 MediaTransportEncodedAudioFrame(const MediaTransportEncodedAudioFrame&);
108 MediaTransportEncodedAudioFrame& operator=(
109 const MediaTransportEncodedAudioFrame& other);
110 MediaTransportEncodedAudioFrame& operator=(
111 MediaTransportEncodedAudioFrame&& other);
112 MediaTransportEncodedAudioFrame(MediaTransportEncodedAudioFrame&&);
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400113
114 // Getters.
115 int sampling_rate_hz() const { return sampling_rate_hz_; }
116 int starting_sample_index() const { return starting_sample_index_; }
117 int samples_per_channel() const { return samples_per_channel_; }
118 int sequence_number() const { return sequence_number_; }
119
Niels Möllerd8a1b7a2018-12-06 13:00:27 +0100120 int payload_type() const { return payload_type_; }
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400121 FrameType frame_type() const { return frame_type_; }
122
123 rtc::ArrayView<const uint8_t> encoded_data() const { return encoded_data_; }
124
125 private:
126 int sampling_rate_hz_;
127 int starting_sample_index_;
128 int samples_per_channel_;
129
130 // TODO(sukhanov): Refactor NetEq so we don't need sequence number.
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700131 // Having sample_index and samples_per_channel should be enough.
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400132 int sequence_number_;
133
134 FrameType frame_type_;
135
Niels Möllerd8a1b7a2018-12-06 13:00:27 +0100136 int payload_type_;
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400137
138 std::vector<uint8_t> encoded_data_;
139};
140
Piotr (Peter) Slatalaada077f2018-11-08 07:43:31 -0800141// Callback to notify about network route changes.
142class MediaTransportNetworkChangeCallback {
143 public:
144 virtual ~MediaTransportNetworkChangeCallback() = default;
145
146 // Called when the network route is changed, with the new network route.
147 virtual void OnNetworkRouteChanged(
148 const rtc::NetworkRoute& new_network_route) = 0;
149};
150
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400151// Interface for receiving encoded audio frames from MediaTransportInterface
152// implementations.
153class MediaTransportAudioSinkInterface {
154 public:
155 virtual ~MediaTransportAudioSinkInterface() = default;
156
157 // Called when new encoded audio frame is received.
158 virtual void OnData(uint64_t channel_id,
159 MediaTransportEncodedAudioFrame frame) = 0;
160};
161
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700162// Represents encoded video frame, along with the codec information.
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -0700163class MediaTransportEncodedVideoFrame final {
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700164 public:
Niels Möllerd8a1b7a2018-12-06 13:00:27 +0100165 // TODO(bugs.webrtc.org/9719): Switch to payload_type
166 RTC_DEPRECATED MediaTransportEncodedVideoFrame(
167 int64_t frame_id,
168 std::vector<int64_t> referenced_frame_ids,
169 VideoCodecType codec_type,
170 const webrtc::EncodedImage& encoded_image);
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700171 MediaTransportEncodedVideoFrame(int64_t frame_id,
172 std::vector<int64_t> referenced_frame_ids,
Niels Möllerd8a1b7a2018-12-06 13:00:27 +0100173 int payload_type,
Niels Möller3a742392018-10-08 11:13:58 +0200174 const webrtc::EncodedImage& encoded_image);
175 ~MediaTransportEncodedVideoFrame();
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -0700176 MediaTransportEncodedVideoFrame(const MediaTransportEncodedVideoFrame&);
177 MediaTransportEncodedVideoFrame& operator=(
178 const MediaTransportEncodedVideoFrame& other);
179 MediaTransportEncodedVideoFrame& operator=(
180 MediaTransportEncodedVideoFrame&& other);
181 MediaTransportEncodedVideoFrame(MediaTransportEncodedVideoFrame&&);
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700182
Niels Möllerd8a1b7a2018-12-06 13:00:27 +0100183 // TODO(bugs.webrtc.org/9719): Switch to payload_type
184 RTC_DEPRECATED VideoCodecType codec_type() const { return codec_type_; }
185 int payload_type() const { return payload_type_; }
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700186 const webrtc::EncodedImage& encoded_image() const { return encoded_image_; }
187
188 int64_t frame_id() const { return frame_id_; }
189 const std::vector<int64_t>& referenced_frame_ids() const {
190 return referenced_frame_ids_;
191 }
192
Niels Möllerd5696fb2018-11-28 15:34:37 +0100193 // Hack to workaround lack of ownership of the encoded_image_._buffer. If we
194 // don't already own the underlying data, make a copy.
195 void Retain();
196
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700197 private:
Niels Möllerd5696fb2018-11-28 15:34:37 +0100198 MediaTransportEncodedVideoFrame();
199
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700200 VideoCodecType codec_type_;
Niels Möllerd8a1b7a2018-12-06 13:00:27 +0100201 int payload_type_;
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700202
Niels Möllerd5696fb2018-11-28 15:34:37 +0100203 // The buffer is not owned by the encoded image. On the sender it means that
204 // it will need to make a copy using the Retain() method, if it wants to
205 // deliver it asynchronously.
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700206 webrtc::EncodedImage encoded_image_;
207
Niels Möllerd5696fb2018-11-28 15:34:37 +0100208 // If non-empty, this is the data for the encoded image.
209 std::vector<uint8_t> encoded_data_;
210
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700211 // Frame id uniquely identifies a frame in a stream. It needs to be unique in
212 // a given time window (i.e. technically unique identifier for the lifetime of
213 // the connection is not needed, but you need to guarantee that remote side
214 // got rid of the previous frame_id if you plan to reuse it).
215 //
216 // It is required by a remote jitter buffer, and is the same as
217 // EncodedFrame::id::picture_id.
218 //
219 // This data must be opaque to the media transport, and media transport should
220 // itself not make any assumptions about what it is and its uniqueness.
221 int64_t frame_id_;
222
223 // A single frame might depend on other frames. This is set of identifiers on
224 // which the current frame depends.
225 std::vector<int64_t> referenced_frame_ids_;
226};
227
228// Interface for receiving encoded video frames from MediaTransportInterface
229// implementations.
230class MediaTransportVideoSinkInterface {
231 public:
232 virtual ~MediaTransportVideoSinkInterface() = default;
233
234 // Called when new encoded video frame is received.
235 virtual void OnData(uint64_t channel_id,
236 MediaTransportEncodedVideoFrame frame) = 0;
237
Niels Möllerd8a1b7a2018-12-06 13:00:27 +0100238 // TODO(bugs.webrtc.org/9719): Belongs on send side, not receive side.
239 RTC_DEPRECATED virtual void OnKeyFrameRequested(uint64_t channel_id) {}
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700240};
241
Niels Möller1c7f5f62018-12-10 11:06:02 +0100242// Interface for video sender to be notified of received key frame request.
243class MediaTransportKeyFrameRequestCallback {
244 public:
245 virtual ~MediaTransportKeyFrameRequestCallback() = default;
246
247 // Called when a key frame request is received on the transport.
248 virtual void OnKeyFrameRequested(uint64_t channel_id) = 0;
249};
250
Bjorn Mellemc78b0ea2018-10-29 15:21:31 -0700251// State of the media transport. Media transport begins in the pending state.
252// It transitions to writable when it is ready to send media. It may transition
253// back to pending if the connection is blocked. It may transition to closed at
254// any time. Closed is terminal: a transport will never re-open once closed.
255enum class MediaTransportState {
256 kPending,
257 kWritable,
258 kClosed,
259};
260
261// Callback invoked whenever the state of the media transport changes.
262class MediaTransportStateCallback {
263 public:
264 virtual ~MediaTransportStateCallback() = default;
265
266 // Invoked whenever the state of the media transport changes.
267 virtual void OnStateChanged(MediaTransportState state) = 0;
268};
269
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700270// Supported types of application data messages.
271enum class DataMessageType {
272 // Application data buffer with the binary bit unset.
273 kText,
274
275 // Application data buffer with the binary bit set.
276 kBinary,
277
278 // Transport-agnostic control messages, such as open or open-ack messages.
279 kControl,
280};
281
282// Parameters for sending data. The parameters may change from message to
283// message, even within a single channel. For example, control messages may be
284// sent reliably and in-order, even if the data channel is configured for
285// unreliable delivery.
286struct SendDataParams {
287 SendDataParams();
Niels Möllere0446cb2018-11-30 09:35:52 +0100288 SendDataParams(const SendDataParams&);
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700289
290 DataMessageType type = DataMessageType::kText;
291
292 // Whether to deliver the message in order with respect to other ordered
293 // messages with the same channel_id.
294 bool ordered = false;
295
296 // If set, the maximum number of times this message may be
297 // retransmitted by the transport before it is dropped.
298 // Setting this value to zero disables retransmission.
299 // Must be non-negative. |max_rtx_count| and |max_rtx_ms| may not be set
300 // simultaneously.
301 absl::optional<int> max_rtx_count;
302
303 // If set, the maximum number of milliseconds for which the transport
304 // may retransmit this message before it is dropped.
305 // Setting this value to zero disables retransmission.
306 // Must be non-negative. |max_rtx_count| and |max_rtx_ms| may not be set
307 // simultaneously.
308 absl::optional<int> max_rtx_ms;
309};
310
311// Sink for callbacks related to a data channel.
312class DataChannelSink {
313 public:
314 virtual ~DataChannelSink() = default;
315
316 // Callback issued when data is received by the transport.
317 virtual void OnDataReceived(int channel_id,
318 DataMessageType type,
319 const rtc::CopyOnWriteBuffer& buffer) = 0;
320
321 // Callback issued when a remote data channel begins the closing procedure.
322 // Messages sent after the closing procedure begins will not be transmitted.
323 virtual void OnChannelClosing(int channel_id) = 0;
324
325 // Callback issued when a (remote or local) data channel completes the closing
326 // procedure. Closing channels become closed after all pending data has been
327 // transmitted.
328 virtual void OnChannelClosed(int channel_id) = 0;
329};
330
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400331// Media transport interface for sending / receiving encoded audio/video frames
332// and receiving bandwidth estimate update from congestion control.
333class MediaTransportInterface {
334 public:
335 virtual ~MediaTransportInterface() = default;
336
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700337 // Start asynchronous send of audio frame. The status returned by this method
338 // only pertains to the synchronous operations (e.g.
339 // serialization/packetization), not to the asynchronous operation.
340
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400341 virtual RTCError SendAudioFrame(uint64_t channel_id,
342 MediaTransportEncodedAudioFrame frame) = 0;
343
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700344 // Start asynchronous send of video frame. The status returned by this method
345 // only pertains to the synchronous operations (e.g.
346 // serialization/packetization), not to the asynchronous operation.
347 virtual RTCError SendVideoFrame(
348 uint64_t channel_id,
349 const MediaTransportEncodedVideoFrame& frame) = 0;
350
Niels Möller1c7f5f62018-12-10 11:06:02 +0100351 // Used by video sender to be notified on key frame requests.
352 virtual void SetKeyFrameRequestCallback(
353 MediaTransportKeyFrameRequestCallback* callback);
354
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700355 // Requests a keyframe for the particular channel (stream). The caller should
356 // check that the keyframe is not present in a jitter buffer already (i.e.
357 // don't request a keyframe if there is one that you will get from the jitter
358 // buffer in a moment).
359 virtual RTCError RequestKeyFrame(uint64_t channel_id) = 0;
360
361 // Sets audio sink. Sink must be unset by calling SetReceiveAudioSink(nullptr)
362 // before the media transport is destroyed or before new sink is set.
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400363 virtual void SetReceiveAudioSink(MediaTransportAudioSinkInterface* sink) = 0;
364
Piotr (Peter) Slatalae804f922018-09-25 08:40:30 -0700365 // Registers a video sink. Before destruction of media transport, you must
366 // pass a nullptr.
367 virtual void SetReceiveVideoSink(MediaTransportVideoSinkInterface* sink) = 0;
368
Piotr (Peter) Slatalaada077f2018-11-08 07:43:31 -0800369 // Adds a target bitrate observer. Before media transport is destructed
370 // the observer must be unregistered (by calling
371 // RemoveTargetTransferRateObserver).
372 // A newly registered observer will be called back with the latest recorded
373 // target rate, if available.
374 virtual void AddTargetTransferRateObserver(
375 webrtc::TargetTransferRateObserver* observer);
376
377 // Removes an existing |observer| from observers. If observer was never
378 // registered, an error is logged and method does nothing.
379 virtual void RemoveTargetTransferRateObserver(
380 webrtc::TargetTransferRateObserver* observer);
381
382 // Returns the last known target transfer rate as reported to the above
383 // observers.
384 virtual absl::optional<TargetTransferRate> GetLatestTargetTransferRate();
385
386 // Gets the audio packet overhead in bytes. Returned overhead does not include
387 // transport overhead (ipv4/6, turn channeldata, tcp/udp, etc.).
388 // If the transport is capable of fusing packets together, this overhead
389 // might not be a very accurate number.
390 virtual size_t GetAudioPacketOverhead() const;
391
392 // Sets an observer for network change events. If the network route is already
393 // established when the callback is set, |callback| will be called immediately
394 // with the current network route.
395 // Before media transport is destroyed, the callback must be unregistered by
396 // setting it to nullptr.
397 virtual void SetNetworkChangeCallback(
398 MediaTransportNetworkChangeCallback* callback);
Piotr (Peter) Slatala6b9d8232018-10-26 07:59:46 -0700399
Bjorn Mellemc78b0ea2018-10-29 15:21:31 -0700400 // Sets a state observer callback. Before media transport is destroyed, the
401 // callback must be unregistered by setting it to nullptr.
402 // A newly registered callback will be called with the current state.
403 // Media transport does not invoke this callback concurrently.
Bjorn Mellemc78b0ea2018-10-29 15:21:31 -0700404 virtual void SetMediaTransportStateCallback(
Bjorn Mellemeb2c6412018-10-31 15:25:32 -0700405 MediaTransportStateCallback* callback) = 0;
Bjorn Mellemc78b0ea2018-10-29 15:21:31 -0700406
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700407 // Sends a data buffer to the remote endpoint using the given send parameters.
408 // |buffer| may not be larger than 256 KiB. Returns an error if the send
409 // fails.
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700410 virtual RTCError SendData(int channel_id,
411 const SendDataParams& params,
Bjorn Mellemeb2c6412018-10-31 15:25:32 -0700412 const rtc::CopyOnWriteBuffer& buffer) = 0;
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700413
414 // Closes |channel_id| gracefully. Returns an error if |channel_id| is not
415 // open. Data sent after the closing procedure begins will not be
416 // transmitted. The channel becomes closed after pending data is transmitted.
Bjorn Mellemeb2c6412018-10-31 15:25:32 -0700417 virtual RTCError CloseChannel(int channel_id) = 0;
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700418
419 // Sets a sink for data messages and channel state callbacks. Before media
420 // transport is destroyed, the sink must be unregistered by setting it to
421 // nullptr.
Bjorn Mellemeb2c6412018-10-31 15:25:32 -0700422 virtual void SetDataSink(DataChannelSink* sink) = 0;
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700423
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400424 // TODO(sukhanov): RtcEventLogs.
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400425};
426
427// If media transport factory is set in peer connection factory, it will be
428// used to create media transport for sending/receiving encoded frames and
429// this transport will be used instead of default RTP/SRTP transport.
430//
431// Currently Media Transport negotiation is not supported in SDP.
432// If application is using media transport, it must negotiate it before
433// setting media transport factory in peer connection.
434class MediaTransportFactory {
435 public:
436 virtual ~MediaTransportFactory() = default;
437
438 // Creates media transport.
439 // - Does not take ownership of packet_transport or network_thread.
440 // - Does not support group calls, in 1:1 call one side must set
441 // is_caller = true and another is_caller = false.
Piotr (Peter) Slatalaa0677d12018-10-29 07:31:42 -0700442 // TODO(bugs.webrtc.org/9938) This constructor will be removed and replaced
443 // with the one below.
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400444 virtual RTCErrorOr<std::unique_ptr<MediaTransportInterface>>
445 CreateMediaTransport(rtc::PacketTransportInternal* packet_transport,
446 rtc::Thread* network_thread,
Piotr (Peter) Slatalaa0677d12018-10-29 07:31:42 -0700447 bool is_caller);
448
449 // Creates media transport.
450 // - Does not take ownership of packet_transport or network_thread.
451 // TODO(bugs.webrtc.org/9938): remove default implementation once all children
452 // override it.
453 virtual RTCErrorOr<std::unique_ptr<MediaTransportInterface>>
454 CreateMediaTransport(rtc::PacketTransportInternal* packet_transport,
455 rtc::Thread* network_thread,
Piotr (Peter) Slatalaed7b8b12018-10-29 10:43:16 -0700456 const MediaTransportSettings& settings);
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400457};
458
459} // namespace webrtc
Anton Sukhanovf60bd4b2018-09-05 13:41:46 -0400460#endif // API_MEDIA_TRANSPORT_INTERFACE_H_