protected static final class MediaPresentationDescriptionParser.ContentProtectionsBuilder extends java.lang.Object implements java.util.Comparator<ContentProtection>
ContentProtection
elements for an AdaptationSet
.
If child Representation elements contain ContentProtection elements, then it is required that they all define the same ones. If they do, the ContentProtection elements are bubbled up to the AdaptationSet. Child Representation elements defining different ContentProtection elements is considered an error.
Modifier | Constructor and Description |
---|---|
protected |
ContentProtectionsBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
addAdaptationSetProtection(ContentProtection contentProtection)
Adds a
ContentProtection found in the AdaptationSet element. |
void |
addRepresentationProtection(ContentProtection contentProtection)
Adds a
ContentProtection found in a child Representation element. |
java.util.ArrayList<ContentProtection> |
build()
Returns the final list of consistent
ContentProtection elements. |
int |
compare(ContentProtection first,
ContentProtection second) |
void |
endRepresentation()
Should be invoked after processing each child Representation element, in order to apply
consistency checks.
|
public void addAdaptationSetProtection(ContentProtection contentProtection)
ContentProtection
found in the AdaptationSet element.contentProtection
- The ContentProtection
to add.public void addRepresentationProtection(ContentProtection contentProtection)
ContentProtection
found in a child Representation element.contentProtection
- The ContentProtection
to add.public void endRepresentation()
public java.util.ArrayList<ContentProtection> build()
ContentProtection
elements.public int compare(ContentProtection first, ContentProtection second)
compare
in interface java.util.Comparator<ContentProtection>