Track readers are objects that allow you to easily read sequential samples or access units from a movie track. More...
Functions | |
MP4Err | MP4CreateTrackReader (MP4Track theTrack, MP4TrackReader *outReader) |
Create a track reader for a movie track. | |
MP4Err | MP4DisposeTrackReader (MP4TrackReader theReader) |
Frees up resources associated with a track reader. | |
MP4Err | MP4TrackReaderGetCurrentDecoderConfig (MP4TrackReader theReader, MP4Handle decoderConfigH) |
Places the appropriate decoder config descriptor into the handle provided. | |
MP4Err | MP4TrackReaderGetCurrentSampleDescription (MP4TrackReader theReader, MP4Handle sampleEntryH) |
Get the sample description associated with the current read-point. | |
MP4Err | MP4TrackReaderGetCurrentSampleDescriptionIndex (MP4TrackReader theReader, u32 *index) |
Get the index of the current sample description. | |
MP4Err | MP4TrackReaderGetNextAccessUnit (MP4TrackReader theReader, MP4Handle outAccessUnit, u32 *outSize, u32 *outSampleFlags, s32 *outCTS, s32 *outDTS) |
Use this to get the next access unit (MPEG-4), or sample, from the track. | |
MP4Err | MP4TrackReaderGetNextAccessUnitWithDuration (MP4TrackReader theReader, MP4Handle outAccessUnit, u32 *outSize, u32 *outSampleFlags, s32 *outCTS, s32 *outDTS, u32 *outDuration) |
Get the next access unit (MPEG-4), or sample, from the track with duration of the sample. | |
MP4Err | MP4TrackReaderGetNextAccessUnitWithPad (MP4TrackReader theReader, MP4Handle outAccessUnit, u32 *outSize, u32 *outSampleFlags, s32 *outCTS, s32 *outDTS, u8 *outPad) |
Get the next access unit, or sample, from the track with the padding bits for the sample. | |
MP4Err | MP4TrackReaderGetNextPacket (MP4TrackReader theReader, MP4Handle outPacket, u32 *outSize) |
Use this to read the next SL-packet from the track. | |
MP4Err | MP4TrackReaderSetSLConfig (MP4TrackReader theReader, MP4SLConfig slConfig) |
Set the SLConfig of the trackreader. | |
MP4Err | MP4TrackReaderGetCurrentSampleNumber (MP4TrackReader theReader, u32 *sampleNumber) |
Get the sample number of the last returned access unit. | |
Track readers are objects that allow you to easily read sequential samples or access units from a movie track.
MP4Err MP4TrackReaderGetCurrentSampleNumber | ( | MP4TrackReader | theReader, |
u32 * | sampleNumber | ||
) |
Get the sample number of the last returned access unit.
After a track reader has returned an access unit (one of the above functions), this function can be called to find the sample number of that access unit. This may be useful when (for example), sample group association information is wanted for that sample.
MP4Err MP4TrackReaderGetNextAccessUnit | ( | MP4TrackReader | theReader, |
MP4Handle | outAccessUnit, | ||
u32 * | outSize, | ||
u32 * | outSampleFlags, | ||
s32 * | outCTS, | ||
s32 * | outDTS | ||
) |
Use this to get the next access unit (MPEG-4), or sample, from the track.
theReader | input track reader object |
outAccessUnit | A handler that the sample/AU will be placed into |
outSize | The size of the returned sample/AU in bytes |
outSampleFlags | Contains information about the media sample that specifies this sample/AU. Flag values are combinations of MP4MediaSampleNotSync if the sample is not a sync sample and MP4MediaSampleHasCompositionOffset if the sample’s DTS differs from its CTS. |
outCTS | The composition time stamp for this sample/AU. This is measured in the movie time, but in media time-units. If the DTS is negative (see below) and the CTS offset not that large (or not present, and hence zero), this may also be negative. NB in previous releases this parameter was unsigned. |
outDTS | The decoding time stamp for this sample/AU. This is measured in the movie time, but in media time-units. It may be negative, or overlap the end of the previously decoded access unit, indicating that not all the normal duration of this AU should be presented, and some material trimmed from the beginning (the amount the time-stamp is negative or overlaps the previous timestamp plus previous duration). NB in previous releases this parameter was unsigned |
MP4Err MP4TrackReaderGetNextAccessUnitWithDuration | ( | MP4TrackReader | theReader, |
MP4Handle | outAccessUnit, | ||
u32 * | outSize, | ||
u32 * | outSampleFlags, | ||
s32 * | outCTS, | ||
s32 * | outDTS, | ||
u32 * | outDuration | ||
) |
Get the next access unit (MPEG-4), or sample, from the track with duration of the sample.
The duration may be shorter than the natural duration of the AU, in the case where the end of an edit falls within the AU. Some material may need to be trimmed from the end of the AU.
MP4Err MP4TrackReaderGetNextAccessUnitWithPad | ( | MP4TrackReader | theReader, |
MP4Handle | outAccessUnit, | ||
u32 * | outSize, | ||
u32 * | outSampleFlags, | ||
s32 * | outCTS, | ||
s32 * | outDTS, | ||
u8 * | outPad | ||
) |
Get the next access unit, or sample, from the track with the padding bits for the sample.
If the track has no recorded padding table (no padding information) then the padding value returned will be 0xF8. This is not a legal value for actual padding and should not be supplied to calls which add samples.
MP4Err MP4TrackReaderGetNextPacket | ( | MP4TrackReader | theReader, |
MP4Handle | outPacket, | ||
u32 * | outSize | ||
) |
Use this to read the next SL-packet from the track.
The packet is placed into the outPacket handle, and its size is indicated in outSize.