libgpac
Documentation of the core library of GPAC
ISOBMFF Sample Descriptions
+ Collaboration diagram for ISOBMFF Sample Descriptions:

Data Structures

struct  GF_GenericSampleDescription
 
struct  GF_3GPConfig
 
struct  GF_DIMSDescription
 
struct  GF_ISOM_Y3D_Info
 

Enumerations

enum  GF_ISOMAVCType {
  GF_ISOM_AVCTYPE_NONE =0 , GF_ISOM_AVCTYPE_AVC_ONLY , GF_ISOM_AVCTYPE_AVC_SVC , GF_ISOM_AVCTYPE_SVC_ONLY ,
  GF_ISOM_AVCTYPE_AVC_MVC , GF_ISOM_AVCTYPE_MVC_ONLY
}
 
enum  GF_ISOMHEVCType { GF_ISOM_HEVCTYPE_NONE =0 , GF_ISOM_HEVCTYPE_HEVC_ONLY , GF_ISOM_HEVCTYPE_HEVC_LHVC , GF_ISOM_HEVCTYPE_LHVC_ONLY }
 
enum  GF_ISOMVVCType { GF_ISOM_VVCTYPE_NONE =0 , GF_ISOM_VVCTYPE_ONLY , GF_ISOM_VVCTYPE_SUBPIC , GF_ISOM_VVCTYPE_NVCL }
 
enum  GF_ISONaluExtractMode {
  GF_ISOM_NALU_EXTRACT_DEFAULT = 0 , GF_ISOM_NALU_EXTRACT_LAYER_ONLY , GF_ISOM_NALU_EXTRACT_INSPECT , GF_ISOM_NALU_EXTRACT_INBAND_PS_FLAG = 1<<16 ,
  GF_ISOM_NALU_EXTRACT_ANNEXB_FLAG = 2<<17 , GF_ISOM_NALU_EXTRACT_VDRD_FLAG = 1<<18 , GF_ISOM_NALU_EXTRACT_TILE_ONLY = 1<<19
}
 
enum  GF_ISOMLHEVCTrackType { GF_ISOM_LEHVC_ONLY = 0 , GF_ISOM_LEHVC_WITH_BASE , GF_ISOM_LEHVC_WITH_BASE_BACKWARD , GF_ISOM_HEVC_TILE_BASE }
 

Functions

GF_GenericSampleDescriptiongf_isom_get_generic_sample_description (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_Err gf_isom_get_jp2_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u8 **out_dsi, u32 *out_size)
 
GF_Err gf_isom_get_rvc_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u16 *rvc_predefined, u8 **data, u32 *size, const char **mime)
 
GF_Err gf_isom_set_rvc_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u16 rvc_predefined, char *mime, u8 *data, u32 size)
 
GF_Err gf_isom_update_video_sample_entry_fields (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u16 revision, u32 vendor, u32 temporalQ, u32 spatialQ, u32 horiz_res, u32 vert_res, u16 frames_per_sample, const char *compressor_name, s16 color_table_index)
 
GF_Err gf_isom_update_sample_description_from_template (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u8 *data, u32 size)
 
GF_Err gf_isom_new_generic_sample_description (GF_ISOFile *isom_file, u32 trackNumber, const char *URLname, const char *URNname, GF_GenericSampleDescription *udesc, u32 *outDescriptionIndex)
 
