ISOBMFF
ISO Base Media File Format Reference Software Documentation
 
Loading...
Searching...
No Matches
User data functions

These functions allow you to access and manipulate track and movie user data. More...

Functions

MP4Err MP4GetMovieUserData (MP4Movie theMovie, MP4UserData *outUserData)
 Get the movie level user data 'udta'.
 
MP4Err MP4GetTrackUserData (MP4Track theTrack, MP4UserData *outUserData)
 Get the track level user data 'udta'.
 
MP4Err MP4AddUserData (MP4UserData theUserData, MP4Handle dataH, u32 userDataType, u32 *outIndex)
 Adds an entry to the user data list.
 
MP4Err MP4GetIndUserDataType (MP4UserData theUserData, u32 typeIndex, u32 *outType)
 Queries an indexed type of user data in the user data list.
 
MP4Err MP4GetUserDataEntryCount (MP4UserData theUserData, u32 userDataType, u32 *outCount)
 Returns the count of user data atoms of the specified type.
 
MP4Err MP4GetUserDataItem (MP4UserData theUserData, MP4Handle dataH, u32 userDataType, u32 itemIndex)
 Returns the contents of the requested user data item.
 
MP4Err MP4GetAtomFromUserData (MP4UserData theUserData, MP4GenericAtom *outAtom, u32 userDataType, u32 itemIndex)
 Returns the contents of the requested user data item.
 
MP4Err MP4GetUserDataTypeCount (MP4UserData theUserData, u32 *outCount)
 Returns the count of user data types.
 
MP4Err MP4DeleteUserDataItem (MP4UserData theUserData, u32 userDataType, u32 itemIndex)
 Deletes a user-data item, by index.
 
MP4Err MP4NewUserData (MP4UserData *outUserData)
 Creates a new user data list.
 
MP4Err MP4NewForeignAtom (MP4GenericAtom *outAtom, u32 atomType, MP4Handle atomPayload)
 Construct a new custom atom object.
 
MP4Err MP4NewUUIDAtom (MP4GenericAtom *outAtom, u8 the_uuid[16], MP4Handle atomPayload)
 Construct a new custom atom object with UUID type.
 
MP4Err MP4GetForeignAtom (MP4GenericAtom atom, u32 *atomType, u8 the_uuid[16], MP4Handle atomPayload)
 Returns the type and contents of the given foreign atom, and, if it is a UUID atom, its UUID also.
 

Detailed Description

These functions allow you to access and manipulate track and movie user data.

Function Documentation

◆ MP4AddUserData()

MP4Err MP4AddUserData ( MP4UserData  theUserData,
MP4Handle  dataH,
u32  userDataType,
u32 *  outIndex 
)

Adds an entry to the user data list.

Parameters
theUserDataThe user data list you are modifying
dataHAn ISOHandle containing the data you are adding
userDataTypeThe atom type that will identify this data
outIndexReturns the index (of entries of userDataType) that corresponds to this entry. You will need this to retrieve this particular entry.

◆ MP4GetAtomFromUserData()

MP4Err MP4GetAtomFromUserData ( MP4UserData  theUserData,
MP4GenericAtom outAtom,
u32  userDataType,
u32  itemIndex 
)

Returns the contents of the requested user data item.

Parameters
theUserDataThe user data list you are querying
outAtomA generic atom, which will contain the requested atom
userDataTypeThe type of user data
itemIndexThe index for the atom type you are querying. This should be one based

◆ MP4GetIndUserDataType()

MP4Err MP4GetIndUserDataType ( MP4UserData  theUserData,
u32  typeIndex,
u32 *  outType 
)

Queries an indexed type of user data in the user data list.

Parameters
theUserDataThe user data list you are querying
typeIndexThe index for the atom type you are querying. This should be one based.
outTypeReturns the atom type corresponding to the given index.

◆ MP4GetMovieUserData()

MP4Err MP4GetMovieUserData ( MP4Movie  theMovie,
MP4UserData outUserData 
)

Get the movie level user data 'udta'.

Note
If no 'udta' is found, the default one is created in theMovie and returned.
Parameters
theMovieinput movie object
outUserDataoutput pointer to user data
Returns
MP4Err error code

◆ MP4GetTrackUserData()

MP4Err MP4GetTrackUserData ( MP4Track  theTrack,
MP4UserData outUserData 
)

Get the track level user data 'udta'.

Note
If no 'udta' is found, the default one is created in theTrack and returned.
Parameters
theTrackinput track object
outUserDataoutput pointer to user data
Returns
MP4Err error code

◆ MP4GetUserDataItem()

MP4Err MP4GetUserDataItem ( MP4UserData  theUserData,
MP4Handle  dataH,
u32  userDataType,
u32  itemIndex 
)

Returns the contents of the requested user data item.

Parameters
theUserDataThe user data list you are querying
dataHA handle to contain the returned data
userDataTypeThe type of user data
itemIndexThe index for the atom type you are querying. This should be one based

◆ MP4NewForeignAtom()

MP4Err MP4NewForeignAtom ( MP4GenericAtom outAtom,
u32  atomType,
MP4Handle  atomPayload 
)

Construct a new custom atom object.

Parameters
outAtomoutput new atom object
atomTypeatom type fourcc
atomPayloadatom payload data handle
Returns
MP4Err error code

◆ MP4NewUUIDAtom()

MP4Err MP4NewUUIDAtom ( MP4GenericAtom outAtom,
u8  the_uuid[16],
MP4Handle  atomPayload 
)

Construct a new custom atom object with UUID type.

Parameters
outAtomoutput new atom object
the_uuidatom UUID
atomPayloadatom payload data handle
Returns
MP4Err error code