Deprecate PeerConnectionFactory::CreatePeerConnection
Applications should use CreatePeerConnectionOrError instead. Moved fallback implementations of CreatePeerConnection into the api/peer_connection_interface.h file, so that we do not have to declare these methods in the proxy. Bug: webrtc:12238 Change-Id: I70c56336641c2a108b68446ae41f43409277a584 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217762 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33964}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
91c48f3a16
commit
f33f7a2ada
@ -471,14 +471,14 @@ static jlong JNI_PeerConnectionFactory_CreatePeerConnection(
|
||||
jni, j_sslCertificateVerifier);
|
||||
}
|
||||
|
||||
rtc::scoped_refptr<PeerConnectionInterface> pc =
|
||||
PeerConnectionFactoryFromJava(factory)->CreatePeerConnection(
|
||||
auto result =
|
||||
PeerConnectionFactoryFromJava(factory)->CreatePeerConnectionOrError(
|
||||
rtc_config, std::move(peer_connection_dependencies));
|
||||
if (!pc)
|
||||
if (!result.ok())
|
||||
return 0;
|
||||
|
||||
return jlongFromPointer(
|
||||
new OwnedPeerConnection(pc, std::move(observer), std::move(constraints)));
|
||||
return jlongFromPointer(new OwnedPeerConnection(
|
||||
result.MoveValue(), std::move(observer), std::move(constraints)));
|
||||
}
|
||||
|
||||
static jlong JNI_PeerConnectionFactory_CreateVideoSource(
|
||||
|
||||
Reference in New Issue
Block a user