GF_Err gf_isom_clone_sample_description (GF_ISOFile *isom_file, u32 trackNumber, GF_ISOFile *orig_file, u32 orig_track, u32 orig_desc_index, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_get_stsd_template (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u8 **output, u32 *output_size)
 
Bool gf_isom_is_same_sample_description (GF_ISOFile *f1, u32 tk1, u32 sdesc_index1, GF_ISOFile *f2, u32 tk2, u32 sdesc_index2)
 
GF_3GPConfiggf_isom_3gp_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_Err gf_isom_3gp_config_new (GF_ISOFile *isom_file, u32 trackNumber, GF_3GPConfig *config, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_3gp_config_update (GF_ISOFile *isom_file, u32 trackNumber, GF_3GPConfig *config, u32 sampleDescriptionIndex)
 
GF_AVCConfiggf_isom_avc_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_AVCConfiggf_isom_svc_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_AVCConfiggf_isom_mvc_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_ISOMAVCType gf_isom_get_avc_svc_type (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_ISOMHEVCType gf_isom_get_hevc_lhvc_type (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_HEVCConfiggf_isom_hevc_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_HEVCConfiggf_isom_lhvc_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_ISOMVVCType gf_isom_get_vvc_type (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_VVCConfiggf_isom_vvc_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_AV1Configgf_isom_av1_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_VPConfiggf_isom_vp_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_DOVIDecoderConfigurationRecordgf_isom_dovi_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
Bool gf_isom_needs_layer_reconstruction (GF_ISOFile *isom_file)
 
GF_Err gf_isom_set_nalu_extract_mode (GF_ISOFile *isom_file, u32 trackNumber, GF_ISONaluExtractMode nalu_extract_mode)
 
GF_ISONaluExtractMode gf_isom_get_nalu_extract_mode (GF_ISOFile *isom_file, u32 trackNumber)
 
s32 gf_isom_get_composition_offset_shift (GF_ISOFile *isom_file, u32 trackNumber)
 
GF_Err gf_isom_avc_config_new (GF_ISOFile *isom_file, u32 trackNumber, GF_AVCConfig *cfg, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_avc_config_update (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_AVCConfig *cfg)
 
GF_Err gf_isom_svc_config_new (GF_ISOFile *isom_file, u32 trackNumber, GF_AVCConfig *cfg, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_svc_config_update (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_AVCConfig *cfg, Bool is_additional)
 
GF_Err gf_isom_svc_config_del (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_Err gf_isom_mvc_config_new (GF_ISOFile *isom_file, u32 trackNumber, GF_AVCConfig *cfg, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_mvc_config_update (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_AVCConfig *cfg, Bool is_additional)
 
GF_Err gf_isom_mvc_config_del (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_Err gf_isom_avc_set_inband_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, Bool keep_xps)
 
GF_Err gf_isom_hevc_set_inband_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, Bool keep_xps)
 
GF_Err gf_isom_lhvc_force_inband_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_Err gf_isom_hevc_set_tile_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_HEVCConfig *cfg, Bool is_base_track)
 
GF_Err gf_isom_hevc_config_new (GF_ISOFile *isom_file, u32 trackNumber, GF_HEVCConfig *cfg, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_hevc_config_update (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_HEVCConfig *cfg)
 
GF_Err gf_isom_lhvc_config_update (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_HEVCConfig *cfg, GF_ISOMLHEVCTrackType track_type)
 
GF_Err gf_isom_set_nalu_length_field (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 nalu_size_length)
 
GF_Err gf_isom_vvc_config_new (GF_ISOFile *isom_file, u32 trackNumber, GF_VVCConfig *cfg, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_vvc_set_inband_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, Bool keep_xps)
 
GF_Err gf_isom_vvc_config_update (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_VVCConfig *cfg)
 
GF_Err gf_isom_vp_config_new (GF_ISOFile *isom_file, u32 trackNumber, GF_VPConfig *cfg, const char *URLname, const char *URNname, u32 *outDescriptionIndex, u32 vpx_type)
 
GF_Err gf_isom_av1_config_new (GF_ISOFile *isom_file, u32 trackNumber, GF_AV1Config *cfg, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_get_dims_description (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_DIMSDescription *desc)
 
GF_Err gf_isom_new_dims_description (GF_ISOFile *isom_file, u32 trackNumber, GF_DIMSDescription *desc, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_get_udts_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_UDTSConfig *cfg)
 
GF_AC3Configgf_isom_ac3_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_Err gf_isom_ac3_config_new (GF_ISOFile *isom_file, u32 trackNumber, GF_AC3Config *cfg, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_ac3_config_update (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_AC3Config *cfg)
 
GF_Err gf_isom_truehd_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *format_info, u32 *peak_data_rate)
 
GF_Err gf_isom_truehd_config_new (GF_ISOFile *isom_file, u32 trackNumber, char *URLname, char *URNname, u32 format_info, u32 peak_data_rate, u32 *outDescriptionIndex)
 
GF_Err gf_isom_flac_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u8 **dsi, u32 *dsi_size)
 
GF_Err gf_isom_flac_config_new (GF_ISOFile *isom_file, u32 trackNumber, u8 *metadata, u32 metadata_size, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_opus_config_get (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u8 **dsi, u32 *dsi_size)
 
GF_Err gf_isom_opus_config_get_desc (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_OpusConfig *opcfg)
 
GF_Err gf_isom_opus_config_new (GF_ISOFile *isom_file, u32 trackNumber, GF_OpusConfig *cfg, char *URLname, char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_new_mj2k_description (GF_ISOFile *isom_file, u32 trackNumber, const char *URLname, const char *URNname, u32 *outDescriptionIndex, u8 *dsi, u32 dsi_len)
 
GF_Err gf_isom_tmcd_config_new (GF_ISOFile *isom_file, u32 trackNumber, u32 fps_num, u32 fps_den, s32 frames_per_counter_tick, Bool is_drop, Bool is_counter, u32 *outDescriptionIndex)
 
GF_Err gf_isom_get_tmcd_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *tmcd_flags, u32 *tmcd_fps_num, u32 *tmcd_fps_den, u32 *tmcd_fpt)
 
GF_Err gf_isom_get_pcm_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *flags, u32 *pcm_size)
 
GF_Err gf_isom_get_lpcm_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, Double *sample_rate, u32 *nb_channels, u32 *flags, u32 *pcm_size)
 
GF_Err gf_isom_new_mpha_description (GF_ISOFile *isom_file, u32 trackNumber, const char *URLname, const char *URNname, u32 *outDescriptionIndex, u8 *dsi, u32 dsi_size, u32 mha_subtype)
 
const u8gf_isom_get_mpegh_compatible_profiles (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *nb_compatible_profiles)
 
GF_Err gf_isom_set_mpegh_compatible_profiles (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, const u32 *profiles, u32 nb_compatible_profiles)
 
GF_Err gf_isom_get_y3d_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_ISOM_Y3D_Info *info)
 
GF_Err gf_isom_set_y3d_info (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_ISOM_Y3D_Info *info)
 

Detailed Description

Sample Description functions are used to query and set codec parameters of a track


Data Structure Documentation

◆ GF_GenericSampleDescription

struct GF_GenericSampleDescription

Unknown sample description

Data Fields
u32 codec_tag

codec tag is the containing box's tag, 0 if UUID is used

bin128 UUID

entry UUID if no tag is used

u16 version

codec version

u16 revision

codec revision

u32 vendor_code

vendor four character code

u32 temporal_quality

temporal quality, video codecs only

u32 spatial_quality

spatial quality, video codecs only

u16 width

width in pixels, video codecs only

u16 height

height in pixels, video codecs only

u32 h_res

horizontal resolution as 16.16 fixed point, video codecs only

u32 v_res

vertical resolution as 16.16 fixed point, video codecs only

u16 depth

bit depth resolution in bits, video codecs only

u16 color_table_index

color table, video codecs only

char compressor_name[33]

compressor name, video codecs only

u32 samplerate

sample rate, audio codecs only

u16 nb_channels

number of channels, audio codecs only

u16 bits_per_sample

bits per sample, audio codecs only

Bool is_qtff

indicates if QTFF signaling should be used, audio codecs only

u32 lpcm_flags

for lpcm only, indicates format flags

u8 * extension_buf
u32 extension_buf_size
u32 ext_box_wrap

◆ GF_3GPConfig

struct GF_3GPConfig

Generic 3GP/3GP2 config record

Data Fields
u32 type
u32 vendor
u8 decoder_version
u8 frames_per_sample
u8 H263_level
u8 H263_profile
u16 AMR_mode_set
u8 AMR_mode_change_period

◆ GF_DIMSDescription

struct GF_DIMSDescription

Sample entry description for 3GPP DIMS

Data Fields
u8 profile

profile

u8 level

level

u8 pathComponents

number of components in path

Bool fullRequestHost

full request

Bool streamType

stream type

u8 containsRedundant

has redundant sample (carousel)

const char * textEncoding

text encoding string

const char * contentEncoding

content encoding string

const char * content_script_types

script string

const char * mime_type

mime type string

const char * xml_schema_loc

xml schema location string

◆ GF_ISOM_Y3D_Info

struct GF_ISOM_Y3D_Info
Data Fields
u32 stereo_type

stereo type holding youtube 360 video info

u32 projection_type

0: unknown (not present), 1: cube map, 2: EQR, 3: mesh

const char * meta_data

metadata about 3D software creator

Bool pose_present

indicate default pause is present

u32 yaw

default pause yaw as 16.16 fixed point

u32 pitch

default pause pitch as 16.16 fixed point

u32 roll

default pause roll as 16.16 fixed point

u32 layout

cube map layout

u32 padding

cube map padding

u32 top

EQR top crop pos in frame, in pixels

u32 bottom

EQR bottom crop pos in frame, in pixels

u32 left

EQR left crop pos in frame, in pixels

u32 right

EQR right crop pos in frame, in pixels

Enumeration Type Documentation

◆ GF_ISOMAVCType

AVC familiy type

Enumerator
GF_ISOM_AVCTYPE_NONE 

not an AVC codec

GF_ISOM_AVCTYPE_AVC_ONLY 

AVC only

GF_ISOM_AVCTYPE_AVC_SVC 

AVC+SVC in same track

GF_ISOM_AVCTYPE_SVC_ONLY 

SVC only

GF_ISOM_AVCTYPE_AVC_MVC 

AVC+MVC in same track

GF_ISOM_AVCTYPE_MVC_ONLY 

SVC only

◆ GF_ISOMHEVCType

HEVC family type

Enumerator
GF_ISOM_HEVCTYPE_NONE 

not an HEVC codec

GF_ISOM_HEVCTYPE_HEVC_ONLY 

HEVC only

GF_ISOM_HEVCTYPE_HEVC_LHVC 

HEVC+LHVC in same track

GF_ISOM_HEVCTYPE_LHVC_ONLY 

LHVC only

◆ GF_ISOMVVCType

VVC family type

Enumerator
GF_ISOM_VVCTYPE_NONE 

not an VVC codec

GF_ISOM_VVCTYPE_ONLY 

VVC only

GF_ISOM_VVCTYPE_SUBPIC 

VVC subpicture track

GF_ISOM_VVCTYPE_NVCL 

VVC non-VCL only

◆ GF_ISONaluExtractMode

NALU extract modes and flags

Enumerator
GF_ISOM_NALU_EXTRACT_DEFAULT 

all extractors are rewritten

GF_ISOM_NALU_EXTRACT_LAYER_ONLY 

all extractors are skipped but NALU data from this track is kept

GF_ISOM_NALU_EXTRACT_INSPECT 

all extractors are kept (untouched sample) - used for dumping modes

GF_ISOM_NALU_EXTRACT_INBAND_PS_FLAG 

above mode is applied and PPS/SPS/... are appended in the front of every IDR

GF_ISOM_NALU_EXTRACT_ANNEXB_FLAG 

above mode is applied and all start codes are rewritten (xPS inband as well)

GF_ISOM_NALU_EXTRACT_VDRD_FLAG 

above mode is applied and VDRD NAL unit is inserted before SVC slice

GF_ISOM_NALU_EXTRACT_TILE_ONLY 

all extractors are skipped and only tile track data is kept

◆ GF_ISOMLHEVCTrackType

Updates L-HHVC config

Enumerator
GF_ISOM_LEHVC_ONLY 

changes track type to LHV1/LHE1: no base nor extractors in track, just enhancement layers

GF_ISOM_LEHVC_WITH_BASE 

changes track type to HVC2/HEV2: base and extractors/enh. in track

GF_ISOM_LEHVC_WITH_BASE_BACKWARD 

changes track type to HVC1/HEV1 with additional cfg: base and enh. in track no extractors

GF_ISOM_HEVC_TILE_BASE 

changes track type to HVC2/HEV2 for tile base tracks

Function Documentation

◆ gf_isom_get_generic_sample_description()

GF_GenericSampleDescription* gf_isom_get_generic_sample_description ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets an unknown sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index (1-based)
Returns
generic sample description information, or NULL if error

◆ gf_isom_get_jp2_config()

GF_Err gf_isom_get_jp2_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u8 **  out_dsi,
u32 out_size 
)

gets the decoder configuration of a JP2 file

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index (1-based)
out_dsiset to the decoder configuration - shall be freed by user
out_sizeset to the decoder configuration size
Returns
error if any

◆ gf_isom_get_rvc_config()

GF_Err gf_isom_get_rvc_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u16 rvc_predefined,
u8 **  data,
u32 size,
const char **  mime 
)

gets RVC (Reconvigurable Video Coding) config of a track for a given sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index (1-based)
rvc_predefinedset to a predefined value of RVC
dataset to the RVC config buffer if not predefined, NULL otherwise
sizeset to the RVC config buffer size
mimeset to the associated mime type of the stream
Returns
error if any

◆ gf_isom_set_rvc_config()

GF_Err gf_isom_set_rvc_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u16  rvc_predefined,
char *  mime,
u8 data,
u32  size 
)

sets the RVC config for the given track sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track number
sampleDescriptionIndexthe target sample description index
rvc_predefinedthe predefined RVC configuration code, 0 if not predefined
mimethe associated mime type of the video
datathe RVC configuration data; ignored if rvc_predefined is not 0
sizethe size of the RVC configuration data; ignored if rvc_predefined is not 0
Returns
error if any

◆ gf_isom_update_video_sample_entry_fields()

GF_Err gf_isom_update_video_sample_entry_fields ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u16  revision,
u32  vendor,
u32  temporalQ,
u32  spatialQ,
u32  horiz_res,
u32  vert_res,
u16  frames_per_sample,
const char *  compressor_name,
s16  color_table_index 
)

updates fields of given visual sample description - these fields are reserved in ISOBMFF, this should only be used for QT, see QTFF

Parameters
isom_filethe target ISO file
trackNumberthe target track number
sampleDescriptionIndexthe target sample description
revisionrevision of the sample description format
vendorfour character code of the vendor
temporalQtemporal quality
spatialQspatial quality
horiz_reshorizontal resolution as 16.16 fixed point number
vert_resvertical resolution as 16.16 fixed point number
frames_per_samplenumber of frames per media samples
compressor_namehuman readable name for the compressor
color_table_indexcolor table index, use -1 if no color table (most common case)
Returns
error if any

◆ gf_isom_update_sample_description_from_template()

GF_Err gf_isom_update_sample_description_from_template ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u8 data,
u32  size 
)

updates a sample description from a serialized sample description box. Only child boxes are removed in the process

Parameters
isom_filethe target ISO file
trackNumberthe target track number
sampleDescriptionIndexthe target sample description
dataa serialized sample description box
sizesize of the serialized sample description
Returns
error if any

◆ gf_isom_new_generic_sample_description()

GF_Err gf_isom_new_generic_sample_description ( GF_ISOFile isom_file,
u32  trackNumber,
const char *  URLname,
const char *  URNname,
GF_GenericSampleDescription udesc,
u32 outDescriptionIndex 
)

creates a new unknown StreamDescription in the file.

Note
use this to store media not currently supported by the ISO media format or media types not implemented in this library
Parameters
isom_filethe target ISO file
trackNumberthe target track
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
udescgeneric sample description information to use
outDescriptionIndexset to index of the new sample description
Returns
error if any

◆ gf_isom_clone_sample_description()

GF_Err gf_isom_clone_sample_description ( GF_ISOFile isom_file,
u32  trackNumber,
GF_ISOFile orig_file,
u32  orig_track,
u32  orig_desc_index,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

clones a sample description without inspecting media types

Parameters
isom_filethe destination ISO file
trackNumberthe destination track
orig_filethe source ISO file
orig_trackthe source track
orig_desc_indexthe source sample description to clone
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to index of the new sample description
Returns
error if any

◆ gf_isom_get_stsd_template()

GF_Err gf_isom_get_stsd_template ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u8 **  output,
u32 output_size 
)

gets the sample description template of a track. This serializes sample description box

Parameters
isom_filethe destination ISO file
trackNumberthe destination track
sampleDescriptionIndexthe target sample description
outputwill be set to a newly allocated buffer containing the serialized box - caller shall free it
output_sizewill be set to the size of the allocated buffer
Returns
error if any

◆ gf_isom_is_same_sample_description()

Bool gf_isom_is_same_sample_description ( GF_ISOFile f1,
u32  tk1,
u32  sdesc_index1,
GF_ISOFile f2,
u32  tk2,
u32  sdesc_index2 
)

checks if sample descriptions are the same. This does include self-contained checking and reserved flags. The specific media cfg (DSI & co) is not analysed, only a memory comparaison is done

Parameters
f1the first ISO file
tk1the first track
sdesc_index1the first sample description
f2the second ISO file
tk2the second track
sdesc_index2the second sample description
Returns
GF_TRUE if sample descriptions match, GF_FALSE otherwise

◆ gf_isom_3gp_config_get()

GF_3GPConfig* gf_isom_3gp_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets a 3GPP sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the 3GP config for this sample description, NULL if not a 3GPP track

◆ gf_isom_3gp_config_new()

GF_Err gf_isom_3gp_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
GF_3GPConfig config,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

creates a 3GPP sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
configthe 3GP config for this sample description
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_3gp_config_update()

GF_Err gf_isom_3gp_config_update ( GF_ISOFile isom_file,
u32  trackNumber,
GF_3GPConfig config,
u32  sampleDescriptionIndex 
)

updates the 3GPP config - subtypes shall NOT differ

Parameters
isom_filethe target ISO file
trackNumberthe target track
configthe 3GP config for this sample description
sampleDescriptionIndexthe target sample description index
Returns
error if any

◆ gf_isom_avc_config_get()

GF_AVCConfig* gf_isom_avc_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets AVC config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the AVC config - user is responsible for deleting it

◆ gf_isom_svc_config_get()

GF_AVCConfig* gf_isom_svc_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets SVC config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the SVC config - user is responsible for deleting it

◆ gf_isom_mvc_config_get()

GF_AVCConfig* gf_isom_mvc_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets MVC config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the SVC config - user is responsible for deleting it

◆ gf_isom_get_avc_svc_type()

GF_ISOMAVCType gf_isom_get_avc_svc_type ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets the AVC family type for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target hint track
sampleDescriptionIndexthe target sample description index
Returns
the type of AVC media

◆ gf_isom_get_hevc_lhvc_type()

GF_ISOMHEVCType gf_isom_get_hevc_lhvc_type ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets the HEVC family type for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the type of HEVC media

◆ gf_isom_hevc_config_get()

GF_HEVCConfig* gf_isom_hevc_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets HEVC config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the HEVC config - user is responsible for deleting it

◆ gf_isom_lhvc_config_get()

GF_HEVCConfig* gf_isom_lhvc_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets LHVC config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the LHVC config - user is responsible for deleting it

◆ gf_isom_get_vvc_type()

GF_ISOMVVCType gf_isom_get_vvc_type ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets the VVC family type for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the type of VVC media

◆ gf_isom_vvc_config_get()

GF_VVCConfig* gf_isom_vvc_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets VVC config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the VVC config - user is responsible for deleting it

◆ gf_isom_av1_config_get()

GF_AV1Config* gf_isom_av1_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets AV1 config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the AV1 config - user is responsible for deleting it

◆ gf_isom_vp_config_get()

GF_VPConfig* gf_isom_vp_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets VP8/9 config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the VP8/9 config - user is responsible for deleting it

◆ gf_isom_dovi_config_get()

GF_DOVIDecoderConfigurationRecord* gf_isom_dovi_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets DOVI config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the DOVI config - user is responsible for deleting it

◆ gf_isom_needs_layer_reconstruction()

Bool gf_isom_needs_layer_reconstruction ( GF_ISOFile isom_file)

checks if some tracks in file needs layer reconstruction

Parameters
isom_filethe target ISO file
Returns
GF_TRUE if track dependencies implying extractors or implicit reconstruction are found, GF_FALSE otherwise

◆ gf_isom_set_nalu_extract_mode()

GF_Err gf_isom_set_nalu_extract_mode ( GF_ISOFile isom_file,
u32  trackNumber,
GF_ISONaluExtractMode  nalu_extract_mode 
)

sets the NALU extraction mode for this track

Parameters
isom_filethe target ISO file
trackNumberthe target track
nalu_extract_modethe NALU extraction mode to set
Returns
error if any

◆ gf_isom_get_nalu_extract_mode()

GF_ISONaluExtractMode gf_isom_get_nalu_extract_mode ( GF_ISOFile isom_file,
u32  trackNumber 
)

gets the NALU extraction mode for this track

Parameters
isom_filethe target ISO file
trackNumberthe target track
Returns
the NALU extraction mode used

◆ gf_isom_get_composition_offset_shift()

s32 gf_isom_get_composition_offset_shift ( GF_ISOFile isom_file,
u32  trackNumber 
)

gets the composition offset shift if any for track using negative ctts

Parameters
isom_filethe target ISO file
trackNumberthe target track
Returns
the composition offset shift or 0

◆ gf_isom_avc_config_new()

GF_Err gf_isom_avc_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
GF_AVCConfig cfg,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

creates a new AVC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
cfgthe AVC config for this sample description
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_avc_config_update()

GF_Err gf_isom_avc_config_update ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_AVCConfig cfg 
)

