What's New in QuickTime 5
| Previous | Chapter Contents | Chapter Top | Next |
Media Sharing Support
The Movie Toolbox now supports the construction of new Tracks that share the underlying media sample tables with another Track in the same movie.
To construct such a "cloned" Track, you can use the new API
AddClonedTrackToMovie
, which is discussed next.
AddClonedTrackToMovie
Used to construct cloned tracks.
OSErr AddClonedTrackToMovie( Track sourceTrack, Movie destinationMovie,
long flags, Track *newTrack);
-
sourceTrack
-
Indicates the Track to be cloned. This is the source of the sample table once the cloned Track is constructed.
-
destinationMovie
-
-
Indicates the Movie where the cloned Track should be created. Currently, this Movie must be the same Movie containing the
sourceTrack
Track.
-
flags
A set of flags determining how cloning should be performed.
-
-
kQTCloneShareSamples
= 1
-
-
This flag indicates that you want to share the sample table between the source and clone tracks. If you don't pass this flag, the
AddClonedTrackToMovie
call will fail currently.
-
kQTCloneDontCopyEdits
= 2
-
-
By default, the edit list is copied from the source track to the cloned track. Use this flag to leave the clone track's edit list empty.
-
newTrack
-
The address of storage where a reference to the newly constructed Track is returned. If the function fails, this storage is set to nil.
DISCUSSION
The
AddClonedTrackToMovie function is similar to the
AddEmptyTrackToMovie
function, in that you can create a new Track and Media compatible with the Track specified by the
sourceTrack
parameter. The function returns appropriate errors.
Most QuickTime developers should never need to call this API.
© 2001 Apple Computer, Inc.
What's New in QuickTime 5
| Previous | Chapter Contents | Chapter Top | Next |