Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Relevant replacement documents include:
Start Code/QTFlatten.c
#include <Movies.h> |
#include "QTUtilities.h" |
#include "QTFlatten.h" |
#include "CreateMovie.h" |
#include "ComFramework.h" |
/************************************************************ |
* * |
* * |
* QTSave_FlattenMovie * |
* Save and flatten a movie resource into a file. * |
* * |
* * |
*************************************************************/ |
OSErr QTSave_FlattenMovie (Movie theMovie, FSSpec *myFile) |
{ |
Movie aMovie = NULL; |
OSErr myErr = noErr; |
// The FlattenMovieData function creates a new movie file and creates a new movie |
// that contains all of its movie data. |
// NOTE: Unlike the FlattenMovie, this function does not add the new movie resource |
// to the new movie file. Instead, the FlattenMovieData function returns the new |
// movie to your application. Your application must dispose of the returned movie. |
// Step 1. |
// Insert FlattenMovieData.clp here... |
myErr = GetMoviesError(); |
CheckError( myErr, "FlattenMovie error" ); |
// Dispose the returned movie because we don't need it. Our sample uses NewMovieFromFile |
// to open the newly flattened movie. |
if (aMovie == NULL) |
CheckError( invalidMovie, "FlattenMovie error" ); |
else |
DisposeMovie(aMovie); |
return myErr; |
} |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14