ICencDRMInfo2public interface ICencDRMInfo
Interface for Common Encryption (CENC) DRM information classes. DRM system-specific metadata can be attached to a stream's CENC data to indicate that a stream or a media segment within that stream is protected by the particular DRM system, and may be authorized and decrypted by a player client using the provided DRM system metadata. The metadata provided by classes implementing ICencDRMInfo is inserted into a stream's manifest and/or fragment files. CENC DRM support is in accordance with the Common Encryption standard (ISO/IEC 23001-7).
| Modifier and Type | Method | Description |
|---|---|---|
void |
deserialize(byte[] data) |
Sets all internal class data by deserializing the data from the provided byte buffer representation of the class.
|
byte[] |
generateKey(byte[] KID) |
Generates a 128-bit content key for use in AES encryption.
|
String |
getMPEGDashCPSubElements(boolean keyRotation) |
Returns a string defining zero or more custom xml elements to be inserted as sub-elements to the ContentProtection element that
defines the DRM system in an MPEG-DASH MPD.
|
String |
getNameSpaces() |
Returns a string defining zero or more custom xml name space strings to be inserted into an xml-formatted manifest, such as an MPEG-DASH MPD.
|
byte[] |
getPsshData(boolean keyRotation) |
Returns the DRM system-specific binary data associated with the encryption of the media.
|
String |
getSystemId() |
Returns the DRM system id.
|
String |
getSystemName() |
Returns a string defining the DRM system name.
|
String |
getURL() |
Returns the license acquisition URL.
|
boolean |
isComplete() |
Verifies whether all required class parameters have been set, such as systemId.
|
byte[] |
serialize() |
Returns a byte buffer with a serialized representation of the class, which could later be reconstituted back into the class via the
deserialize method.
|
void |
setPsshData(byte[] psshData) |
Sets the DRM system-specific binary data associated with the encryption of the media.
|
void |
setSystemId(String systemId) |
Sets the DRM system id.
|
void |
setURL(String url) |
Sets the license acquisition URL.
|
boolean |
supportsKeyGeneration() |
Verifies whether dynamic key generation is supported.
|
void |
updateKeyInfo(byte[] KID,
byte[] contentKey) |
Sets the new key id and a 128-bit content key values for use in AES encryption.
|
void deserialize(byte[] data)
data - byte buffer containing the serialized representation of the classserialize()byte[] generateKey(byte[] KID)
KID - key id for which a content key should be generatedsupportsKeyGeneration()String getMPEGDashCPSubElements(boolean keyRotation)
Example: <sdrma:hdr><!-- base64-encoded data --></sdrma:hdr>
The resulting ContentProtection element would look something like:
<ContentProtection schemeIdUri="urn:uuid:12345678-1234-1234-1234-123456789012" value="SuperDRM">
<sdrma:hdr><!-- base64-encoded data --></sdrma:hdr>
</ContentProtection>
keyRotation - indicates whether key rotation is enabledString getNameSpaces()
Example: xmlns:sdrma="urn:mycompany:superdrm:a" xmlns:sdrmb="urn:mycompany:superdrm:b"
byte[] getPsshData(boolean keyRotation)
keyRotation - indicates whether key rotation is enabledString getSystemId()
String getSystemName()
Example: "SuperDRM"
The resulting ContentProtection element in an MPEG-DASH MPD would look something like:
<ContentProtection schemeIdUri="urn:uuid:12345678-1234-1234-1234-123456789012" value="SuperDRM">
<sdrma:hdr><!-- base64-encoded data --></sdrma:hdr>
</ContentProtection>
String getURL()
boolean isComplete()
byte[] serialize()
deserialize(byte[] data)void setPsshData(byte[] psshData)
psshData - DRM system-specific binary data for the pssh boxvoid setSystemId(String systemId)
Example: "12345678-1234-1234-1234-123456789012"
systemId - DRM system idvoid setURL(String url)
Example: "http://www.mycompany.com/sdrm/rightsmanager.asmx"
url - license acquisition URL stringboolean supportsKeyGeneration()
generateKey(byte[] KID)void updateKeyInfo(byte[] KID,
byte[] contentKey)
KID - new key id in effectcontentKey - new content key in effectsupportsKeyGeneration()