Interface ICencDRMInfo
- 
- All Known Subinterfaces:
- ICencDRMInfo2
 
 public interface ICencDRMInfoInterface 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). 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeserialize(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.StringgetMPEGDashCPSubElements(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.StringgetNameSpaces()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.StringgetSystemId()Returns the DRM system id.StringgetSystemName()Returns a string defining the DRM system name.StringgetURL()Returns the license acquisition URL.booleanisComplete()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.voidsetPsshData(byte[] psshData)Sets the DRM system-specific binary data associated with the encryption of the media.voidsetSystemId(String systemId)Sets the DRM system id.voidsetURL(String url)Sets the license acquisition URL.booleansupportsKeyGeneration()Verifies whether dynamic key generation is supported.voidupdateKeyInfo(byte[] KID, byte[] contentKey)Sets the new key id and a 128-bit content key values for use in AES encryption.
 
- 
- 
- 
Method Detail- 
setSystemIdvoid setSystemId(String systemId) Sets the DRM system id.Example: "12345678-1234-1234-1234-123456789012" - Parameters:
- systemId- DRM system id
 
 - 
getSystemIdString getSystemId() Returns the DRM system id.- Returns:
- DRM system id string
 
 - 
getURLString getURL() Returns the license acquisition URL.- Returns:
- license acquisition URL string
 
 - 
setURLvoid setURL(String url) Sets the license acquisition URL.Example: "http://www.mycompany.com/sdrm/rightsmanager.asmx" - Parameters:
- url- license acquisition URL string
 
 - 
getNameSpacesString 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.Example: xmlns:sdrma="urn:mycompany:superdrm:a" xmlns:sdrmb="urn:mycompany:superdrm:b"- Returns:
- zero or more xml name space strings separate by spaces, with a "" or 'null' return indicating no custom namespaces
 
 - 
getMPEGDashCPSubElementsString 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. The element would typically contain Base64-encoded system-specific metadata.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>- Parameters:
- keyRotation- indicates whether key rotation is enabled
- Returns:
- string defining the MPEG-DASH ContentProtection sub-elements
 
 - 
getSystemNameString getSystemName() Returns a string defining the DRM system name. This string would be used as the value of the value attribute in the ContentProtection element that defines the DRM system in an MPEG-DASH MPD.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>- Returns:
- string defining the DRM system name
 
 - 
supportsKeyGenerationboolean supportsKeyGeneration() Verifies whether dynamic key generation is supported. This capability is only required for dynamic random key rotation support.- Returns:
- true if dynamic key generation is supported, else false
- See Also:
- generateKey(byte[] KID)
 
 - 
generateKeybyte[] generateKey(byte[] KID) Generates a 128-bit content key for use in AES encryption. Support for this method is only required when dynamic random key generation & rotation is supported.- Parameters:
- KID- key id for which a content key should be generated
- Returns:
- byte buffer containing the generated content key, or null if not supported
- See Also:
- supportsKeyGeneration()
 
 - 
updateKeyInfovoid updateKeyInfo(byte[] KID, byte[] contentKey)Sets the new key id and a 128-bit content key values for use in AES encryption. Support for this method is only required in a Common Encryption scenario where dynamic random key generation & rotation is supported.- Parameters:
- KID- new key id in effect
- contentKey- new content key in effect
- See Also:
- supportsKeyGeneration()
 
 - 
serializebyte[] 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.- Returns:
- byte buffer containing a serialized representation of the class
- See Also:
- deserialize(byte[] data)
 
 - 
deserializevoid deserialize(byte[] data) Sets all internal class data by deserializing the data from the provided byte buffer representation of the class.- Parameters:
- data- byte buffer containing the serialized representation of the class
- See Also:
- serialize()
 
 - 
getPsshDatabyte[] getPsshData(boolean keyRotation) Returns the DRM system-specific binary data associated with the encryption of the media. This data will be inserted into an ISOBMFF pssh box and identified by the associated systemId.- Parameters:
- keyRotation- indicates whether key rotation is enabled
- Returns:
- byte buffer containing the DRM system-specific binary data for the pssh box
 
 - 
setPsshDatavoid setPsshData(byte[] psshData) Sets the DRM system-specific binary data associated with the encryption of the media. This data will be inserted into an ISOBMFF pssh box and identified by the associated systemId.- Parameters:
- psshData- DRM system-specific binary data for the pssh box
 
 - 
isCompleteboolean isComplete() Verifies whether all required class parameters have been set, such as systemId.- Returns:
- true if all required class parameters have been set, else false
 
 
- 
 
-