Add UseMediaTransport RTCConfiguration support in Java class

Bug: webrtc:9719
Change-Id: I122657f37377f2c3f4f70bf3d9dd0909e2d97e3d
Reviewed-on: https://webrtc-review.googlesource.com/c/106460
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25235}
This commit is contained in:
Piotr (Peter) Slatala
2018-10-17 07:22:40 -07:00
committed by Commit Bot
parent 2bff5436f4
commit 09beff2cfd
2 changed files with 14 additions and 0 deletions

View File

@ -462,6 +462,12 @@ public class PeerConnection {
// every offer/answer negotiation.This is only intended to be a workaround for crbug.com/835958
public boolean activeResetSrtpParams;
/*
* Experimental flag that enables a use of media transport. If this is true, the media transport
* factory MUST be provided to the PeerConnectionFactory.
*/
public boolean useMediaTransport;
// TODO(deadbeef): Instead of duplicating the defaults here, we should do
// something to pick up the defaults from C++. The Objective-C equivalent
// of RTCConfiguration does that.
@ -501,6 +507,7 @@ public class PeerConnection {
networkPreference = AdapterType.UNKNOWN;
sdpSemantics = SdpSemantics.PLAN_B;
activeResetSrtpParams = false;
useMediaTransport = false;
}
@CalledByNative("RTCConfiguration")
@ -699,6 +706,11 @@ public class PeerConnection {
boolean getActiveResetSrtpParams() {
return activeResetSrtpParams;
}
@CalledByNative("RTCConfiguration")
boolean getUseMediaTransport() {
return useMediaTransport;
}
};
private final List<MediaStream> localStreams = new ArrayList<>();

View File

@ -244,6 +244,8 @@ void JavaToNativeRTCConfiguration(
rtc_config->sdp_semantics = JavaToNativeSdpSemantics(jni, j_sdp_semantics);
rtc_config->active_reset_srtp_params =
Java_RTCConfiguration_getActiveResetSrtpParams(jni, j_rtc_config);
rtc_config->use_media_transport =
Java_RTCConfiguration_getUseMediaTransport(jni, j_rtc_config);
}
rtc::KeyType GetRtcConfigKeyType(JNIEnv* env,