home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-05 | 1.1 KB | 50 lines | [TEXT/MPS ] |
- /*
- File: mtb7.c
- Contains: Video Track Functions
- Written by: DTS and QT Engineering
- Copyright: © 1992-1994 by Apple Computer, Inc., all rights reserved.
- Change History (most recent first):
- <1> 12/4/94 khs changed the format of the file to the new look and feel
- To Do:
- */
-
-
- // INCLUDE FILES
- #include "mtb.h"
-
-
- // FUNCTIONS
- void CreateMyVideoTrack(Movie theMovie)
- {
- Track theTrack;
- Media theMedia;
- OSErr err = noErr;
- Rect trackFrame =
- {
- 0, 0, 100, 320
- }
- ;
-
- theTrack = NewMovieTrack(theMovie, FixRatio(trackFrame.right, 1), FixRatio(trackFrame.bottom, 1), kNoVolume);
- CheckError(GetMoviesError(), "\pNewMovieTrack");
-
- theMedia = NewTrackMedia(theTrack, VideoMediaType, 600,// Video Time Scale
- nil, 0);
- CheckError(GetMoviesError(), "\pNewTrackMedia");
-
- err = BeginMediaEdits(theMedia);
- CheckError(err, "\pBeginMediaEdits");
-
- AddVideoSamplesToMedia(theMedia, &trackFrame);
-
- err = EndMediaEdits(theMedia);
- CheckError(err, "\pEndMediaEdits");
-
- err = InsertMediaIntoTrack(theTrack, 0, // track start time
- 0, // media start time
- GetMediaDuration(theMedia), fixed1);
- CheckError(err, "\pInsertMediaIntoTrack");
- }
-
-
-