Android: Deprecate peerconnection constraints.
C++ API allows passing all configuration through RTCConfiguration object. This adds all values previously passed through PC constraints to Java RTCConfiguration object and deprecates API that takes PC contraints. Using the deprecated API overrides the values in RTCConfigration object. Bug: webrtc:8663, webrtc:8662 Change-Id: I128432c3caba74403513fb1347ff58830c643885 Reviewed-on: https://webrtc-review.googlesource.com/33460 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21357}
This commit is contained in:
committed by
Commit Bot
parent
ecb5e2a4b9
commit
e8b26cd86b
@ -219,6 +219,11 @@ public class PeerConnectionFactory {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated. PeerConnection constraints are deprecated. Supply values in rtcConfig struct
|
||||
* instead and use the method without constraints in the signature.
|
||||
*/
|
||||
@Deprecated
|
||||
public PeerConnection createPeerConnection(PeerConnection.RTCConfiguration rtcConfig,
|
||||
MediaConstraints constraints, PeerConnection.Observer observer) {
|
||||
long nativeObserver = createNativeObserver(observer);
|
||||
@ -233,12 +238,28 @@ public class PeerConnectionFactory {
|
||||
return new PeerConnection(nativePeerConnection, nativeObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated. PeerConnection constraints are deprecated. Supply values in rtcConfig struct
|
||||
* instead and use the method without constraints in the signature.
|
||||
*/
|
||||
@Deprecated
|
||||
public PeerConnection createPeerConnection(List<PeerConnection.IceServer> iceServers,
|
||||
MediaConstraints constraints, PeerConnection.Observer observer) {
|
||||
PeerConnection.RTCConfiguration rtcConfig = new PeerConnection.RTCConfiguration(iceServers);
|
||||
return createPeerConnection(rtcConfig, constraints, observer);
|
||||
}
|
||||
|
||||
public PeerConnection createPeerConnection(
|
||||
List<PeerConnection.IceServer> iceServers, PeerConnection.Observer observer) {
|
||||
PeerConnection.RTCConfiguration rtcConfig = new PeerConnection.RTCConfiguration(iceServers);
|
||||
return createPeerConnection(rtcConfig, observer);
|
||||
}
|
||||
|
||||
public PeerConnection createPeerConnection(
|
||||
PeerConnection.RTCConfiguration rtcConfig, PeerConnection.Observer observer) {
|
||||
return createPeerConnection(rtcConfig, null /* constraints */, observer);
|
||||
}
|
||||
|
||||
public MediaStream createLocalMediaStream(String label) {
|
||||
return new MediaStream(createNativeLocalMediaStream(nativeFactory, label));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user