updates an AVC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index to update
cfgthe AVC config for this sample description
Returns
error if any

◆ gf_isom_svc_config_new()

GF_Err gf_isom_svc_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
GF_AVCConfig cfg,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

creates a new SVC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
cfgthe SVC config for this sample description
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_svc_config_update()

GF_Err gf_isom_svc_config_update ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_AVCConfig cfg,
Bool  is_additional 
)

updates an SVC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index to update
cfgthe AVC config for this sample description
is_additionalif set, the SVCConfig will be added to the AVC sample description, otherwise the sample description will be SVC-only
Returns
error if any

◆ gf_isom_svc_config_del()

GF_Err gf_isom_svc_config_del ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

deletes an SVC sample description

Warning
Associated samples if any are NOT deleted
Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index to delete
Returns
error if any

◆ gf_isom_mvc_config_new()

GF_Err gf_isom_mvc_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
GF_AVCConfig cfg,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

creates a new MVC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
cfgthe SVC config for this sample description
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_mvc_config_update()

GF_Err gf_isom_mvc_config_update ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_AVCConfig cfg,
Bool  is_additional 
)

updates an MVC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index to update
cfgthe AVC config for this sample description
is_additionalif set, the MVCConfig will be added to the AVC sample description, otherwise the sample description will be MVC-only
Returns
error if any

