What's New in QuickTime 5
| Previous | Chapter Contents | Chapter Top | Next |
The QTVR Flattener is a movie export component that converts an existing QuickTime VR single node movie into a new movie that is optimized for the Web. The flattener re-orders media samples; and for panoramas the flattener creates a small preview of the panorama. When viewed on the Web, this preview appears after 5% to 10% of the movie data has been downloaded, allowing users to see a lower-resolution version of the panorama before the full resolution version is available.
In QuickTime 5, this QTVR Flattener has been enhanced. There is a new implementation of tile ranking that works with horizontal and cubic panos, and also with two-dimensional tiling. The result is that panoramas appear to come in faster.
To use the QTVR Flattener from your application, you first create a QuickTime VR movie, then open the QTVR Flattener component and call the MovieExportToFile routine, as shown in Listing 4 .
Listing 4 Using the QTVR flattener
ComponentDescription desc;
Component flattener;
ComponentInstance qtvrExport = nil;
desc.componentType = MovieExportType;
desc.componentSubType = MovieFileType;
desc.componentManufacturer = kQTVRFlattenerManufacturer;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
flattener = FindNextComponent(nil, &desc);
if (flattener) qtvrExport = OpenComponent (flattener);
if (qtvrExport)
MovieExportToFile (qtvrExport, &myFileSpec, myQTVRMovie, nil, 0, 0);The code snippet shown in Listing 4 creates a flattened movie file specified by the myFileSpec parameter. If your QuickTime VR movie is a panorama, the flattened movie file includes a quarter size, blurred JPEG, compressed preview of the panorama image.
The constants MovieExportType and MovieFileType used in Listing 4 are defined in the header files QuickTimeComponents.h and Movies.h , respectively, and are defined as 'spit' and 'MooV' .
The various authoring atom type constants can be found in the 5.0 version of QuickTimeVRFormat.h .
What's New in QuickTime 5
| Previous | Chapter Contents | Chapter Top | Next |