libgpac
Documentation of the core library of GPAC
drm_sample.c File Reference
+ Include dependency graph for drm_sample.c:

Functions

GF_ISMASamplegf_isom_ismacryp_new_sample ()
 
GF_EXPORT void gf_isom_ismacryp_delete_sample (GF_ISMASample *samp)
 
GF_ISMASamplegf_isom_ismacryp_sample_from_data (u8 *data, u32 dataLength, Bool use_selective_encryption, u8 KI_length, u8 IV_length)
 
static GF_ProtectionSchemeInfoBoxisom_get_sinf_entry (GF_TrackBox *trak, u32 sampleDescriptionIndex, u32 scheme_type, GF_SampleEntryBox **out_sea)
 
GF_EXPORT GF_ISMASamplegf_isom_get_ismacryp_sample (GF_ISOFile *the_file, u32 trackNumber, const GF_ISOSample *samp, u32 sampleDescriptionIndex)
 
GF_EXPORT u32 gf_isom_is_media_encrypted (GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_EXPORT Bool gf_isom_is_ismacryp_media (GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_EXPORT Bool gf_isom_is_omadrm_media (GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_EXPORT GF_Err gf_isom_get_ismacryp_info (GF_ISOFile *the_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_EXPORT GF_Err gf_isom_get_omadrm_info (GF_ISOFile *the_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_EXPORT GF_Err gf_isom_change_ismacryp_protection (GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex, char *scheme_uri, char *kms_uri)
 
static GF_Err isom_set_protected_entry (GF_ISOFile *the_file, u32 trackNumber, u32 desc_index, u8 version, u32 flags, u32 scheme_type, u32 scheme_version, char *scheme_uri, Bool is_isma, GF_ProtectionSchemeInfoBox **out_sinf)
 
GF_EXPORT GF_Err gf_isom_set_ismacryp_protection (GF_ISOFile *the_file, u32 trackNumber, u32 desc_index, 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_set_oma_protection (GF_ISOFile *the_file, u32 trackNumber, u32 desc_index, 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 *the_file, u32 trackNumber, u32 desc_index, u32 scheme_type, u32 scheme_version, char *scheme_uri, char *kms_URI)
 
GF_EXPORT GF_Err gf_isom_get_original_format_type (GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *outOriginalFormat)
 
GF_EXPORT Bool gf_isom_is_cenc_media (GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_EXPORT GF_Err gf_isom_get_cenc_info (GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *outOriginalFormat, u32 *outSchemeType, u32 *outSchemeVersion)
 
GF_Err gf_isom_set_cenc_protection (GF_ISOFile *the_file, u32 trackNumber, u32 desc_index, 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 *file, bin128 systemID, u32 version, u32 KID_count, bin128 *KIDs, u8 *data, u32 len, u32 pssh_mode)
 
GF_Err gf_isom_remove_samp_enc_box (GF_ISOFile *the_file, u32 trackNumber)
 
GF_Err gf_isom_remove_samp_group_box (GF_ISOFile *the_file, u32 trackNumber)
 
GF_SampleEncryptionBoxgf_isom_create_piff_psec_box (u8 version, u32 flags, u32 AlgorithmID, u8 IV_size, bin128 KID)
 
GF_SampleEncryptionBoxgf_isom_create_samp_enc_box (u8 version, u32 flags)
 
GF_Err gf_isom_cenc_allocate_storage (GF_ISOFile *the_file, u32 trackNumber)
 
GF_Err gf_isom_piff_allocate_storage (GF_ISOFile *the_file, u32 trackNumber, u32 AlgorithmID, u8 IV_size, bin128 KID)
 
void gf_isom_cenc_set_saiz_saio (GF_SampleEncryptionBox *senc, GF_SampleTableBox *stbl, GF_TrackFragmentBox *traf, u32 len, Bool saio_32bits, Bool use_multikey)
 
GF_Err gf_isom_cenc_merge_saiz_saio (GF_SampleEncryptionBox *senc, GF_SampleTableBox *stbl, u32 sample_number, u64 offset, u32 len)
 
GF_Err gf_isom_track_cenc_add_sample_info (GF_ISOFile *the_file, u32 trackNumber, u32 container_type, u8 *buf, u32 len, Bool use_subsamples, Bool use_saio_32bit, Bool use_multikey)
 
GF_EXPORT void gf_isom_cenc_samp_aux_info_del (GF_CENCSampleAuxInfo *samp)
 
Bool gf_isom_cenc_has_saiz_saio_full (GF_SampleTableBox *stbl, void *_traf, u32 scheme_type)
 
Bool gf_isom_cenc_has_saiz_saio_track (GF_SampleTableBox *stbl, u32 scheme_type)
 
Bool gf_isom_cenc_has_saiz_saio_traf (GF_TrackFragmentBox *traf, u32 scheme_type)
 
static GF_Err isom_cenc_get_sai_by_saiz_saio (GF_MediaBox *mdia, u32 sampleNumber, u32 scheme_type, u8 **out_buffer, u32 *out_size)
 
GF_EXPORT GF_Err gf_isom_cenc_get_sample_aux_info (GF_ISOFile *the_file, u32 trackNumber, u32 sampleNumber, u32 sampleDescIndex, u32 *container_type, u8 **out_buffer, u32 *outSize)
 
void gf_isom_cenc_get_default_info_internal (GF_TrackBox *trak, u32 sampleDescriptionIndex, u32 *container_type, Bool *default_IsEncrypted, u32 *crypt_byte_block, u32 *skip_byte_block, const u8 **key_info, u32 *key_info_size)
 
GF_EXPORT GF_Err gf_isom_cenc_get_default_info (GF_ISOFile *the_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)
 
GF_Err gf_isom_set_adobe_protection (GF_ISOFile *the_file, u32 trackNumber, u32 desc_index, u32 scheme_type, u32 scheme_version, Bool is_selective_enc, char *metadata, u32 len)
 
GF_EXPORT Bool gf_isom_is_adobe_protection_media (GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_EXPORT GF_Err gf_isom_get_adobe_protection_info (GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *outOriginalFormat, u32 *outSchemeType, u32 *outSchemeVersion, const char **outMetadata)
 
Bool gf_cenc_validate_key_info (const u8 *key_info, u32 key_info_size)
 

Function Documentation

◆ isom_get_sinf_entry()

static GF_ProtectionSchemeInfoBox* isom_get_sinf_entry ( GF_TrackBox trak,
u32  sampleDescriptionIndex,
u32  scheme_type,
GF_SampleEntryBox **  out_sea 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isom_set_protected_entry()

static GF_Err isom_set_protected_entry ( GF_ISOFile *  the_file,
u32  trackNumber,
u32  desc_index,
u8  version,
u32  flags,
u32  scheme_type,
u32  scheme_version,
char *  scheme_uri,
Bool  is_isma,
GF_ProtectionSchemeInfoBox **  out_sinf 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_create_piff_psec_box()

GF_SampleEncryptionBox* gf_isom_create_piff_psec_box ( u8  version,
u32  flags,
u32  AlgorithmID,
u8  IV_size,
bin128  KID 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_create_samp_enc_box()

GF_SampleEncryptionBox* gf_isom_create_samp_enc_box ( u8  version,
u32  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_cenc_set_saiz_saio()

void gf_isom_cenc_set_saiz_saio ( GF_SampleEncryptionBox senc,
GF_SampleTableBox stbl,
GF_TrackFragmentBox traf,
u32  len,
Bool  saio_32bits,
Bool  use_multikey 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_cenc_merge_saiz_saio()

GF_Err gf_isom_cenc_merge_saiz_saio ( GF_SampleEncryptionBox senc,
GF_SampleTableBox stbl,
u32  sample_number,
u64  offset,
u32  len 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_cenc_samp_aux_info_del()

GF_EXPORT void gf_isom_cenc_samp_aux_info_del ( GF_CENCSampleAuxInfo samp_aux_info)

destroys a CENC sample auxiliary structure

Parameters
samp_aux_infothe target auxiliary buffer
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_cenc_has_saiz_saio_full()

Bool gf_isom_cenc_has_saiz_saio_full ( GF_SampleTableBox stbl,
void *  _traf,
u32  scheme_type 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_cenc_has_saiz_saio_track()

Bool gf_isom_cenc_has_saiz_saio_track ( GF_SampleTableBox stbl,
u32  scheme_type 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_cenc_has_saiz_saio_traf()

Bool gf_isom_cenc_has_saiz_saio_traf ( GF_TrackFragmentBox traf,
u32  scheme_type 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isom_cenc_get_sai_by_saiz_saio()

static GF_Err isom_cenc_get_sai_by_saiz_saio ( GF_MediaBox mdia,
u32  sampleNumber,
u32  scheme_type,
u8 **  out_buffer,
u32 out_size 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_cenc_get_default_info_internal()

void gf_isom_cenc_get_default_info_internal ( GF_TrackBox trak,
u32  sampleDescriptionIndex,
u32 container_type,
Bool default_IsEncrypted,
u32 crypt_byte_block,
u32 skip_byte_block,
const u8 **  key_info,
u32 key_info_size 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_cenc_validate_key_info()

Bool gf_cenc_validate_key_info ( const u8 key_info,
u32  key_info_size 
)
+ Here is the caller graph for this function: