Add CreateDatagram to MediaTransportFactory
Bug: webrtc:9719 Change-Id: I6e756d925917f032aa94a221706cd4241085b2a2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137340 Commit-Queue: Anton Sukhanov <sukhanov@webrtc.org> Reviewed-by: Bjorn Mellem <mellem@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27980}
This commit is contained in:
committed by
Commit Bot
parent
9fe1834d5d
commit
6b319e68e9
@ -15,11 +15,12 @@
|
||||
// enable different media transport implementations, including QUIC-based
|
||||
// media transport.
|
||||
|
||||
#include "api/media_transport_interface.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
|
||||
#include "api/datagram_transport_interface.h"
|
||||
#include "api/media_transport_interface.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
MediaTransportSettings::MediaTransportSettings() = default;
|
||||
@ -48,6 +49,13 @@ MediaTransportFactory::CreateMediaTransport(
|
||||
return std::unique_ptr<MediaTransportInterface>(nullptr);
|
||||
}
|
||||
|
||||
RTCErrorOr<std::unique_ptr<DatagramTransportInterface>>
|
||||
MediaTransportFactory::CreateDatagramTransport(
|
||||
rtc::Thread* network_thread,
|
||||
const MediaTransportSettings& settings) {
|
||||
return std::unique_ptr<DatagramTransportInterface>(nullptr);
|
||||
}
|
||||
|
||||
std::string MediaTransportFactory::GetTransportName() const {
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -39,6 +39,7 @@ class Thread;
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class DatagramTransportInterface;
|
||||
class RtcEventLog;
|
||||
|
||||
class AudioPacketReceivedObserver {
|
||||
@ -382,6 +383,17 @@ class MediaTransportFactory {
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user