◆ gf_isom_mvc_config_del()

GF_Err gf_isom_mvc_config_del ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

deletes an MVC sample description

Warning
Associated samples if any are NOT deleted
Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index to delete
Returns
error if any

◆ gf_isom_avc_set_inband_config()

GF_Err gf_isom_avc_set_inband_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
Bool  keep_xps 
)

sets avc3 entry type (inband SPS/PPS) instead of avc1 (SPS/PPS in avcC box)

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
keep_xpsif set to GF_TRUE, keeps parameter set in the configuration record otherwise removes them
Returns
error if any

◆ gf_isom_hevc_set_inband_config()

GF_Err gf_isom_hevc_set_inband_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
Bool  keep_xps 
)

sets hev1 entry type (inband SPS/PPS) instead of hvc1 (SPS/PPS in hvcC box)

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
keep_xpsif set to GF_TRUE, keeps parameter set in the configuration record otherwise removes them
Returns
error if any

◆ gf_isom_lhvc_force_inband_config()

GF_Err gf_isom_lhvc_force_inband_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

sets lhe1 entry type instead of lhc1 but keep lhcC box intact

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
error if any

◆ gf_isom_hevc_set_tile_config()

GF_Err gf_isom_hevc_set_tile_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_HEVCConfig cfg,
Bool  is_base_track 
)

