Expose bitrate_priority and network_priority in Android API.
BUG=webrtc:5658 Change-Id: Ie4fcad0a379bed17c41efffde044fa51f51a14b1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168360 Commit-Queue: Taylor <deadbeef@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30861}
This commit is contained in:
committed by
Commit Bot
parent
ea6ae4a323
commit
e3a294c2d6
@ -50,6 +50,19 @@ public class RtpParameters {
|
||||
// Set to true to cause this encoding to be sent, and false for it not to
|
||||
// be sent.
|
||||
public boolean active = true;
|
||||
// The relative bitrate priority of this encoding. Currently this is
|
||||
// implemented for the entire RTP sender by using the value of the first
|
||||
// encoding parameter.
|
||||
// See: https://w3c.github.io/webrtc-priority/#enumdef-rtcprioritytype
|
||||
// "very-low" = 0.5
|
||||
// "low" = 1.0
|
||||
// "medium" = 2.0
|
||||
// "high" = 4.0
|
||||
public double bitratePriority = 1.0;
|
||||
// The relative DiffServ Code Point priority for this encoding, allowing
|
||||
// packets to be marked relatively higher or lower without affecting
|
||||
// bandwidth allocations.
|
||||
@Priority public int networkPriority = Priority.LOW;
|
||||
// If non-null, this represents the Transport Independent Application
|
||||
// Specific maximum bandwidth defined in RFC3890. If null, there is no
|
||||
// maximum bitrate.
|
||||
@ -75,10 +88,13 @@ public class RtpParameters {
|
||||
}
|
||||
|
||||
@CalledByNative("Encoding")
|
||||
Encoding(String rid, boolean active, Integer maxBitrateBps, Integer minBitrateBps,
|
||||
Integer maxFramerate, Integer numTemporalLayers, Double scaleResolutionDownBy, Long ssrc) {
|
||||
Encoding(String rid, boolean active, double bitratePriority, @Priority int networkPriority,
|
||||
Integer maxBitrateBps, Integer minBitrateBps, Integer maxFramerate,
|
||||
Integer numTemporalLayers, Double scaleResolutionDownBy, Long ssrc) {
|
||||
this.rid = rid;
|
||||
this.active = active;
|
||||
this.bitratePriority = bitratePriority;
|
||||
this.networkPriority = networkPriority;
|
||||
this.maxBitrateBps = maxBitrateBps;
|
||||
this.minBitrateBps = minBitrateBps;
|
||||
this.maxFramerate = maxFramerate;
|
||||
@ -98,6 +114,17 @@ public class RtpParameters {
|
||||
return active;
|
||||
}
|
||||
|
||||
@CalledByNative("Encoding")
|
||||
double getBitratePriority() {
|
||||
return bitratePriority;
|
||||
}
|
||||
|
||||
@CalledByNative("Encoding")
|
||||
@Priority
|
||||
int getNetworkPriority() {
|
||||
return networkPriority;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@CalledByNative("Encoding")
|
||||
Integer getMaxBitrateBps() {
|
||||
|
||||
Reference in New Issue
Block a user