MP4FindTrackId - Find a track id
#include <mp4.h>
MP4TrackId MP4FindTrackId(
MP4FileHandle hFile,
u_int16_t index,
const char* type = NULL,
u_int8_t subType = 0
)
Upon success, the track id of the specified track. Upon an error, MP4_INVALID_TRACK_ID.
MP4FindTrackId gets the track id associated with the index'th track of the specified track type. For example, to get the track id of the first video track:
MP4FindTrackId(hFile, 0, MP4_VIDEO_TRACK_TYPE);
For audio and video tracks, a subtype can be specified to find a track of a particular encoding. For example, to get the track id of the first audio track encoded with MPEG-1 audio:
MP4FindTrackId(hFile, 0, MP4_AUDIO_TRACK_TYPE, MP4_MPEG1_AUDIO_TYPE);
Caveat: The track id's do not imply anything about the ordering of the track information within the mp4 file.
MP4(3) MP4FindTrackIndex(3)