1MP4(3)                      MP4 File Format Library                     MP4(3)
2
3
4

NAME

6       MP4AddAudioTrack - Add an audio track
7

SYNTAX

9       #include <mp4.h>
10
11       MP4TrackId MP4AddAudioTrack(
12            MP4FileHandle hFile,
13            u_int32_t timeScale,
14            u_int32_t sampleDuration,
15            u_int8_t audioType = MP4_MPEG4_AUDIO_TYPE
16       )
17

ARGUMENTS

19       hFile  Specifies the mp4 file to which the operation applies.
20
21       timeScale
22              Specifies the time scale in ticks per second of the track.
23
24       sampleDuration
25              Specifies a fixed sample duration for all track samples. Caveat:
26              The value should be in track time scale units
27
28       audioType
29              Specifies the audio encoding  type.  See  MP4GetTrackAudioType()
30              for known values.
31

RETURN VALUES

33       Upon   success,  the  track  id  of  the  new  track.  Upon  an  error,
34       MP4_INVALID_TRACK_ID.
35
36

DESCRIPTION

38       MP4AddAudioTrack adds an audio track to the mp4 file.  MP4WriteSample()
39       can then be used to add the desired audio samples.
40
41       It  is recommended that the time scale be set to the sampling frequency
42       (e.g. 44100 Hz) of the audio so as to preserve the  timing  information
43       accurately.
44
45       If the audio encoding uses a fixed duration for each sample that should
46       be specified here. If not then  the  value  MP4_INVALID_SAMPLE_DURATION
47       should be given for the sampleDuration argument.
48
49
50

SEE ALSO

52       MP4(3)
53
54
55
56Cisco Systems Inc.                Version 0.9                           MP4(3)
Impressum