sets hvt1 entry type (tile track) or hev2/hvc2 type if is_base_track is set. It is the use responsibility to set the tbas track reference to the base hevc track

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
cfgmay be set to the tile track configuration to indicate sub-profile of the tile, or NULL
is_base_trackif set to GF_TRUE, indicates this is a tile base track, otherwise this is a tile track
Returns
error if any

◆ gf_isom_hevc_config_new()

GF_Err gf_isom_hevc_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
GF_HEVCConfig cfg,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

creates a new HEVC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
cfgthe HEVC config for this sample description
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_hevc_config_update()

GF_Err gf_isom_hevc_config_update ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_HEVCConfig cfg 
)

updates an HEVC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index to update
cfgthe HEVC config for this sample description
Returns
error if any

◆ gf_isom_lhvc_config_update()

GF_Err gf_isom_lhvc_config_update ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_HEVCConfig cfg,
GF_ISOMLHEVCTrackType  track_type 
)

updates an HEVC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index to update
cfgthe LHVC config for this sample description
track_typeindicates the LHVC track type to set
Returns
error if any

◆ gf_isom_set_nalu_length_field()

GF_Err gf_isom_set_nalu_length_field ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u32  nalu_size_length 
)

sets nalu size length

Warning
Any previously added samples must be rewritten by the caller
Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index to update
nalu_size_lengththe new NALU size length in bytes
Returns
error if any

