Add create function for PeerConnection that can return an error.
Needed in order to return different codes for different failures
in initialization.
Sideswipe: Check TURN URL hostnames for illegal characters.
Bug: webrtc:12238
Change-Id: I1af3a37b9654b83b268304f7356049f9f3786b7a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195541
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32710}
diff --git a/api/peer_connection_interface.cc b/api/peer_connection_interface.cc
index f82e84b..e1d94dd 100644
--- a/api/peer_connection_interface.cc
+++ b/api/peer_connection_interface.cc
@@ -87,6 +87,13 @@
return nullptr;
}
+RTCErrorOr<rtc::scoped_refptr<PeerConnectionInterface>>
+PeerConnectionFactoryInterface::CreatePeerConnectionOrError(
+ const PeerConnectionInterface::RTCConfiguration& configuration,
+ PeerConnectionDependencies dependencies) {
+ return RTCError(RTCErrorType::INTERNAL_ERROR);
+}
+
RtpCapabilities PeerConnectionFactoryInterface::GetRtpSenderCapabilities(
cricket::MediaType kind) const {
return {};