libgpac
Documentation of the core library of GPAC
Meta and Image File Format
+ Collaboration diagram for Meta and Image File Format:

Data Structures

struct  GF_ImageItemOverlayOffset
 
struct  GF_ImageItemProtection
 
struct  GF_ImageItemProperties
 
struct  GF_ItemExtentEntry
 

Enumerations

enum  GF_TileItemMode {
  TILE_ITEM_NONE = 0 , TILE_ITEM_ALL_NO_BASE , TILE_ITEM_ALL_BASE , TILE_ITEM_ALL_GRID ,
  TILE_ITEM_SINGLE
}
 

Functions

u32 gf_isom_get_meta_type (GF_ISOFile *isom_file, Bool root_meta, u32 track_num)
 
u32 gf_isom_has_meta_xml (GF_ISOFile *isom_file, Bool root_meta, u32 track_num)
 
GF_Err gf_isom_extract_meta_xml (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, char *outName, Bool *is_binary)
 
u32 gf_isom_get_meta_item_count (GF_ISOFile *isom_file, Bool root_meta, u32 track_num)
 
GF_Err gf_isom_get_meta_item_info (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 item_num, u32 *itemID, u32 *type, u32 *protection_scheme, u32 *protection_scheme_version, Bool *is_self_reference, const char **item_name, const char **item_mime_type, const char **item_encoding, const char **item_url, const char **item_urn)
 
u32 gf_isom_get_meta_item_flags (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 item_num)
 
u32 gf_isom_get_meta_item_by_id (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 item_ID)
 
GF_Err gf_isom_extract_meta_item (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 item_num, const char *dump_file_name)
 
GF_Err gf_isom_extract_meta_item_mem (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 item_id, u8 **out_data, u32 *out_size, u32 *out_alloc_size, const char **mime_type, Bool use_annex_b)
 
GF_Err gf_isom_extract_meta_item_get_cenc_info (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 item_id, Bool *is_protected, u32 *skip_byte_block, u32 *crypt_byte_block, const u8 **key_info, u32 *key_info_size, u32 *aux_info_type_parameter, u8 **sai_out_data, u32 *sai_out_size, u32 *sai_out_alloc_size)
 
u32 gf_isom_get_meta_primary_item_id (GF_ISOFile *isom_file, Bool root_meta, u32 track_num)
 
u32 gf_isom_meta_get_item_ref_count (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 from_id, u32 type)
 
u32 gf_isom_meta_get_item_ref_id (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 from_id, u32 type, u32 ref_idx)
 
u32 gf_isom_meta_item_has_ref (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 to_id, u32 type)
 
GF_Err gf_isom_set_meta_type (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 metaType)
 
GF_Err gf_isom_remove_meta_xml (GF_ISOFile *isom_file, Bool root_meta, u32 track_num)
 
GF_Err gf_isom_set_meta_xml (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, char *XMLFileName, unsigned char *data, u32 data_size, Bool IsBinaryXML)
 
GF_Err gf_isom_meta_get_next_item_id (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 *item_id)
 
GF_Err gf_isom_add_meta_item (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, Bool self_reference, char *resource_path, const char *item_name, u32 item_id, u32 item_type, const char *mime_type, const char *content_encoding, const char *URL, const char *URN, GF_ImageItemProperties *image_props)
 
GF_Err gf_isom_add_meta_item_memory (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, const char *item_name, u32 *item_id, u32 item_type, const char *mime_type, const char *content_encoding, GF_ImageItemProperties *image_props, char *data, u32 data_len, GF_List *item_extent_refs)
 
GF_Err gf_isom_add_meta_item_sample_ref (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, const char *item_name, u32 *item_id, u32 item_type, const char *mime_type, const char *content_encoding, GF_ImageItemProperties *image_props, GF_ISOTrackID tk_id, u32 sample_num)
 
GF_Err gf_isom_iff_create_image_grid_item (GF_ISOFile *isom_file, Bool root_meta, u32 meta_track_number, const char *item_name, u32 item_id, GF_ImageItemProperties *image_props)
 
GF_Err gf_isom_iff_create_image_overlay_item (GF_ISOFile *isom_file, Bool root_meta, u32 meta_track_number, const char *item_name, u32 item_id, GF_ImageItemProperties *image_props)
 
GF_Err gf_isom_iff_create_image_identity_item (GF_ISOFile *isom_file, Bool root_meta, u32 meta_track_number, const char *item_name, u32 item_id, GF_ImageItemProperties *image_props)
 
