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.
Clippings/CreateMovieFile.txt
// create a movie file for the destination movie |
myErr = CreateMovieFile(&myFile, /* fsspec for the movie to be created */ |
FOUR_CHAR_CODE('TVOD'), /* creator value for the new file */ |
smSystemScript, /* script in which the movie file should be created */ |
myFlags, /* movie creation flags */ |
&myResRefNum, /* file reference for movie file return here */ |
&myMovie); /* new movie identifier return here */ |
if (myErr != noErr) |
goto bail; |
// select the "no controller" movie controller option |
myType = EndianU32_NtoB(myType); |
SetUserDataItem(GetMovieUserData(myMovie), |
&myType, |
sizeof(myType), |
kUserDataMovieControllerType, |
1); |
////////// |
// |
// create the sprite track and media |
// |
////////// |
myTrack = NewMovieTrack(myMovie, |
((long)kSpriteTrackWidth << 16), /* display width in pixels */ |
((long)kSpriteTrackHeight << 16), /* display height in pixels */ |
kNoVolume); /* volume setting of the track */ |
myMedia = NewTrackMedia(myTrack, |
SpriteMediaType, /* type of media to create */ |
kSpriteMediaTimeScale, /* media time scale */ |
NULL, /* data ref, pass nil to use the file the movie was created in */ |
0); /* data ref type, pass nil to use the file the movie was created in */ |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-02-25