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, Copying, and Disposing of Atom ContainersCopying Existing AtomsQuickTime provides several functions for copying existing atoms within an atom container. TheQTInsertChildren function inserts a container of atoms as children of a parent atom in another atomcontainer. Figure 6-3 (page 328) shows two example QT atom containers, A and B.Figure 6-3Two QT atom containers, A and BQT atomcontainer AQT atomcontainer BIndex= 1Offset= 10'abcd'Index = 1Offset = 10'defg''hijk'Index = 2Offset = 2010009002000DataThe following code sample calls QTFindChildByID to retrieve the offset of the atom in container A. Then,the code sample calls the QTInsertChildren function to insert the atoms in container B as children of theatom in container A. Figure 6-4 (page 329) shows what container A looks like after the atoms from container Bhave been inserted.QTAtom targetAtom;targetAtom = QTFindChildByID (containerA, kParentAtomIsContainer,'abcd',1000, nil);<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.328

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

Saved successfully!

Ooh no, something went wrong!