Add bindings for simulcast and RIDs in Android SDK.
This adds the bindings for rid in RtpParameters.Encoding and bindings for send_encodings in RtpTransceiverInit to allow creating a transceiver with multiple send encodings. Bug: webrtc:10464 Change-Id: I4c205dc0f466768c63b7efcb3c68e93277236da0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128960 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Seth Hampson <shampson@webrtc.org> Commit-Queue: Amit Hilbuch <amithi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27323}
This commit is contained in:
@ -12,6 +12,7 @@ package org.webrtc;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
import java.lang.Double;
|
||||
import java.lang.String;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -28,6 +29,9 @@ import org.webrtc.MediaStreamTrack;
|
||||
*/
|
||||
public class RtpParameters {
|
||||
public static class Encoding {
|
||||
// If non-null, this represents the RID that identifies this encoding layer.
|
||||
// RIDs are used to identify layers in simulcast.
|
||||
@Nullable public String rid;
|
||||
// Set to true to cause this encoding to be sent, and false for it not to
|
||||
// be sent.
|
||||
public boolean active = true;
|
||||
@ -48,9 +52,17 @@ public class RtpParameters {
|
||||
// Can't be changed between getParameters/setParameters.
|
||||
public Long ssrc;
|
||||
|
||||
// This constructor is useful for creating simulcast layers.
|
||||
Encoding(String rid, boolean active, Double scaleResolutionDownBy) {
|
||||
this.rid = rid;
|
||||
this.active = active;
|
||||
this.scaleResolutionDownBy = scaleResolutionDownBy;
|
||||
}
|
||||
|
||||
@CalledByNative("Encoding")
|
||||
Encoding(boolean active, Integer maxBitrateBps, Integer minBitrateBps, Integer maxFramerate,
|
||||
Integer numTemporalLayers, Double scaleResolutionDownBy, Long ssrc) {
|
||||
Encoding(String rid, boolean active, Integer maxBitrateBps, Integer minBitrateBps,
|
||||
Integer maxFramerate, Integer numTemporalLayers, Double scaleResolutionDownBy, Long ssrc) {
|
||||
this.rid = rid;
|
||||
this.active = active;
|
||||
this.maxBitrateBps = maxBitrateBps;
|
||||
this.minBitrateBps = minBitrateBps;
|
||||
@ -60,6 +72,12 @@ public class RtpParameters {
|
||||
this.ssrc = ssrc;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@CalledByNative("Encoding")
|
||||
String getRid() {
|
||||
return rid;
|
||||
}
|
||||
|
||||
@CalledByNative("Encoding")
|
||||
boolean getActive() {
|
||||
return active;
|
||||
|
||||
Reference in New Issue
Block a user