GF_Err gf_isom_iff_create_image_item_from_track (GF_ISOFile *isom_file, Bool root_meta, u32 meta_track_number, u32 media_track, const char *item_name, u32 item_id, GF_ImageItemProperties *image_props, GF_List *item_extent_refs)
 
GF_Err gf_isom_remove_meta_item (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 item_num, Bool keep_refs, const char *keep_props)
 
GF_Err gf_isom_set_meta_primary_item (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 item_num)
 
GF_Err gf_isom_meta_add_item_ref (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 from_id, u32 to_id, u32 type, u64 *ref_index)
 
GF_Err gf_isom_meta_add_item_group (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 item_id, u32 group_id, u32 group_type)
 
GF_Err gf_isom_get_meta_image_props (GF_ISOFile *isom_file, Bool root_meta, u32 track_num, u32 item_id, GF_ImageItemProperties *out_image_props, GF_List *unmapped_props)
 

Detailed Description


Data Structure Documentation

◆ GF_ImageItemOverlayOffset

struct GF_ImageItemOverlayOffset

Image overlay offset properties

Data Fields
u32 horizontal
u32 vertical

◆ GF_ImageItemProtection

struct GF_ImageItemProtection

Image protection item properties

Data Fields
u32 scheme_type
u32 scheme_version
u32 crypt_byte_block
u32 skip_byte_block
const u8 * key_info
u32 key_info_size
const u8 * sai_data
u32 sai_data_size

◆ GF_ImageItemProperties

struct GF_ImageItemProperties

Image item properties

+ Collaboration diagram for GF_ImageItemProperties:
Data Fields
u32 width

width in pixels

u32 height

height in pixless

u32 hSpacing

pixel aspect ratio numerator

u32 vSpacing

pixel aspect ratio denominator

u32 hOffset

horizontal offset in pixels

u32 vOffset

vertical offset in pixels

u32 angle

angle in radians

u32 mirror

mirroring axis: 0 = not set, 1 = vertical, 2 = horizontal

Bool hidden

hidden flag

u32 clap_wnum

clean aperture

u32 clap_wden
u32 clap_hnum
u32 clap_hden
u32 clap_hoden
u32 clap_voden
s32 clap_honum
s32 clap_vonum
void * config

pointer to configuration box

GF_TileItemMode tile_mode

tile item mode

u32 single_tile_number

tile number

Double time

time for importing

Double end_time

end time for importing

Double step_time

step time between imports

u32 sample_num

sample num for importing

char iccPath[GF_MAX_PATH]

file containg iCC data for importing

Bool alpha

is alpha

Bool depth

is depth

u8 num_channels

number of channels

u32 bits_per_channel[3]

bits per channels in bits

u32 num_grid_columns

number of columns in grid

u32 num_grid_rows

number of rows in grid

u32 overlay_count

number of overlayed images

GF_ImageItemOverlayOffset * overlay_offsets

overlay offsets

u32 overlay_canvas_fill_value_r

canvas overlay color

u32 overlay_canvas_fill_value_g
u32 overlay_canvas_fill_value_b
u32 overlay_canvas_fill_value_a
GF_ImageItemProtection * cenc_info

protection info, NULL if item is not protected

Bool use_reference

If set, reference image from sample sample_num (same file data used for sample and item)

u32 item_ref_id
Bool copy_props
GF_ISOFile * src_file
Bool auto_grid
Double auto_grid_ratio
u32 av1_layer_size[3]
u8 av1_op_index
u8 interlace_type
const char * aux_urn
const u8 * aux_data
u32 aux_data_len
u8 * config_ba
u32 config_ba_size

◆ GF_ItemExtentEntry

struct GF_ItemExtentEntry

item extend description

Data Fields
u64 extent_offset

offset of extent in file

u64 extent_length

size of extent

u64 extent_index

index of extent

u64 original_extent_offset

for storage only, original offset in source file

Enumeration Type Documentation

◆ GF_TileItemMode

item tile mode

Enumerator
TILE_ITEM_NONE 

not a tile item

TILE_ITEM_ALL_NO_BASE 

a tile item without base

TILE_ITEM_ALL_BASE 

a tile item with base

TILE_ITEM_ALL_GRID 

a tile item grid

TILE_ITEM_SINGLE 

a tile item single

Function Documentation

◆ gf_isom_get_meta_type()

u32 gf_isom_get_meta_type ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num 
)

