Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Movie Posters and Movie Previews
A QuickTime movie may contain a preview and a poster:
A movie preview is a very short version of a movie, typically less than five seconds in duration. It is intended to give the user an idea of a movie’s contents.
A movie poster is a still frame representing the movie.
The following Movie Toolbox functions allow your application to work with movie previews and movie posters:
Use the
PlayMoviePreview
function to display a movie’s preview. ThePlayMoviePreview
function sets the movie into preview mode, plays the movie preview, sets the movie back to normal playback mode, and returns to your application.Alternatively, your application can control the playback of a movie’s preview. Use the
SetMoviePreviewMode
function to place a movie into preview mode. You can then use theStartMovie
andStopMovie
functions, described below, to control movie playback. Your application can find out if a movie is in preview mode by calling theGetMoviePreviewMode
function.Your application can specify the starting time and duration of the movie preview with the
SetMoviePreviewTime
andGetMoviePreviewTime
functions.Use the
ShowMoviePoster
function to display a movie’s poster. You can work with the poster’s boundary rectangle using theSetPosterBox
andGetPosterBox
functions. Your application can work with the starting time of the poster with theSetMoviePosterTime
andGetMoviePosterTime
functions. Posters always have no duration.Tracks may be specified for use in the movie, its preview, its poster, or any combination of the three. So, for example, when the Movie Toolbox plays the movie preview it uses only those tracks that are assigned to the preview. Your application controls the use of a movie’s tracks with the
SetTrackUsage
function. You can find out how a track is used by calling theGetTrackUsage
function.
Controlling Movie Playback of Previews
This section describes a number of high-level functions provided by the Movie Toolbox that allow your application to play movies. For information about how to control a movie’s playback rate, see Controlling Movie Time.
You can use the StartMovie
and StopMovie
functions to start and stop movies.
The Movie Toolbox provides functions that can be used to control your position within a movie. You can use two functions, GoToBeginningOfMovie
and GoToEndOfMovie
, to set the position at either the beginning or the end of a movie. These functions are described in this section. Functions that work with time bases, such as SetMovieTimeValue
and GetMovieTimeScale
, can be used to control the current position anywhere within a movie.
Controlling Movie Time
Every QuickTime movie has its own time base. A movie’s time base allows all the tracks that make up the movie to be synchronized when the movie is played. The Movie Toolbox provides a number of functions that allow your application to determine and establish the time parameters of a movie:
You can use the
GetMovieTimeBase
function to retrieve the time base for a movie.You can work with a movie’s current time by calling the
GetMovieTime
,SetMovieTime
, andSetMovieTimeValue
functions.You can work with a movie’s time scale by calling the
GetMovieTimeScale
andSetMovieTimeScale
functions.The Movie Toolbox can calculate the total duration of a movie. You can use the
GetMovieDuration
function to retrieve a movie’s duration.Your application can call the
GetMovieRate
andSetMovieRate
to work with a movie’s playback rate.
Copyright © 2005, 2018 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2018-06-04