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

NAME

6       MP4CopyTrack - Make a copy of a specified track
7

SYNTAX

9       #include <mp4.h>
10
11       MP4TrackId MP4CopyTrack(
12            MP4FileHandle srcFile,
13            MP4TrackId srcTrackId,
14            MP4FileHandle dstFile = MP4_INVALID_FILE_HANDLE,
15            bool applyEdits = false,
16            MP4TrackId dstHintTrackReferenceTrack = MP4_INVALID_TRACK_ID
17       )
18

ARGUMENTS

20       srcFile
21              Specifies the mp4 file of the source track of the operation.
22
23       srcTrackId
24              Specifies the track id of the track to be copied.
25
26       dstFile
27              Specifies  the  mp4  file of the new, copied track. If the value
28              is MP4_INVALID_FILE_HANDLE, the new track is created in the same
29              file as the source track.
30
31       applyEdits
32              Specifies  if  the  track  edit list is to be applied during the
33              copying of media samples. If false, then all samples are copied,
34              if  true then only those samples included by the track edit list
35              are copied.
36
37       dstHintTrackReferenceTrack
38              When cloning a hint track, this parameter specifies the track id
39              of the reference track in the destination file.
40

RETURN VALUES

42       Upon   success,  the  track  id  of  the  new  track.  Upon  an  error,
43       MP4_INVALID_TRACK_ID.
44
45

DESCRIPTION

47       MP4CopyTrack creates a new track to an mp4 file that is a  copy  of  an
48       existing  track  with  respect  to  the track media type, other control
49       information, and media samples.
50
51       The applyEdits parameter of this function allows for easy  creation  of
52       standalone   clips   from   a   larger   mp4   file.  To  do  this  use
53       MP4AddTrackEdit() to specify the start and duration of  the  clip,  and
54       then  use  MP4CopyTrack()  to export that portion of the media to a new
55       mp4 file.
56
57       Note if you do not want to copy the media samples,  but  just  want  to
58       create a track with the same type and control information of the source
59       track use MP4CloneTrack().
60
61
62

SEE ALSO

64       MP4(3) MP4CloneTrack(3) MP4AddTrackEdit(3)
65
66
67
68Cisco Systems Inc.                Version 0.9                           MP4(3)
Impressum