gets meta type

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
Returns
0 if no meta found, or four char code of meta (eg, "mp21", "smil", ...)

◆ gf_isom_has_meta_xml()

u32 gf_isom_has_meta_xml ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num 
)

checks if the meta has an XML container (note that XML data can also be included as items).

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
Returns
0 (no XML or error), 1 (XML text), 2 (BinaryXML, eg BiM)

◆ gf_isom_extract_meta_xml()

GF_Err gf_isom_extract_meta_xml ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
char *  outName,
Bool is_binary 
)

extracts XML (if any) from given meta

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
outNameoutput file path and location for writing
is_binaryindicates if XML is Bim or regular XML
Returns
error if any

◆ gf_isom_get_meta_item_count()

u32 gf_isom_get_meta_item_count ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num 
)

checks the number of items in a meta

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
Returns
number of items

◆ gf_isom_get_meta_item_info()

GF_Err gf_isom_get_meta_item_info ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  item_num,
u32 itemID,
u32 type,
u32 protection_scheme,
u32 protection_scheme_version,
Bool is_self_reference,
const char **  item_name,
const char **  item_mime_type,
const char **  item_encoding,
const char **  item_url,
const char **  item_urn 
)

gets item info for the given item

Note
When an item is fully contained in file, both item_url and item_urn are set to NULL
Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_num1-based index of item to query
itemIDset to item ID in file (optional, can be NULL)
typeset to item 4CC type
protection_schemeset to 0 if not protected, or scheme type used if item is protected. If protected but scheme type not present, set to 'unkw'
protection_scheme_versionset to 0 if not protected, or scheme version used if item is protected
is_self_referenceset to item is the file itself
item_nameset to the item name (optional, can be NULL)
item_mime_typeset to the item mime type (optional, can be NULL)
item_encodingset to the item content encoding type (optional, can be NULL)
item_urlset to the URL of external resource containing this item data if any.
item_urnset to the URN of external resource containing this item data if any.
Returns
error if any

◆ gf_isom_get_meta_item_flags()

u32 gf_isom_get_meta_item_flags ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  item_num 
)

gets item flags for the given item

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_num1-based index of item to query
Returns
item flags

◆ gf_isom_get_meta_item_by_id()

u32 gf_isom_get_meta_item_by_id ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  item_ID 
)

gets item index from item ID

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_IDID of the item to search
Returns
item index if found, 0 otherwise

◆ gf_isom_extract_meta_item()

GF_Err gf_isom_extract_meta_item ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  item_num,
const char *  dump_file_name 
)

extracts an item from given meta

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_num1-based index of item to query
dump_file_nameif NULL, uses item name for dumping, otherwise dumps in given file object (binary write mode)
Returns
error if any

◆ gf_isom_extract_meta_item_mem()

GF_Err gf_isom_extract_meta_item_mem ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  item_id,
u8 **  out_data,
u32 out_size,
u32 out_alloc_size,
const char **  mime_type,
Bool  use_annex_b 
)

extracts item from given meta in memory

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_idthe ID of the item to dump
out_dataset to allocated buffer containing the item, shall be freeed by user
out_sizeset to the size of the allocated buffer
out_alloc_sizeset to the allocated size of the buffer (this allows passing an existing buffer without always reallocating it)
mime_typeset to the mime type of the item
use_annex_bfor image items based on NALU formats (AVC, HEVC) indicates to extract the data as Annex B format (with start codes)
Returns
error if any

◆ gf_isom_extract_meta_item_get_cenc_info()

GF_Err gf_isom_extract_meta_item_get_cenc_info ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  item_id,
Bool is_protected,
u32 skip_byte_block,
u32 crypt_byte_block,
const u8 **  key_info,
u32 key_info_size,
u32 aux_info_type_parameter,
u8 **  sai_out_data,
u32 sai_out_size,
u32 sai_out_alloc_size 
)

fetch CENC info for an item

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_idthe ID of the item to dump
is_protectedset to GF_TRUE if item is protected
skip_byte_blockset to skip_byte_block or 0 if no pattern
crypt_byte_blockset to crypt_byte_block or 0 if no pattern
key_infoset to key info
key_info_sizeset to key info size
aux_info_type_parameterset to the CENC auxiliary type param of SAI data
sai_out_dataset to allocated buffer containing the item, shall be freeed by user - may be NULL to only retrieve the info
sai_out_sizeset to the size of the allocated buffer - may be NULL if sai_out_data is NULL
sai_out_alloc_sizeset to the allocated size of the buffer (this allows passing an existing buffer without always reallocating it) - may be NULL if sai_out_data is NULL
Returns
error if any