◆ gf_isom_vvc_config_new()

GF_Err gf_isom_vvc_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
GF_VVCConfig cfg,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

creates a new VVC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
cfgthe VVC config for this sample description
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_vvc_set_inband_config()

GF_Err gf_isom_vvc_set_inband_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
Bool  keep_xps 
)

sets vvi1 entry type (inband SPS/PPS) instead of vvc1 (SPS/PPS in hvcC box)

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
keep_xpsif set to GF_TRUE, keeps parameter set in the configuration record otherwise removes them
Returns
error if any

◆ gf_isom_vvc_config_update()

GF_Err gf_isom_vvc_config_update ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_VVCConfig cfg 
)

updates vvcC configuration

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
cfgnew config to set
Returns
error if any

◆ gf_isom_vp_config_new()

GF_Err gf_isom_vp_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
GF_VPConfig cfg,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex,
u32  vpx_type 
)

creates new VPx config

Parameters
isom_filethe target ISO file
trackNumberthe target track
cfgthe VPx config for this sample description
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
vpx_typefour character code of entry ('vp08', 'vp09' or 'vp10')
Returns
error if any

◆ gf_isom_av1_config_new()

GF_Err gf_isom_av1_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
GF_AV1Config cfg,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

creates new AV1 config

Parameters
isom_filethe target ISO file
trackNumberthe target track
cfgthe AV1 config for this sample description
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_get_dims_description()

