These functions allow you to manage meta boxes (atoms) at file, movie, and track level, and the items they contain. More...
Functions | |
ISOErr | ISONewFileMeta (ISOMovie theMovie, u32 metaType, ISOMeta *meta) |
Creates a new meta box (atom), with the indicated ‘handler’ type, at the file level. | |
ISOErr | ISONewMovieMeta (ISOMovie theMovie, u32 metaType, ISOMeta *meta) |
Creates a new meta box (atom), with the indicated ‘handler’ type, in the movie box (atom). | |
ISOErr | ISONewTrackMeta (ISOTrack theTrack, u32 metaType, ISOMeta *meta) |
Creates a new meta box (atom), with the indicated ‘handler’ type, in the indicated track box (atom). | |
ISOErr | ISOAddMetaBoxRelation (ISOMeta first_meta, ISOMeta second_meta, u8 relation_type) |
Adds a meta box relation box to the additional meta data box, related to first and second meta box. | |
ISOErr | ISOGetMetaBoxRelation (ISOMeta first_meta, ISOMeta second_meta, u8 *relation_type) |
Get the reletation type. | |
ISOErr | ISOAddMetaDataReference (ISOMeta meta, u16 *out_ref, ISOHandle urlHandle, ISOHandle urnHandle) |
Adds a data reference to the given meta-data. | |
ISOErr | ISOAddMetaItem (ISOMeta meta, ISOMetaItem *outItem, u64 base_offset, u16 data_ref_index) |
Creates a new meta-data item, and returns an opaque pointer to it. | |
ISOErr | ISOAddMetaItemWithID (ISOMeta meta, ISOMetaItem *outItem, u64 base_offset, u16 data_ref_index, u16 item_ID) |
Creates a new meta-data item with specific ID, and returns an opaque pointer to it. | |
ISOErr | ISOAddItemExtent (ISOMetaItem item, MP4Handle data) |
Adds some data to the given item, as its first (perhaps only) extent. | |
ISOErr | ISOAddItemExtentReference (ISOMetaItem item, u64 offset, u64 length) |
Adds a reference to the data. | |
ISOErr | ISOAddItemExtentUsingItemData (ISOMetaItem item, MP4Handle data) |
Adds some data to the given item, as its first (perhaps only) extent. | |
ISOErr | ISOAddItemExtentItem (ISOMetaItem item, ISOMetaItem extent_item, u32 offset, u32 length) |
Indicates that the data for this extent is located at another item’s extends. | |
ISOErr | ISOAddItemReference (ISOMetaItem item, u32 reference_type, u32 to_item_ID, u32 *outIndex) |
This function adds an item reference to the item reference box. | |
ISOErr | ISOAddItemReferences (ISOMetaItem item, u32 reference_type, u16 reference_count, MP4Handle to_item_IDs) |
This function adds multiple item references to the item reference box. | |
MP4Err | ISOAddItemRelation (ISOMetaItem fromItem, ISOMetaItem toItem, u32 relationType) |
ISOErr | ISOGetItemReferences (ISOMetaItem item, u32 reference_type, u16 *reference_count, MP4Handle to_item_IDs) |
This function collects all item references of the item / reference_type combination. | |
ISOErr | ISOGetItemReference (ISOMetaItem item, u32 reference_type, u16 reference_index, ISOMetaItem *outItem) |
Get an item by reference type and index. | |
ISOErr | ISOAddPrimaryData (ISOMeta meta, u32 box_type, MP4Handle data, u8 is_full_atom) |
Places the indicated data inside a box in the meta-box, with the indicated box type (e.g. | |
ISOErr | ISOGetPrimaryData (ISOMeta meta, u32 box_type, MP4Handle data, u8 is_full_atom) |
Finds the box of the given type inside the meta box, and returns its contents. | |
ISOErr | ISOGetPrimaryItemData (ISOMeta meta, u32 box_type, MP4Handle data, u8 is_full_atom) |
Finds the box of the given type inside the meta box, and returns its contents. | |
ISOErr | ISOSetPrimaryItem (ISOMeta meta, ISOMetaItem item) |
Sets the item of the indicated ID as the primary item (using a primary item box). | |
ISOErr | ISOGetPrimaryItemID (ISOMeta meta, u16 *ID) |
Finds the ID of the primary item. | |
ISOErr | ISOGetItemID (ISOMetaItem item, u16 *ID) |
Gets the ID of the indicated item. | |
ISOErr | ISOSetItemInfo (ISOMetaItem item, u16 protection_index, char *name, char *content_type, char *content_encoding) |
Sets the information for the indicated item. | |
ISOErr | ISOSetItemInfoExtension (ISOMetaItem item, MP4Handle extension, u32 extension_type) |
Adds an item info extension to an existing item info entry. | |
ISOErr | ISOGetItemInfoExtension (ISOMetaItem item, MP4Handle extension, u32 *extension_type) |
Gets an item info extension and its extension type from an item. | |
ISOErr | ISOSetItemInfoItemType (ISOMetaItem item, u32 item_type, char *item_uri_type) |
Adds an item info item type to an existing item info entry. | |
ISOErr | ISOHideItem (ISOMetaItem item) |
Hide item by setting the (flags & 1) = 1. | |
ISOErr | ISOIsItemHidden (ISOMetaItem item) |
Check if item is hiden. | |
ISOErr | ISOGetItemInfoItemType (ISOMetaItem item, u32 *item_type, char **item_uri_type) |
Gets an item info item type from an existing item info entry. | |
ISOErr | ISOGetFileMeta (ISOMovie theMovie, ISOMeta *meta, u32 inMetaType, u32 *outMetaType) |
Gets a reference to the file-level meta data. | |
ISOErr | ISOGetMovieMeta (ISOMovie theMovie, ISOMeta *meta, u32 inMetaType, u32 *outMetaType) |
Gets a reference to the movie-level meta data. | |
ISOErr | ISOGetTrackMeta (ISOTrack theTrack, ISOMeta *meta, u32 inMetaType, u32 *outMetaType) |
Gets a reference to the track-level meta data. | |
ISOErr | ISOGetAllItemsWithType (ISOMeta meta, u32 type, ISOMetaItem **items, u32 *numberOfItemsFound) |
Collects all items of a given type and presents the result in form of an array. | |
ISOErr | ISOFindItemByName (ISOMeta meta, ISOMetaItem *item, char *name, u8 exact_case) |
Finds an item that has the associated name in its item information. | |
ISOErr | ISOFindItemByID (ISOMeta meta, ISOMetaItem *item, u16 ID) |
Gets a reference to an item by its ID. | |
ISOErr | ISOGetItemData (ISOMetaItem item, MP4Handle data, u64 *base_offset) |
Reads and returns the data associated with all the extents of the given item, concatenating them. | |
ISOErr | ISOGetItemInfo (ISOMetaItem item, u16 *protection_index, char *name, char *content_type, char *content_encoding) |
Returns the information for a given item. | |
MP4Err | ISOCheckMetaDataReferences (ISOMeta meta) |
Checks that all the data references used by the meta-data are accessible. | |
MP4Err | ISONewMetaProtection (ISOMeta meta, u32 sch_type, u32 sch_version, char *sch_url, u16 *protection_index) |
Creates a new item protection information inside the given meta-data box. | |
MP4Err | ISOAddMetaProtectionInfo (ISOMeta meta, u16 protection_index, MP4GenericAtom schi_atom) |
Adds an arbitrary atom to the scheme information of the associated protection information. | |
MP4Err | ISOGetMetaProtection (ISOMeta meta, u16 protection_index, u32 *sch_type, u32 *sch_version, char *sch_url) |
Gets the scheme type, version, and URL associated with the protection information of the given index. | |
MP4Err | ISOGetMetaProtectionInfo (ISOMeta meta, u16 protection_index, u32 atom_type, MP4GenericAtom *schi_atom) |
Finds and returns the atom of the given type inside the scheme information of the protection scheme at the given index. | |
MP4Err | ISOAddMetaItemProperty (ISOMetaItem item, MP4GenericAtom *itemProperty, u8 essential) |
Adds an item property, which can be any MP4GenericAtom, to an ISOMetaItem. | |
MP4Err | ISOGetProperitesOfMetaItem (ISOMetaItem item, MP4GenericAtom **properties, u32 *propertiesFound) |
Retruns an array of MP4GenericAtom pointers, which represent the item properties found for the item given. | |
ISOErr | ISONewEntityGroup (ISOMeta meta, u32 grouping_type, u32 group_id) |
Add new EntityToGroupBox (creates grpl if needed) | |
ISOErr | ISOAddEntityIDToGroup (ISOMeta meta, u32 group_id, u32 entity_id) |
Add entity_id to EntityToGroupBox. | |
ISOErr | ISOGetEntityIDCnt (ISOMeta meta, u32 group_id, u32 *num_entities_in_group) |
Get number of entries in the EntityToGroupBox. | |
ISOErr | ISOGetEntityGroupEntries (ISOMeta meta, EntityGroupEntryPtr *pEntries, u32 *cnt) |
Get common data for all EntityToGroup entries. | |
These functions allow you to manage meta boxes (atoms) at file, movie, and track level, and the items they contain.
The meta-type in the following functions can be a four-character code, or one of the pre-defined codes:
Type | four CC |
---|---|
MP7TextHandlerType | mp7t |
7BinaryHandlerType | mp7b |
MP21HandlerType | mp21 |
MP4NullHandlerType | null |
ISOErr ISOAddEntityIDToGroup | ( | ISOMeta | meta, |
u32 | group_id, | ||
u32 | entity_id | ||
) |
Add entity_id to EntityToGroupBox.
meta | MetaBox on which we are operating |
group_id | unique group ID to which we want to add the entity_id |
entity_id | entity ID value |
ISOErr ISOAddItemExtent | ( | ISOMetaItem | item, |
MP4Handle | data | ||
) |
Adds some data to the given item, as its first (perhaps only) extent.
Should generally be called only when the data reference for the item was supplied as zero. The data will be added to the related mdat box.
ISOErr ISOAddItemExtentItem | ( | ISOMetaItem | item, |
ISOMetaItem | extent_item, | ||
u32 | offset, | ||
u32 | length | ||
) |
Indicates that the data for this extent is located at another item’s extends.
ISOErr ISOAddItemExtentReference | ( | ISOMetaItem | item, |
u64 | offset, | ||
u64 | length | ||
) |
Adds a reference to the data.
Should generally be called only when a non-zero data reference was supplied for the item.
ISOErr ISOAddItemExtentUsingItemData | ( | ISOMetaItem | item, |
MP4Handle | data | ||
) |
Adds some data to the given item, as its first (perhaps only) extent.
The data will be added to an item data box, which is contained in the meta data box.
ISOErr ISOAddItemReference | ( | ISOMetaItem | item, |
u32 | reference_type, | ||
u32 | to_item_ID, | ||
u32 * | outIndex | ||
) |
This function adds an item reference to the item reference box.
If there is no existing item reference box, it will be created.
outIndex | will contain the position of the to_item_ID in all to_item_IDs of this item and reference_type combination. |
ISOErr ISOAddItemReferences | ( | ISOMetaItem | item, |
u32 | reference_type, | ||
u16 | reference_count, | ||
MP4Handle | to_item_IDs | ||
) |
This function adds multiple item references to the item reference box.
If there is no existing item reference box, it will be created.
MP4Err ISOAddItemRelation | ( | ISOMetaItem | fromItem, |
ISOMetaItem | toItem, | ||
u32 | relationType | ||
) |
fromItem | The relation points from this item to the toItem |
toItem | The relation points to this item from the fromItem |
relationType | The 4cc relation type |
Adds a meta box relation box to the additional meta data box, related to first and second meta box.
ISOErr ISOAddMetaDataReference | ( | ISOMeta | meta, |
u16 * | out_ref, | ||
ISOHandle | urlHandle, | ||
ISOHandle | urnHandle | ||
) |
Adds a data reference to the given meta-data.
The returned reference can later be passed to the ISOAddMetaItem().
ISOErr ISOAddMetaItem | ( | ISOMeta | meta, |
ISOMetaItem * | outItem, | ||
u64 | base_offset, | ||
u16 | data_ref_index | ||
) |
Creates a new meta-data item, and returns an opaque pointer to it.
meta | input meta object |
outItem | output pointer to created meta item object |
base_offset | should generally be zero. The software will increment this to reflect the actual base offset of the item’s first extent in the file |
data_ref_index | can be zero (for items to be in the same file) or as returned by ISOAddMetaDataReference(). |
MP4Err ISOAddMetaItemProperty | ( | ISOMetaItem | item, |
MP4GenericAtom * | itemProperty, | ||
u8 | essential | ||
) |
Adds an item property, which can be any MP4GenericAtom, to an ISOMetaItem.
essential | The essential flag can be set with 1 and unset with 0. |
ISOErr ISOAddMetaItemWithID | ( | ISOMeta | meta, |
ISOMetaItem * | outItem, | ||
u64 | base_offset, | ||
u16 | data_ref_index, | ||
u16 | item_ID | ||
) |
Creates a new meta-data item with specific ID, and returns an opaque pointer to it.
Places the indicated data inside a box in the meta-box, with the indicated box type (e.g.
ISOXMLAtomType or ISOBinaryXMLAtomType).
is_full_atom | This flag can be used to insert the four bytes of version and flags required in a full atom. |
ISOErr ISOGetEntityGroupEntries | ( | ISOMeta | meta, |
EntityGroupEntryPtr * | pEntries, | ||
u32 * | cnt | ||
) |
Get common data for all EntityToGroup entries.
meta | MetaBox on which we are operating |
pEntries | [out] An array of EntityGroup entries with common data (id's, count, etc.) |
cnt | [out] Number of EntityGroup entries (size of EntityGroupEntryPtr array) |
ISOErr ISOGetEntityIDCnt | ( | ISOMeta | meta, |
u32 | group_id, | ||
u32 * | num_entities_in_group | ||
) |
Get number of entries in the EntityToGroupBox.
meta | MetaBox on which we are operating |
group_id | group ID |
num_entities_in_group | [out] number of entities in group |
ISOErr ISOGetFileMeta | ( | ISOMovie | theMovie, |
ISOMeta * | meta, | ||
u32 | inMetaType, | ||
u32 * | outMetaType | ||
) |
Gets a reference to the file-level meta data.
The input parameter meta-type, if non-zero, can be used to check that the associated meta-data is of the given type. The output always supplies the type.
ISOErr ISOGetItemData | ( | ISOMetaItem | item, |
MP4Handle | data, | ||
u64 * | base_offset | ||
) |
Reads and returns the data associated with all the extents of the given item, concatenating them.
The returned base offset will be adjusted to represent the offset in the resulting handle (which will generally match the value passed in to ISOAddMetaItem(), typically zero).
ISOErr ISOGetItemInfo | ( | ISOMetaItem | item, |
u16 * | protection_index, | ||
char * | name, | ||
char * | content_type, | ||
char * | content_encoding | ||
) |
Returns the information for a given item.
ISOErr ISOGetItemInfoItemType | ( | ISOMetaItem | item, |
u32 * | item_type, | ||
char ** | item_uri_type | ||
) |
Gets an item info item type from an existing item info entry.
item_uri_type | could be NULL, if the item_type is not ‘uri ‘. |
Get the reletation type.
relation_type | will contain the type found in a meta box relation box or 0. |
ISOErr ISOGetMovieMeta | ( | ISOMovie | theMovie, |
ISOMeta * | meta, | ||
u32 | inMetaType, | ||
u32 * | outMetaType | ||
) |
Gets a reference to the movie-level meta data.
The input parameter meta-type, if non-zero, can be used to check that the associated meta-data is of the given type. The output always supplies the type.
Finds the box of the given type inside the meta box, and returns its contents.
is_full_atom | can be used to skip the four bytes of version and flags of a full atom. |
Finds the box of the given type inside the meta box, and returns its contents.
Like ISOGetPrimaryData(), but probably more useful, as if a box of the given type does not exist, finds the primary item and returns its data. Gives an error indication if neither the box nor the primary item exist.
MP4Err ISOGetProperitesOfMetaItem | ( | ISOMetaItem | item, |
MP4GenericAtom ** | properties, | ||
u32 * | propertiesFound | ||
) |
Retruns an array of MP4GenericAtom pointers, which represent the item properties found for the item given.
propertiesFound | indicates the amount of items found and the size of the array, that is returned. |
ISOErr ISOGetTrackMeta | ( | ISOTrack | theTrack, |
ISOMeta * | meta, | ||
u32 | inMetaType, | ||
u32 * | outMetaType | ||
) |
Gets a reference to the track-level meta data.
The input parameter meta-type, if non-zero, can be used to check that the associated meta-data is of the given type. The output always supplies the type.
ISOErr ISOHideItem | ( | ISOMetaItem | item | ) |
Hide item by setting the (flags & 1) = 1.
item | Item to hide |
ISOErr ISOIsItemHidden | ( | ISOMetaItem | item | ) |
Check if item is hiden.
item | Item to check |
ISOErr ISONewEntityGroup | ( | ISOMeta | meta, |
u32 | grouping_type, | ||
u32 | group_id | ||
) |
Add new EntityToGroupBox (creates grpl if needed)
meta | MetaBox where the new EntityToGroupBox should be added to |
grouping_type | grouping type |
group_id | group ID |
ISOErr ISONewFileMeta | ( | ISOMovie | theMovie, |
u32 | metaType, | ||
ISOMeta * | meta | ||
) |
Creates a new meta box (atom), with the indicated ‘handler’ type, at the file level.
If there is already a meta box present, a additional meta box atom will be created and the new meta box will be added inside.
theMovie | input movie object |
metaType | metadata type fourcc |
meta | output meta object |
ISOErr ISONewMovieMeta | ( | ISOMovie | theMovie, |
u32 | metaType, | ||
ISOMeta * | meta | ||
) |
Creates a new meta box (atom), with the indicated ‘handler’ type, in the movie box (atom).
If there is already a meta box present, a additional meta box atom will be created and the new meta box will be added inside.
theMovie | input movie object |
metaType | metadata type fourcc |
meta | output meta object |
ISOErr ISONewTrackMeta | ( | ISOTrack | theTrack, |
u32 | metaType, | ||
ISOMeta * | meta | ||
) |
Creates a new meta box (atom), with the indicated ‘handler’ type, in the indicated track box (atom).
If there is already a meta box present, a additional meta box atom will be created and the new meta box will be added inside
theTrack | input track object |
metaType | metadata type fourcc |
meta | output meta object |
ISOErr ISOSetItemInfo | ( | ISOMetaItem | item, |
u16 | protection_index, | ||
char * | name, | ||
char * | content_type, | ||
char * | content_encoding | ||
) |
Sets the information for the indicated item.
protection_index | is returned by ISONewMetaProtection() |
ISOErr ISOSetItemInfoItemType | ( | ISOMetaItem | item, |
u32 | item_type, | ||
char * | item_uri_type | ||
) |
Adds an item info item type to an existing item info entry.
item_uri_type | can be NULL, if the item_type is not ‘uri ‘ |