Add HeaderExtensions to RtpParameters
Bug: webrtc:7580 Change-Id: I4fcf3e8bc4975a6b2baa6f24a17c254d2bf521d9 Reviewed-on: https://webrtc-review.googlesource.com/78288 Commit-Queue: Florent Castelli <orphis@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Anders Carlsson <andersc@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23584}
This commit is contained in:
committed by
Commit Bot
parent
867e510ef5
commit
abe301fe6c
@ -150,10 +150,43 @@ public class RtpParameters {
|
||||
}
|
||||
}
|
||||
|
||||
public static class HeaderExtension {
|
||||
/** The URI of the RTP header extension, as defined in RFC5285. */
|
||||
private final String uri;
|
||||
/** The value put in the RTP packet to identify the header extension. */
|
||||
private final int id;
|
||||
/** Whether the header extension is encrypted or not. */
|
||||
private final boolean encrypted;
|
||||
|
||||
@CalledByNative("HeaderExtension")
|
||||
HeaderExtension(String uri, int id, boolean encrypted) {
|
||||
this.uri = uri;
|
||||
this.id = id;
|
||||
this.encrypted = encrypted;
|
||||
}
|
||||
|
||||
@CalledByNative("HeaderExtension")
|
||||
public String getUri() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
@CalledByNative("HeaderExtension")
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@CalledByNative("HeaderExtension")
|
||||
public boolean getEncrypted() {
|
||||
return encrypted;
|
||||
}
|
||||
}
|
||||
|
||||
public final String transactionId;
|
||||
|
||||
private final Rtcp rtcp;
|
||||
|
||||
private final List<HeaderExtension> headerExtensions;
|
||||
|
||||
public final List<Encoding> encodings;
|
||||
// Codec parameters can't currently be changed between getParameters and
|
||||
// setParameters. Though in the future it will be possible to reorder them or
|
||||
@ -161,9 +194,11 @@ public class RtpParameters {
|
||||
public final List<Codec> codecs;
|
||||
|
||||
@CalledByNative
|
||||
RtpParameters(String transactionId, Rtcp rtcp, List<Encoding> encodings, List<Codec> codecs) {
|
||||
RtpParameters(String transactionId, Rtcp rtcp, List<HeaderExtension> headerExtensions,
|
||||
List<Encoding> encodings, List<Codec> codecs) {
|
||||
this.transactionId = transactionId;
|
||||
this.rtcp = rtcp;
|
||||
this.headerExtensions = headerExtensions;
|
||||
this.encodings = encodings;
|
||||
this.codecs = codecs;
|
||||
}
|
||||
@ -178,6 +213,11 @@ public class RtpParameters {
|
||||
return rtcp;
|
||||
}
|
||||
|
||||
@CalledByNative
|
||||
public List<HeaderExtension> getHeaderExtensions() {
|
||||
return headerExtensions;
|
||||
}
|
||||
|
||||
@CalledByNative
|
||||
List<Encoding> getEncodings() {
|
||||
return encodings;
|
||||
|
||||
Reference in New Issue
Block a user