blob: f0eea5914613c68074e497a1e5be9833865bf916 [file] [log] [blame]
.TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library"
.SH "NAME"
.LP
\fBMP4FindTrackId\fR \- Find a track id
.SH "SYNTAX"
.LP
#include <mp4.h>
.LP
MP4TrackId \fBMP4FindTrackId\fR(
.br
MP4FileHandle \fIhFile\fP,
.br
u_int16_t \fIindex\fP,
.br
const char* \fItype\fP = NULL,
.br
u_int8_t \fIsubType\fP = 0
.br
)
.SH "ARGUMENTS"
.LP
.TP
\fIhFile\fP
Specifies the mp4 file to which the operation applies.
.TP
\fIindex\fP
Specifies which track is desired from matching tracks.
.TP
\fItype\fP
Specifies the type of track to be matched. A NULL value implies any type of track. See MP4GetTrackType() for predefined values.
.TP
\fIsubType\fP
Specifies the subtype of the track to be matched. Subtypes are only defined for audio and video tracks, see MP4GetAudioTrackType() and MP4GetVideoTrackType() for predefined values. A zero value implies any subtype.
.SH "RETURN VALUES"
.LP
Upon success, the track id of the specified track. Upon an error, MP4_INVALID_TRACK_ID.
.SH "DESCRIPTION"
.LP
\fBMP4FindTrackId\fR 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:
.LP
MP4FindTrackId(hFile, 0, MP4_VIDEO_TRACK_TYPE);
.LP
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:
.LP
MP4FindTrackId(hFile, 0, MP4_AUDIO_TRACK_TYPE, MP4_MPEG1_AUDIO_TYPE);
.LP
Caveat: The track id's do not imply anything about the ordering of the track information within the mp4 file.
.SH "SEE ALSO"
.LP
MP4(3) MP4FindTrackIndex(3)