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 ScenariosOptimizing QuickTime VR Movies for Web PlaybackSample Atom Container for the QTVR FlattenerThe sample code in Listing 6-18 (page 368) creates an atom container and adds atoms to indicate an importpreview file for the flattener to use.Listing 6-18Specifying a preview file for the flattener to useBoolean yes = true;QTAtomContainer exportData;QTAtom parent;err = QTNewAtomContainer(&exportData);// create a parent for the other settings atomserr = QTInsertChild (exportData, kParentAtomIsContainer,QTVRFlattenerParentAtomType, 1, 0, 0, nil, &parent);// Add child atom to indicate we want to import the preview from a fileerr = QTInsertChild (exportData, parent, QTVRImportPreviewAtomType, 1, 0,sizeof (yes), &yes, nil);// Add child atom to tell which file to importerr = QTInsertChild (exportData, parent, QTVRImportSpecAtomType, 1, 0,sizeof (previewSpec), &previewSpec, nil);// Tell the export componentMovieExportSetSettingsFromAtomContainer (qtvrExport, exportData);Overriding the compression settings is a bit more complicated. You need to open a standard image compressiondialog component and make calls to obtain an atom container that you can then pass to the QTVR Flattenercomponent.Listing 6-19Overriding the compression settingsComponentInstance sc;QTAtomContainer compressorData;SCSpatialSettings ss;sc = OpenDefaultComponent(StandardCompressionType,StandardCompressionSubType);ss.codecType = kCinepakCodecType;ss.codec = nil;ss.depth = 0;ss.spatialQuality = codecHighQuality<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.368

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

Saved successfully!

Ooh no, something went wrong!