GF_Err gf_isom_get_dims_description ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_DIMSDescription desc 
)

gets a DIMS sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
descset to the DIMS description
Returns
error if any

◆ gf_isom_new_dims_description()

GF_Err gf_isom_new_dims_description ( GF_ISOFile isom_file,
u32  trackNumber,
GF_DIMSDescription desc,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

creates a DIMS sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
descthe DIMS config for this sample description
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_get_udts_config()

GF_Err gf_isom_get_udts_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_UDTSConfig cfg 
)

gets a UDTS Specific Configuration sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
cfgset to the UDTS Specific Configuration
Returns
error if any

◆ gf_isom_ac3_config_get()

GF_AC3Config* gf_isom_ac3_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets an AC3 sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
AC-3 config

◆ gf_isom_ac3_config_new()

GF_Err gf_isom_ac3_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
GF_AC3Config cfg,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

creates an AC3 or EAC3 sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
cfgthe AC3 config for this sample description
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_ac3_config_update()

GF_Err gf_isom_ac3_config_update ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_AC3Config cfg 
)

updates an AC3 or EAC3 sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
cfgthe AC3 config for this sample description
Returns
error if any

◆ gf_isom_truehd_config_get()

GF_Err gf_isom_truehd_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u32 format_info,
u32 peak_data_rate 
)

gets TrueHD sample description info

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
format_infoset to the format info - may be NULL
peak_data_rateset to the peak data rate info - may be NULL
Returns
error if any

◆ gf_isom_truehd_config_new()

GF_Err gf_isom_truehd_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
char *  URLname,
char *  URNname,
u32  format_info,
u32  peak_data_rate,
u32 outDescriptionIndex 
)

creates a FLAC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
format_infoTrueHD format info
peak_data_rateTrueHD peak data rate
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_flac_config_get()

GF_Err gf_isom_flac_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u8 **  dsi,
u32 dsi_size 
)

gets a FLAC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
dsiset to the flac decoder config - shall be freeed by caller
dsi_sizeset to the size of the flac decoder config
Returns
error if any

◆ gf_isom_flac_config_new()

GF_Err gf_isom_flac_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
u8 metadata,
u32  metadata_size,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

creates a FLAC sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
metadatathe flac decoder config buffer
metadata_sizethe size of flac decoder config
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_opus_config_get()

GF_Err gf_isom_opus_config_get ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u8 **  dsi,
u32 dsi_size 
)

gets a OPUS sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
dsiset to the OPUS decoder config (without OpusHead tag), may be NULL - shall be freeed by caller
dsi_sizeset to the size of the OPUS decoder config, may be NULL
Returns
error if any

◆ gf_isom_opus_config_get_desc()

GF_Err gf_isom_opus_config_get_desc ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_OpusConfig opcfg 
)

gets a OPUS sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
opcfgopus config to get
Returns
error if any

◆ gf_isom_opus_config_new()

