Add new PeerConnection APIs to the Java SDK.
This adds wrappers to the following native APIs: - SdpSemantics enum added to the RTCConfiguration - RtpTransceiver - PeerConnection.addTrack - PeerConnection.removeTrack - PeerConnection.addTransceiver - PeerConnection.getTransceivers These APIs are used with the new Unified Plan semantics. Bug: webrtc:8869 Change-Id: I19443f3ff7ffc91a139ad8276331f09e57cec554 Reviewed-on: https://webrtc-review.googlesource.com/57800 Commit-Queue: Seth Hampson <shampson@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22317}
This commit is contained in:
@ -88,13 +88,19 @@ public class MediaStream {
|
||||
JniCommon.nativeReleaseRef(nativeStream);
|
||||
}
|
||||
|
||||
// TODO(shampson): Remove this when downstreams have moved to using id() instead.
|
||||
@Deprecated
|
||||
public String label() {
|
||||
return nativeGetLabel(nativeStream);
|
||||
return nativeGetId(nativeStream);
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return nativeGetId(nativeStream);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[" + label() + ":A=" + audioTracks.size() + ":V=" + videoTracks.size() + "]";
|
||||
return "[" + getId() + ":A=" + audioTracks.size() + ":V=" + videoTracks.size() + "]";
|
||||
}
|
||||
|
||||
@CalledByNative
|
||||
@ -137,5 +143,5 @@ public class MediaStream {
|
||||
long stream, long nativeVideoTrack);
|
||||
private static native boolean nativeRemoveAudioTrack(long stream, long nativeAudioTrack);
|
||||
private static native boolean nativeRemoveVideoTrack(long stream, long nativeVideoTrack);
|
||||
private static native String nativeGetLabel(long stream);
|
||||
private static native String nativeGetId(long stream);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user