◆ gf_isom_get_meta_primary_item_id()

u32 gf_isom_get_meta_primary_item_id ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num 
)

gets primary item ID

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
Returns
primary item ID, 0 if none found (primary can also be stored through meta XML)

◆ gf_isom_meta_get_item_ref_count()

u32 gf_isom_meta_get_item_ref_count ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  from_id,
u32  type 
)

gets number of references of a given type from a given item ID

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
from_iditem ID to check
typereference type to check
Returns
number of referenced items

◆ gf_isom_meta_get_item_ref_id()

u32 gf_isom_meta_get_item_ref_id ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  from_id,
u32  type,
u32  ref_idx 
)

gets ID of reference of a given type and index from a given item ID

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
from_iditem ID to check
typereference type to check
ref_idx1-based index of reference to check
Returns
ID if the referred item

◆ gf_isom_meta_item_has_ref()

u32 gf_isom_meta_item_has_ref ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  to_id,
u32  type 
)

gets number of references of a given type to a given item ID

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
to_iditem ID to check
typereference type to check
Returns
number of referenced items

◆ gf_isom_set_meta_type()

GF_Err gf_isom_set_meta_type ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  metaType 
)

sets meta type (four char int, eg "mp21", ...), creating a meta box if not found

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
metaTypethe type of meta to create. If 0, removes the meta box
Returns
error if any

◆ gf_isom_remove_meta_xml()

GF_Err gf_isom_remove_meta_xml ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num 
)

removes meta XML info if any

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
Returns
error if any

◆ gf_isom_set_meta_xml()

GF_Err gf_isom_set_meta_xml ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
char *  XMLFileName,
unsigned char *  data,
u32  data_size,
Bool  IsBinaryXML 
)

sets meta XML data from file or memory - erase any previously (Binary)XML info

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
XMLFileNamethe XML file to import as XML item, or NULL if data is specified
databuffer containing XML data, or NULL if file is specified
data_sizesize of buffer in bytes, ignored if file is specified
IsBinaryXMLindicates if the content of the XML file is binary XML (BIM) or not
Returns
error if any

◆ gf_isom_meta_get_next_item_id()

GF_Err gf_isom_meta_get_next_item_id ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32 item_id 
)

gets next available item ID in a meta

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_idset to the next available item ID
Returns
error if any

◆ gf_isom_add_meta_item()

GF_Err gf_isom_add_meta_item ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
Bool  self_reference,
char *  resource_path,
const char *  item_name,
u32  item_id,
u32  item_type,
const char *  mime_type,
const char *  content_encoding,
const char *  URL,
const char *  URN,
GF_ImageItemProperties image_props 
)

adds an item to a meta box from file

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
self_referenceif GF_TRUE, indicates that the item is in fact the entire container file
resource_pathpath to the file to add
item_namename of the item
item_idID of the item, can be 0
item_typefour character code of item type
mime_typemime type of the item, can be NULL
content_encodingcontent encoding of the item, can be NULL
URLURL of the item for external data reference (data is not contained in meta parent file)
URNURN of the item for external data reference (data is not contained in meta parent file)
image_propsimage properties information for image items
Returns
error if any

◆ gf_isom_add_meta_item_memory()

GF_Err gf_isom_add_meta_item_memory ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
const char *  item_name,
u32 item_id,
u32  item_type,
const char *  mime_type,
const char *  content_encoding,
GF_ImageItemProperties image_props,
char *  data,
u32  data_len,
GF_List item_extent_refs 
)

adds an item to a meta box from memory

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_namename of the item
item_idID of the item, can be NULL, can be 0 in input, set to item ID after call
item_typefour character code of item type
mime_typemime type of the item, can be NULL
content_encodingcontent encoding of the item, can be NULL
image_propsimage properties information for image items
databuffer containing the item data
data_lensize of item data buffer in bytes
item_extent_refslist of item extend description, or NULL
Returns
error if any

◆ gf_isom_add_meta_item_sample_ref()

GF_Err gf_isom_add_meta_item_sample_ref ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
const char *  item_name,
u32 item_id,
u32  item_type,
const char *  mime_type,
const char *  content_encoding,
GF_ImageItemProperties image_props,
GF_ISOTrackID  tk_id,
u32  sample_num 
)

