13.07.2015 Views

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Some Useful Examples and ScenariosCreating Movies with Modifier TrackskTrackModifierReference, &referenceIndex);QTInsertChild(inputMap, kParentAtomIsContainer,kTrackModifierInput, referenceIndex, 0, 0, nil, &inputAtom);The QTInsertChild function returns the offset of the new modifier input atom in the inputAtom parameter.You now need to add the name and type of the source track to the modifier input atom. Again, calling theQTInsertChild function does this, as shown in the following code snippet:inputType = VideoMediaType;QTInsertChild(inputMap, inputAtom,kTrackModifierType, 1, 0, sizeof(inputType), &inputType,nil);aType = 'srcA';QTInsertChild(inputMap, inputAtom, kEffectDataSourceType, 1, 0,sizeof(aType), &aType, nil);This process is repeated for each source for the effect.Creating Movies with Modifier TracksQuickTime 2.1 added additional functionality for media handlers. By way of modifier tracks, a media handlercan send its data to another media handler rather than presenting its media directly. See “Modifier Tracks” (page247) for a complete discussion of this feature.To create a movie with modifier tracks, first you create a movie with all the desired tracks, then you create themodifier track. To link the modifier track to the track that it modifies, you use the AddTrackReference functionas shown in Listing 6-12 (page 343).Listing 6-12Linking a modifier track to the track it modifieslong addedIndex;AddTrackReference(aVideoTrack, aModifierTrack,kTrackModifierReference, &addedIndex);<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.343

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!