Implement read-only codecPayloadType in RtpParameters

Bug: webrtc:7580
Change-Id: I6d901afa97262b6c6d9fe6c7366df465ec77bfb3
Reviewed-on: https://webrtc-review.googlesource.com/c/113944
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25993}
This commit is contained in:
Florent Castelli
2018-12-12 11:56:42 +01:00
committed by Commit Bot
parent f7f13e0742
commit 806e06d136
13 changed files with 108 additions and 38 deletions

View File

@ -30,6 +30,9 @@ 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 payloadType of the codec used by the sender.
// Can't be changed between getParameters/setParameters.
@Nullable public Integer codecPayloadType;
// If non-null, this represents the Transport Independent Application
// Specific maximum bandwidth defined in RFC3890. If null, there is no
// maximum bitrate.
@ -45,9 +48,10 @@ public class RtpParameters {
public Long ssrc;
@CalledByNative("Encoding")
Encoding(boolean active, Integer maxBitrateBps, Integer minBitrateBps, Integer maxFramerate,
Integer numTemporalLayers, Long ssrc) {
Encoding(boolean active, Integer codecPayloadType, Integer maxBitrateBps, Integer minBitrateBps,
Integer maxFramerate, Integer numTemporalLayers, Long ssrc) {
this.active = active;
this.codecPayloadType = codecPayloadType;
this.maxBitrateBps = maxBitrateBps;
this.minBitrateBps = minBitrateBps;
this.maxFramerate = maxFramerate;
@ -55,6 +59,12 @@ public class RtpParameters {
this.ssrc = ssrc;
}
@Nullable
@CalledByNative("Encoding")
Integer getCodecPayloadType() {
return codecPayloadType;
}
@CalledByNative("Encoding")
boolean getActive() {
return active;