Functions | |
bool | MP4HaveTrackAtom (MP4FileHandle hFile, MP4TrackId trackId, const char *atomname) |
const char * | MP4GetTrackType (MP4FileHandle hFile, MP4TrackId trackId) |
Get the track type. | |
const char * | MP4GetTrackMediaDataName (MP4FileHandle hFile, MP4TrackId trackId) |
bool | MP4GetTrackMediaDataOriginalFormat (MP4FileHandle hFile, MP4TrackId trackId, char *originalFormat, uint32_t buflen) |
MP4Duration | MP4GetTrackDuration (MP4FileHandle hFile, MP4TrackId trackId) |
uint32_t | MP4GetTrackTimeScale (MP4FileHandle hFile, MP4TrackId trackId) |
Get the time scale of a track. | |
bool | MP4SetTrackTimeScale (MP4FileHandle hFile, MP4TrackId trackId, uint32_t value) |
Set the time scale of a track. | |
bool | MP4GetTrackLanguage (MP4FileHandle hFile, MP4TrackId trackId, char *code) |
Get ISO-639-2/T language code of a track. | |
bool | MP4SetTrackLanguage (MP4FileHandle hFile, MP4TrackId trackId, const char *code) |
Set ISO-639-2/T language code of a track. | |
bool | MP4GetTrackName (MP4FileHandle hFile, MP4TrackId trackId, char **name) |
Get track name. | |
bool | MP4SetTrackName (MP4FileHandle hFile, MP4TrackId trackId, const char *name) |
Set track name. | |
uint8_t | MP4GetTrackAudioMpeg4Type (MP4FileHandle hFile, MP4TrackId trackId) |
uint8_t | MP4GetTrackEsdsObjectTypeId (MP4FileHandle hFile, MP4TrackId trackId) |
MP4Duration | MP4GetTrackFixedSampleDuration (MP4FileHandle hFile, MP4TrackId trackId) |
uint32_t | MP4GetTrackBitRate (MP4FileHandle hFile, MP4TrackId trackId) |
bool | MP4GetTrackVideoMetadata (MP4FileHandle hFile, MP4TrackId trackId, uint8_t **ppConfig, uint32_t *pConfigSize) |
bool | MP4GetTrackESConfiguration (MP4FileHandle hFile, MP4TrackId trackId, uint8_t **ppConfig, uint32_t *pConfigSize) |
bool | MP4SetTrackESConfiguration (MP4FileHandle hFile, MP4TrackId trackId, const uint8_t *pConfig, uint32_t configSize) |
void | MP4FreeH264SeqPictHeaders (uint8_t **pSeqHeaders, uint32_t *pSeqHeaderSize, uint8_t **pPictHeader, uint32_t *pPictHeaderSize) |
Frees the memory allocated by MP4GetTrackH264SeqPictHeaders. | |
bool | MP4GetTrackH264ProfileLevel (MP4FileHandle hFile, MP4TrackId trackId, uint8_t *pProfile, uint8_t *pLevel) |
bool | MP4GetTrackH264SeqPictHeaders (MP4FileHandle hFile, MP4TrackId trackId, uint8_t ***pSeqHeaders, uint32_t **pSeqHeaderSize, uint8_t ***pPictHeader, uint32_t **pPictHeaderSize) |
bool | MP4GetTrackH264LengthSize (MP4FileHandle hFile, MP4TrackId trackId, uint32_t *pLength) |
MP4SampleId | MP4GetTrackNumberOfSamples (MP4FileHandle hFile, MP4TrackId trackId) |
uint16_t | MP4GetTrackVideoWidth (MP4FileHandle hFile, MP4TrackId trackId) |
uint16_t | MP4GetTrackVideoHeight (MP4FileHandle hFile, MP4TrackId trackId) |
double | MP4GetTrackVideoFrameRate (MP4FileHandle hFile, MP4TrackId trackId) |
int | MP4GetTrackAudioChannels (MP4FileHandle hFile, MP4TrackId trackId) |
bool | MP4IsIsmaCrypMediaTrack (MP4FileHandle hFile, MP4TrackId trackId) |
bool | MP4GetTrackIntegerProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, uint64_t *retvalue) |
bool | MP4GetTrackFloatProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, float *ret_value) |
bool | MP4GetTrackStringProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, const char **retvalue) |
bool | MP4GetTrackBytesProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, uint8_t **ppValue, uint32_t *pValueSize) |
bool | MP4SetTrackIntegerProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, int64_t value) |
bool | MP4SetTrackFloatProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, float value) |
bool | MP4SetTrackStringProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, const char *value) |
bool | MP4SetTrackBytesProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, const uint8_t *pValue, uint32_t valueSize) |
void MP4FreeH264SeqPictHeaders | ( | uint8_t ** | pSeqHeaders, |
uint32_t * | pSeqHeaderSize, | ||
uint8_t ** | pPictHeader, | ||
uint32_t * | pPictHeaderSize ) |
Frees the memory allocated by MP4GetTrackH264SeqPictHeaders.
MP4FreeH264SeqPictHeaders frees the memory that was allocated by a call to the MP4GetTrackH264SeqPictHeaders function.
When a client application wants to extract the H.264 video data from an MP4 file it will call MP4GetTrackH264SeqPictHeaders to obtain the sequence and picture parameter sets. These parameter sets are required for decoding a sequence of one, or more, coded slices. When the client application is done with the data it must free it. On the Windows platform this cannot be done directly by the client application because the C runtime of the client application and the C runtime of the mp4v2 DLL may be different, which will result in an error at runtime. This function allows the client application to let the mp4v2 DLL free the memory with the appropriate CRT heap manager.
pSeqHeaders | pointer to an array of SPS pointers. |
pSeqHeaderSize | pointer to array of SPS sizes. |
pPictHeader | pointer to an array of PPS pointers. |
pPictHeaderSize | pointer to array of PPS sizes. |
bool MP4GetTrackLanguage | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
char * | code ) |
Get ISO-639-2/T language code of a track.
The language code is a 3-char alpha code consisting of lower-case letters.
hFile | handle of file for operation. |
trackId | id of track for operation. |
code | buffer to hold 3-char+null (4-bytes total). |
bool MP4GetTrackName | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
char ** | name ) |
Get track name.
MP4GetTrackName gets the name of the track via udta.name property.
hFile | handle of file for operation. |
trackId | id of track for operation. |
uint32_t MP4GetTrackTimeScale | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId ) |
Get the time scale of a track.
MP4GetTrackTimeScale returns the time scale of the specified track in the mp4 file. The time scale determines the number of clock ticks per second for this track.
hFile | handle of file for operation. |
trackId | id of track for operation. |
const char * MP4GetTrackType | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId ) |
Get the track type.
MP4GetTrackType gets the type of the track with the specified track id.
Note: the library does not provide a MP4SetTrackType function, the track type needs to be specified when the track is created, e.g. MP4AddSystemsTrack(MP4_OCI_TRACK_TYPE).
Known track types are:
hFile | handle of file for operation. |
trackId | id of track for operation. |
bool MP4SetTrackLanguage | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const char * | code ) |
Set ISO-639-2/T language code of a track.
The language code is a 3-char alpha code consisting of lower-case letters.
hFile | handle of file for operation. |
trackId | id of track for operation. |
code | 3-char language code. |
bool MP4SetTrackName | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const char * | name ) |
Set track name.
MP4SetTrackName sets the name of the track via udta.name property. The udta atom is created if needed.
hFile | handle of file for operation. |
trackId | id of track for operation. |
bool MP4SetTrackTimeScale | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
uint32_t | value ) |
Set the time scale of a track.
MP4SetTrackTimeScale sets the time scale of the specified track in the mp4 file. The time scale determines the number of clock ticks per second for this track.
Typically this value is set once when the track is created. However this call can be used to modify the value if that is desired. Since track sample durations are expressed in units of the track time scale, any change to the time scale value will effect the real time duration of the samples.
hFile | handle of file for operation. |
trackId | id of track for operation. |
timeScale | desired time scale for the track. |