libgpac
Documentation of the core library of GPAC
|
Enumerations | |
enum | { GF_ISOM_SAMPLE_GROUP_ROLL = GF_4CC( 'r', 'o', 'l', 'l') , GF_ISOM_SAMPLE_GROUP_PROL = GF_4CC( 'p', 'r', 'o', 'l') , GF_ISOM_SAMPLE_GROUP_RAP = GF_4CC( 'r', 'a', 'p', ' ' ) , GF_ISOM_SAMPLE_GROUP_SEIG = GF_4CC( 's', 'e', 'i', 'g' ) , GF_ISOM_SAMPLE_GROUP_OINF = GF_4CC( 'o', 'i', 'n', 'f') , GF_ISOM_SAMPLE_GROUP_LINF = GF_4CC( 'l', 'i', 'n', 'f') , GF_ISOM_SAMPLE_GROUP_TRIF = GF_4CC( 't', 'r', 'i', 'f' ) , GF_ISOM_SAMPLE_GROUP_NALM = GF_4CC( 'n', 'a', 'l', 'm') , GF_ISOM_SAMPLE_GROUP_TELE = GF_4CC( 't', 'e', 'l', 'e') , GF_ISOM_SAMPLE_GROUP_SAP = GF_4CC( 's', 'a', 'p', ' ') , GF_ISOM_SAMPLE_GROUP_ALST = GF_4CC( 'a', 'l', 's', 't') , GF_ISOM_SAMPLE_GROUP_RASH = GF_4CC( 'r', 'a', 's', 'h') , GF_ISOM_SAMPLE_GROUP_AVLL = GF_4CC( 'a', 'v', 'l', 'l') , GF_ISOM_SAMPLE_GROUP_AVSS = GF_4CC( 'a', 'v', 's', 's') , GF_ISOM_SAMPLE_GROUP_DTRT = GF_4CC( 'd', 't', 'r', 't') , GF_ISOM_SAMPLE_GROUP_MVIF = GF_4CC( 'm', 'v', 'i', 'f') , GF_ISOM_SAMPLE_GROUP_SCIF = GF_4CC( 's', 'c', 'i', 'f') , GF_ISOM_SAMPLE_GROUP_SCNM = GF_4CC( 's', 'c', 'n', 'm') , GF_ISOM_SAMPLE_GROUP_STSA = GF_4CC( 's', 't', 's', 'a') , GF_ISOM_SAMPLE_GROUP_TSAS = GF_4CC( 't', 's', 'a', 's') , GF_ISOM_SAMPLE_GROUP_SYNC = GF_4CC( 's', 'y', 'n', 'c') , GF_ISOM_SAMPLE_GROUP_TSCL = GF_4CC( 't', 's', 'c', 'l') , GF_ISOM_SAMPLE_GROUP_VIPR = GF_4CC( 'v', 'i', 'p', 'r') , GF_ISOM_SAMPLE_GROUP_LBLI = GF_4CC( 'l', 'b', 'l', 'i') , GF_ISOM_SAMPLE_GROUP_3GAG = GF_4CC( '3', 'g', 'a', 'g') , GF_ISOM_SAMPLE_GROUP_AVCB = GF_4CC( 'a', 'v', 'c', 'b') , GF_ISOM_SAMPLE_GROUP_SPOR = GF_4CC( 's', 'p', 'o', 'r') , GF_ISOM_SAMPLE_GROUP_SULM = GF_4CC( 's', 'u', 'l', 'm') , GF_ISOM_SAMPLE_GROUP_ESGH = GF_4CC( 'e', 's', 'g', 'h') , GF_ISOM_SAMPLE_GROUP_ILCE = GF_4CC( 'i', 'l', 'c', 'e') } |
Functions | |
GF_Err | gf_isom_get_sample_rap_roll_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, Bool *is_rap, GF_ISOSampleRollType *roll_type, s32 *roll_distance) |
Bool | gf_isom_get_sample_group_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sample_group_description_index, u32 grouping_type, u32 *default_index, const u8 **data, u32 *size) |
GF_Err | gf_isom_get_sample_to_group_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sample_number, u32 grouping_type, u32 grouping_type_parameter, u32 *sampleGroupDescIndex) |
Bool | gf_isom_has_cenc_sample_group (GF_ISOFile *isom_file, u32 trackNumber, Bool *has_selective, Bool *has_roll) |
Bool | gf_isom_get_tile_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sample_group_description_index, u32 *default_sample_group_index, u32 *id, u32 *independent, Bool *full_frame, u32 *x, u32 *y, u32 *w, u32 *h) |
GF_Err | gf_isom_enum_sample_group (GF_ISOFile *isom_file, u32 trackNumber, u32 sample_number, u32 *sgrp_idx, u32 *sgrp_type, u32 *sgrp_flags, u32 *sgrp_parameter, u8 **sgrp_data, u32 *sgrp_size) |
GF_Err | gf_isom_enum_sample_aux_data (GF_ISOFile *isom_file, u32 trackNumber, u32 sample_number, u32 *sai_idx, u32 *sai_type, u32 *sai_parameter, u8 **sai_data, u32 *sai_size) |
GF_Err | gf_isom_set_sample_rap_group (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, Bool is_rap, u32 num_leading_samples) |
GF_Err | gf_isom_set_sample_roll_group (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, GF_ISOSampleRollType roll_type, s16 roll_distance) |
GF_Err | gf_isom_set_sample_cenc_group (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u8 isEncrypted, u32 crypt_byte_block, u32 skip_byte_block, u8 *key_info, u32 key_info_size) |
GF_Err | gf_isom_set_sample_cenc_default_group (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber) |
GF_Err | gf_isom_add_sample_group_info (GF_ISOFile *isom_file, u32 trackNumber, u32 grouping_type, void *data, u32 data_size, Bool is_default, u32 *sampleGroupDescriptionIndex) |
GF_Err | gf_isom_remove_sample_group (GF_ISOFile *isom_file, u32 trackNumber, u32 grouping_type) |
GF_Err | gf_isom_set_sample_group_description (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u32 grouping_type, u32 grouping_type_parameter, void *data, u32 data_size, u32 sgpd_flags) |
GF_Err | gf_isom_add_sample_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u32 grouping_type, u32 sampleGroupDescriptionIndex, u32 grouping_type_parameter) |
GF_Err | gf_isom_set_sample_group_in_traf (GF_ISOFile *isom_file) |
GF_Err | gf_isom_set_sample_references (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, s32 ID, u32 nb_refs, s32 *refs) |
GF_Err | gf_isom_get_sample_references (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u32 *refID, u32 *nb_refs, const u32 **refs) |
GF_Err | gf_isom_fragment_add_sample_references (GF_ISOFile *isom_file, GF_ISOTrackID TrackID, s32 refID, u32 nb_refs, s32 *refs) |
anonymous enum |
defined sample groups in GPAC
GF_Err gf_isom_get_sample_rap_roll_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
Bool * | is_rap, | ||
GF_ISOSampleRollType * | roll_type, | ||
s32 * | roll_distance | ||
) |
gets 'rap ' and 'roll' group info for the given sample
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the target sample number |
is_rap | set to GF_TRUE if sample is a rap (open gop), GF_FALSE otherwise |
roll_type | set to GF_ISOM_SAMPLE_ROLL if sample has roll information, GF_ISOM_SAMPLE_PREROLL if sample has preroll information, GF_ISOM_SAMPLE_ROLL_NONE otherwise |
roll_distance | if sample has roll information, set to roll distance |
Bool gf_isom_get_sample_group_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sample_group_description_index, | ||
u32 | grouping_type, | ||
u32 * | default_index, | ||
const u8 ** | data, | ||
u32 * | size | ||
) |
returns opaque data of sample group
isom_file | the target ISO file |
trackNumber | the target track |
sample_group_description_index | index of sample group description entry to query |
grouping_type | four character code of grouping type of sample group description to query |
default_index | set to the default index for this sample group description if any, 0 otherwise (no defaults) |
data | set to the internal sample group description data buffer |
size | set to size of the sample group description data buffer |
GF_Err gf_isom_get_sample_to_group_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sample_number, | ||
u32 | grouping_type, | ||
u32 | grouping_type_parameter, | ||
u32 * | sampleGroupDescIndex | ||
) |
gets sample group description index for a given sample and grouping type.
isom_file | the target ISO file |
trackNumber | the target track |
sample_number | sample number to query |
grouping_type | four character code of grouping type of sample group description to query |
grouping_type_parameter | grouping type parameter of sample group description to query |
sampleGroupDescIndex | set to the 1-based sample group description index, or 0 if no sample group of this type is associated |
Bool gf_isom_has_cenc_sample_group | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
Bool * | has_selective, | ||
Bool * | has_roll | ||
) |
checks if a track as a CENC seig sample group used for key rolling
isom_file | the target ISO file |
trackNumber | the target track |
has_selective | set to TRUE if some entries describe unprotected samples - may be NULL |
has_roll | set to TRUE if more than one key defined - may be NULL |
Bool gf_isom_get_tile_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sample_group_description_index, | ||
u32 * | default_sample_group_index, | ||
u32 * | id, | ||
u32 * | independent, | ||
Bool * | full_frame, | ||
u32 * | x, | ||
u32 * | y, | ||
u32 * | w, | ||
u32 * | h | ||
) |
gets HEVC tiling info
isom_file | the target ISO file |
trackNumber | the target track |
sample_group_description_index | index of sample group description entry to query |
default_sample_group_index | set to the default index for this sample group description if any, 0 otherwise (no defaults) |
id | set to the tile group ID |
independent | set to independent flag of the tile group (0: not constrained, 1: constrained in layer, 2: all intra slices) |
full_frame | set to GF_TRUE if the tile corresponds to the entire picture |
x | set to the horizontal position in pixels |
y | set to the vertical position in pixels |
w | set to the width in pixels |
h | set to the height in pixels |
GF_Err gf_isom_enum_sample_group | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sample_number, | ||
u32 * | sgrp_idx, | ||
u32 * | sgrp_type, | ||
u32 * | sgrp_flags, | ||
u32 * | sgrp_parameter, | ||
u8 ** | sgrp_data, | ||
u32 * | sgrp_size | ||
) |
enumerates custom sample groups (not natively supported by this library) for a given sample
isom_file | the target ISO file |
trackNumber | the target track |
sample_number | the target sample |
sgrp_idx | the current index. Must be set to 0 on first call, incremented by this call on each success, must not be NULL |
sgrp_type | set to the grouping type, or set to 0 if no more sample group descriptions, must not be NULL |
sgrp_flags | set to the grouping flags, (0x1: static_group_description, 0x2: static_mapping) |
sgrp_parameter | set to the grouping_type_parameter or 0 if not defined |
sgrp_data | set to the sample group description data, may be NULL - MUST be freed by caller |
sgrp_size | set to the sample group description size, may be NULL |
GF_Err gf_isom_enum_sample_aux_data | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sample_number, | ||
u32 * | sai_idx, | ||
u32 * | sai_type, | ||
u32 * | sai_parameter, | ||
u8 ** | sai_data, | ||
u32 * | sai_size | ||
) |
enumerates custom sample auxiliary data (not natively supported by this library) for a given sample
isom_file | the target ISO file |
trackNumber | the target track |
sample_number | the target sample |
sai_idx | the current index. Must be et to 0 on first call, incremented by this call on each success, must not be NULL |
sai_type | set to the grouping type, or set to 0 if no more sample group descriptions, must not be NULL |
sai_parameter | set to the grouping_type_parameter or 0 if not defined |
sai_data | set (allocated) to the sample group description data, must not be NULL and must be freed by caller |
sai_size | set to the sample group description size, must not be NULL |
GF_Err gf_isom_set_sample_rap_group | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
Bool | is_rap, | ||
u32 | num_leading_samples | ||
) |
sets rap flag for sample_number - this is used by non-IDR RAPs in AVC (also in USAC) were SYNC flag (stss table) cannot be used
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the target sample number |
is_rap | indicates if the sample is a RAP (open gop) sample |
num_leading_samples | indicates the number of leading samples (samples after this RAP that have dependences on samples before this RAP and hence should be discarded when tuning in) |
GF_Err gf_isom_set_sample_roll_group | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
GF_ISOSampleRollType | roll_type, | ||
s16 | roll_distance | ||
) |
sets roll_distance info for sample_number (number of frames before (<0) or after (>0) this sample to have a complete refresh of the decoded data (used by GDR in AVC)
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the target sample number. If 0, assumes last added sample. If 0xFFFFFFFF, marks all samples as belonging to the roll group |
roll_type | indicates the sample roll recovery type |
roll_distance | indicates the roll distance before a correct decoding is produced |
GF_Err gf_isom_set_sample_cenc_group | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u8 | isEncrypted, | ||
u32 | crypt_byte_block, | ||
u32 | skip_byte_block, | ||
u8 * | key_info, | ||
u32 | key_info_size | ||
) |
sets encryption group for a sample number
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the target sample number |
isEncrypted | isEncrypted flag |
crypt_byte_block | crypt block size for pattern encryption, can be 0 |
skip_byte_block | skip block size for pattern encryption, can be 0 |
key_info | multikey descriptor (cf CENC and GF_PROP_PID_CENC_KEY) |
key_info_size | multikey descriptor size |
GF_Err gf_isom_set_sample_cenc_default_group | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber | ||
) |
sets a sample using the default CENC parameters in a CENC saig sample group SEIG, creating a sample group description if needed (when seig is already defined)
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the target sample number |
GF_Err gf_isom_add_sample_group_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | grouping_type, | ||
void * | data, | ||
u32 | data_size, | ||
Bool | is_default, | ||
u32 * | sampleGroupDescriptionIndex | ||
) |
adds the given blob as a sample group description entry of the given grouping type.
isom_file | the target ISO file |
trackNumber | the target track |
grouping_type | the four character code of the grouping type |
data | the payload of the sample group description |
data_size | the size of the payload |
is_default | if GF_TRUE, thie created entry will be marked as the default entry for the sample group description |
sampleGroupDescriptionIndex | is set to the sample group description index (optional, can be NULL) |
removes a sample group description of the give grouping type, if found
isom_file | the target ISO file |
trackNumber | the target track |
grouping_type | the four character code of the grouping type |
GF_Err gf_isom_set_sample_group_description | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u32 | grouping_type, | ||
u32 | grouping_type_parameter, | ||
void * | data, | ||
u32 | data_size, | ||
u32 | sgpd_flags | ||
) |
adds the given blob as a sample group description entry of the given grouping type for the given sample.
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the target sample number.Use 0 for setting sample group info to last sample in a track fragment |
grouping_type | the four character code of the grouping type |
grouping_type_parameter | associated grouping type parameter (usually 0) |
data | the payload of the sample group description |
data_size | the size of the payload |
sgpd_flags | flags for sgpd: 1: static description, 2, static mapping, 1<<30: essential sample group, 1<<31: default sample description |
GF_Err gf_isom_add_sample_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u32 | grouping_type, | ||
u32 | sampleGroupDescriptionIndex, | ||
u32 | grouping_type_parameter | ||
) |
adds a sample to the given sample group
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the target sample number |
grouping_type | the four character code of the grouping type |
sampleGroupDescriptionIndex | the 1-based index of the sample group description entry |
grouping_type_parameter | the grouping type paramter (see ISO/IEC 14496-12) |
GF_Err gf_isom_set_sample_group_in_traf | ( | GF_ISOFile * | isom_file | ) |
sets sample group descriptions storage in trafs and not in initial movie (Smooth compatibility)
isom_file | the target ISO file |
GF_Err gf_isom_set_sample_references | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
s32 | ID, | ||
u32 | nb_refs, | ||
s32 * | refs | ||
) |
sets sample references
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the target sample number - currently restricted to be the last sample |
ID | ID for the sample |
nb_refs | number of references for this sample, may be 0 if none (IDR) |
refs | IDs of samples this sample depends on |
GF_Err gf_isom_get_sample_references | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u32 * | refID, | ||
u32 * | nb_refs, | ||
const u32 ** | refs | ||
) |
gets sample references
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the target sample number |
refID | ID for the sample |
nb_refs | number of references for this sample, may be 0 if none (IDR) |
refs | IDs of samples this sample depends on. Do NOT modify |
GF_Err gf_isom_fragment_add_sample_references | ( | GF_ISOFile * | isom_file, |
GF_ISOTrackID | TrackID, | ||
s32 | refID, | ||
u32 | nb_refs, | ||
s32 * | refs | ||
) |
sets sample references for fragmented mode
isom_file | the target ISO file |
TrackID | the target track ID |
refID | ID for the sample |
nb_refs | number of references for this sample, may be 0 if none (IDR) |
refs | IDs of samples this sample depends on |