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}
This commit is contained in:
committed by
Commit Bot
parent
c22ac1cc60
commit
a3dd772e7a
@ -1428,6 +1428,12 @@ class RTC_EXPORT PeerConnectionFactoryInterface
|
||||
// configuration and a PeerConnectionDependencies structure.
|
||||
// TODO(benwright): Make pure virtual once downstream mock PC factory classes
|
||||
// are updated.
|
||||
virtual RTCErrorOr<rtc::scoped_refptr<PeerConnectionInterface>>
|
||||
CreatePeerConnectionOrError(
|
||||
const PeerConnectionInterface::RTCConfiguration& configuration,
|
||||
PeerConnectionDependencies dependencies);
|
||||
// Deprecated creator - does not return an error code on error.
|
||||
// TODO(bugs.webrtc.org:12238): Deprecate and remove.
|
||||
virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection(
|
||||
const PeerConnectionInterface::RTCConfiguration& configuration,
|
||||
PeerConnectionDependencies dependencies);
|
||||
|
||||
Reference in New Issue
Block a user