libgpac
Documentation of the core library of GPAC
|
Data Structures | |
struct | GF_ISMASample |
Enumerations | |
enum | { GF_ISOM_BOX_UUID_PSEC = GF_4CC( 'P', 'S', 'E', 'C' ) , GF_ISOM_BOX_TYPE_SENC = GF_4CC( 's', 'e', 'n', 'c') , GF_ISOM_BOX_TYPE_PSSH = GF_4CC( 'p', 's', 's', 'h') , GF_ISOM_ISMACRYP_SCHEME = GF_4CC( 'i', 'A', 'E', 'C' ) , GF_ISOM_OMADRM_SCHEME = GF_4CC('o','d','k','m') , GF_ISOM_CENC_SCHEME = GF_4CC('c','e','n','c') , GF_ISOM_CBC_SCHEME = GF_4CC('c','b','c','1') , GF_ISOM_ADOBE_SCHEME = GF_4CC('a','d','k','m') , GF_ISOM_CENS_SCHEME = GF_4CC('c','e','n','s') , GF_ISOM_CBCS_SCHEME = GF_4CC('c','b','c','s') , GF_ISOM_PIFF_SCHEME = GF_4CC('p','i','f','f') , GF_ISOM_SVE1_SCHEME = GF_4CC('s','v','e','1') } |
enum | GF_ISOISMACrypFlags { GF_ISOM_ISMA_USE_SEL_ENC = 1 , GF_ISOM_ISMA_IS_ENCRYPTED = 2 } |
Functions | |
Bool | gf_isom_is_track_encrypted (GF_ISOFile *isom_file, u32 trackNumber) |
GF_ISMASample * | gf_isom_ismacryp_new_sample () |
void | gf_isom_ismacryp_delete_sample (GF_ISMASample *samp) |
GF_ISMASample * | gf_isom_ismacryp_sample_from_data (u8 *data, u32 dataLength, Bool use_selective_encryption, u8 KI_length, u8 IV_length) |
GF_ISMASample * | gf_isom_get_ismacryp_sample (GF_ISOFile *isom_file, u32 trackNumber, const GF_ISOSample *samp, u32 sampleDescriptionIndex) |
u32 | gf_isom_is_media_encrypted (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
Bool | gf_isom_is_ismacryp_media (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
Bool | gf_isom_is_omadrm_media (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
GF_Err | gf_isom_get_omadrm_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *outOriginalFormat, u32 *outSchemeType, u32 *outSchemeVersion, const char **outContentID, const char **outRightsIssuerURL, const char **outTextualHeaders, u32 *outTextualHeadersLen, u64 *outPlaintextLength, u32 *outEncryptionType, Bool *outSelectiveEncryption, u32 *outIVLength, u32 *outKeyIndicationLength) |
GF_Err | gf_isom_get_ismacryp_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *outOriginalFormat, u32 *outSchemeType, u32 *outSchemeVersion, const char **outSchemeURI, const char **outKMS_URI, Bool *outSelectiveEncryption, u32 *outIVLength, u32 *outKeyIndicationLength) |
GF_Err | gf_isom_get_original_format_type (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *outOriginalFormat) |
GF_Err | gf_isom_set_ismacryp_protection (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 scheme_type, u32 scheme_version, char *scheme_uri, char *kms_URI, Bool selective_encryption, u32 KI_length, u32 IV_length) |
GF_Err | gf_isom_change_ismacryp_protection (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, char *scheme_uri, char *kms_uri) |
GF_Err | gf_isom_set_oma_protection (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, char *contentID, char *kms_URI, u32 encryption_type, u64 plainTextLength, char *textual_headers, u32 textual_headers_len, Bool selective_encryption, u32 KI_length, u32 IV_length) |
GF_Err | gf_isom_set_generic_protection (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 scheme_type, u32 scheme_version, char *scheme_uri, char *kms_URI) |
GF_Err | gf_isom_cenc_allocate_storage (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_piff_allocate_storage (GF_ISOFile *isom_file, u32 trackNumber, u32 AlgorithmID, u8 IV_size, bin128 KID) |
GF_Err | gf_isom_track_cenc_add_sample_info (GF_ISOFile *isom_file, u32 trackNumber, u32 container_type, u8 *buf, u32 len, Bool use_subsamples, Bool use_saio_32bit, Bool is_multi_key) |
GF_Err | gf_isom_set_cenc_protection (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 scheme_type, u32 scheme_version, u32 default_IsEncrypted, u32 default_crypt_byte_block, u32 default_skip_byte_block, u8 *key_info, u32 key_info_size) |
GF_Err | gf_isom_set_cenc_protection_mkey (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 scheme_type, u32 scheme_version, u32 default_IsEncrypted, u32 default_crypt_byte_block, u32 default_skip_byte_block, u8 *key_info, u32 key_info_size) |
GF_Err | gf_cenc_set_pssh (GF_ISOFile *isom_file, bin128 systemID, u32 version, u32 KID_count, bin128 *KID, u8 *data, u32 len, u32 pssh_mode) |
GF_Err | gf_isom_remove_samp_enc_box (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_remove_samp_group_box (GF_ISOFile *isom_file, u32 trackNumber) |
Bool | gf_isom_is_adobe_protection_media (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
GF_Err | gf_isom_get_adobe_protection_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *outOriginalFormat, u32 *outSchemeType, u32 *outSchemeVersion, const char **outMetadata) |
GF_Err | gf_isom_set_adobe_protection (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 scheme_type, u32 scheme_version, Bool is_selective_enc, char *metadata, u32 len) |
Bool | gf_isom_is_cenc_media (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
GF_Err | gf_isom_get_cenc_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *outOriginalFormat, u32 *outSchemeType, u32 *outSchemeVersion) |
GF_Err | gf_isom_cenc_get_sample_aux_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u32 sampleDescIndex, u32 *container_type, u8 **out_buffer, u32 *outSize) |
GF_Err | gf_isom_cenc_get_default_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *container_type, Bool *default_IsEncrypted, u32 *crypt_byte_block, u32 *skip_byte_block, const u8 **key_info, u32 *key_info_size) |
u32 | gf_isom_get_pssh_count (GF_ISOFile *isom_file) |
GF_Err | gf_isom_get_pssh_info (GF_ISOFile *isom_file, u32 pssh_index, bin128 SystemID, u32 *version, u32 *KID_count, const bin128 **KIDs, const u8 **private_data, u32 *private_data_size) |
GF_Err | gf_isom_dump_ismacryp_protection (GF_ISOFile *isom_file, u32 trackNumber, FILE *trace) |
GF_Err | gf_isom_dump_ismacryp_sample (GF_ISOFile *isom_file, u32 trackNumber, u32 SampleNum, FILE *trace) |
GF_Err | gf_isom_get_sample_cenc_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, Bool *IsEncrypted, u32 *crypt_byte_block, u32 *skip_byte_block, const u8 **key_info, u32 *key_info_size) |
struct GF_ISMASample |
ISMA sample
Data Fields | ||
---|---|---|
u64 | IV |
IV in ISMACryp is Byte Stream Offset |
u8 | IV_length |
IV size in bytes, repeated from sampleDesc for convenience |
u8 * | key_indicator |
key indicator |
u8 | KI_length |
key indicator size, repeated from sampleDesc for convenience |
u32 | dataLength |
payload size |
u8 * | data |
payload |
u32 | flags |
flags |
anonymous enum |
DRM related code points
Enumerator | |
---|---|
GF_ISOM_BOX_UUID_PSEC | Storage location of CENC sample auxiliary in PSEC UUID box |
GF_ISOM_BOX_TYPE_SENC | Storage location of CENC sample auxiliary in senc box |
GF_ISOM_BOX_TYPE_PSSH | PSSH box type |
GF_ISOM_ISMACRYP_SCHEME | ISMA Encryption Scheme Type in the SchemeTypeInfoBox |
GF_ISOM_OMADRM_SCHEME | OMA DRM Encryption Scheme Type in the SchemeTypeInfoBox |
GF_ISOM_CENC_SCHEME | CENC AES-CTR Encryption Scheme Type in the SchemeTypeInfoBox |
GF_ISOM_CBC_SCHEME | CENC AES-CBC Encryption Scheme Type in the SchemeTypeInfoBox |
GF_ISOM_ADOBE_SCHEME | Adobe Encryption Scheme Type in the SchemeTypeInfoBox |
GF_ISOM_CENS_SCHEME | CENC AES-CTR Pattern Encryption Scheme Type in the SchemeTypeInfoBox |
GF_ISOM_CBCS_SCHEME | CENC AES-CBC Pattern Encryption Scheme Type in the SchemeTypeInfoBox |
GF_ISOM_PIFF_SCHEME | PIFF Scheme Type in the SchemeTypeInfoBox |
GF_ISOM_SVE1_SCHEME | CENC sensitive encryption |
enum GF_ISOISMACrypFlags |
flags for GF_ISMASample
Enumerator | |
---|---|
GF_ISOM_ISMA_USE_SEL_ENC | signals the stream the sample belongs to uses selective encryption |
GF_ISOM_ISMA_IS_ENCRYPTED | signals the sample is encrypted |
Bool gf_isom_is_track_encrypted | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
checks if a track is encrypted or protected
isom_file | the target ISO file |
trackNumber | the target track |
GF_ISMASample* gf_isom_ismacryp_new_sample | ( | ) |
creates a new empty ISMA sample
void gf_isom_ismacryp_delete_sample | ( | GF_ISMASample * | samp | ) |
delete an ISMA sample.
samp | the target ISMA sample |
GF_ISMASample* gf_isom_ismacryp_sample_from_data | ( | u8 * | data, |
u32 | dataLength, | ||
Bool | use_selective_encryption, | ||
u8 | KI_length, | ||
u8 | IV_length | ||
) |
decodes ISMACryp sample based on all info in ISMACryp sample description
data | sample data |
dataLength | sample data size in bytes |
use_selective_encryption | set to GF_TRUE if sample uses selective encryption |
KI_length | set to the size in bytes of the key indicator - 0 means no key roll |
IV_length | set to the size in bytes of the initialization vector |
GF_ISMASample* gf_isom_get_ismacryp_sample | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
const GF_ISOSample * | samp, | ||
u32 | sampleDescriptionIndex | ||
) |
decodes ISMACryp sample based on sample and its descrition index
isom_file | the target ISO file |
trackNumber | the target track |
samp | the sample to decode |
sampleDescriptionIndex | the sample description index of the sample to decode |
u32 gf_isom_is_media_encrypted | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
checks if sample description is protected or not
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index. If 0, checks all sample descriptions for protected ones |
Bool gf_isom_is_ismacryp_media | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
checks if sample description is protected with ISMACryp
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
Bool gf_isom_is_omadrm_media | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
checks if sample description is protected with OMA DRM
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
GF_Err gf_isom_get_omadrm_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 * | outOriginalFormat, | ||
u32 * | outSchemeType, | ||
u32 * | outSchemeVersion, | ||
const char ** | outContentID, | ||
const char ** | outRightsIssuerURL, | ||
const char ** | outTextualHeaders, | ||
u32 * | outTextualHeadersLen, | ||
u64 * | outPlaintextLength, | ||
u32 * | outEncryptionType, | ||
Bool * | outSelectiveEncryption, | ||
u32 * | outIVLength, | ||
u32 * | outKeyIndicationLength | ||
) |
gets OMA DRM configuration - all output parameters are optional and may be NULL
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
outOriginalFormat | four character code of the unprotected sample description |
outSchemeType | set to four character code of the protection scheme type |
outSchemeVersion | set to scheme protection version |
outContentID | set to associated ID of content |
outRightsIssuerURL | set to the rights issuer (license server) URL |
outTextualHeaders | set to OMA textual headers |
outTextualHeadersLen | set to the size in bytes of OMA textual headers |
outPlaintextLength | set to the size in bytes of clear data in file |
outEncryptionType | set to the OMA encryption type used |
outSelectiveEncryption | set to GF_TRUE if sample description uses selective encryption |
outIVLength | set to the size of the initialization vector |
outKeyIndicationLength | set to the size of the key indicator |
GF_Err gf_isom_get_ismacryp_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 * | outOriginalFormat, | ||
u32 * | outSchemeType, | ||
u32 * | outSchemeVersion, | ||
const char ** | outSchemeURI, | ||
const char ** | outKMS_URI, | ||
Bool * | outSelectiveEncryption, | ||
u32 * | outIVLength, | ||
u32 * | outKeyIndicationLength | ||
) |
retrieves ISMACryp info for the given track & SDI - all output parameters are optional - URIs SHALL NOT BE MODIFIED BY USER
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
outOriginalFormat | set to orginal unprotected media format |
outSchemeType | set to 4CC of protection scheme (GF_ISOM_ISMACRYP_SCHEME = iAEC in ISMACryp 1.0) |
outSchemeVersion | set to version of protection scheme (1 in ISMACryp 1.0) |
outSchemeURI | set to URI location of scheme |
outKMS_URI | set to URI location of key management system - only valid with ISMACryp 1.0 |
outSelectiveEncryption | set to whether sample-based encryption is used in media - only valid with ISMACryp 1.0 |
outIVLength | set to length of Initial Vector - only valid with ISMACryp 1.0 |
outKeyIndicationLength | set to length of key indicator - only valid with ISMACryp 1.0 |
GF_Err gf_isom_get_original_format_type | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 * | outOriginalFormat | ||
) |
gets original format four character code type of a protected media sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index. If 0, checks all sample descriptions for a protected one |
outOriginalFormat | set to orginal unprotected media format |
GF_Err gf_isom_set_ismacryp_protection | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 | scheme_type, | ||
u32 | scheme_version, | ||
char * | scheme_uri, | ||
char * | kms_URI, | ||
Bool | selective_encryption, | ||
u32 | KI_length, | ||
u32 | IV_length | ||
) |
creates ISMACryp protection info for a sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
scheme_type | 4CC of protection scheme (GF_ISOM_ISMACRYP_SCHEME = iAEC in ISMACryp 1.0) |
scheme_version | version of protection scheme (1 in ISMACryp 1.0) |
scheme_uri | URI location of scheme |
kms_URI | URI location of key management system - only valid with ISMACryp 1.0 |
selective_encryption | whether sample-based encryption is used in media - only valid with ISMACryp 1.0 |
KI_length | length of key indicator - only valid with ISMACryp 1.0 |
IV_length | length of Initial Vector - only valid with ISMACryp 1.0 |
GF_Err gf_isom_change_ismacryp_protection | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
char * | scheme_uri, | ||
char * | kms_uri | ||
) |
changes scheme URI and/or KMS URI for crypted files. Other params cannot be changed once the media is crypted
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
scheme_uri | new scheme URI, or NULL to keep previous |
kms_uri | new KMS URI, or NULL to keep previous |
GF_Err gf_isom_set_oma_protection | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
char * | contentID, | ||
char * | kms_URI, | ||
u32 | encryption_type, | ||
u64 | plainTextLength, | ||
char * | textual_headers, | ||
u32 | textual_headers_len, | ||
Bool | selective_encryption, | ||
u32 | KI_length, | ||
u32 | IV_length | ||
) |
creates OMA DRM protection for a sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
contentID | associated ID of content |
kms_URI | the rights issuer (license server) URL |
encryption_type | the OMA encryption type used |
plainTextLength | the size in bytes of clear data in file |
textual_headers | OMA textual headers |
textual_headers_len | the size in bytes of OMA textual headers |
selective_encryption | GF_TRUE if sample description uses selective encryption |
KI_length | the size of the key indicator |
IV_length | the size of the initialization vector |
GF_Err gf_isom_set_generic_protection | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 | scheme_type, | ||
u32 | scheme_version, | ||
char * | scheme_uri, | ||
char * | kms_URI | ||
) |
creates a generic protection for a sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
scheme_type | 4CC of protection scheme (GF_ISOM_ISMACRYP_SCHEME = iAEC in ISMACryp 1.0) |
scheme_version | version of protection scheme (1 in ISMACryp 1.0) |
scheme_uri | URI location of scheme |
kms_URI | the rights issuer (license server) URL |
GF_Err gf_isom_cenc_allocate_storage | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
allocates storage for CENC side data in a senc box
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_piff_allocate_storage | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | AlgorithmID, | ||
u8 | IV_size, | ||
bin128 | KID | ||
) |
allocates storage for CENC side data in a PIFF senc UUID box
isom_file | the target ISO file |
trackNumber | the target track |
AlgorithmID | algorith ID, usually 0 |
IV_size | the size of the init vector |
KID | the default Key ID |
GF_Err gf_isom_track_cenc_add_sample_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | container_type, | ||
u8 * | buf, | ||
u32 | len, | ||
Bool | use_subsamples, | ||
Bool | use_saio_32bit, | ||
Bool | is_multi_key | ||
) |
adds cenc SAI for the last sample added to a track
isom_file | the target ISO file |
trackNumber | the target track |
container_type | the code of the container (currently 'senc' for CENC or 'PSEC' for smooth) |
buf | the SAI buffer |
len | the size of the SAI buffer. If buf is NULL or len is 0, this adds an unencrypted entry (not written to file) |
use_subsamples | if GF_TRUE, the media format uses CENC subsamples |
use_saio_32bit | forces usage of 32-bit saio boxes |
is_multi_key | indicates if multi key is in use (required to tag saio and saiz boxes) |
GF_Err gf_isom_set_cenc_protection | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 | scheme_type, | ||
u32 | scheme_version, | ||
u32 | default_IsEncrypted, | ||
u32 | default_crypt_byte_block, | ||
u32 | default_skip_byte_block, | ||
u8 * | key_info, | ||
u32 | key_info_size | ||
) |
creates CENC protection for a sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
scheme_type | 4CC of protection scheme (GF_ISOM_ISMACRYP_SCHEME = iAEC in ISMACryp 1.0) |
scheme_version | version of protection scheme (1 in ISMACryp 1.0) |
default_IsEncrypted | default isEncrypted flag |
default_crypt_byte_block | default crypt block size for pattern encryption |
default_skip_byte_block | default skip block size for pattern encryption |
key_info | key descriptor formatted as a multi-key info (cf GF_PROP_PID_CENC_KEY) |
key_info_size | key descriptor size |
GF_Err gf_isom_set_cenc_protection_mkey | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 | scheme_type, | ||
u32 | scheme_version, | ||
u32 | default_IsEncrypted, | ||
u32 | default_crypt_byte_block, | ||
u32 | default_skip_byte_block, | ||
u8 * | key_info, | ||
u32 | key_info_size | ||
) |
creates CENC protection for a multi-key sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
scheme_type | 4CC of protection scheme (GF_ISOM_ISMACRYP_SCHEME = iAEC in ISMACryp 1.0) |
scheme_version | version of protection scheme (1 in ISMACryp 1.0) |
default_IsEncrypted | default isEncrypted flag |
default_crypt_byte_block | default crypt block size for pattern encryption |
default_skip_byte_block | default skip block size for pattern encryption |
key_info | key info (cf CENC and GF_PROP_PID_CENC_KEY) |
key_info_size | key info size |
GF_Err gf_cenc_set_pssh | ( | GF_ISOFile * | isom_file, |
bin128 | systemID, | ||
u32 | version, | ||
u32 | KID_count, | ||
bin128 * | KID, | ||
u8 * | data, | ||
u32 | len, | ||
u32 | pssh_mode | ||
) |
adds PSSH info for a file, can be called several time per system ID
isom_file | the target ISO file |
systemID | the ID of the protection system |
version | the version of the protection system |
KID_count | the number of key IDs |
KID | the list of key IDs |
data | opaque data for the protection system |
len | size of the opaque data |
pssh_mode | 0: regular PSSH in moov, 1: PIFF PSSH in moov, 2: regular PSSH in meta |
GF_Err gf_isom_remove_samp_enc_box | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
removes CENC senc box info
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_remove_samp_group_box | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
removes all CENC sample groups
isom_file | the target ISO file |
trackNumber | the target track |
Bool gf_isom_is_adobe_protection_media | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
checks if sample description is protected with Adobe systems
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
GF_Err gf_isom_get_adobe_protection_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 * | outOriginalFormat, | ||
u32 * | outSchemeType, | ||
u32 * | outSchemeVersion, | ||
const char ** | outMetadata | ||
) |
gets adobe protection information for a sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
outOriginalFormat | set to orginal unprotected media format |
outSchemeType | set to 4CC of protection scheme (GF_ISOM_ISMACRYP_SCHEME = iAEC in ISMACryp 1.0) |
outSchemeVersion | set to version of protection scheme (1 in ISMACryp 1.0) |
outMetadata | set to adobe metadata string |
GF_Err gf_isom_set_adobe_protection | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 | scheme_type, | ||
u32 | scheme_version, | ||
Bool | is_selective_enc, | ||
char * | metadata, | ||
u32 | len | ||
) |
creates an adobe protection for a sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
scheme_type | 4CC of protection scheme (GF_ISOM_ISMACRYP_SCHEME = iAEC in ISMACryp 1.0) |
scheme_version | version of protection scheme (1 in ISMACryp 1.0) |
is_selective_enc | indicates if selective encryption is used |
metadata | metadata information |
len | size of metadata information in bytes |
Bool gf_isom_is_cenc_media | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
checks of sample description is protected with CENC
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index. If 0, checks all sample descriptions for protected ones |
GF_Err gf_isom_get_cenc_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 * | outOriginalFormat, | ||
u32 * | outSchemeType, | ||
u32 * | outSchemeVersion | ||
) |
gets CENC information of a sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
outOriginalFormat | set to orginal unprotected media format |
outSchemeType | set to 4CC of protection scheme (GF_ISOM_ISMACRYP_SCHEME = iAEC in ISMACryp 1.0) |
outSchemeVersion | set to version of protection scheme (1 in ISMACryp 1.0) |
GF_Err gf_isom_cenc_get_sample_aux_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u32 | sampleDescIndex, | ||
u32 * | container_type, | ||
u8 ** | out_buffer, | ||
u32 * | outSize | ||
) |
gets CENC auxiliary info of a sample as a buffer
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the target sample |
sampleDescIndex | the sample description index |
container_type | is type of box which contains the sample auxiliary information. Now we have two type: GF_ISOM_BOX_UUID_PSEC and GF_ISOM_BOX_TYPE_SENC |
out_buffer | set to a newly allocated buffer, or reallocated buffer if not NULL |
outSize | set to the size of the serialized buffer. If an existing buffer was passed, the passed value shall be the allocated buffer size (the returned value is still the buffer size) |
GF_Err gf_isom_cenc_get_default_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 * | container_type, | ||
Bool * | default_IsEncrypted, | ||
u32 * | crypt_byte_block, | ||
u32 * | skip_byte_block, | ||
const u8 ** | key_info, | ||
u32 * | key_info_size | ||
) |
gets CENC default info for a sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the sample description index |
container_type | set to the container type of SAI data |
default_IsEncrypted | set to default isEncrypted flag |
crypt_byte_block | set to default crypt block size for pattern encryption |
skip_byte_block | set to default skip block size for pattern encryption |
key_info | set to multikey descriptor (cf CENC and GF_PROP_PID_CENC_KEY) |
key_info_size | set to multikey descriptor size |
u32 gf_isom_get_pssh_count | ( | GF_ISOFile * | isom_file | ) |
gets the number of PSSH defined
isom_file | the target ISO file |
GF_Err gf_isom_get_pssh_info | ( | GF_ISOFile * | isom_file, |
u32 | pssh_index, | ||
bin128 | SystemID, | ||
u32 * | version, | ||
u32 * | KID_count, | ||
const bin128 ** | KIDs, | ||
const u8 ** | private_data, | ||
u32 * | private_data_size | ||
) |
gets PSS info
isom_file | the target ISO file |
pssh_index | 1-based index of PSSH to query, see gf_isom_get_pssh_count |
SystemID | set to the protection system ID |
version | set to the protection system version |
KID_count | set to the number of key IDs defined |
KIDs | array of defined key IDs |
private_data | set to a buffer containing system ID private data |
private_data_size | set to the size of the system ID private data |
GF_Err gf_isom_dump_ismacryp_protection | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
FILE * | trace | ||
) |
dumps ismacrypt protection of sample descriptions to xml trace
isom_file | the target ISO file |
trackNumber | the target track |
trace | the file object to dump to |
GF_Err gf_isom_dump_ismacryp_sample | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | SampleNum, | ||
FILE * | trace | ||
) |
dumps ismacrypt sample to xml trace
isom_file | the target ISO file |
trackNumber | the target track |
SampleNum | the target sample number |
trace | the file object to dump to |
GF_Err gf_isom_get_sample_cenc_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
Bool * | IsEncrypted, | ||
u32 * | crypt_byte_block, | ||
u32 * | skip_byte_block, | ||
const u8 ** | key_info, | ||
u32 * | key_info_size | ||
) |
gets CENC configuration for a given sample
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the target sample number |
IsEncrypted | set to GF_TRUE if the sample is encrypted, GF_FALSE otherwise (optional can be NULL) |
crypt_byte_block | set to crypt block count for pattern encryption (optional can be NULL) |
skip_byte_block | set to skip block count for pattern encryption (optional can be NULL) |
key_info | set to key descriptor (cf GF_PROP_PID_CENC_KEY) |
key_info_size | set to key descriptor size |