libgpac
Documentation of the core library of GPAC
|
Typedefs | |
typedef GF_Err(* | gf_isom_on_block_out) (void *usr_data, u8 *block, u32 block_size, void *sample_cbk_data, u32 sample_cbk_magic) |
typedef GF_Err(* | gf_isom_on_block_patch) (void *usr_data, u8 *block, u32 block_size, u64 block_offset, Bool is_insert) |
typedef void(* | gf_isom_on_last_block_start) (void *usr_data) |
Functions | |
GF_Err | gf_isom_freeze_order (GF_ISOFile *isom_file) |
void | gf_isom_keep_utc_times (GF_ISOFile *isom_file, Bool keep_utc) |
Bool | gf_isom_has_keep_utc_times (GF_ISOFile *isom_file) |
GF_Err | gf_isom_set_timescale (GF_ISOFile *isom_file, u32 timeScale) |
GF_Err | gf_isom_load_extra_boxes (GF_ISOFile *isom_file, u8 *moov_boxes, u32 moov_boxes_size, Bool udta_only) |
u32 | gf_isom_new_track (GF_ISOFile *isom_file, GF_ISOTrackID trackID, u32 MediaType, u32 TimeScale) |
u32 | gf_isom_new_track_from_template (GF_ISOFile *isom_file, GF_ISOTrackID trackID, u32 MediaType, u32 TimeScale, u8 *tk_box, u32 tk_box_size, Bool udta_only) |
GF_Err | gf_isom_remove_track (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_set_track_enabled (GF_ISOFile *isom_file, u32 trackNumber, Bool enableTrack) |
GF_Err | gf_isom_set_track_flags (GF_ISOFile *isom_file, u32 trackNumber, u32 flags, GF_ISOMTrackFlagOp op) |
GF_Err | gf_isom_set_creation_time (GF_ISOFile *isom_file, u64 create_time, u64 modif_time) |
GF_Err | gf_isom_set_track_creation_time (GF_ISOFile *isom_file, u32 trackNumber, u64 create_time, u64 modif_time) |
GF_Err | gf_isom_set_media_creation_time (GF_ISOFile *isom_file, u32 trackNumber, u64 create_time, u64 modif_time) |
GF_Err | gf_isom_set_track_id (GF_ISOFile *isom_file, u32 trackNumber, GF_ISOTrackID trackID) |
GF_Err | gf_isom_rewrite_track_dependencies (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_add_sample (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, const GF_ISOSample *sample) |
GF_Err | gf_isom_copy_sample_info (GF_ISOFile *dst, u32 dst_track, GF_ISOFile *src, u32 src_track, u32 sampleNumber) |
GF_Err | gf_isom_add_sample_shadow (GF_ISOFile *isom_file, u32 trackNumber, GF_ISOSample *sample) |
GF_Err | gf_isom_append_sample_data (GF_ISOFile *isom_file, u32 trackNumber, u8 *data, u32 data_size) |
GF_Err | gf_isom_add_sample_reference (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_ISOSample *sample, u64 dataOffset) |
GF_Err | gf_isom_set_last_sample_duration (GF_ISOFile *isom_file, u32 trackNumber, u32 duration) |
GF_Err | gf_isom_set_last_sample_duration_ex (GF_ISOFile *isom_file, u32 trackNumber, u32 dur_num, u32 dur_den) |
GF_Err | gf_isom_patch_last_sample_duration (GF_ISOFile *isom_file, u32 trackNumber, u64 next_dts) |
GF_Err | gf_isom_set_track_reference (GF_ISOFile *isom_file, u32 trackNumber, u32 referenceType, GF_ISOTrackID ReferencedTrackID) |
GF_Err | gf_isom_remove_track_references (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_purge_track_reference (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_remove_track_reference (GF_ISOFile *isom_file, u32 trackNumber, u32 ref_type) |
GF_Err | gf_isom_set_handler_name (GF_ISOFile *isom_file, u32 trackNumber, const char *nameUTF8) |
GF_Err | gf_isom_refresh_size_info (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_update_duration (GF_ISOFile *isom_file) |
GF_Err | gf_isom_update_sample (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, GF_ISOSample *sample, Bool data_only) |
GF_Err | gf_isom_update_sample_reference (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, GF_ISOSample *sample, u64 data_offset) |
GF_Err | gf_isom_remove_sample (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber) |
GF_Err | gf_isom_set_media_timescale (GF_ISOFile *isom_file, u32 trackNumber, u32 new_timescale, u32 new_tsinc, u32 force_rescale_type) |
GF_Err | gf_isom_add_sample_aux_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u32 aux_type, u32 aux_info, u8 *data, u32 size) |
GF_Err | gf_isom_set_final_name (GF_ISOFile *isom_file, char *filename) |
GF_Err | gf_isom_set_storage_mode (GF_ISOFile *isom_file, GF_ISOStorageMode storage_mode) |
GF_Err | gf_isom_set_interleave_time (GF_ISOFile *isom_file, u32 InterleaveTime) |
GF_Err | gf_isom_force_64bit_chunk_offset (GF_ISOFile *isom_file, Bool set_on) |
GF_Err | gf_isom_enable_compression (GF_ISOFile *isom_file, GF_ISOCompressMode compress_mode, u32 compress_flags) |
GF_Err | gf_isom_set_copyright (GF_ISOFile *isom_file, const char *threeCharCode, char *notice) |
GF_Err | gf_isom_add_track_kind (GF_ISOFile *isom_file, u32 trackNumber, const char *schemeURI, const char *value) |
GF_Err | gf_isom_remove_track_kind (GF_ISOFile *isom_file, u32 trackNumber, const char *schemeURI, const char *value) |
GF_Err | gf_isom_set_media_type (GF_ISOFile *isom_file, u32 trackNumber, u32 new_type) |
GF_Err | gf_isom_set_media_subtype (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 new_type) |
GF_Err | gf_isom_set_alternate_group_id (GF_ISOFile *isom_file, u32 trackNumber, u32 groupId) |
GF_Err | gf_isom_add_chapter (GF_ISOFile *isom_file, u32 trackNumber, u64 timestamp, char *name) |
GF_Err | gf_isom_remove_chapter (GF_ISOFile *isom_file, u32 trackNumber, u32 index) |
GF_Err | gf_isom_set_edit (GF_ISOFile *isom_file, u32 trackNumber, u64 EditTime, u64 EditDuration, u64 MediaTime, GF_ISOEditType EditMode) |
GF_Err | gf_isom_set_edit_with_rate (GF_ISOFile *isom_file, u32 trackNumber, u64 EditTime, u64 EditDuration, u64 MediaTime, u32 MediaRate) |
GF_Err | gf_isom_modify_edit (GF_ISOFile *isom_file, u32 trackNumber, u32 edit_index, u64 EditDuration, u64 MediaTime, GF_ISOEditType EditMode) |
GF_Err | gf_isom_append_edit (GF_ISOFile *isom_file, u32 trackNumber, u64 EditDuration, u64 MediaTime, GF_ISOEditType EditMode) |
GF_Err | gf_isom_remove_edits (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_remove_edit (GF_ISOFile *isom_file, u32 trackNumber, u32 edit_index) |
GF_Err | gf_isom_update_edit_list_duration (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_remove_uuid (GF_ISOFile *isom_file, u32 trackNumber, bin128 UUID) |
GF_Err | gf_isom_add_uuid (GF_ISOFile *isom_file, u32 trackNumber, bin128 UUID, const u8 *data, u32 size) |
GF_Err | gf_isom_use_compact_size (GF_ISOFile *isom_file, u32 trackNumber, Bool CompactionOn) |
GF_Err | gf_isom_disable_brand_rewrite (GF_ISOFile *isom_file, Bool do_disable) |
GF_Err | gf_isom_set_brand_info (GF_ISOFile *isom_file, u32 MajorBrand, u32 MinorVersion) |
GF_Err | gf_isom_modify_alternate_brand (GF_ISOFile *isom_file, u32 Brand, Bool AddIt) |
GF_Err | gf_isom_reset_alt_brands (GF_ISOFile *isom_file) |
GF_Err | gf_isom_reset_alt_brands_ex (GF_ISOFile *isom_file, Bool leave_empty) |
GF_Err | gf_isom_set_sample_flags (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u32 isLeading, u32 dependsOn, u32 dependedOn, u32 redundant) |
GF_Err | gf_isom_set_visual_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 Width, u32 Height) |
GF_Err | gf_isom_set_visual_bit_depth (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u16 bitDepth) |
GF_Err | gf_isom_set_track_layout_info (GF_ISOFile *isom_file, u32 trackNumber, u32 width, u32 height, s32 translation_x, s32 translation_y, s16 layer) |
GF_Err | gf_isom_set_track_matrix (GF_ISOFile *isom_file, u32 trackNumber, s32 matrix[9]) |
GF_Err | gf_isom_set_pixel_aspect_ratio (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, s32 hSpacing, s32 vSpacing, Bool force_par) |
GF_Err | gf_isom_set_clean_aperture (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 cleanApertureWidthN, u32 cleanApertureWidthD, u32 cleanApertureHeightN, u32 cleanApertureHeightD, s32 horizOffN, u32 horizOffD, s32 vertOffN, u32 vertOffD) |
GF_Err | gf_isom_update_aperture_info (GF_ISOFile *isom_file, u32 trackNumber, Bool remove) |
GF_Err | gf_isom_set_high_dynamic_range_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_MasteringDisplayColourVolumeInfo *mdcv, GF_ContentLightLevelInfo *clli) |
GF_Err | gf_isom_set_dolby_vision_profile (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_DOVIDecoderConfigurationRecord *dvcc) |
GF_Err | gf_isom_set_image_sequence_coding_constraints (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, Bool remove, Bool all_ref_pics_intra, Bool intra_pred_used, u32 max_ref_per_pic) |
GF_Err | gf_isom_set_image_sequence_alpha (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, Bool remove) |
GF_Err | gf_isom_set_visual_color_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 colour_type, u16 colour_primaries, u16 transfer_characteristics, u16 matrix_coefficients, Bool full_range_flag, u8 *icc_data, u32 icc_size) |
GF_Err | gf_isom_set_audio_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 sampleRate, u32 nbChannels, u8 bitsPerSample, GF_AudioSampleEntryImportMode asemode) |
GF_Err | gf_isom_set_audio_layout (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_AudioChannelLayout *layout) |
GF_Err | gf_isom_set_cts_packing (GF_ISOFile *isom_file, u32 trackNumber, Bool unpack) |
GF_Err | gf_isom_shift_cts_offset (GF_ISOFile *isom_file, u32 trackNumber, s32 offset_shift) |
GF_Err | gf_isom_set_composition_offset_mode (GF_ISOFile *isom_file, u32 trackNumber, Bool use_negative_offsets) |
GF_Err | gf_isom_set_ctts_v1 (GF_ISOFile *isom_file, u32 trackNumber, u32 ctts_shift) |
GF_Err | gf_isom_set_media_language (GF_ISOFile *isom_file, u32 trackNumber, char *code) |
GF_ISOTrackID | gf_isom_get_last_created_track_id (GF_ISOFile *isom_file) |
GF_Err | gf_isom_apply_box_patch (GF_ISOFile *isom_file, GF_ISOTrackID trackID, const char *box_patch_filename, Bool for_fragments) |
GF_Err | gf_isom_set_track_magic (GF_ISOFile *isom_file, u32 trackNumber, u64 magic) |
GF_Err | gf_isom_set_track_index (GF_ISOFile *isom_file, u32 trackNumber, u32 index, void(*track_num_changed)(void *udta, u32 old_track_num, u32 new_track_num), void *udta) |
GF_Err | gf_isom_remove_stream_description (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
GF_Err | gf_isom_update_bitrate (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 average_bitrate, u32 max_bitrate, u32 decode_buffer_size) |
GF_Err | gf_isom_clone_track (GF_ISOFile *orig_file, u32 orig_track, GF_ISOFile *dest_file, GF_ISOTrackCloneFlags flags, u32 *dest_track) |
GF_Err | gf_isom_set_track_interleaving_group (GF_ISOFile *isom_file, u32 trackNumber, u32 GroupID) |
GF_Err | gf_isom_set_track_priority_in_group (GF_ISOFile *isom_file, u32 trackNumber, u32 InversePriority) |
GF_Err | gf_isom_hint_max_chunk_size (GF_ISOFile *isom_file, u32 trackNumber, u32 maxChunkSize) |
GF_Err | gf_isom_hint_max_chunk_duration (GF_ISOFile *isom_file, u32 trackNumber, u32 maxChunkDur) |
GF_Err | gf_isom_make_interleave (GF_ISOFile *isom_file, Double TimeInSec) |
GF_Err | gf_isom_make_interleave_ex (GF_ISOFile *isom_file, GF_Fraction *fTimeInSec) |
void | gf_isom_set_progress_callback (GF_ISOFile *isom_file, void(*progress_cbk)(void *udta, u64 nb_done, u64 nb_total), void *progress_cbk_udta) |
GF_Err | gf_isom_set_write_callback (GF_ISOFile *isom_file, gf_isom_on_block_out on_block_out, gf_isom_on_block_patch on_block_patch, gf_isom_on_last_block_start on_last_block_start, void *usr_data, u32 block_size) |
Bool | gf_isom_is_inplace_rewrite (GF_ISOFile *isom_file) |
void | gf_isom_disable_inplace_rewrite (GF_ISOFile *isom_file) |
GF_Err | gf_isom_set_inplace_padding (GF_ISOFile *isom_file, u32 padding) |
ISOBMF file writing
typedef GF_Err(* gf_isom_on_block_out) (void *usr_data, u8 *block, u32 block_size, void *sample_cbk_data, u32 sample_cbk_magic) |
Callback function to receive new data blocks
usr_data | user callback, as passed to gf_isom_set_write_callback |
block | data block to write |
block_size | data block size in bytes |
sample_cbk_data | callback data of sample or NULL |
sample_cbk_magic | callback magic of sample or 0 |
typedef GF_Err(* gf_isom_on_block_patch) (void *usr_data, u8 *block, u32 block_size, u64 block_offset, Bool is_insert) |
Callback function to receive new data blocks, only used in non-fragmented mode:
usr_data | user callback, as passed to gf_isom_set_write_callback |
block | data block to write |
block_size | data block size in bytes |
block_offset | offset in file for block to patch |
is_insert | if GF_TRUE, indicates the bytes must be inserted at the given offset. Otherwise bytes are to be replaced |
typedef void(* gf_isom_on_last_block_start) (void *usr_data) |
Callback function to indicate the last call to gf_isom_on_block_out is about to be produced for a segment, unused for non-fragmented or non-dash cases
usr_data | user callback, as passed to gf_isom_set_write_callback |
enum GF_ISOStorageMode |
Movie Storage modes
Enumerator | |
---|---|
GF_ISOM_STORE_FLAT | FLAT: the MediaData is stored at the beginning of the file |
GF_ISOM_STORE_STREAMABLE | STREAMABLE: the MetaData (File Info) is stored at the beginning of the file for fast access during download |
GF_ISOM_STORE_INTERLEAVED | INTERLEAVED: Same as STREAMABLE, plus the media data is mixed by chunk of fixed duration |
GF_ISOM_STORE_DRIFT_INTERLEAVED | INTERLEAVED +DRIFT: Same as INTERLEAVED, and adds time drift control to avoid creating too long chunks |
GF_ISOM_STORE_TIGHT | tightly interleaves samples based on their DTS, therefore allowing better placement of samples in the file. This is used for both http interleaving and Hinting optimizations |
GF_ISOM_STORE_FASTSTART | FASTSTART: same as FLAT but moves moov before mdat at the end |
enum GF_ISOMTrackFlagOp |
anonymous enum |
enum GF_ISOCompressMode |
compression mode of top-level boxes
anonymous enum |
Audio Sample Description signaling mode
track clone flags
GF_Err gf_isom_freeze_order | ( | GF_ISOFile * | isom_file | ) |
freezes order of the current box tree in the file. By default the library always reorder boxes in the recommended order in the various specifications implemented. New created tracks or meta items will not have a frozen order of boxes, but the function can be called several time
isom_file | the target ISO file |
void gf_isom_keep_utc_times | ( | GF_ISOFile * | isom_file, |
Bool | keep_utc | ||
) |
keeps UTC edit times when storing
isom_file | the target ISO file |
keep_utc | if GF_TRUE, do not edit times |
Bool gf_isom_has_keep_utc_times | ( | GF_ISOFile * | isom_file | ) |
Checks if UTC keeping is enabled
isom_file | the target ISO file |
GF_Err gf_isom_set_timescale | ( | GF_ISOFile * | isom_file, |
u32 | timeScale | ||
) |
sets the timescale of the movie. This rescales times expressed in movie timescale in edit lists and mvex boxes
isom_file | the target ISO file |
timeScale | the target timescale |
GF_Err gf_isom_load_extra_boxes | ( | GF_ISOFile * | isom_file, |
u8 * | moov_boxes, | ||
u32 | moov_boxes_size, | ||
Bool | udta_only | ||
) |
loads a set of top-level boxes in moov udta and child boxes. UDTA will be replaced if already present
isom_file | the target ISO file |
moov_boxes | a serialized array of boxes to add |
moov_boxes_size | the size of the serialized array of boxes |
udta_only | only replace/inject udta box and entries |
u32 gf_isom_new_track | ( | GF_ISOFile * | isom_file, |
GF_ISOTrackID | trackID, | ||
u32 | MediaType, | ||
u32 | TimeScale | ||
) |
creates a new track
isom_file | the target ISO file |
trackID | the ID of the track - if 0, the track ID is chosen by the API |
MediaType | the handler type (four character code) of the media |
TimeScale | the time scale of the media |
u32 gf_isom_new_track_from_template | ( | GF_ISOFile * | isom_file, |
GF_ISOTrackID | trackID, | ||
u32 | MediaType, | ||
u32 | TimeScale, | ||
u8 * | tk_box, | ||
u32 | tk_box_size, | ||
Bool | udta_only | ||
) |
creates a new track from an encoded trak box.
isom_file | the target ISO file |
trackID | the ID of the track - if 0, the track ID is chosen by the API |
MediaType | the handler type (four character code) of the media |
TimeScale | the time scale of the media |
tk_box | a serialized trak box to use as template |
tk_box_size | the size of the serialized trak box |
udta_only | only replace/inject udta box and entries |
GF_Err gf_isom_remove_track | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
removes a track - internal cross dependencies will be updated.
isom_file | the target ISO file |
trackNumber | the target track to remove file |
GF_Err gf_isom_set_track_enabled | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
Bool | enableTrack | ||
) |
sets the enable flag of a track
isom_file | the target ISO file |
trackNumber | the target track |
enableTrack | if GF_TRUE, track is enabled, otherwise disabled |
GF_Err gf_isom_set_track_flags | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | flags, | ||
GF_ISOMTrackFlagOp | op | ||
) |
toggles track flags on or off
isom_file | the target ISO file |
trackNumber | the target track |
flags | flags to modify |
op | flag operation mode |
GF_Err gf_isom_set_creation_time | ( | GF_ISOFile * | isom_file, |
u64 | create_time, | ||
u64 | modif_time | ||
) |
sets creationTime and modificationTime of the movie to the specified dates (no validty check)
isom_file | the target ISO file |
create_time | the new creation time |
modif_time | the new modification time |
GF_Err gf_isom_set_track_creation_time | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u64 | create_time, | ||
u64 | modif_time | ||
) |
sets creationTime and modificationTime of the track to the specified dates
isom_file | the target ISO file |
trackNumber | the target track |
create_time | the new creation time |
modif_time | the new modification time |
GF_Err gf_isom_set_media_creation_time | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u64 | create_time, | ||
u64 | modif_time | ||
) |
sets creationTime and modificationTime of the track media header to the specified dates
isom_file | the target ISO file |
trackNumber | the target track |
create_time | the new creation time |
modif_time | the new modification time |
GF_Err gf_isom_set_track_id | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
GF_ISOTrackID | trackID | ||
) |
changes the ID of a track - all track references present in the file are updated
isom_file | the target ISO file |
trackNumber | the target track |
trackID | the new track ID |
GF_Err gf_isom_rewrite_track_dependencies | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
forces to rewrite all dependencies when track ID changes. Used to check if track references are broken during import of a single track
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_add_sample | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
const GF_ISOSample * | sample | ||
) |
adds a sample to a track
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index associated with the sample |
sample | the target sample to add |
GF_Err gf_isom_copy_sample_info | ( | GF_ISOFile * | dst, |
u32 | dst_track, | ||
GF_ISOFile * | src, | ||
u32 | src_track, | ||
u32 | sampleNumber | ||
) |
copies all sample dependency, subSample and sample group information from the given sampleNumber in source file to the last added sample in dest file
dst | the destination ISO file |
dst_track | the destination track |
src | the source ISO file |
src_track | the source track |
sampleNumber | the source sample number |
GF_Err gf_isom_add_sample_shadow | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
GF_ISOSample * | sample | ||
) |
adds a sync shadow sample to a track.
isom_file | the target ISO file |
trackNumber | the target track |
sample | the target shadow sample to add |
GF_Err gf_isom_append_sample_data | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u8 * | data, | ||
u32 | data_size | ||
) |
adds data to current sample in the track. This will update the data size. CANNOT be used with OD media type There shall not be any other
isom_file | the target ISO file |
trackNumber | the target track |
data | the data to append to the sample |
data_size | the size of the data to append |
GF_Err gf_isom_add_sample_reference | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
GF_ISOSample * | sample, | ||
u64 | dataOffset | ||
) |
adds sample references to a track
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index associated with the sample |
sample | the target sample to add |
dataOffset | is the offset in bytes of the data in the referenced file. |
GF_Err gf_isom_set_last_sample_duration | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | duration | ||
) |
sets the duration of the last media sample. If not set, the duration of the last sample is the duration of the previous one if any, or media TimeScale (default value). This does not modify the edit list if any, you must modify this using gf_isom_set_edit
isom_file | the target ISO file |
trackNumber | the target track |
duration | duration of last sample in media timescale |
GF_Err gf_isom_set_last_sample_duration_ex | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | dur_num, | ||
u32 | dur_den | ||
) |
sets the duration of the last media sample. If not set, the duration of the last sample is the duration of the previous one if any, or media TimeScale (default value). This does not modify the edit list if any, you must modify this using gf_isom_set_edit. If both dur_num and dur_den are both zero, forces last sample duration to be the same as previous sample
isom_file | the target ISO file |
trackNumber | the target track |
dur_num | duration num value |
dur_den | duration num value |
GF_Err gf_isom_patch_last_sample_duration | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u64 | next_dts | ||
) |
patches last stts entry to make sure the cumulated duration equals the given next_dts value - this will overrite timing of all previous samples using an average dur
isom_file | the target ISO file |
trackNumber | the target track |
next_dts | target decode time of next sample |
GF_Err gf_isom_set_track_reference | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | referenceType, | ||
GF_ISOTrackID | ReferencedTrackID | ||
) |
adds a track reference to another track
isom_file | the target ISO file |
trackNumber | the target track |
referenceType | the four character code of the reference |
ReferencedTrackID | the ID of the track referred to |
GF_Err gf_isom_remove_track_references | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
removes all track references
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_purge_track_reference | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
removes any track reference poiting to a non-existing track
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_remove_track_reference | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | ref_type | ||
) |
removes all track references of a given type
isom_file | the target ISO file |
trackNumber | the target track |
ref_type | the reference type to remove |
GF_Err gf_isom_set_handler_name | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
const char * | nameUTF8 | ||
) |
sets track handler name.
isom_file | the target ISO file |
trackNumber | the target track |
nameUTF8 | the handler name; either NULL (reset), a UTF-8 formatted string or a UTF8 file resource in the form "file://path/to/file_utf8" |
GF_Err gf_isom_refresh_size_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
updates the sample size table - this is needed when using gf_isom_append_sample_data in case the resulting samples are of same sizes (typically in 3GP speech tracks)
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_update_duration | ( | GF_ISOFile * | isom_file | ) |
updates the duration of the movie.This is done automatically when storing the file or editing timesales/edit list, but it is not done when adding samples.
isom_file | the target ISO file |
GF_Err gf_isom_update_sample | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
GF_ISOSample * | sample, | ||
Bool | data_only | ||
) |
updates a given sample of the media. This function updates both media data of sample and sample properties (DTS, CTS, SAP type)
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the number of the sample to update |
sample | the new sample |
data_only | if set to GF_TRUE, only the sample data is updated, not other info |
GF_Err gf_isom_update_sample_reference | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
GF_ISOSample * | sample, | ||
u64 | data_offset | ||
) |
updates a sample reference in the media. Note that the sample MUST exists, and that sample->data MUST be NULL and sample->dataLength must be NON NULL.
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the number of the sample to update |
sample | the new sample |
data_offset | new offset of sample in referenced file |
GF_Err gf_isom_remove_sample | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber | ||
) |
removes a given sample
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the number of the sample to update |
GF_Err gf_isom_set_media_timescale | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | new_timescale, | ||
u32 | new_tsinc, | ||
u32 | force_rescale_type | ||
) |
changes media time scale
isom_file | the target ISO file |
trackNumber | the target track |
new_timescale | the new timescale to set |
new_tsinc | if not 0, changes sample duration and composition offsets to new_tsinc/new_timescale. If non-constant sample dur is used, uses the samllest sample dur in the track. Otherwise, only changes the timescale |
force_rescale_type | type fo rescaling, Ignored if new_tsinc is not 0:
|
GF_Err gf_isom_add_sample_aux_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u32 | aux_type, | ||
u32 | aux_info, | ||
u8 * | data, | ||
u32 | size | ||
) |
adds sample auxiliary data
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the sample number. Must be equal or larger to last auxiliary |
aux_type | auxiliary sample data type, shall not be 0 |
aux_info | auxiliary sample data specific info type, may be 0 |
data | data to add |
size | size of data to add |
GF_Err gf_isom_set_final_name | ( | GF_ISOFile * | isom_file, |
char * | filename | ||
) |
sets the save file name of the (edited) movie. If the movie is edited, the default fileName is the open name suffixed with an internally defined extension "%p_isotmp")"
isom_file | the target ISO file |
filename | the new final filename |
GF_Err gf_isom_set_storage_mode | ( | GF_ISOFile * | isom_file, |
GF_ISOStorageMode | storage_mode | ||
) |
sets the storage mode of a file (FLAT, STREAMABLE, INTERLEAVED)
isom_file | the target ISO file |
storage_mode | the target storage mode |
GF_Err gf_isom_set_interleave_time | ( | GF_ISOFile * | isom_file, |
u32 | InterleaveTime | ||
) |
sets the interleaving time of media data (INTERLEAVED mode only)
isom_file | the target ISO file |
InterleaveTime | the target interleaving time in movie timescale |
GF_Err gf_isom_force_64bit_chunk_offset | ( | GF_ISOFile * | isom_file, |
Bool | set_on | ||
) |
forces usage of 64 bit chunk offsets
isom_file | the target ISO file |
set_on | if GF_TRUE, 64 bit chunk offsets are always used; otherwise, they are used only for large files |
GF_Err gf_isom_enable_compression | ( | GF_ISOFile * | isom_file, |
GF_ISOCompressMode | compress_mode, | ||
u32 | compress_flags | ||
) |
sets compression mode of file
isom_file | the target ISO file |
compress_mode | the desired compress mode |
compress_flags | compress mode flags |
GF_Err gf_isom_set_copyright | ( | GF_ISOFile * | isom_file, |
const char * | threeCharCode, | ||
char * | notice | ||
) |
sets the copyright in one language
isom_file | the target ISO file |
threeCharCode | the ISO three character language code for copyright |
notice | the copyright notice to add |
GF_Err gf_isom_add_track_kind | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
const char * | schemeURI, | ||
const char * | value | ||
) |
adds a kind type to a track
isom_file | the target ISO file |
trackNumber | the target track |
schemeURI | the scheme URI of the added kind |
value | the value of the added kind |
GF_Err gf_isom_remove_track_kind | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
const char * | schemeURI, | ||
const char * | value | ||
) |
removes a kind type to the track, all if NULL params
isom_file | the target ISO file |
trackNumber | the target track |
schemeURI | the scheme URI of the removed kind |
value | the value of the removed kind |
GF_Err gf_isom_set_media_type | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | new_type | ||
) |
changes the handler type of the media
isom_file | the target ISO file |
trackNumber | the target track |
new_type | the new handler four character type |
GF_Err gf_isom_set_media_subtype | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 | new_type | ||
) |
changes the type of the sampleDescriptionBox
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index |
new_type | the new four character code type of the smaple description |
GF_Err gf_isom_set_alternate_group_id | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | groupId | ||
) |
sets a track in an alternate group
isom_file | the target ISO file |
trackNumber | the target track |
groupId | the alternate group ID |
GF_Err gf_isom_add_chapter | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u64 | timestamp, | ||
char * | name | ||
) |
adds chapter info:
isom_file | the target ISO file |
trackNumber | the target track. If 0, the chapter info is added to the movie, otherwise to the track |
timestamp | the chapter start time in milliseconds. Chapters are added in order to the file. If a chapter with same timestamp is found, its name is updated but no entry is created. |
name | the chapter name. If NULL, defaults to 'Chapter N' |
GF_Err gf_isom_remove_chapter | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | index | ||
) |
deletes copyright
isom_file | the target ISO file |
trackNumber | the target track |
index | the 1-based index of the copyright notice to remove, or 0 to remove all chapters |
GF_Err gf_isom_set_edit | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u64 | EditTime, | ||
u64 | EditDuration, | ||
u64 | MediaTime, | ||
GF_ISOEditType | EditMode | ||
) |
updates or inserts a new edit in the track time line. Edits are used to modify the media normal timing. EditTime and EditDuration are expressed in movie timescale
isom_file | the target ISO file |
trackNumber | the target track |
EditTime | the start of the edit in movie timescale |
EditDuration | the duration of the edit in movie timecale |
MediaTime | the corresponding media time of the start of the edit, in media timescale. -1 for empty edits |
EditMode | the edit mode |
GF_Err gf_isom_set_edit_with_rate | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u64 | EditTime, | ||
u64 | EditDuration, | ||
u64 | MediaTime, | ||
u32 | MediaRate | ||
) |
updates or inserts a new edit in the track time line. Edits are used to modify the media normal timing. EditTime and EditDuration are expressed in movie timescale
isom_file | the target ISO file |
trackNumber | the target track |
EditTime | the start of the edit in movie timescale |
EditDuration | the duration of the edit in movie timecale |
MediaTime | the corresponding media time of the start of the edit, in media timescale. -1 for empty edits |
MediaRate | a 16.16 rate (0x10000 means normal playback) |
GF_Err gf_isom_modify_edit | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | edit_index, | ||
u64 | EditDuration, | ||
u64 | MediaTime, | ||
GF_ISOEditType | EditMode | ||
) |
same as gf_isom_set_edit except only modifies duration type and mediaType
isom_file | the target ISO file |
trackNumber | the target track |
edit_index | the 1-based index of the edit to update |
EditDuration | duration of the edit in movie timescale |
MediaTime | the corresponding media time of the start of the edit, in media timescale. -1 for empty edits |
EditMode | the edit mode |
GF_Err gf_isom_append_edit | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u64 | EditDuration, | ||
u64 | MediaTime, | ||
GF_ISOEditType | EditMode | ||
) |
same as gf_isom_modify_edit except only appends new segment
isom_file | the target ISO file |
trackNumber | the target track |
EditDuration | duration of the edit in movie timescale |
MediaTime | the corresponding media time of the start of the edit, in media timescale. -1 for empty edits |
EditMode | the edit mode |
GF_Err gf_isom_remove_edits | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
removes all edits in the track
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_remove_edit | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | edit_index | ||
) |
removes the given edit. If this is not the last segment, the next segment duration is updated to maintain a continous timeline
isom_file | the target ISO file |
trackNumber | the target track |
edit_index | the 1-based index of the edit to update |
GF_Err gf_isom_update_edit_list_duration | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
updates edit list after track edition. All edit entries with a duration or media starttime larger than the media duration are clamped to media duration
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_remove_uuid | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
bin128 | UUID | ||
) |
remove track, moov or file-level UUID box of matching type
isom_file | the target ISO file |
trackNumber | the target track for the UUID box; if 0, removes from movie; if 0xFFFFFFFF, removes from file |
UUID | the UUID of the box to remove |
GF_Err gf_isom_add_uuid | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
bin128 | UUID, | ||
const u8 * | data, | ||
u32 | size | ||
) |
adds track, moov or file-level UUID box
isom_file | the target ISO file |
trackNumber | the target track for the UUID box; if 0, removes from movie; if 0xFFFFFFFF, removes from file |
UUID | the UUID of the box to remove |
data | the data to add, may be NULL |
size | the size of the data to add, shall be 0 when data is NULL |
GF_Err gf_isom_use_compact_size | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
Bool | CompactionOn | ||
) |
uses a compact track version for sample size. This is not usually recommended except for speech codecs where the track has a lot of small samples compaction is done automatically while writing based on the track's sample sizes
isom_file | the target ISO file |
trackNumber | the target track for the udta box; if 0, add the udta to the movie; |
CompactionOn | if set to GF_TRUE, compact size tables are used; otherwise regular size tables are used |
GF_Err gf_isom_disable_brand_rewrite | ( | GF_ISOFile * | isom_file, |
Bool | do_disable | ||
) |
disabled brand rewrite for file, usually done for temporary import in an existing file
isom_file | the target ISO file |
do_disable | if true, brand rewrite is disabled, otherwise enabled |
GF_Err gf_isom_set_brand_info | ( | GF_ISOFile * | isom_file, |
u32 | MajorBrand, | ||
u32 | MinorVersion | ||
) |
sets the brand of the movie
isom_file | the target ISO file |
MajorBrand | four character code of the major brand to set |
MinorVersion | version of the brand |
GF_Err gf_isom_modify_alternate_brand | ( | GF_ISOFile * | isom_file, |
u32 | Brand, | ||
Bool | AddIt | ||
) |
adds or removes an alternate brand for the movie.
isom_file | the target ISO file |
Brand | four character code of the brand to add or remove |
AddIt | if set to GF_TRUE, the brand is added, otherwise it is removed |
GF_Err gf_isom_reset_alt_brands | ( | GF_ISOFile * | isom_file | ) |
removes all alternate brands except major brand
isom_file | the target ISO file |
GF_Err gf_isom_reset_alt_brands_ex | ( | GF_ISOFile * | isom_file, |
Bool | leave_empty | ||
) |
removes all alternate brands except major brand
isom_file | the target ISO file |
leave_empty | if GF_TRUE, does not create a default alternate brand matching the major brand |
GF_Err gf_isom_set_sample_flags | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u32 | isLeading, | ||
u32 | dependsOn, | ||
u32 | dependedOn, | ||
u32 | redundant | ||
) |
set sample dependency flags - see ISO/IEC 14496-12 and gf_filter_pck_set_dependency_flags
isom_file | the target ISO file |
trackNumber | the target track number |
sampleNumber | the target sample number |
isLeading | indicates that the sample is a leading picture |
dependsOn | indicates the sample dependency towards other samples |
dependedOn | indicates the sample dependency from other samples |
redundant | indicates that the sample contains redundant coding |
GF_Err gf_isom_set_visual_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 | Width, | ||
u32 | Height | ||
) |
sets size information of a sample description of a visual track
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
Width | the width in pixels |
Height | the height in pixels |
GF_Err gf_isom_set_visual_bit_depth | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u16 | bitDepth | ||
) |
sets bit depth of a sample description of a visual track (for uncompressed media usually)
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
bitDepth | the bit depth of each pixel (eg 24 for RGB, 32 for RGBA) |
GF_Err gf_isom_set_track_layout_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | width, | ||
u32 | height, | ||
s32 | translation_x, | ||
s32 | translation_y, | ||
s16 | layer | ||
) |
sets a visual track layout info
isom_file | the target ISO file |
trackNumber | the target track number |
width | the track width in pixels |
height | the track height in pixels |
translation_x | the horizontal translation (from the left) of the track in the movie canvas, expressed as 16.16 fixed point float |
translation_y | the vertical translation (from the top) of the track in the movie canvas, expressed as 16.16 fixed point float |
layer | z order of the track on the canvas |
GF_Err gf_isom_set_track_matrix | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
s32 | matrix[9] | ||
) |
sets track matrix
isom_file | the target ISO file |
trackNumber | the target track number |
matrix | the transformation matrix of the track on the movie canvas; all coeficients are expressed as 16.16 floating points |
GF_Err gf_isom_set_pixel_aspect_ratio | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
s32 | hSpacing, | ||
s32 | vSpacing, | ||
Bool | force_par | ||
) |
sets the pixel aspect ratio for a sample description
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
hSpacing | horizontal spacing of the aspect ratio; a value of 0 removes PAR; negative value means 1 |
vSpacing | vertical spacing of the aspect ratio; a value of 0 removes PAR; negative value means 1 |
force_par | if set, forces PAR to 1:1 when hSpacing=vSpacing; otherwise removes PAR when hSpacing=vSpacing |
GF_Err gf_isom_set_clean_aperture | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 | cleanApertureWidthN, | ||
u32 | cleanApertureWidthD, | ||
u32 | cleanApertureHeightN, | ||
u32 | cleanApertureHeightD, | ||
s32 | horizOffN, | ||
u32 | horizOffD, | ||
s32 | vertOffN, | ||
u32 | vertOffD | ||
) |
sets clean aperture (crop window, see ISO/IEC 14496-12) for a sample description
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
cleanApertureWidthN | nominator of clean aperture horizontal size |
cleanApertureWidthD | denominator of clean aperture horizontal size |
cleanApertureHeightN | nominator of clean aperture vertical size |
cleanApertureHeightD | denominator of clean aperture vertical size |
horizOffN | nominator of horizontal offset of clean aperture center minus (width-1)/2 (eg 0 sets center to center of video) |
horizOffD | denominator of horizontal offset of clean aperture center minus (width-1)/2 (eg 0 sets center to center of video) |
vertOffN | nominator of vertical offset of clean aperture center minus (height-1)/2 (eg 0 sets center to center of video) |
vertOffD | denominator of vertical offset of clean aperture center minus (height-1)/2 (eg 0 sets center to center of video) |
GF_Err gf_isom_update_aperture_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
Bool | remove | ||
) |
updates track aperture information for QT/ProRes
isom_file | the target ISO file |
trackNumber | the target track number |
remove | if GF_TRUE, remove track aperture information, otherwise updates it |
GF_Err gf_isom_set_high_dynamic_range_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
GF_MasteringDisplayColourVolumeInfo * | mdcv, | ||
GF_ContentLightLevelInfo * | clli | ||
) |
sets high dynamic range information for a sample description
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
mdcv | the mastering display colour volume to set, if NULL removes the info |
clli | the content light level to set, if NULL removes the info |
GF_Err gf_isom_set_dolby_vision_profile | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
GF_DOVIDecoderConfigurationRecord * | dvcc | ||
) |
force Dolby Vision profile: mainly used when the bitstream doesn't contain all the necessary information
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
dvcc | the Dolby Vision configuration |
GF_Err gf_isom_set_image_sequence_coding_constraints | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
Bool | remove, | ||
Bool | all_ref_pics_intra, | ||
Bool | intra_pred_used, | ||
u32 | max_ref_per_pic | ||
) |
sets image sequence coding constraints (mostly used for HEIF image files)
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
remove | if set to GF_TRUE, removes coding constraints |
all_ref_pics_intra | indicates if all reference pictures are intra frames |
intra_pred_used | indicates if intra prediction is used |
max_ref_per_pic | indicates the max number of reference images per picture |
GF_Err gf_isom_set_image_sequence_alpha | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
Bool | remove | ||
) |
sets image sequence alpha flag (mostly used for HEIF image files). The alpha flag indicates the image sequence is an alpha plane or has an alpha channel
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
remove | if set to GF_TRUE, removes coding constraints |
GF_Err gf_isom_set_visual_color_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 | colour_type, | ||
u16 | colour_primaries, | ||
u16 | transfer_characteristics, | ||
u16 | matrix_coefficients, | ||
Bool | full_range_flag, | ||
u8 * | icc_data, | ||
u32 | icc_size | ||
) |
sets colour information for a sample description
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
colour_type | the four character code of the colour type to set (nclc, nclx, prof, ricc); if 0, removes all color info |
colour_primaries | the colour primaries for nclc/nclx as defined in ISO/IEC 23001-8 |
transfer_characteristics | the colour primaries for nclc/nclx as defined in ISO/IEC 23001-8 |
matrix_coefficients | the colour primaries for nclc/nclx as defined in ISO/IEC 23001-8 |
full_range_flag | the colour primaries for nclc as defined in ISO/IEC 23001-8 |
icc_data | the icc data pto set for prof and ricc types |
icc_size | the size of the icc data |
GF_Err gf_isom_set_audio_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 | sampleRate, | ||
u32 | nbChannels, | ||
u8 | bitsPerSample, | ||
GF_AudioSampleEntryImportMode | asemode | ||
) |
sets audio format information for a sample description
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
sampleRate | the audio sample rate |
nbChannels | the number of audio channels |
bitsPerSample | the number of bits per sample, mostly used for raw audio |
asemode | type of audio entry signaling desired |
GF_Err gf_isom_set_audio_layout | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
GF_AudioChannelLayout * | layout | ||
) |
sets audio channel and object layout information for a sample description, ISOBMFF style
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
layout | the layout information |
GF_Err gf_isom_set_cts_packing | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
Bool | unpack | ||
) |
sets CTS unpack mode (used for B-frames & like): in unpack mode, each sample uses one entry in CTTS tables
isom_file | the target ISO file |
trackNumber | the target track number |
unpack | if GF_TRUE, sets unpack on, creating a ctts table if none found; if GF_FALSE, sets unpack off and repacks all table info |
GF_Err gf_isom_shift_cts_offset | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
s32 | offset_shift | ||
) |
shifts all CTS with the given offset. This MUST be called in unpack mode only
isom_file | the target ISO file |
trackNumber | the target track number |
offset_shift | CTS offset shift in media timescale |
GF_Err gf_isom_set_composition_offset_mode | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
Bool | use_negative_offsets | ||
) |
enables negative composition offset in track
isom_file | the target ISO file |
trackNumber | the target track |
use_negative_offsets | if GF_TRUE, negative offsets are used, otherwise they are disabled |
GF_Err gf_isom_set_ctts_v1 | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | ctts_shift | ||
) |
enables negative composition offset in track and shift offsets
isom_file | the target ISO file |
trackNumber | the target track |
ctts_shift | shif CTS offsets by the given time in media timescale if positive offsets only are used |
GF_Err gf_isom_set_media_language | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
char * | code | ||
) |
sets language for a track
isom_file | the target ISO file |
trackNumber | the target track number |
code | 3-character code or BCP-47 code media language |
GF_ISOTrackID gf_isom_get_last_created_track_id | ( | GF_ISOFile * | isom_file | ) |
gets the ID of the last created track
isom_file | the target ISO file |
GF_Err gf_isom_apply_box_patch | ( | GF_ISOFile * | isom_file, |
GF_ISOTrackID | trackID, | ||
const char * | box_patch_filename, | ||
Bool | for_fragments | ||
) |
applies a box patch to the file. See examples in gpac test suite, media/boxpatch/
isom_file | the target ISO file |
trackID | the ID of the track to patch, in case one of the box patch applies to a track |
box_patch_filename | the name of the file containing the box patches |
for_fragments | indicates if the patch targets movie fragments or regular moov |
GF_Err gf_isom_set_track_magic | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u64 | magic | ||
) |
sets track magic number
isom_file | the target ISO file |
trackNumber | the target track |
magic | the magic number to set; magic number is not written to file |
GF_Err gf_isom_set_track_index | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | index, | ||
void(*)(void *udta, u32 old_track_num, u32 new_track_num) | track_num_changed, | ||
void * | udta | ||
) |
sets track index in moov
isom_file | the target ISO file |
trackNumber | the target track |
index | the 1-based index to set. Tracks will be reordered after this! |
track_num_changed | callback function used to notify track changes during the call to this function |
udta | opaque user data for the callback function |
GF_Err gf_isom_remove_stream_description | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
removes a sample description with the given index
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description to remove |
GF_Err gf_isom_update_bitrate | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 | average_bitrate, | ||
u32 | max_bitrate, | ||
u32 | decode_buffer_size | ||
) |
updates average and max bitrate of a sample description if both average_bitrate and max_bitrate are 0, this removes any bitrate information
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description |
average_bitrate | the average bitrate of the media for that sample description |
max_bitrate | the maximum bitrate of the media for that sample description |
decode_buffer_size | the decoder buffer size in bytes for that sample description |
GF_Err gf_isom_clone_track | ( | GF_ISOFile * | orig_file, |
u32 | orig_track, | ||
GF_ISOFile * | dest_file, | ||
GF_ISOTrackCloneFlags | flags, | ||
u32 * | dest_track | ||
) |
clones a track. This clones everything except media data and sample info (DTS, CTS, RAPs, etc...), and also clones sample descriptions
orig_file | the source ISO file |
orig_track | the source track |
dest_file | the destination ISO file |
flags | flags to use during clone |
dest_track | set to the track number of cloned track |
GF_Err gf_isom_set_track_interleaving_group | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | GroupID | ||
) |
sets the GroupID of a track (only used for optimized interleaving). By setting GroupIDs you can specify the storage order for media data of a group of streams. This is useful for BIFS presentation so that static resources of the scene can be downloaded before BIFS
isom_file | the target ISO file |
trackNumber | the target track |
GroupID | the desired group ID |
GF_Err gf_isom_set_track_priority_in_group | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | InversePriority | ||
) |
sets the priority of a track within a Group (used for optimized interleaving and hinting). This allows tracks to be stored before other within a same group, for instance the hint track data can be stored just before the media data, reducing disk seeking
isom_file | the target ISO file |
trackNumber | the target track |
InversePriority | the desired priority. For a same time, within a group of tracks, the track with the lowest InversePriority will be written first |
GF_Err gf_isom_hint_max_chunk_size | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | maxChunkSize | ||
) |
sets the maximum chunk size for a track
isom_file | the target ISO file |
trackNumber | the target track |
maxChunkSize | the maximum chunk size in bytes |
GF_Err gf_isom_hint_max_chunk_duration | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | maxChunkDur | ||
) |
sets the maximum chunk duration for a track
isom_file | the target ISO file |
trackNumber | the target track |
maxChunkDur | the maximum chunk duration in media timescale |
GF_Err gf_isom_make_interleave | ( | GF_ISOFile * | isom_file, |
Double | TimeInSec | ||
) |
sets up interleaving for storage (shortcut for storeage mode + interleave_time)
isom_file | the target ISO file |
TimeInSec | the desired interleaving time in seconds |
GF_Err gf_isom_make_interleave_ex | ( | GF_ISOFile * | isom_file, |
GF_Fraction * | fTimeInSec | ||
) |
sets up interleaving for storage (shortcut for storeage mode + interleave_time)
isom_file | the target ISO file |
fTimeInSec | the desired interleaving time in seconds, as a fraction |
void gf_isom_set_progress_callback | ( | GF_ISOFile * | isom_file, |
void(*)(void *udta, u64 nb_done, u64 nb_total) | progress_cbk, | ||
void * | progress_cbk_udta | ||
) |
sets progress callback when writing a file
isom_file | the target ISO file |
progress_cbk | the progress callback function |
progress_cbk_udta | opaque data passed to the progress callback function |
GF_Err gf_isom_set_write_callback | ( | GF_ISOFile * | isom_file, |
gf_isom_on_block_out | on_block_out, | ||
gf_isom_on_block_patch | on_block_patch, | ||
gf_isom_on_last_block_start | on_last_block_start, | ||
void * | usr_data, | ||
u32 | block_size | ||
) |
sets write callback functions for in-memory file writing
isom_file | the target ISO file |
on_block_out | the block write callback function, mandatory |
on_block_patch | the block patch callback function, may be NULL if only fragmented files or very small files are being produced |
on_last_block_start | called before writing the last block of a sequence of movie fragments |
usr_data | opaque user data passed to callback functions |
block_size | desired block size in bytes |
Bool gf_isom_is_inplace_rewrite | ( | GF_ISOFile * | isom_file | ) |
checks if file will use in-place rewriting or not
isom_file | the target ISO file |
void gf_isom_disable_inplace_rewrite | ( | GF_ISOFile * | isom_file | ) |
Disables inplace rewrite. Once in-place rewrite is disabled, the file can no longer be rewrittten in place.
In-place rewriting allows editing the file structure (ftyp, moov and meta boxes) without modifying the media data size.
In-place rewriting is disabled for any of the following:
In-place rewriting is enabled by default on files open in edit mode.
isom_file | the target ISO file |
GF_Err gf_isom_set_inplace_padding | ( | GF_ISOFile * | isom_file, |
u32 | padding | ||
) |
sets amount of bytes to reserve after moov for future in-place editing. This may be ignored depending on the final write mode
isom_file | the target ISO file |
padding | amount of bytes to reserve |