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 ScenariosGetting the Name of a QuickTime VR NodeSize[2]Type[2]Version[2]Flags[2]Data reference[2]…'rsrc'00 (not self referenced)[alias pointing to file #2]Getting the Name of a QuickTime VR NodeYou can use standard QuickTime atom container functions to retrieve the information in a QuickTime VR nodeheader atom. For example, the MyGetNodeName function defined in Listing 6-<strong>14</strong> (page 361) returns the nameof a node, given its node ID.Listing 6-<strong>14</strong>Getting a node’s nameOSErr MyGetNodeName (QTVRInstance theInstance, UInt32 theNodeID,theStringPtr)StringPtr{OSErrQTAtomContainerQTVRNodeHeaderAtomPtrtheErr = noErr;theNodeInfo;theNodeHeader;QTAtom theNodeHeaderAtom = 0;//Get the node information atom container.theErr = QTVRGetNodeInfo(theInstance, theNodeID, &theNodeInfo);//Get the node header atom.if (!theErr)theNodeHeaderAtom = QTFindChildByID(theNodeInfo, kParentAtomIsContainer,nil);kQTVRNodeHeaderAtomType, 1,if (theNodeHeaderAtom != 0) {QTLockContainer(theNodeInfo);<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.361

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

Saved successfully!

Ooh no, something went wrong!