adds an item to a meta box as a reference to a sample

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_namename of the item
item_idID of the item, can be 0
item_typefour character code of item type
mime_typemime type of the item, can be NULL
content_encodingcontent encoding of the item, can be NULL
image_propsimage properties information for image items
tk_idsource track ID
sample_numnumber of sample to reference
Returns
error if any

◆ gf_isom_iff_create_image_grid_item()

GF_Err gf_isom_iff_create_image_grid_item ( GF_ISOFile isom_file,
Bool  root_meta,
u32  meta_track_number,
const char *  item_name,
u32  item_id,
GF_ImageItemProperties image_props 
)

creates an image grid item

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if meta_track_number is 0
meta_track_numberif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_namename of the item
item_idID of the item, can be 0
image_propsimage properties information for image items
Returns
error if any

◆ gf_isom_iff_create_image_overlay_item()

GF_Err gf_isom_iff_create_image_overlay_item ( GF_ISOFile isom_file,
Bool  root_meta,
u32  meta_track_number,
const char *  item_name,
u32  item_id,
GF_ImageItemProperties image_props 
)

creates an image overlay item

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if meta_track_number is 0
meta_track_numberif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_namename of the item
item_idID of the item, can be 0
image_propsimage properties information for image items
Returns
error if any

◆ gf_isom_iff_create_image_identity_item()

GF_Err gf_isom_iff_create_image_identity_item ( GF_ISOFile isom_file,
Bool  root_meta,
u32  meta_track_number,
const char *  item_name,
u32  item_id,
GF_ImageItemProperties image_props 
)

creates an image identity item

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if meta_track_number is 0
meta_track_numberif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_namename of the item
item_idID of the item, can be 0
image_propsimage properties information for image items
Returns
error if any

◆ gf_isom_iff_create_image_item_from_track()

GF_Err gf_isom_iff_create_image_item_from_track ( GF_ISOFile isom_file,
Bool  root_meta,
u32  meta_track_number,
u32  media_track,
const char *  item_name,
u32  item_id,
GF_ImageItemProperties image_props,
GF_List item_extent_refs 
)

creates image item(s) from samples of a media track

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if meta_track_number is 0
meta_track_numberif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
media_tracktrack number to import samples from
item_namename of the item
item_idID of the item, can be 0
image_propsimage properties information for image items
item_extent_refslist of item extend description, or NULL
Returns
error if any

◆ gf_isom_remove_meta_item()

GF_Err gf_isom_remove_meta_item ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  item_num,
Bool  keep_refs,
const char *  keep_props 
)

removes item from meta

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_num1-based index of the item to remove
keep_refsdo not modify item reference, typically used when replacing an item
keep_propskeep property association for properties with 4CC listed in keep_props (coma-seprated list)
Returns
error if any

◆ gf_isom_set_meta_primary_item()

GF_Err gf_isom_set_meta_primary_item ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  item_num 
)

sets the given item as the primary one

Warning
This SHALL NOT be used if the meta has a valid XML data
Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_num1-based index of the item to remove
Returns
error if any

◆ gf_isom_meta_add_item_ref()

GF_Err gf_isom_meta_add_item_ref ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  from_id,
u32  to_id,
u32  type,
u64 ref_index 
)

adds an item reference to another item

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
from_idID of item the reference is from
to_idID of item the reference is to
typefour character code of reference
ref_indexset to the 1-based index of the reference
Returns
error if any

◆ gf_isom_meta_add_item_group()

GF_Err gf_isom_meta_add_item_group ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  item_id,
u32  group_id,
u32  group_type 
)

adds the item to the given group

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_idID of item to add
group_idID of group, 0 if needs to be determined from the file
group_typefour character code of group
Returns
error if any

◆ gf_isom_get_meta_image_props()

GF_Err gf_isom_get_meta_image_props ( GF_ISOFile isom_file,
Bool  root_meta,
u32  track_num,
u32  item_id,
GF_ImageItemProperties out_image_props,
GF_List unmapped_props 
)

gets image item properties

Parameters
isom_filethe target ISO file
root_metaif GF_TRUE uses meta at the file, otherwise uses meta at the movie level if track number is 0
track_numif GF_TRUE and root_meta is GF_FALSE, uses meta at the track level
item_idID of the item
out_image_propsset to the image properties information of the item
unmapped_propswill contain all properties (box) not mapped to image properties. May be NULL. DO NOT DESTROY the content of the list
Returns
error if any