Add ::Connect method to the media transport interface

In order to enable ::Connect method, we also need to split the factory and create a method that creates media transport, but doesn't connect it.

So far media transport was connecting right away after creation. We would however want to expose some of the settings in SDP. SDP is created before connection is connected (and before ICE transport is created), and so we would like to be able to get the settings from the caller to the callee.

Bug: webrtc:9719
Change-Id: I1dc2f30c9a2dae8b3db04f14c8b334cd1b3ab5ab
Reviewed-on: https://webrtc-review.googlesource.com/c/124517
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26863}
This commit is contained in:
Piotr (Peter) Slatala
2019-02-26 12:08:27 -08:00
committed by Commit Bot
parent 6a7baa7d0f
commit d6f61dd787
2 changed files with 62 additions and 0 deletions

View File

@ -41,9 +41,28 @@ MediaTransportFactory::CreateMediaTransport(
return std::unique_ptr<MediaTransportInterface>(nullptr);
}
RTCErrorOr<std::unique_ptr<MediaTransportInterface>>
MediaTransportFactory::CreateMediaTransport(
rtc::Thread* network_thread,
const MediaTransportSettings& settings) {
return std::unique_ptr<MediaTransportInterface>(nullptr);
}
std::string MediaTransportFactory::GetTransportName() const {
return "";
}
MediaTransportInterface::MediaTransportInterface() = default;
MediaTransportInterface::~MediaTransportInterface() = default;
absl::optional<std::string>
MediaTransportInterface::GetTransportParametersOffer() const {
return absl::nullopt;
}
void MediaTransportInterface::Connect(
rtc::PacketTransportInternal* packet_transport) {}
void MediaTransportInterface::SetKeyFrameRequestCallback(
MediaTransportKeyFrameRequestCallback* callback) {}