MP4v2
|
Functions | |
const char * | MP4GetTrackType (MP4FileHandle hFile, MP4TrackId trackId) |
Get the track type. More... | |
const char * | MP4GetTrackMediaDataName (MP4FileHandle hFile, MP4TrackId trackId) |
Get the name of the track's media data atom. More... | |
bool | MP4GetTrackMediaDataOriginalFormat (MP4FileHandle hFile, MP4TrackId trackId, char *originalFormat, uint32_t buflen) |
Get the name of an encrypted track's original media data atom. More... | |
MP4Duration | MP4GetTrackDuration (MP4FileHandle hFile, MP4TrackId trackId) |
Get the duration of a track. More... | |
uint32_t | MP4GetTrackTimeScale (MP4FileHandle hFile, MP4TrackId trackId) |
Get the time scale of a track. More... | |
bool | MP4SetTrackTimeScale (MP4FileHandle hFile, MP4TrackId trackId, uint32_t value) |
Set the time scale of a track. More... | |
bool | MP4GetTrackLanguage (MP4FileHandle hFile, MP4TrackId trackId, char *code) |
Get ISO-639-2/T language code of a track. More... | |
bool | MP4SetTrackLanguage (MP4FileHandle hFile, MP4TrackId trackId, const char *code) |
Set ISO-639-2/T language code of a track. More... | |
bool | MP4GetTrackName (MP4FileHandle hFile, MP4TrackId trackId, char **name) |
Get track name. More... | |
bool | MP4SetTrackName (MP4FileHandle hFile, MP4TrackId trackId, const char *name) |
Set track name. More... | |
uint8_t | MP4GetTrackAudioMpeg4Type (MP4FileHandle hFile, MP4TrackId trackId) |
Get the encoding type of an MPEG-4 audio track. More... | |
uint8_t | MP4GetTrackEsdsObjectTypeId (MP4FileHandle hFile, MP4TrackId trackId) |
Get the encoding object type id from a track's esds atom. More... | |
MP4Duration | MP4GetTrackFixedSampleDuration (MP4FileHandle hFile, MP4TrackId trackId) |
Get the fixed duration of samples in a track. More... | |
uint32_t | MP4GetTrackBitRate (MP4FileHandle hFile, MP4TrackId trackId) |
Get the average bit rate in bits per second of the specified track. More... | |
bool | MP4GetTrackVideoMetadata (MP4FileHandle hFile, MP4TrackId trackId, uint8_t **ppConfig, uint32_t *pConfigSize) |
bool | MP4GetTrackESConfiguration (MP4FileHandle hFile, MP4TrackId trackId, uint8_t **ppConfig, uint32_t *pConfigSize) |
Get the elementary stream (ES) configuration of a track. More... | |
bool | MP4SetTrackESConfiguration (MP4FileHandle hFile, MP4TrackId trackId, const uint8_t *pConfig, uint32_t configSize) |
Set the elementary stream (ES) configuration of a track. More... | |
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) |
void | MP4FreeH264SeqPictHeaders (uint8_t **pSeqHeaders, uint32_t *pSeqHeaderSize, uint8_t **pPictHeader, uint32_t *pPictHeaderSize) |
Frees the memory allocated by MP4GetTrackH264SeqPictHeaders. More... | |
bool | MP4GetTrackH264LengthSize (MP4FileHandle hFile, MP4TrackId trackId, uint32_t *pLength) |
MP4SampleId | MP4GetTrackNumberOfSamples (MP4FileHandle hFile, MP4TrackId trackId) |
Get the number of samples in a track. More... | |
uint16_t | MP4GetTrackVideoWidth (MP4FileHandle hFile, MP4TrackId trackId) |
Get the video width in pixels of the specified video track. More... | |
uint16_t | MP4GetTrackVideoHeight (MP4FileHandle hFile, MP4TrackId trackId) |
Get the video height in pixels of the specified video track. More... | |
double | MP4GetTrackVideoFrameRate (MP4FileHandle hFile, MP4TrackId trackId) |
Get the video frame rate of the specified video track. More... | |
int | MP4GetTrackAudioChannels (MP4FileHandle hFile, MP4TrackId trackId) |
Get the number of channels of the specified audio track. More... | |
bool | MP4IsIsmaCrypMediaTrack (MP4FileHandle hFile, MP4TrackId trackId) |
Check whether a track is ISMACrypt encrypted. More... | |
bool | MP4HaveTrackAtom (MP4FileHandle hFile, MP4TrackId trackId, const char *atomName) |
Check for presence of a track atom. More... | |
bool | MP4GetTrackIntegerProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, uint64_t *retVal) |
Get the value of an integer property for a track. More... | |
bool | MP4GetTrackFloatProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, float *retVal) |
Get the value of a float property for a track. More... | |
bool | MP4GetTrackStringProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, const char **retVal) |
Get the value of a string property for a track. More... | |
bool | MP4GetTrackBytesProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, uint8_t **ppValue, uint32_t *pValueSize) |
Get the value of a bytes property for a track. More... | |
bool | MP4SetTrackIntegerProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, int64_t value) |
Set the value of an integer property for a track. More... | |
bool | MP4SetTrackFloatProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, float value) |
Set the value of a float property for a track. More... | |
bool | MP4SetTrackStringProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, const char *value) |
Set the value of a string property for a track. More... | |
bool | MP4SetTrackBytesProperty (MP4FileHandle hFile, MP4TrackId trackId, const char *propName, const uint8_t *pValue, uint32_t valueSize) |
Set the value of a bytes property for a track. More... | |
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. |
int MP4GetTrackAudioChannels | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Get the number of channels of the specified audio track.
MP4GetTrackAudioChannels returns the number of audio channels in the specified track in the mp4 file.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the number of audio channels is desired. |
uint8_t MP4GetTrackAudioMpeg4Type | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Get the encoding type of an MPEG-4 audio track.
MP4GetTrackAudioMpeg4Type returns the MPEG-4 encoding type of the specified MPEG-4 audio track in the mp4 file. If an mp4 audio track has type MP4_MPEG4_AUDIO_TYPE, this call can be used to determine which specific MPEG-4 audio encoding is contained in the track.
Known MPEG-4 audio encoding types are:
Type | Description |
---|---|
MP4_MPEG4_AAC_MAIN_AUDIO_TYPE | MPEG-4 AAC Main profile |
MP4_MPEG4_AAC_LC_AUDIO_TYPE | MPEG-4 AAC Low Complexity profile |
MP4_MPEG4_AAC_SSR_AUDIO_TYPE | MPEG-4 AAC SSR profile |
MP4_MPEG4_AAC_LTP_AUDIO_TYPE | MPEG-4 AAC Long Term Prediction profile |
MP4_MPEG4_AAC_SCALABLE_AUDIO_TYPE | MPEG-4 AAC Scalable |
MP4_MPEG4_CELP_AUDIO_TYPE | MPEG-4 CELP |
MP4_MPEG4_HVXC_AUDIO_TYPE | MPEG-4 HVXC |
MP4_MPEG4_TTSI_AUDIO_TYPE | MPEG-4 Text To Speech |
MP4_MPEG4_MAIN_SYNTHETIC_AUDIO_TYPE | MPEG-4 Main Synthetic profile |
MP4_MPEG4_WAVETABLE_AUDIO_TYPE | MPEG-4 Wavetable Synthesis profile |
MP4_MPEG4_MIDI_AUDIO_TYPE | MPEG-4 MIDI profile |
MP4_MPEG4_ALGORITHMIC_FX_AUDIO_TYPE | MPEG-4 Algorithmic Synthesis and Audio FX profile |
Note: This information is retrieved from the audio track ES configuration.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the MPEG-4 audio type is desired. |
uint32_t MP4GetTrackBitRate | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Get the average bit rate in bits per second of the specified track.
MP4GetTrackBitRate returns the average bit rate in bits per second in the specified track in the mp4 file.
Note: hint tracks will not return their bit rate via this mechanism.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the bit rate is desired. |
bool MP4GetTrackBytesProperty | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const char * | propName, | ||
uint8_t ** | ppValue, | ||
uint32_t * | pValueSize | ||
) |
Get the value of a bytes property for a track.
MP4GetTrackBytesProperty determines the value of the bytes property identified by propName
, e.g. "tkhd.matrix", for the track identified by trackId
. The value is stored in a newly allocated buffer the location of which is assigned to the variable pointed to by ppValue. The caller is responsible for freeing the memory with MP4Free().
hFile | handle of file for operation. |
trackId | id of track for operation. |
propName | path to the property to get. |
ppValue | pointer to a variable to receive the memory location containing the property bytes. |
pValueSize | pointer to a variable to receive the length of the property bytes value. |
MP4Duration MP4GetTrackDuration | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Get the duration of a track.
MP4GetTrackDuration returns the total duration of all the samples in the specified track in the mp4 file.
Caveat: The value is in units of the track time scale.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the duration is desired. |
bool MP4GetTrackESConfiguration | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
uint8_t ** | ppConfig, | ||
uint32_t * | pConfigSize | ||
) |
Get the elementary stream (ES) configuration of a track.
MP4GetTrackESConfiguration returns the elementary stream (ES) configuration of the specified track in the mp4 file. This information is codec specific and contains the configuration necessary for the given codec to decode the samples in the track.
Caveat: the returned block of memory has been allocated by the library. The caller may safely modify the value without effecting the library, but the caller takes responsiblity for freeing the memory with MP4Free().
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the ES configuration is desired. |
ppConfig | specifies a pointer to a pointer variable that will be given the address of the configuration information. |
pConfigSize | specifies a pointer to a variable to hold the size of the ES configuration information. |
uint8_t MP4GetTrackEsdsObjectTypeId | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Get the encoding object type id from a track's esds atom.
MP4GetTrackEsdsObjectTypeId returns the encoding object type of the specified audio or video track in the mp4 file.
Known audio object types are:
Type | Description |
---|---|
MP4_MPEG1_AUDIO_TYPE | MPEG-1 Audio Layers I, II, & III |
MP4_MPEG2_AUDIO_TYPE | MPEG-2 low bitrate extensions to MPEG-1 Audio |
MP4_MP3_AUDIO_TYPE is an alias for this value | |
MP4_MPEG2_AAC_MAIN_AUDIO_TYPE | MPEG-2 AAC Main profile |
MP4_MPEG2_AAC_LC_AUDIO_TYPE | MPEG-2 AAC Low Complexity profile |
MP4_MPEG2_AAC_SSR_AUDIO_TYPE | MPEG-2 AAC SSR profile |
MP4_MPEG4_AUDIO_TYPE | MPEG-4 Audio, includes MPEG-4 extensions to AAC |
MP4_PRIVATE_AUDIO_TYPE | User private type |
Known video object types are:
Type | Description |
---|---|
MP4_MPEG1_VIDEO_TYPE | MPEG-1 Video |
MP4_MPEG2_SIMPLE_VIDEO_TYPE | MPEG-2 Simple Profile Video |
MP4_MPEG2_MAIN_VIDEO_TYPE | MPEG-2 Main Profile Video (Broadcast/DVD) |
MP4_MPEG2_SNR_VIDEO_TYPE | MPEG-2 SNR Profile Video |
MP4_MPEG2_SPATIAL_VIDEO_TYPE | MPEG-2 Spatial Scalability Profile Video |
MP4_MPEG2_HIGH_VIDEO_TYPE | MPEG-2 High Profile Video (HDTV) |
MP4_MPEG2_442_VIDEO_TYPE | MPEG-2 442 Profile Video (Studio) |
MP4_MPEG4_VIDEO_TYPE | MPEG-4 Video |
MP4_JPEG_VIDEO_TYPE | JPEG stills or motion JPEG |
MP4_PRIVATE_VIDEO_TYPE | User private type |
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the encoding object type is desired. |
MP4Duration MP4GetTrackFixedSampleDuration | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Get the fixed duration of samples in a track.
MP4GetTrackFixedSampleDuration returns the duration of samples in the specified track in the mp4 file, if this value is fixed for all samples. This is typically the case for audio tracks and video tracks. If the track samples have variable duration, then MP4_INVALID_DURATION is returned.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track to which the operation applies. |
bool MP4GetTrackFloatProperty | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const char * | propName, | ||
float * | retVal | ||
) |
Get the value of a float property for a track.
MP4GetTrackFloatProperty determines the value of the float property identified by propName
, e.g. "tkhd.volume", for the track identified by trackId
. The value is stored in the variable pointed to by retVal
.
hFile | handle of file for operation. |
trackId | id of track for operation. |
propName | path to the property to get. |
retVal | pointer to a variable to receive the return value. |
bool MP4GetTrackIntegerProperty | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const char * | propName, | ||
uint64_t * | retVal | ||
) |
Get the value of an integer property for a track.
MP4GetTrackIntegerProperty determines the value of the integer property identified by propName
, e.g. "tkhd.layer", for the track identified by trackId
. The value is stored in the variable pointed to by retVal
.
hFile | handle of file for operation. |
trackId | id of track for operation. |
propName | path to the property to get. |
retVal | pointer to a variable to receive the return value. |
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). |
const char* MP4GetTrackMediaDataName | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Get the name of the track's media data atom.
MP4GetTrackMediaDataName returns the four character name of the specified track's media data atom, i.e. the child atom of the track's stsd atom.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the media data atom name is desired. |
bool MP4GetTrackMediaDataOriginalFormat | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
char * | originalFormat, | ||
uint32_t | buflen | ||
) |
Get the name of an encrypted track's original media data atom.
MP4GetTrackMediaDataOriginalFormat is used to get the original media data atom name if a track has been encrypted. The track identified by trackId
must be an encrypted track with encv as the media data name returned by MP4GetTrackMediaDataName.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the encoded track for which the original media data atom name is desired. |
originalFormat | specifies a buffer to receive the original media data atom name. |
buflen | specifies the size of the buffer pointed to by originalFormat . |
bool MP4GetTrackName | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
char ** | name | ||
) |
Get track name.
MP4GetTrackName gets the name of the track via udta.name property.
The memory to store the track name is allocated by the library, so the caller is responsible for freeing it with MP4Free().
hFile | handle of file for operation. |
trackId | id of track for operation. |
name | pointer to a variable to receive the track name. |
MP4SampleId MP4GetTrackNumberOfSamples | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Get the number of samples in a track.
MP4GetTrackNumberOfSamples returns the number of samples in the specified track in the mp4 file. Sample id's are the consecutive sequence of numbers from 1 to the total number of samples, i.e. 1-based indexing, not 0-based indexing.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the number of samples is desired. |
bool MP4GetTrackStringProperty | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const char * | propName, | ||
const char ** | retVal | ||
) |
Get the value of a string property for a track.
MP4GetTrackStringProperty determines the value of the string property identified by propName
, e.g. "udta.hnti.sdp .sdpText", for the track identified by trackId
. The value is stored in the variable pointed to by retVal
.
hFile | handle of file for operation. |
trackId | id of track for operation. |
propName | path to the property to get. |
retVal | pointer to a variable to receive the return value. |
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:
@li #MP4_OD_TRACK_TYPE @li #MP4_SCENE_TRACK_TYPE @li #MP4_AUDIO_TRACK_TYPE @li #MP4_VIDEO_TRACK_TYPE @li #MP4_HINT_TRACK_TYPE @li #MP4_CNTL_TRACK_TYPE @li #MP4_TEXT_TRACK_TYPE @li #MP4_CLOCK_TRACK_TYPE @li #MP4_MPEG7_TRACK_TYPE @li #MP4_OCI_TRACK_TYPE @li #MP4_IPMP_TRACK_TYPE @li #MP4_MPEGJ_TRACK_TYPE
hFile | handle of file for operation. |
trackId | id of track for operation. |
double MP4GetTrackVideoFrameRate | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Get the video frame rate of the specified video track.
MP4GetTrackVideoFrameRate returns the frame rate of the video in the specified track in the mp4 file. If the video is variable rate, the average frame rate is returned.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the video frame rate is desired. |
uint16_t MP4GetTrackVideoHeight | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Get the video height in pixels of the specified video track.
MP4GetTrackVideoHeight returns the height of the video in pixels in the specified track in the mp4 file.
Caveat: Not all mp4 implementations set this value accurately. The mp4 specification states that the authoritative values are contained in the track ES configuration which is video encoding specific, and hence not interpretable by the mp4 library.
If the value of 240 is returned, care should be taken to verify the accuracy of this value since this is the default value in the mp4 specification.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the video height is desired. |
uint16_t MP4GetTrackVideoWidth | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Get the video width in pixels of the specified video track.
MP4GetTrackVideoWidth returns the width of the video in pixels in the specified track in the mp4 file.
Caveat: Not all mp4 implementations set this value accurately. The mp4 specification states that the authoritative values are contained in the track ES configuration which is video encoding specific, and hence not interpretable by the mp4 library.
If the value of 320 is returned, care should be taken to verify the accuracy of this value since this is the default value in the mp4 specification.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the video width is desired. |
bool MP4HaveTrackAtom | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const char * | atomName | ||
) |
Check for presence of a track atom.
MP4HaveTrackAtom checks for the presence of the track atom passed in atomName
. atomName
can specify an atom path to check for atoms that are not direct children of the trak atom, e.g. "mdia.minf.stbl".
hFile | handle of file for operation. |
trackId | id of track for operation. |
atomName | name of the atom to check for. |
bool MP4IsIsmaCrypMediaTrack | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId | ||
) |
Check whether a track is ISMACrypt encrypted.
MP4IsIsmaCrypMediaTrack checks whether the specified track is encrypted using ISMACrypt.
hFile | specifies the mp4 file to which the operation applies. |
trackId | specifies the track for which the information is desired. |
bool MP4SetTrackBytesProperty | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const char * | propName, | ||
const uint8_t * | pValue, | ||
uint32_t | valueSize | ||
) |
Set the value of a bytes property for a track.
MP4SetTrackBytesProperty sets the value of the bytes property identified by propName
, e.g. "tkhd.matrix", for the track identified by trackId
.
hFile | handle of file for operation. |
trackId | id of track for operation. |
propName | path to the property to set. |
pValue | pointer the bytes representing the new value of the property. |
valueSize | the size of the bytes value pointed to by pValue. |
bool MP4SetTrackESConfiguration | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const uint8_t * | pConfig, | ||
uint32_t | configSize | ||
) |
Set the elementary stream (ES) configuration of a track.
MP4SetTrackESConfiguration sets the elementary stream (ES) configuration of the specified track in the mp4 file. This information is codec specific and contains the configuration necessary for the given codec to decode the samples in the track.
hFile | specifies the mp4 file to which the operation applies. |
trackId | the track to which the operation applies. |
pConfig | specifies a pointer to the ES configuration information. |
configSize | specifies the size of the ES configuration information. |
bool MP4SetTrackFloatProperty | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const char * | propName, | ||
float | value | ||
) |
Set the value of a float property for a track.
MP4SetTrackFloatProperty sets the value of the float property identified by propName
, e.g. "tkhd.volume", for the track identified by trackId
.
hFile | handle of file for operation. |
trackId | id of track for operation. |
propName | path to the property to set. |
value | the new value of the property. |
bool MP4SetTrackIntegerProperty | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const char * | propName, | ||
int64_t | value | ||
) |
Set the value of an integer property for a track.
MP4SetTrackIntegerProperty sets the value of the integer property identified by propName
, e.g. "tkhd.layer", for the track identified by trackId
.
hFile | handle of file for operation. |
trackId | id of track for operation. |
propName | path to the property to set. |
value | the new value of the property. |
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. |
name | the name to set as the track name. |
bool MP4SetTrackStringProperty | ( | MP4FileHandle | hFile, |
MP4TrackId | trackId, | ||
const char * | propName, | ||
const char * | value | ||
) |
Set the value of a string property for a track.
MP4SetTrackStringProperty sets the value of the string property identified by propName
, e.g. "udta.hnti.sdp .sdpText", for the track identified by trackId
.
hFile | handle of file for operation. |
trackId | id of track for operation. |
propName | path to the property to set. |
value | the new value of the property. |
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. |
value | desired time scale for the track. |