Adds PeerConnectionDependencies to Java API.

This change adds the base PeerConnectionDependencies structure available in the
native API to the Java API. This changelist only adds the API for the
PeerConnection.Observer which is currently the only mandatory parameter. In
a following CL this will be extended to include the SSLCertificateVerifier
allowing java code to provide an implementation of this.

Bug: webrtc:7913
Change-Id: I74c2e46988ed5cb0685ed907c1bff43867f2c48c
Reviewed-on: https://webrtc-review.googlesource.com/86180
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23892}
This commit is contained in:
Benjamin Wright
2018-07-03 13:28:34 -07:00
committed by Commit Bot
parent eed6ea4a1f
commit 728b9b564d
3 changed files with 56 additions and 0 deletions

View File

@ -349,6 +349,12 @@ public class PeerConnectionFactory {
return createPeerConnection(rtcConfig, null /* constraints */, observer);
}
@Nullable
public PeerConnection createPeerConnection(
PeerConnection.RTCConfiguration rtcConfig, PeerConnectionDependencies dependencies) {
return createPeerConnection(rtcConfig, null /* constraints */, dependencies.getObserver());
}
public MediaStream createLocalMediaStream(String label) {
return new MediaStream(nativeCreateLocalMediaStream(nativeFactory, label));
}