libgpac
Documentation of the core library of GPAC
|
Data Structures | |
struct | GF_AudioChannelLayout |
struct | GF_ContentLightLevelInfo |
struct | GF_MasteringDisplayColourVolumeInfo |
struct | GF_AudioChannelLayout.layouts |
struct | GF_MasteringDisplayColourVolumeInfo.display_primaries |
Macros | |
#define | GF_ISOM_MAC_TIME_OFFSET 2082844800 |
Enumerations | |
enum | GF_ISOMMinNegCtsQuery { GF_ISOM_MIN_NEGCTTS_ANY = 0 , GF_ISOM_MIN_NEGCTTS_CLSG , GF_ISOM_MIN_NEGCTTS_SAMPLES } |
enum | { GF_ISOM_EXTK_EDTS_SKIP =1 , GF_ISOM_EXTK_URN =1<<1 , GF_ISOM_EXTK_NO_UDTA =1<<2 , GF_ISOM_EXTK_NO_META =1<<3 } |
Functions | |
Bool | gf_isom_moov_first (GF_ISOFile *isom_file) |
GF_Err | gf_isom_set_byte_offset (GF_ISOFile *isom_file, s64 byte_offset) |
GF_Err | gf_isom_open_progressive (const char *fileName, u64 start_range, u64 end_range, Bool enable_frag_templates, GF_ISOFile **isom_file, u64 *BytesMissing) |
GF_Err | gf_isom_open_progressive_ex (const char *fileName, u64 start_range, u64 end_range, Bool enable_frag_templates, GF_ISOFile **isom_file, u64 *BytesMissing, u32 *topBoxType) |
u64 | gf_isom_get_missing_bytes (GF_ISOFile *isom_file, u32 trackNumber) |
Bool | gf_isom_has_movie (GF_ISOFile *isom_file) |
u32 | gf_isom_get_track_count (GF_ISOFile *isom_file) |
u32 | gf_isom_get_timescale (GF_ISOFile *isom_file) |
u64 | gf_isom_get_duration (GF_ISOFile *isom_file) |
u64 | gf_isom_get_original_duration (GF_ISOFile *isom_file) |
GF_Err | gf_isom_get_creation_time (GF_ISOFile *isom_file, u64 *creationTime, u64 *modificationTime) |
GF_Err | gf_isom_get_track_creation_time (GF_ISOFile *isom_file, u32 trackNumber, u64 *creationTime, u64 *modificationTime) |
GF_ISOTrackID | gf_isom_get_track_id (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_track_by_id (GF_ISOFile *isom_file, GF_ISOTrackID trackID) |
GF_ISOTrackID | gf_isom_get_track_original_id (GF_ISOFile *isom_file, u32 trackNumber) |
u8 | gf_isom_is_track_enabled (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_track_flags (GF_ISOFile *isom_file, u32 trackNumber) |
u64 | gf_isom_get_track_duration (GF_ISOFile *isom_file, u32 trackNumber) |
u64 | gf_isom_get_track_duration_orig (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_media_type (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_media_subtype (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
GF_Err | gf_isom_get_media_time (GF_ISOFile *isom_file, u32 trackNumber, u32 movieTime, u64 *mediaTime) |
u32 | gf_isom_get_sample_description_count (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_sample_description_index (GF_ISOFile *isom_file, u32 trackNumber, u64 for_time) |
Bool | gf_isom_is_self_contained (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
u64 | gf_isom_get_media_duration (GF_ISOFile *isom_file, u32 trackNumber) |
u64 | gf_isom_get_media_original_duration (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_media_timescale (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_get_chunks_infos (GF_ISOFile *isom_file, u32 trackNumber, u32 *dur_min, u32 *dur_avg, u32 *dur_max, u32 *size_min, u32 *size_avg, u32 *size_max) |
GF_Err | gf_isom_get_handler_name (GF_ISOFile *isom_file, u32 trackNumber, const char **outName) |
GF_Err | gf_isom_check_data_reference (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
GF_Err | gf_isom_get_data_reference (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, const char **outURL, const char **outURN) |
u32 | gf_isom_get_sample_count (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_constant_sample_size (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_constant_sample_duration (GF_ISOFile *isom_file, u32 trackNumber) |
Bool | gf_isom_enable_raw_pack (GF_ISOFile *isom_file, u32 trackNumber, u32 pack_num_samples) |
u64 | gf_isom_get_media_data_size (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_set_sample_padding (GF_ISOFile *isom_file, u32 trackNumber, u32 padding_bytes) |
GF_ISOSample * | gf_isom_get_sample (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u32 *sampleDescriptionIndex) |
GF_ISOSample * | gf_isom_get_sample_ex (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u32 *sampleDescriptionIndex, GF_ISOSample *static_sample, u64 *data_offset) |
GF_ISOSample * | gf_isom_get_sample_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u32 *sampleDescriptionIndex, u64 *data_offset) |
GF_ISOSample * | gf_isom_get_sample_info_ex (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u32 *sampleDescriptionIndex, u64 *data_offset, GF_ISOSample *static_sample) |
u64 | gf_isom_get_sample_dts (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber) |
u32 | gf_isom_get_sample_duration (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber) |
u32 | gf_isom_get_sample_size (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber) |
u32 | gf_isom_get_max_sample_size (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_avg_sample_size (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_max_sample_delta (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_avg_sample_delta (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_max_sample_cts_offset (GF_ISOFile *isom_file, u32 trackNumber) |
Bool | gf_isom_get_sample_sync (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber) |
GF_Err | gf_isom_get_sample_flags (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u32 *is_leading, u32 *dependsOn, u32 *dependedOn, u32 *redundant) |
GF_Err | gf_isom_get_sample_for_media_time (GF_ISOFile *isom_file, u32 trackNumber, u64 desiredTime, u32 *sampleDescriptionIndex, GF_ISOSearchMode SearchMode, GF_ISOSample **sample, u32 *sample_number, u64 *data_offset) |
u32 | gf_isom_get_sample_from_dts (GF_ISOFile *isom_file, u32 trackNumber, u64 dts) |
const GF_ISOTrackID * | gf_isom_enum_track_references (GF_ISOFile *isom_file, u32 trackNumber, u32 idx, u32 *referenceType, u32 *referenceCount) |
s32 | gf_isom_get_reference_count (GF_ISOFile *isom_file, u32 trackNumber, u32 referenceType) |
GF_Err | gf_isom_get_reference (GF_ISOFile *isom_file, u32 trackNumber, u32 referenceType, u32 referenceIndex, u32 *refTrack) |
GF_Err | gf_isom_get_reference_ID (GF_ISOFile *isom_file, u32 trackNumber, u32 referenceType, u32 referenceIndex, GF_ISOTrackID *refTrackID) |
u32 | gf_isom_has_track_reference (GF_ISOFile *isom_file, u32 trackNumber, u32 referenceType, GF_ISOTrackID refTrackID) |
u32 | gf_isom_is_track_referenced (GF_ISOFile *isom_file, u32 trackNumber, u32 referenceType) |
GF_Err | gf_isom_get_sample_for_movie_time (GF_ISOFile *isom_file, u32 trackNumber, u64 movieTime, u32 *sampleDescriptionIndex, GF_ISOSearchMode SearchMode, GF_ISOSample **sample, u32 *sample_number, u64 *data_offset) |
Bool | gf_isom_get_edit_list_type (GF_ISOFile *isom_file, u32 trackNumber, s64 *mediaOffset) |
u32 | gf_isom_get_edits_count (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_get_edit (GF_ISOFile *isom_file, u32 trackNumber, u32 EditIndex, u64 *EditTime, u64 *SegmentDuration, u64 *MediaTime, GF_ISOEditType *EditMode) |
u32 | gf_isom_get_copyright_count (GF_ISOFile *isom_file) |
GF_Err | gf_isom_get_copyright (GF_ISOFile *isom_file, u32 Index, const char **threeCharCodes, const char **notice) |
u32 | gf_isom_get_chapter_count (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_get_chapter (GF_ISOFile *isom_file, u32 trackNumber, u32 Index, u64 *chapter_time, const char **name) |
u8 | gf_isom_has_sync_points (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_sync_point_count (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_has_time_offset (GF_ISOFile *isom_file, u32 trackNumber) |
s64 | gf_isom_get_cts_to_dts_shift (GF_ISOFile *isom_file, u32 trackNumber) |
Bool | gf_isom_has_sync_shadows (GF_ISOFile *isom_file, u32 trackNumber) |
Bool | gf_isom_has_sample_dependency (GF_ISOFile *isom_file, u32 trackNumber) |
u64 | gf_isom_estimate_size (GF_ISOFile *isom_file) |
u32 | gf_isom_get_next_alternate_group_id (GF_ISOFile *isom_file) |
const char * | gf_isom_get_filename (GF_ISOFile *isom_file) |
GF_Err | gf_isom_get_brand_info (GF_ISOFile *isom_file, u32 *brand, u32 *minorVersion, u32 *AlternateBrandsCount) |
GF_Err | gf_isom_get_alternate_brand (GF_ISOFile *isom_file, u32 BrandIndex, u32 *brand) |
const u32 * | gf_isom_get_brands (GF_ISOFile *isom_file) |
GF_Err | gf_isom_get_sample_padding_bits (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleNumber, u8 *NbBits) |
Bool | gf_isom_has_padding_bits (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_get_visual_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *Width, u32 *Height) |
GF_Err | gf_isom_get_visual_bit_depth (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u16 *bitDepth) |
GF_Err | gf_isom_get_audio_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *SampleRate, u32 *Channels, u32 *bitsPerSample) |
GF_Err | gf_isom_get_audio_layout (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_AudioChannelLayout *layout) |
GF_Err | gf_isom_get_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_get_track_matrix (GF_ISOFile *isom_file, u32 trackNumber, u32 matrix[9]) |
GF_Err | gf_isom_get_pixel_aspect_ratio (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *hSpacing, u32 *vSpacing) |
GF_Err | gf_isom_get_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) |
GF_Err | gf_isom_get_icc_profile (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, Bool *icc_restricted, const u8 **icc, u32 *icc_size) |
GF_Err | gf_isom_get_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) |
const GF_MasteringDisplayColourVolumeInfo * | gf_isom_get_mastering_display_colour_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
const GF_ContentLightLevelInfo * | gf_isom_get_content_light_level_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
GF_Err | gf_isom_get_media_language (GF_ISOFile *isom_file, u32 trackNumber, char **lang) |
u32 | gf_isom_get_track_kind_count (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_get_track_kind (GF_ISOFile *isom_file, u32 trackNumber, u32 index, char **scheme, char **value) |
u64 | gf_isom_get_track_magic (GF_ISOFile *isom_file, u32 trackNumber) |
u32 | gf_isom_get_track_group (GF_ISOFile *isom_file, u32 trackNumber, u32 track_group_type) |
Bool | gf_isom_enum_track_group (GF_ISOFile *isom_file, u32 trackNumber, u32 *idx, u32 *track_group_type, u32 *track_group_id) |
Bool | gf_isom_is_single_av (GF_ISOFile *isom_file) |
u32 | gf_isom_guess_specification (GF_ISOFile *isom_file) |
u32 | gf_isom_get_nalu_length_field (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex) |
GF_Err | gf_isom_get_bitrate (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *average_bitrate, u32 *max_bitrate, u32 *decode_buffer_size) |
GF_Err | gf_isom_get_track_template (GF_ISOFile *isom_file, u32 trackNumber, u8 **output, u32 *output_size) |
GF_Err | gf_isom_get_trex_template (GF_ISOFile *isom_file, u32 trackNumber, u8 **output, u32 *output_size) |
s32 | gf_isom_get_min_negative_cts_offset (GF_ISOFile *isom_file, u32 trackNumber, GF_ISOMMinNegCtsQuery query_mode) |
GF_Err | gf_isom_set_removed_bytes (GF_ISOFile *isom_file, u64 bytes_removed) |
GF_Err | gf_isom_get_current_top_box_offset (GF_ISOFile *isom_file, u64 *current_top_box_offset) |
GF_Err | gf_isom_purge_samples (GF_ISOFile *isom_file, u32 trackNumber, u32 nb_samples) |
Bool | gf_isom_is_external_track (GF_ISOFile *isom_file, u32 trackNumber, GF_ISOTrackID *tkid, u32 *type, u32 *flags, const char **location) |
GF_Err | gf_isom_switch_source (GF_ISOFile *isom_file, const char *url) |
GF_Err | gf_isom_dump (GF_ISOFile *isom_file, FILE *trace, Bool skip_init, Bool skip_samples) |
u32 | gf_isom_get_chunk_count (GF_ISOFile *isom_file, u32 trackNumber) |
GF_Err | gf_isom_get_chunk_info (GF_ISOFile *isom_file, u32 trackNumber, u32 chunkNumber, u64 *chunk_offset, u32 *first_sample_num, u32 *sample_per_chunk, u32 *sample_desc_idx, u32 *cache_1, u32 *cache_2) |
u64 | gf_isom_get_first_mdat_start (GF_ISOFile *isom_file) |
u64 | gf_isom_get_unused_box_bytes (GF_ISOFile *isom_file) |
ISOBMF file reading
struct GF_AudioChannelLayout |
Audio channel layout description, ISOBMFF style
Data Fields | ||
---|---|---|
u8 | stream_structure |
stream structure flags, 1: has channel layout, 2: has objects |
u8 | format_ordering |
order of formats in the stream : 0 unknown, 1: Channels, possibly followed by Objects, 2 Objects, possibly followed by Channels |
u8 | base_channel_count |
combined channel count of the channel layout and the object count |
u8 | definedLayout |
defined CICP channel layout |
u8 | channel_order_definition |
indicates where the ordering of the audio channels for the definedLayout are specified 0: as listed for the ChannelConfigurations in ISO/IEC 23091-3 1: Default order of audio codec specification 2: Channel ordering #2 of audio codec specification 3: Channel ordering #3 of audio codec specification 4: Channel ordering #4 of audio codec specification |
u8 | omitted_channels_present |
indicates if omittedChannelsMap is present |
u32 | channels_count |
number of channels |
struct GF_AudioChannelLayout | layouts[64] | |
u64 | omittedChannelsMap |
bit-map of omitted channels using bit positions defined in CICP - only valid if definedLayout is not 0 |
u8 | object_count |
number of objects in the stream |
struct GF_ContentLightLevelInfo |
struct GF_MasteringDisplayColourVolumeInfo |
mastering display colour volume info
Data Fields | ||
---|---|---|
struct GF_MasteringDisplayColourVolumeInfo | display_primaries[3] |
display primaries |
u16 | white_point_x |
X white point |
u16 | white_point_y |
Y white point |
u32 | max_display_mastering_luminance | |
u32 | min_display_mastering_luminance |
min display mastering luminance |
struct GF_AudioChannelLayout.layouts |
struct GF_MasteringDisplayColourVolumeInfo.display_primaries |
#define GF_ISOM_MAC_TIME_OFFSET 2082844800 |
time offset since UNIX EPOC for MP4/QT/MJ2K files
anonymous enum |
Bool gf_isom_moov_first | ( | GF_ISOFile * | isom_file | ) |
checks if moov box is before any mdat box
isom_file | the target ISO file |
when reading a file, indicates that file data is missing the indicated bytes
isom_file | the target ISO file |
byte_offset | number of bytes not present at the beginning of the file |
GF_Err gf_isom_open_progressive | ( | const char * | fileName, |
u64 | start_range, | ||
u64 | end_range, | ||
Bool | enable_frag_templates, | ||
GF_ISOFile ** | isom_file, | ||
u64 * | BytesMissing | ||
) |
opens a movie that can be uncomplete in READ_ONLY mode to use for http streaming & co
start_range and end_range restricts the media byte range in the URL (used by DASH) if 0 or end_range<=start_range, the entire URL is used when parsing
If the url indicates a gfio or gmem resource, the file can be played from the associated underlying buffer. For gmem, you must call gf_isom_refresh_fragmented and gf_isom_set_removed_bytes whenever the underlying buffer is modified.
fileName | the name of the local file or cache to open, gmem:// or gfio:// |
start_range | only loads starting from indicated byte range |
end_range | loading stops at indicated byte range |
enable_frag_templates | loads fragment and segment boundaries in an internal table |
isom_file | pointer set to the opened file if success |
BytesMissing | is set to the predicted number of bytes missing for the file to be loaded Note that if the file is not optimized for streaming, this number is not accurate If the movie is successfully loaded (isom_file non-NULL), BytesMissing is zero |
GF_Err gf_isom_open_progressive_ex | ( | const char * | fileName, |
u64 | start_range, | ||
u64 | end_range, | ||
Bool | enable_frag_templates, | ||
GF_ISOFile ** | isom_file, | ||
u64 * | BytesMissing, | ||
u32 * | topBoxType | ||
) |
same as gf_isom_open_progressive but allows fetching the incomplete box type
fileName | the name of the local file or cache to open |
start_range | only loads starting from indicated byte range |
end_range | loading stops at indicated byte range |
enable_frag_templates | loads fragment and segment boundaries in an internal table |
isom_file | pointer set to the opened file if success |
BytesMissing | is set to the predicted number of bytes missing for the file to be loaded |
topBoxType | is set to the 4CC of the incomplete top-level box found - may be NULL Note that if the file is not optimized for streaming, this number is not accurate If the movie is successfully loaded (isom_file non-NULL), BytesMissing is zero |
retrieves number of bytes missing. if requesting a sample fails with error GF_ISOM_INCOMPLETE_FILE, use this function to get the number of bytes missing to retrieve the sample
isom_file | the target ISO file |
trackNumber | the desired track to query |
Bool gf_isom_has_movie | ( | GF_ISOFile * | isom_file | ) |
checks if a file has movie info (moov box with tracks & dynamic media). Some files may just use the base IsoMedia structure without "moov" container
isom_file | the target ISO file |
u32 gf_isom_get_track_count | ( | GF_ISOFile * | isom_file | ) |
gets number of tracks
isom_file | the target ISO file |
u32 gf_isom_get_timescale | ( | GF_ISOFile * | isom_file | ) |
gets the movie timescale
isom_file | the target ISO file |
u64 gf_isom_get_duration | ( | GF_ISOFile * | isom_file | ) |
gets the movie duration computed based on media samples and edit lists
isom_file | the target ISO file |
u64 gf_isom_get_original_duration | ( | GF_ISOFile * | isom_file | ) |
gets the original movie duration as written in the file, regardless of the media data
isom_file | the target ISO file |
GF_Err gf_isom_get_creation_time | ( | GF_ISOFile * | isom_file, |
u64 * | creationTime, | ||
u64 * | modificationTime | ||
) |
gets the creation info of the movie
isom_file | the target ISO file |
creationTime | set to the creation time of the movie |
modificationTime | set to the modification time of the movie |
GF_Err gf_isom_get_track_creation_time | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u64 * | creationTime, | ||
u64 * | modificationTime | ||
) |
gets the creation info of the movie
isom_file | the target ISO file |
trackNumber | the target track |
creationTime | set to the creation time of the movie |
modificationTime | set to the modification time of the movie |
GF_ISOTrackID gf_isom_get_track_id | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
gets the ID of a track
isom_file | the target ISO file |
trackNumber | the target track |
u32 gf_isom_get_track_by_id | ( | GF_ISOFile * | isom_file, |
GF_ISOTrackID | trackID | ||
) |
gets a track number by its ID
isom_file | the target ISO file |
trackID | the target track ID |
GF_ISOTrackID gf_isom_get_track_original_id | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber | ||
) |
gets the track original ID (before cloning from another file)
isom_file | the target ISO file |
trackNumber | the target track |
gets the enable flag of a track
isom_file | the target ISO file |
trackNumber | the target track |
gets track flags
isom_file | the target ISO file |
trackNumber | the target track |
gets the track duration - this will try to fix any discrepencies between media duration+edit lists vs track duration
isom_file | the target ISO file |
trackNumber | the target track |
gets the unmodified track duration - mus be called before any call to gf_isom_get_track_duration
isom_file | the target ISO file |
trackNumber | the target track |
gets the media type (audio, video, etc) of a track
isom_file | the target ISO file |
trackNumber | the target track |
u32 gf_isom_get_media_subtype | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
gets media subtype of a sample description entry
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
GF_Err gf_isom_get_media_time | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | movieTime, | ||
u64 * | mediaTime | ||
) |
gets the composition time (media time) given the absolute time in the Movie
isom_file | the target ISO file |
trackNumber | the target track |
movieTime | desired time in movie timescale |
mediaTime | is set to 0 if the media is not playing at that time (empty time segment) |
gets the number of sample descriptions in the media - a media can have several stream descriptions (eg different codec configurations, different protetcions, different visual sizes).
isom_file | the target ISO file |
trackNumber | the target track |
gets the stream description index for a given time in media time
isom_file | the target ISO file |
trackNumber | the target track |
for_time | the desired time in media timescale |
Bool gf_isom_is_self_contained | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
checks if a sample stream description is self-contained (samples located in the file)
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
gets the media duration (without edit) based on sample table
isom_file | the target ISO file |
trackNumber | the target track |
gets the original media duration (without edit) as indicated in the file
isom_file | the target ISO file |
trackNumber | the target track |
gets the media timescale
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_get_chunks_infos | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 * | dur_min, | ||
u32 * | dur_avg, | ||
u32 * | dur_max, | ||
u32 * | size_min, | ||
u32 * | size_avg, | ||
u32 * | size_max | ||
) |
gets media chunking information for non-fragmented files
isom_file | the target ISO file |
trackNumber | the target track |
dur_min | set to minimum chunk duration in media timescale (optional, can be NULL) |
dur_avg | set to average chunk duration in media timescale (optional, can be NULL) |
dur_max | set to maximum chunk duration in media timescale (optional, can be NULL) |
size_min | set to smallest chunk size in bytes (optional, can be NULL) |
size_avg | set to average chunk size in bytes (optional, can be NULL) |
size_max | set to largest chunk size in bytes (optional, can be NULL) |
gets the handler name. The outName must be:
isom_file | the target ISO file |
trackNumber | the target track |
outName | set to the handler name (must be non NULL) |
GF_Err gf_isom_check_data_reference | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
checks if the data reference for the given track and sample description is valid and supported (a data Reference allows to construct a file without integrating the media data, however this library only handles local storage external data references)
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
GF_Err gf_isom_get_data_reference | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
const char ** | outURL, | ||
const char ** | outURN | ||
) |
gets the location of the data. If both outURL and outURN are set to NULL, the data is in this file
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
outURL | set to URL value of the data reference |
outURN | set to URN value of the data reference |
gets the number of samples in a track
isom_file | the target ISO file |
trackNumber | the target track |
gets the constant sample size for samples of a track
isom_file | the target ISO file |
trackNumber | the target track |
gets the constant sample duration for samples of a track
isom_file | the target ISO file |
trackNumber | the target track |
sets max audio sample packing in a single ISOSample. This is mostly used when processing raw audio tracks, for which extracting samples per samples would be too time consuming
isom_file | the target ISO file |
trackNumber | the target track |
pack_num_samples | the target number of samples to pack in one ISOSample |
gets the total media data size of a track (whether in the file or not)
isom_file | the target ISO file |
trackNumber | the target track |
sets sample padding bytes when reading a sample It may be desired to fetch samples with a bigger allocated buffer than their real size, in case the decoder reads more data than available. This sets the amount of extra bytes to allocate when reading samples from this track
isom_file | the target ISO file |
trackNumber | the target track |
padding_bytes | the amount of bytes to add at the end of a sample data buffer |
GF_ISOSample* gf_isom_get_sample | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u32 * | sampleDescriptionIndex | ||
) |
fetches a sample from a track. The sample must be destroyed using gf_isom_sample_del
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the desired sample number (1-based index) |
sampleDescriptionIndex | set to the sample description index corresponding to this sample |
GF_ISOSample* gf_isom_get_sample_ex | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u32 * | sampleDescriptionIndex, | ||
GF_ISOSample * | static_sample, | ||
u64 * | data_offset | ||
) |
fetches a sample from a track without allocating a new sample. This function is the same as gf_isom_get_sample except that it fills in the static_sample passed as argument, potentially reallocating buffers
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the desired sample number (1-based index) |
sampleDescriptionIndex | set to the sample description index corresponding to this sample |
static_sample | a caller-allocated ISO sample to use as the returned sample |
data_offset | set to data offset in file / current bitstream - may be NULL |
GF_ISOSample* gf_isom_get_sample_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u32 * | sampleDescriptionIndex, | ||
u64 * | data_offset | ||
) |
gets sample information. This is the same as gf_isom_get_sample but doesn't fetch media data
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the desired sample number (1-based index) |
sampleDescriptionIndex | set to the sample description index corresponding to this sample (optional, can be NULL) |
data_offset | set to the sample start offset in file (optional, can be NULL) |
GF_ISOSample* gf_isom_get_sample_info_ex | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u32 * | sampleDescriptionIndex, | ||
u64 * | data_offset, | ||
GF_ISOSample * | static_sample | ||
) |
gets sample information with a user-allocated sample. This is the same as gf_isom_get_sample_info but uses a static allocated sample as input
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the desired sample number (1-based index) |
sampleDescriptionIndex | set to the sample description index corresponding to this sample (optional, can be NULL) |
data_offset | set to the sample start offset in file (optional, can be NULL) |
static_sample | a caller-allocated ISO sample to use as the returned sample |
get sample decoding time
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the desired sample number (1-based index) |
gets sample duration
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the desired sample number (1-based index) |
gets sample size
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the desired sample number (1-based index) |
gets maximum sample size in track
isom_file | the target ISO file |
trackNumber | the target track |
gets average sample size in a track
isom_file | the target ISO file |
trackNumber | the target track |
gets maximum sample duration in track
isom_file | the target ISO file |
trackNumber | the target track |
gets average sample duration in track, i.e. the sample delta occuring most often
isom_file | the target ISO file |
trackNumber | the target track |
gets max sample CTS offset (CTS-DTS) in track
isom_file | the target ISO file |
trackNumber | the target track |
gets sample sync flag. This does not check other sample groups ('rap ' or 'sap ')
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the desired sample number (1-based index) |
GF_Err gf_isom_get_sample_flags | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u32 * | is_leading, | ||
u32 * | dependsOn, | ||
u32 * | dependedOn, | ||
u32 * | redundant | ||
) |
gets 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 |
sampleNumber | the desired sample number (1-based index) |
is_leading | set to 1 if sample is a leading picture |
dependsOn | set to the depends_on flag |
dependedOn | set to the depended_on flag |
redundant | set to the redundant flag |
GF_Err gf_isom_get_sample_for_media_time | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u64 | desiredTime, | ||
u32 * | sampleDescriptionIndex, | ||
GF_ISOSearchMode | SearchMode, | ||
GF_ISOSample ** | sample, | ||
u32 * | sample_number, | ||
u64 * | data_offset | ||
) |
gets a sample given a desired decoding time and set the sampleDescriptionIndex of this sample
isom_file | the target ISO file |
trackNumber | the target track |
desiredTime | the desired time in media timescale |
sampleDescriptionIndex | set to the sample description index corresponding to this sample (optional, can be NULL) |
SearchMode | the search direction mode |
sample | set to the fetched sample if any. If NULL, sample is not fetched (optional, can be NULL) |
sample_number | set to the fetched sample number if any, set to 0 otherwise (optional, can be NULL) |
data_offset | set to the sample start offset in file (optional, can be NULL) |
gets sample number for a given decode time
isom_file | the target ISO file |
trackNumber | the target track |
dts | the desired decode time in media timescale |
const GF_ISOTrackID* gf_isom_enum_track_references | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | idx, | ||
u32 * | referenceType, | ||
u32 * | referenceCount | ||
) |
enumerates the type and references IDs of a track
isom_file | the target ISO file |
trackNumber | the target track |
idx | 0-based index of reference to query |
referenceType | set to the four character code of the reference entry |
referenceCount | set to the number of track ID references for the reference entry |
get the number of track references of a track for a given ReferenceType
isom_file | the target ISO file |
trackNumber | the target track |
referenceType | the four character code of the reference to query |
GF_Err gf_isom_get_reference | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | referenceType, | ||
u32 | referenceIndex, | ||
u32 * | refTrack | ||
) |
get the referenced track number for a track and a given ReferenceType and Index
isom_file | the target ISO file |
trackNumber | the target track |
referenceType | the four character code of the reference to query |
referenceIndex | the 1-based index of the reference to query (see gf_isom_get_reference_count) |
refTrack | set to the track number of the referenced track |
GF_Err gf_isom_get_reference_ID | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | referenceType, | ||
u32 | referenceIndex, | ||
GF_ISOTrackID * | refTrackID | ||
) |
get the referenced track ID for a track and a given ReferenceType and Index
isom_file | the target ISO file |
trackNumber | the target track |
referenceType | the four character code of the reference to query |
referenceIndex | the 1-based index of the reference to query (see gf_isom_get_reference_count) |
refTrackID | set to the track ID of the referenced track |
u32 gf_isom_has_track_reference | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | referenceType, | ||
GF_ISOTrackID | refTrackID | ||
) |
checks if a track has a reference of given type to another track
isom_file | the target ISO file |
trackNumber | the target track |
referenceType | the four character code of the reference to query |
refTrackID | set to the track number of the referenced track |
checks if a track is referenced by another track wuth the given reference type
isom_file | the target ISO file |
trackNumber | the target track |
referenceType | the four character code of the reference to query |
GF_Err gf_isom_get_sample_for_movie_time | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u64 | movieTime, | ||
u32 * | sampleDescriptionIndex, | ||
GF_ISOSearchMode | SearchMode, | ||
GF_ISOSample ** | sample, | ||
u32 * | sample_number, | ||
u64 * | data_offset | ||
) |
fetches a sample for a given movie time, handling possible track edit lists.
if no sample is playing, an empty sample is returned with no data and a DTS set to MovieTime when searching in sync modes if no sample is playing, the closest sample in the edit time-line is returned when searching in regular modes
isom_file | the target ISO file |
trackNumber | the target track |
movieTime | the desired movie time in media timescale |
sampleDescriptionIndex | set to the sample description index corresponding to this sample (optional, can be NULL) |
SearchMode | the search direction mode |
sample | set to the fetched sample if any. If NULL, sample is not fetched (optional, can be NULL) |
sample_number | set to the fetched sample number if any, set to 0 otherwise (optional, can be NULL) |
data_offset | set to the sample start offset in file (optional, can be NULL) |
gets edit list type
isom_file | the target ISO file |
trackNumber | the target track |
mediaOffset | set to the media offset of the edit for time-shifting edits |
gets the number of edits in an edit list
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_get_edit | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | EditIndex, | ||
u64 * | EditTime, | ||
u64 * | SegmentDuration, | ||
u64 * | MediaTime, | ||
GF_ISOEditType * | EditMode | ||
) |
gets the desired edit information
isom_file | the target ISO file |
trackNumber | the target track |
EditIndex | index of the edit to query (1-based index) |
EditTime | set to the edit time in movie timescale |
SegmentDuration | set to the edit duration in movie timescale |
MediaTime | set to the edit media start time in media timescale |
EditMode | set to the mode of the edit |
u32 gf_isom_get_copyright_count | ( | GF_ISOFile * | isom_file | ) |
gets the number of languages for the copyright
isom_file | the target ISO file |
GF_Err gf_isom_get_copyright | ( | GF_ISOFile * | isom_file, |
u32 | Index, | ||
const char ** | threeCharCodes, | ||
const char ** | notice | ||
) |
gets a copyright and its language code
isom_file | the target ISO file |
Index | the 1-based index of the copyright notice to query |
threeCharCodes | set to the copyright language code |
notice | set to the copyright notice |
gets the number of chapter for movie or track (chapters can be assigned to tracks or to movies)
isom_file | the target ISO file |
trackNumber | the target track to queryy. If 0, looks for chapter at the movie level |
GF_Err gf_isom_get_chapter | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | Index, | ||
u64 * | chapter_time, | ||
const char ** | name | ||
) |
gets the given chapter time and name for a movie or track
isom_file | the target ISO file |
trackNumber | the target track to queryy. If 0, looks for chapter at the movie level |
Index | the index of the ckhapter to queryy |
chapter_time | set to chapter start time in milliseconds (optional, may be NULL) |
name | set to chapter name (optional, may be NULL) |
checks if a media has sync points
isom_file | the target ISO file |
trackNumber | the target track |
gets the number of sync points in a media
isom_file | the target ISO file |
trackNumber | the target track |
checks if a media track hhas composition time offset
isom_file | the target ISO file |
trackNumber | the target track |
gets cts to dts shift value if defined. This shift is defined only in cases of negative CTS offset (ctts version 1) and not always present in files! Adding shift to CTS guarantees that the shifted CTS is always greater than the DTS for any sample
isom_file | the target ISO file |
trackNumber | the target track |
checks if a track has sync shadow samples (RAP samples replacing non RAP ones)
isom_file | the target ISO file |
trackNumber | the target track |
checks if a track has sample dependencoes indicated
isom_file | the target ISO file |
trackNumber | the target track |
u64 gf_isom_estimate_size | ( | GF_ISOFile * | isom_file | ) |
gets a rough estimation of file size. This only works for completely self-contained files and without fragmentation for the current time
isom_file | the target ISO file |
u32 gf_isom_get_next_alternate_group_id | ( | GF_ISOFile * | isom_file | ) |
gets next alternate group ID available
isom_file | the target ISO file |
const char* gf_isom_get_filename | ( | GF_ISOFile * | isom_file | ) |
gets file name of an opened ISO file
isom_file | the target ISO file |
GF_Err gf_isom_get_brand_info | ( | GF_ISOFile * | isom_file, |
u32 * | brand, | ||
u32 * | minorVersion, | ||
u32 * | AlternateBrandsCount | ||
) |
gets file brand information The brand is used to
The function will set brand, minorVersion and AlternateBrandsCount to 0 if no brand indication is found in the file
isom_file | the target ISO file |
brand | set to the four character code of the brand |
minorVersion | set to an informative integer for the minor version of the major brand (optional, can be NULL) |
AlternateBrandsCount | set to the number of compatible brands (optional, can be NULL). |
gets an alternate brand indication
isom_file | the target ISO file |
BrandIndex | 1-based index of alternate brand to query (cf gf_isom_get_brand_info) |
brand | set to the four character code of the brand |
const u32* gf_isom_get_brands | ( | GF_ISOFile * | isom_file | ) |
gets the internal list of brands
isom_file | the target ISO file |
GF_Err gf_isom_get_sample_padding_bits | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleNumber, | ||
u8 * | NbBits | ||
) |
gets the number of padding bits at the end of a given sample if any
isom_file | the target ISO file |
trackNumber | the target track |
sampleNumber | the desired sample number (1-based index) |
NbBits | set to the number of padded bits at the end of the sample |
checks if a track samples use padding bits or not
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_get_visual_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 * | Width, | ||
u32 * | Height | ||
) |
gets information of a visual track for a given sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
Width | set to the width of the sample description in pixels |
Height | set to the height of the sample description in pixels |
GF_Err gf_isom_get_visual_bit_depth | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u16 * | bitDepth | ||
) |
gets 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_get_audio_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 * | SampleRate, | ||
u32 * | Channels, | ||
u32 * | bitsPerSample | ||
) |
gets information of an audio track for a given sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
SampleRate | set to the audio sample rate of the sample description |
Channels | set to the audio channel count of the sample description |
bitsPerSample | set to the audio bits per sample for raw audio of the sample description |
GF_Err gf_isom_get_audio_layout | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
GF_AudioChannelLayout * | layout | ||
) |
get channel layout info for an audio track, ISOBMFF style
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
layout | set to the channel/object layout info for this track |
GF_Err gf_isom_get_track_layout_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 * | width, | ||
u32 * | height, | ||
s32 * | translation_x, | ||
s32 * | translation_y, | ||
s16 * | layer | ||
) |
gets visual track layout information
isom_file | the target ISO file |
trackNumber | the target track |
width | set to the width of the track in pixels |
height | set to the height of the track in pixels |
translation_x | set to the horizontal translation of the track in pixels |
translation_y | set to the vertical translation of the track in pixels |
layer | set to the z-order of the track |
gets matrix of a visual track
isom_file | the target ISO file |
trackNumber | the target track |
matrix | set to the track matrix - all coord values are expressed as 16.16 fixed point floats |
GF_Err gf_isom_get_pixel_aspect_ratio | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 * | hSpacing, | ||
u32 * | vSpacing | ||
) |
gets sample (pixel) aspect ratio information of a visual track for a given sample description The aspect ratio is hSpacing divided by vSpacing
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
hSpacing | horizontal spacing |
vSpacing | vertical spacing |
GF_Err gf_isom_get_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 | ||
) |
gets color information of a visual track for a given sample description
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
colour_type | set to the four character code of the colour type mode used (nclx, nclc, prof or ricc currently defined) |
colour_primaries | set to the colour primaries for nclc/nclx as defined in ISO/IEC 23001-8 |
transfer_characteristics | set to the colour primaries for nclc/nclx as defined in ISO/IEC 23001-8 |
matrix_coefficients | set to the colour primaries for nclc/nclx as defined in ISO/IEC 23001-8 |
full_range_flag | set to the colour primaries for nclc as defined in ISO/IEC 23001-8 |
GF_Err gf_isom_get_icc_profile | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
Bool * | icc_restricted, | ||
const u8 ** | icc, | ||
u32 * | icc_size | ||
) |
gets ICC profile
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
icc_restricted | set to GF_TRUE of restricted ICC profile, GF_FALSE otherwise |
icc | set to profile data, NULL if none |
icc_size | set to profile size, 0 if none |
GF_Err gf_isom_get_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 | ||
) |
gets 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 | set to nominator of clean aperture horizontal size, may be NULL |
cleanApertureWidthD | set to denominator of clean aperture horizontal size, may be NULL |
cleanApertureHeightN | set to nominator of clean aperture vertical size, may be NULL |
cleanApertureHeightD | set to denominator of clean aperture vertical size, may be NULL |
horizOffN | set to nominator of horizontal offset of clean aperture center minus (width-1)/2 (eg 0 sets center to center of video), may be NULL |
horizOffD | set to denominator of horizontal offset of clean aperture center minus (width-1)/2 (eg 0 sets center to center of video), may be NULL |
vertOffN | set to nominator of vertical offset of clean aperture center minus (height-1)/2 (eg 0 sets center to center of video), may be NULL |
vertOffD | set to denominator of vertical offset of clean aperture center minus (height-1)/2 (eg 0 sets center to center of video), may be NULL |
const GF_MasteringDisplayColourVolumeInfo* gf_isom_get_mastering_display_colour_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
gets master display colour info if any
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
const GF_ContentLightLevelInfo* gf_isom_get_content_light_level_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
gets content light level info if any
isom_file | the target ISO file |
trackNumber | the target track number |
sampleDescriptionIndex | the target sample description index |
gets the media language code of a track
isom_file | the target ISO file |
trackNumber | the target track |
lang | set to a newly allocated string containg 3 chars (if old files) or longer form (BCP-47) - shall be freed by caller |
gets the number of kind (media role) for a given track
isom_file | the target ISO file |
trackNumber | the target track |
GF_Err gf_isom_get_track_kind | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | index, | ||
char ** | scheme, | ||
char ** | value | ||
) |
gets a given kind (media role) information for a given track
isom_file | the target ISO file |
trackNumber | the target track |
index | the 1-based index of the kind to retrieve |
scheme | set to the scheme of the kind information - shall be freed by caller |
value | set to the value of the kind information - shall be freed by caller |
gets the magic number associated with a track. The magic number is usually set by a file muxer, and is not serialized to file
isom_file | the target ISO file |
trackNumber | the target track |
gets track group ID of a given track group type for this track
isom_file | the target ISO file |
trackNumber | the target track |
track_group_type | the target track group type |
Bool gf_isom_enum_track_group | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 * | idx, | ||
u32 * | track_group_type, | ||
u32 * | track_group_id | ||
) |
gets track group ID of a given track group type for this track
isom_file | the target ISO file |
trackNumber | the target track |
idx | 0-based index of enumeration, incremented by the function if success |
track_group_type | set to the track group type - may be NULL |
track_group_id | set to the track group ID - may be NULL |
Bool gf_isom_is_single_av | ( | GF_ISOFile * | isom_file | ) |
checks if file is a single AV file with max one audio, one video, one text and basic od/bifs
isom_file | the target ISO file |
u32 gf_isom_guess_specification | ( | GF_ISOFile * | isom_file | ) |
guesses which specification this file refers to.
isom_file | the target ISO file |
for files without movie, returns the file meta handler type
u32 gf_isom_get_nalu_length_field | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex | ||
) |
gets the nalu_length_field size used for this sample description if NALU-based (AVC/HEVC/...)
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
GF_Err gf_isom_get_bitrate | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | sampleDescriptionIndex, | ||
u32 * | average_bitrate, | ||
u32 * | max_bitrate, | ||
u32 * | decode_buffer_size | ||
) |
gets max/average rate information as indicated in ESDS or BTRT boxes. If not found all values are set to 0 if sampleDescriptionIndex is 0, gather for all sample descriptions
isom_file | the target ISO file |
trackNumber | the target track |
sampleDescriptionIndex | the target sample description index (1-based) |
average_bitrate | set to the average bitrate in bits per second of the media |
max_bitrate | set to the maximum bitrate in bits per second of the media |
decode_buffer_size | set to the decoder buffer size in bytes of the media |
GF_Err gf_isom_get_track_template | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u8 ** | output, | ||
u32 * | output_size | ||
) |
gets the track template of a track. This serializes track box without serializing sample tables nor sample description info
isom_file | the destination ISO file |
trackNumber | the destination track |
output | will be set to a newly allocated buffer containing the serialized box - caller shall free it |
output_size | will be set to the size of the allocated buffer |
GF_Err gf_isom_get_trex_template | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u8 ** | output, | ||
u32 * | output_size | ||
) |
gets the trex template of a track. This serializes trex box
isom_file | the destination ISO file |
trackNumber | the destination track |
output | will be set to a newly allocated buffer containing the serialized box - caller shall free it |
output_size | will be set to the size of the allocated buffer |
s32 gf_isom_get_min_negative_cts_offset | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
GF_ISOMMinNegCtsQuery | query_mode | ||
) |
gets the minimum CTS offset for tracks using negative cts
isom_file | the destination ISO file |
trackNumber | the destination track |
query_mode | if set, ignore any CompositionToDecode box present |
sets the number of removed bytes form the input bitstream when using gmem:// url The number of bytes shall be the total number since the opening of the movie
isom_file | the target ISO file |
bytes_removed | number of bytes removed |
gets the current file offset of the current incomplete top level box not parsed This shall be checked to avoid discarding bytes at or after the current top box header
isom_file | the target ISO file |
current_top_box_offset | set to the offset from file first byte |
purges the given number of samples, starting from the first sample, from a track of a fragmented file. This avoids having sample tables growing in size when reading a fragmented file in pure streaming mode (no seek). You should always keep one sample in the track
isom_file | the target ISO file |
trackNumber | the desired track to purge |
nb_samples | the number of samples to remove |
Bool gf_isom_is_external_track | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
GF_ISOTrackID * | tkid, | ||
u32 * | type, | ||
u32 * | flags, | ||
const char ** | location | ||
) |
checks if a track is an external track
isom_file | the target ISO file |
trackNumber | the desired track to purge |
tkid | set to external track ID, may be NULL |
type | set to external track handler type, may be NULL |
flags | set to ExternalTrackLocation box flags, may be NULL |
location | set to external file location, may be NULL |
GF_Err gf_isom_switch_source | ( | GF_ISOFile * | isom_file, |
const char * | url | ||
) |
changes source URL, typically used when seeking operation change cache destination
isom_file | the target ISO file |
url | the new url (local file path or gmem:// blob) |
dumps file structures into XML trace file
isom_file | the target ISO file |
trace | the file object to dump to |
skip_init | does not dump init segment structure |
skip_samples | does not dump sample tables |
gets number of chunks in track
isom_file | the target ISO file |
trackNumber | the desired track to purge |
GF_Err gf_isom_get_chunk_info | ( | GF_ISOFile * | isom_file, |
u32 | trackNumber, | ||
u32 | chunkNumber, | ||
u64 * | chunk_offset, | ||
u32 * | first_sample_num, | ||
u32 * | sample_per_chunk, | ||
u32 * | sample_desc_idx, | ||
u32 * | cache_1, | ||
u32 * | cache_2 | ||
) |
gets info for a given chunk in track
isom_file | the target ISO file |
trackNumber | the desired track to purge |
chunkNumber | the 1-based index of the desired chunk |
chunk_offset | set to the chunk offset in bytes from start of file |
first_sample_num | set to the sample number of the first sample in the chunk |
sample_per_chunk | set to number of samples per chunk |
sample_desc_idx | set to sample desc index of samples of this chunk |
cache_1 | updated by function at each call. May be NULL (slower). Must be set to 0 if not querying consecutive chunks |
cache_2 | updated by function at each call. May be NULL (slower). Must be set to 0 if not querying consecutive chunks |
u64 gf_isom_get_first_mdat_start | ( | GF_ISOFile * | isom_file | ) |
gets the file offset of the first usable byte of the first mdat box in the file
isom_file | the target ISO file |
u64 gf_isom_get_unused_box_bytes | ( | GF_ISOFile * | isom_file | ) |
gets the size of all skip, free and wide boxes present in the file and bytes skipped during parsing (assumes a single file was opened)
isom_file | the target ISO file |