GF_Err gf_isom_opus_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
GF_OpusConfig cfg,
char *  URLname,
char *  URNname,
u32 outDescriptionIndex 
)

creates a new opus sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
cfgthe opus stream configuration
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_new_mj2k_description()

GF_Err gf_isom_new_mj2k_description ( GF_ISOFile isom_file,
u32  trackNumber,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex,
u8 dsi,
u32  dsi_len 
)

creates a motion jpeg 2000 sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
dsithe jpeg2000 decoder config buffer
dsi_lenthe size of jpeg2000 decoder config
Returns
error if any

◆ gf_isom_tmcd_config_new()

GF_Err gf_isom_tmcd_config_new ( GF_ISOFile isom_file,
u32  trackNumber,
u32  fps_num,
u32  fps_den,
s32  frames_per_counter_tick,
Bool  is_drop,
Bool  is_counter,
u32 outDescriptionIndex 
)

creates a time code metadata sample description

Note
frames_per_counter_tick<0 disables counter flag but signals frames_per_tick
Parameters
isom_filethe target ISO file
trackNumberthe target track
fps_numthe frame rate numerator
fps_denthe frame rate denumerator (frame rate numerator will be track media timescale)
frames_per_counter_tickif not 0, enables counter mode (sample data is an counter) and use this value as number of frames per counter tick. Otherwise, disables counter mode (sample data write h,m,s,frames)
is_dropindicates that the time code in samples is a drop timecode
is_counterindicates that the counter flag should be set
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_get_tmcd_config()

GF_Err gf_isom_get_tmcd_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u32 tmcd_flags,
u32 tmcd_fps_num,
u32 tmcd_fps_den,
u32 tmcd_fpt 
)

gets information of a time code metadata sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
tmcd_flagsset to the timecode description flags
tmcd_fps_numset to fps numerator of timecode description
tmcd_fps_denset to fps denominator of timecode description
tmcd_fptset to the ticks per second for counter mode (tmcd_flags & 0x1)
Returns
error if any

◆ gf_isom_get_pcm_config()

GF_Err gf_isom_get_pcm_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u32 flags,
u32 pcm_size 
)

gets information of a raw PCM sample description, ISOBMFF style

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
flagsset to the pcm config flags (0: big endian, 1: little endian), may be NULL
pcm_sizeset to PCM sample size (per channel, 16, 24, 32, 64, may be NULL
Returns
error if any

◆ gf_isom_get_lpcm_config()

GF_Err gf_isom_get_lpcm_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
Double sample_rate,
u32 nb_channels,
u32 flags,
u32 pcm_size 
)

gets information of a raw PCM sample description, QT style (lpcm codecid)

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
sample_rateset to the pcm sample rate, may be NULL
nb_channelsset to the pcm channel count, may be NULL
flagsset to the pcm config flags (1: float, 2: big endian, 4: signed, other flags cf QTFF), may be NULL
pcm_sizeset to PCM sample size (per channel, 16, 24, 32, 64, may be NULL
Returns
error if any

◆ gf_isom_new_mpha_description()

GF_Err gf_isom_new_mpha_description ( GF_ISOFile isom_file,
u32  trackNumber,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex,
u8 dsi,
u32  dsi_size,
u32  mha_subtype 
)

creates a MPHA sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
dsithe MPEGH audio config (payload of mhaC box): byte[0]=1 (config version) ,byte[1]=ProfileLevel, byte[2]=channel layout, byte[3],byte[4]: the size of what follows the rest being a mpegh3daConfig
dsi_sizethe size of the MPEGH audio config
mha_subtypemha1/mha2:/mhm1/mhm2 subtype to use
Returns
error if any

◆ gf_isom_get_mpegh_compatible_profiles()

const u8* gf_isom_get_mpegh_compatible_profiles ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u32 nb_compatible_profiles 
)

gets compatible profile list for mpegh entry

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
nb_compatible_profilesset to the number of compatible profiles returned
Returns
array of compatible profiles, NULL if none found

◆ gf_isom_set_mpegh_compatible_profiles()

GF_Err gf_isom_set_mpegh_compatible_profiles ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
const u32 profiles,
u32  nb_compatible_profiles 
)

sets compatible profile list for mpegh entry

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
profilesarray of compatible profiles, NULL to remove compatible profiles
nb_compatible_profilesnumber of compatible profiles in list, 0 to remove compatible profiles
Returns
error if any

◆ gf_isom_get_y3d_info()

GF_Err gf_isom_get_y3d_info ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_ISOM_Y3D_Info info 
)

gets youtube 3D/360 info

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
infofilled with 3D info
Returns
error if any, GF_NOT_FOUND if no 3D/360 or setero info

◆ gf_isom_set_y3d_info()

GF_Err gf_isom_set_y3d_info ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_ISOM_Y3D_Info info 
)

sets youtube 3D/360 info

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
info3D info to set
Returns
error if any