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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Some Useful Examples and ScenariosCreating an Effect DescriptionYou refer to a kTrackModifierInput atom by its index number, which is returned by theAddTrackReference function when you create the atom.Figure 6-6An example of an input map referencing two sourcesByteThe first reference atom. The IDnumber is the number returned byAddTrackReferenceIt is a video track.kTrackModifierInputkTrackModifierType'srcB'VideoMediaType51The name used in the effectdescription is 'scrA'kEffectDataSourceType1'scrA'The second reference atom. The IDnumber is the number returnedby AddTrackReferenceIt is a video track.kTrackModifierInputkTrackModifierType'srcB'21VideoMediaTypeThe name used in the effectdescription is 'scrB'kEffectDataSourceType1'srcB'Building Input MapsThe first step in creating an input map is to create a new QTAtomContainer to hold the map. You use thestandard QuickTime container creation function.QTNewAtomContainer(&inputMap);For each source you are creating, you need to call the AddTrackReference function. The track IDs of theeffects track and the source track are passed as parameters to AddTrackReference, which creates an atomof type kTrackModifierReference and returns an index number. You use this index as the ID of the atomwhen you need to refer to it. You then insert the reference into the input map as an atom of typekTrackModifierInput.The code in Listing 6-11 (page 342) creates a reference to the track firstSourceTrack, and adds it to theinput map.Listing 6-11Adding an input reference atom to an input mapAddTrackReference(theEffectsTrack, firstSourceTrack,<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.342

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

Saved successfully!

Ooh no, something went wrong!