Framework | Frameworks/QuickTime.framework |
Declared in | Controls.h HIObject.h MacTypes.h Movies.h TextEdit.h |
QuickTime movies have certain overall timing and other presentation characteristics that an application can manage, including the presentation of special kinds of media such as flash media and sprites.
ChooseMovieClock
DisposeTimeBase
GetTimeBaseMasterClock
GetTimeBaseMasterTimeBase
NewTimeBase
QTGetWallClockTimeBase
SetMovieMasterClock
SetMovieMasterTimeBase
SetTimeBaseMasterClock
SetTimeBaseMasterTimeBase
SetTimeBaseZero
AbortPrePrerollMovie
GetMovieActiveSegment
LoadMediaIntoRam
LoadMovieIntoRam
LoadTrackIntoRam
PrePrerollMovie
PrerollMovie
SetMovieActiveSegment
SpriteMediaCountImages
SpriteMediaCountSprites
SpriteMediaGetDisplayedSampleNumber
SpriteMediaGetImageName
SpriteMediaGetIndImageDescription
SpriteMediaGetIndImageProperty
SpriteMediaGetSpriteName
SpriteMediaGetSpriteProperty
SpriteMediaHitTestAllSprites
SpriteMediaHitTestOneSprite
SpriteMediaSetSpriteProperty
SpriteMediaSpriteIDToIndex
SpriteMediaSpriteIndexToID
GetMoviePosterTime
GetMoviePreviewMode
GetMoviePreviewTime
PlayMoviePreview
SetMoviePosterTime
SetMoviePreviewMode
SetMoviePreviewTime
ShowMoviePoster
CreateMovieControl
InvalidateMovieRegion
IsMovieDone
MoviesTask
QTGetTimeUntilNextTask
QTInstallNextTaskNeededSoonerCallback
QTUninstallNextTaskNeededSoonerCallback
UpdateMovie
TextMediaAddHiliteSample
TextMediaAddTESample
TextMediaAddTextSample
TextMediaFindNextText
TextMediaHiliteTextSample
TextMediaSetTextProc
TextMediaSetTextSampleData
DisposeMatte
GetMovieBoundsRgn
GetMovieBox
GetMovieClipRgn
GetMovieDisplayBoundsRgn
GetMovieDisplayClipRgn
GetMovieGWorld
GetMovieMatrix
GetTrackBoundsRgn
GetTrackClipRgn
GetTrackDisplayBoundsRgn
GetTrackMatte
GetTrackMovieBoundsRgn
SetMovieBox
SetMovieClipRgn
SetMovieDisplayClipRgn
SetMovieGWorld
SetMovieMatrix
SetTrackClipRgn
SetTrackGWorld
SetTrackMatte
GetMovieDuration
GetMovieRate
GetMovieTime
GetMovieTimeBase
GetMovieTimeScale
SetMovieRate
SetMovieTime
SetMovieTimeScale
SetMovieTimeValue
QTIdleManagerClose
QTIdleManagerGetNextIdleTime
QTIdleManagerNeedsAnIdle
QTIdleManagerOpen
QTIdleManagerSetNextIdleTime
QTIdleManagerSetNextIdleTimeDelta
QTIdleManagerSetNextIdleTimeNever
QTIdleManagerSetNextIdleTimeNow
QTIdleManagerSetParent
GetTimeBaseEffectiveRate
GetTimeBaseFlags
GetTimeBaseRate
GetTimeBaseStartTime
GetTimeBaseStatus
GetTimeBaseStopTime
GetTimeBaseTime
SetTimeBaseFlags
SetTimeBaseRate
SetTimeBaseStartTime
SetTimeBaseStopTime
SetTimeBaseTime
SetTimeBaseValue
AttachTimeBaseToCurrentThread
CheckQuickTimeRegistration
ConvertTimeToClockTime
DetachTimeBaseFromCurrentThread
EnterMoviesOnThread
ExitMoviesOnThread
FlashMediaDoButtonActions
FlashMediaFrameLabelToMovieTime
FlashMediaFrameNumberToMovieTime
FlashMediaGetDisplayedFrameNumber
FlashMediaGetFlashVariable
FlashMediaGetRefConBounds
FlashMediaGetRefConID
FlashMediaGetSupportedSwfVersion
FlashMediaIDToRefCon
FlashMediaSetFlashVariable
FlashMediaSetPan
FlashMediaSetZoom
FlashMediaSetZoomRect
GetMovieAudioContext
GetMovieNaturalBoundsRect
GetMovieRateChangeConstraints
GetNextTrackForCompositing
GetPrevTrackForCompositing
GetTimeBaseMasterOffsetTimeBase
GetTimeBaseRateChangeStatus
GetTimeBaseThreadAttachState
ITextAddString
ITextGetString
ITextRemoveString
Media3DGetCameraAngleAspect
Media3DGetCameraData
Media3DGetCameraRange
Media3DGetCurrentGroup
Media3DGetNamedObjectList
Media3DGetRendererList
Media3DGetViewObject
Media3DRotateNamedObjectTo
Media3DScaleNamedObjectTo
Media3DSetCameraAngleAspect
Media3DSetCameraData
Media3DSetCameraRange
Media3DTranslateNamedObjectTo
MovieMediaGetChildDoMCActionCallback
MovieMediaGetChildMovieDataReference
MovieMediaGetCurrentMovieProperty
MovieMediaGetCurrentTrackProperty
MovieMediaGetDoMCActionCallback
MovieMediaLoadChildMovieFromDataReference
MovieMediaSetChildMovieDataReference
NewMovieFromProperties
PutMovieIntoDataFork64
QTAudioContextCreateForAudioDevice
QTParseTextHREF
QTSoundDescriptionGetProperty
QTSoundDescriptionGetPropertyInfo
QTSoundDescriptionSetProperty
QTTextToNativeText
SetMovieAudioContext
SetMovieVideoOutput
SetTimeBaseOffsetTimeBase
SpriteMediaDisposeSprite
SpriteMediaGetActionVariableAsString
SpriteMediaGetProperty
SpriteMediaGetSpriteActionsForQTEvent
SpriteMediaHitTestSprites
SpriteMediaNewSprite
SpriteMediaSetActionVariableToString
SpriteMediaSetProperty
TextMediaDrawRaw
TextMediaGetTextProperty
TextMediaRawIdle
TextMediaRawSetup
TextMediaSetTextProperty
VideoMediaGetCodecParameter
VideoMediaGetStallCount
VideoMediaSetCodecParameter
Terminates the operation of PrePrerollMovie.
void AbortPrePrerollMovie ( Movie m, OSErr err );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
See Error Codes
. Returns noErr
if there is no error.
You normally call this function only if you have previously called PrePrerollMovie
asynchronously and the user quits your application.
Introduced in QuickTime 4.
Movies.h
Places a callback event into the list of scheduled callback events.
OSErr AddCallBackToTimeBase ( QTCallBack cb );
Specifies the callback event for the operation. Your clock component obtains this value from the parameters passed to ClockCallMeWhen
.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
If your component calls this function, the Movie Toolbox notifies it of time, rate, or stop and start changes via ClockRateChanged
and ClockTimeChanged
.
Introduced in QuickTime 3 or earlier.
Movies.h
Adds two times.
void AddTime ( TimeRecord *dst, const TimeRecord *src );
A pointer to a time structure. This time structure contains one of the operands for the addition. AddTime
returns the result of the addition into this time structure.
A pointer to a time structure. The Movie Toolbox adds this value to the time or duration specified by the dst
parameter.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
You must specify the input times in time structures. The result value is formatted as a duration or a time value, the same as the format of the structure pointed to by the dst
parameter.
Introduced in QuickTime 3 or earlier.
Movies.h
Attaches a time base to the current thread.
OSErr AttachTimeBaseToCurrentThread ( TimeBase tb );
A time base.
See Error Codes
in the QuickTime API Reference. Returns noErr
if there is no error.
Introduced in QuickTime 6.4.
Movies.h
Schedules a callback event.
OSErr CallMeWhen ( QTCallBack cb, QTCallBackUPP callBackProc, long refCon, long param1, long param2, long param3 );
The callback event for the operation. You obtain this identifier from NewCallBack
.
Points to your callback function, described in QTCallBackProc
.
A reference constant to be passed to your callback. Use this parameter to point to a data structure containing any information your function needs.
Contains scheduling information. The Movie Toolbox interprets this parameter based on the value of the cbType
parameter to NewCallBack
. If cbType
is set to callBackAtTime
, the param1 parameter contains flags (see below) indicating when to invoke your callback function for this callback event. If the cbType
parameter is set to callBackAtRate
, param1 contains flags (see below) indicating when to invoke your callback function for this event. Be sure to set unused flags to 0.
Contains scheduling information. The Movie Toolbox interprets this parameter based on the value of the cbType
parameter to NewCallBack
. If cbType
is set to callBackAtTime
, the param2 parameter contains the time value at which your callback function is to be invoked for this event. The param1 parameter contains flags affecting when the Movie Toolbox calls your function. If cbType
is set to callBackAtRate
, the param2 parameter contains the rate value at which your callback function is to be invoked for this event. The param1 parameter contains flags affecting when the Movie Toolbox calls your function.
The time scale in which to interpret the time value that is stored in param3 if cbType
is set to callBackAtTime
.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
You can call this function from your callback function.
Introduced in QuickTime 3 or earlier.
Movies.h
Cancels a callback event before it executes.
void CancelCallBack ( QTCallBack cb );
The callback event for this operation. You obtain this value from NewCallBack
.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Deprecated.
void CheckQuickTimeRegistration ( void *registrationKey, long flags );
This function is listed for historical purposes only. It may be unsupported or removed in future versions of QuickTime.
Movies.h
Searches media handlers to find the best clock for a movie.
void ChooseMovieClock ( Movie m, long flags );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
Currently not used; set to 0.
This function calls MediaGetClock
and finds the first media handler that has a custom clock. It then calls SetMovieMasterClock
to use the best clock as the movie's master timebase clock.
ChooseMovieClock
can be used to tie the movie's master timebase to a sound clock if there is a sound track. If there is no sound track, the microseconds clock is used as the master timebase.
Introduced in QuickTime 6.
Movies.h
Clears the sticky error value.
void ClearMoviesStickyError ( void );
The Movie Toolbox provides two error values to your application: the current error and the sticky error. The current error is the result code from the last Movie Toolbox function; it is updated each time your application calls a Movie Toolbox function. The Movie Toolbox saves the same result code in the sticky error value. Your application clears the sticky error value by calling ClearMoviesStickyError
. The Movie Toolbox then places the first nonzero result code from any toolbox function used by your application into the sticky error value. The Movie Toolbox does not update the sticky error value until your application clears it again.
Many Movie Toolbox functions don't return an error as a function result; you must use GetMoviesError
to obtain the result code. Even if a function explicitly returns an error as a function result, that result is also available using GetMoviesError
. The Movie Toolbox does not place a result code into the sticky error value until the field has been cleared. Your application is responsible for clearing the sticky error value to ensure that it does not contain a stale result code.
Introduced in QuickTime 3 or earlier.
Movies.h
Converts a time obtained from one time base into a time that is relative to another time base.
void ConvertTime ( TimeRecord *theTime, TimeBase newBase );
A pointer to a time structure that contains the time value to be converted. The ConvertTime
function replaces the contents of this time structure with the time value relative to the specified time base.
The time base for this operation. Your application obtains this time base identifier from the NewTimeBase
function.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
This function includes the rate associated with each time value in the conversion; therefore, you should use this function when you want to convert time values. Both time bases must rely on the same time source, and you must specify the time to be converted in a time structure.
Introduced in QuickTime 3 or earlier.
Movies.h
Converts a time from one time scale into a time that is relative to another time scale.
void ConvertTimeScale ( TimeRecord *theTime, TimeScale newScale );
A pointer to a time structure that contains the time value to be converted. ConvertTimeScale
replaces the contents of this time structure with the time value relative to the specified time scale.
The time scale for this operation.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
This function does not include the rate associated with the time value in the conversion; therefore, you should use this function when you want to convert time durations, but not when converting time values.
Introduced in QuickTime 3 or earlier.
Movies.h
Converts a time record in a time base to clock time.
void ConvertTimeToClockTime ( TimeRecord *time );
The TimeRecord
structure to be converted. It must contain a valid time base; otherwise it remains untouched.
The result of this call has no meaning it the time base rate is 0.
Introduced in QuickTime 6.4.
Movies.h
Creates a movie control object to pass to the Mac OS Control Manager.
OSErr CreateMovieControl ( WindowRef theWindow, Rect *localRect, Movie theMovie, UInt32 options, ControlRef *returnedControl );
The window in which the control is placed.
A pointer to a Rect
structure that describes in local coordinates the window in which the movie control is placed. If NIL
is passed, the movie control is positioned at 0,0 within the window; it will have the natural dimensions of the movie plus the height of the movie controls if they are visible. If 0 height and width is passed, this parameter is interpreted as an anchor point and the top left point of the movie control will be located at this position with height and width as in the NIL
case. For all other cases of rectangles, the movie control is centered within the rectangle by default and is sized to fit within it while maintaining the movie's aspect ratio.
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
Constants (see below) that determine parts of the movie control's appearance. See these constants:
kMovieControlOptionHideController
kMovieControlOptionLocateTopLeft
kMovieControlOptionEnableEditing
kMovieControlOptionHandleEditingHI
kMovieControlOptionSetKeysEnabled
kMovieControlOptionManuallyIdled
A handle to a ControlRecord
struct. This defines a movie control, suitable for passing to Mac OS Control Manager functions.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
. This routine returns an error if there is a problem with one of the parameters or if an error occurred while creating the underlying movie controller or the custom control itself. If an error is returned, the value of returnedControl
is undefined.
The Carbon Movie Control is implemented as a custom control, which installs an event handler to handle the Carbon Events sent to controls. When a Carbon Movie Control is created for a movie, a movie controller is also created. The movie control then directs user interface events to the controller. The application can install event handlers on the Carbon Movie Control to handle such things as contextual menu clicks or to intercept events to do special processing. Control Manager calls can be made as well.
The control can be deleted by calling the Mac OS function DisposeControl
. Note that the control is automatically disposed of if the enclosing window is destroyed. Note, too, that the underlying movie controller is disposed of when the control is deleted.
Introduced in QuickTime 6.
Movies.h
Detaches a time base from the current thread.
OSErr DetachTimeBaseFromCurrentThread ( TimeBase tb );
A time base.
See Error Codes
in the QuickTime API Reference. Returns noErr
if there is no error.
Introduced in QuickTime 6.4.
Movies.h
Disposes of a callback event.
void DisposeCallBack ( QTCallBack cb );
The callback event for the operation. You obtain this value from NewCallBack
.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
You should call this function when you are done with each callback event.
Don't call this function at interrupt time.
Introduced in QuickTime 3 or earlier.
Movies.h
Disposes of a matte obtained from the GetTrackMatte function.
void DisposeMatte ( PixMapHandle theMatte );
Handle
to the matte to be disposed. Your application obtains this handle from GetTrackMatte
.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Frees any memory being used by a movie, including the memory used by the movie's tracks and media structures.
void DisposeMovie ( Movie theMovie );
Identifies the movie to be freed. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, or NewMovieFromHandle
.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Your application should call this function when it is done working with a movie, as shown in the following example:
// DisposeMovie coding example |
// See "Discovering QuickTime," page 85 |
void CreateMyCoolMovie (void) |
{ |
StandardFileReply sfr; |
Movie movie =NIL; |
FSSpec fss; |
short nFileRefNum =0; |
short nResID =movieInDataForkResID; |
StandardPutFile("\pEnter movie file name:", "\puntitled.mov", &sfr); |
if (!sfr.sfGood) |
return; |
CreateMovieFile(&sfr.sfFile, |
FOUR_CHAR_CODE('TVOD'), |
smCurrentScript, |
createMovieFileDeleteCurFile | createMovieFileDontCreateResFile, |
&nFileRefNum, |
&movie); |
CreateMyVideoTrack(movie); // See "Creating a Track," below |
AddMovieResource(movie, nFileRefNum, &nResID, NIL); |
if (nFileRefNum !=0) |
CloseMovieFile(nFileRefNum); |
DisposeMovie(movie); |
} |
Introduced in QuickTime 3 or earlier.
Movies.h
Disposes of a time base once you are finished with it.
void DisposeTimeBase ( TimeBase tb );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Initializes the Movie Toolbox and creates a private storage area for your application.
OSErr EnterMovies ( void );
Be sure to check the value returned by this function before using any other facilities of the Movie Toolbox. See Error Codes
. Returns noErr
if there is no error.
Before calling any Movie Toolbox functions, you must use EnterMovies
to initialize the toolbox. Your application may call EnterMovies
multiple times. The following code sample demonstrates how your application can call the Gestalt Manager to determine whether the Movie Toolbox is installed, using the selector gestaltQuickTime
('qtim'
), before calling EnterMovies
:
//Using the Gestalt Manager with the Movie Toolbox |
#include <GestaltEqu.h> |
#include <Movies.h> |
Boolean IsQuickTimeInstalled (void) |
{ |
short error; |
long result; |
error =Gestalt (gestaltQuickTime, &result); |
return (error ==noErr); |
} |
void main (void) |
{ |
Boolean qtInstalled; |
. |
. |
. |
qtInstalled =IsQuickTimeInstalled (); |
} |
// EnterMovies coding example |
// See "Discovering QuickTime," page 242 |
void MyInitMovieToolbox (void) |
{ |
InitGraf(&qd.thePort); |
InitFonts(); |
InitWindows(); |
InitMenus(); |
TEInit(); |
InitDialogs(NIL); |
EnterMovies(); |
} |
void main (void) |
{ |
MyInitMovieToolbox(); |
CreateMyCoolMovie(); |
} |
You should initialize any other Macintosh managers your application uses before calling EnterMovies
. You do not need to balance calls to EnterMovies
with calls to ExitMovies
; you need to call ExitMovies
only if you finish with the Movie Toolbox long before your application is ready to quit.
Introduced in QuickTime 3 or earlier.
Movies.h
Indicates that the client will be using QuickTime on the current thread.
OSErr EnterMoviesOnThread ( UInt32 inFlags );
Flag (see below) indicating how the executing thread will use QuickTime. Setting the thread mode is a convenience provided by this function. Pass 0 for the default options. See these constants:
kQTEnterMoviesFlagDontSetComponentsThreadMode
See Error Codes
in the QuickTime API Reference. Returns noErr
if there is no error. This function returns an appropriate operating system or QuickTime error if the operation couldn't be completed. This might occur because a second call on the thread was made that used incompatible flags (for example, the first call required a shared state but a subsequent call required a private state).
This function is analogous to EnterMovies
. It initializes QuickTime and prepares QuickTime for calls from its thread. Unlike EnterMovies
, this function allows the client to indicate if its access to QuickTime requires sharing of QuickTime state with the main thread. The default is to maintain a private state.
Introduced in QuickTime 6.4.
Movies.h
Called by a clock component when it determines that it is time to execute a callback function.
void ExecuteCallBack ( QTCallBack cb );
Specifies the callback event for the operation. Your clock component obtains this value from the parameters passed to your ClockCallMeWhen
function.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Before calling the application's function, the ExecuteCallBack
function cancels the callback event. In this manner, the callback event is prevented from executing twice in succession. It is up to the application, or the callback function itself, to reschedule the callback event.
Your clock component should not release the memory associated with the callback event at this time. You should do so only with ClockDisposeCallBack
. This is particularly important when a callback function cannot execute at interrupt time, since the Movie Toolbox schedules such functions for invocation at a later time.
Introduced in QuickTime 3 or earlier.
Movies.h
Automatically called when an application quits.
void ExitMovies ( void );
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
You only need to call this function if you finish with the Movie Toolbox long before your application is ready to quit. When you call ExitMovies
, the Movie Toolbox releases the private storage (which may be significant) that was allocated when you called EnterMovies
. As a general rule, your application seldom uses this function; the following code illustrates an exception:
// ExitMovies coding example |
// See "Discovering QuickTime," page 225 |
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, |
LPSTR lpCmdLine, int nCmdShow) |
{ |
MSG msg; |
HANDLE hAccelTable; |
if (!hPrevInstance) // Is there a previous instance? |
if (!(InitApplication(hInstance))) // Register window class |
return FALSE; // Report failure |
if (InitializeQTML(0) !=0) { // Initialize QTML |
MessageBox(hwnd, "QuickTime not available", // Notify user |
"", MB_OK); |
return FALSE; // Report failure |
} // end if (InitializeQTML(0) !=0) |
if (EnterMovies() !=0) { // Initialize QuickTime |
MessageBox(hwnd, "QuickTime not available", // Notify user |
"", MB_OK); |
return FALSE; // Report failure |
} // end if (EnterMovies() !=0) |
if (!(InitInstance(hInstance, nCmdShow))) // Create main window |
return FALSE; // Report failure |
hAccelTable =LoadAccelerators(hInstance, // Load accelerator table |
MAKEINTRESOURCE(IDR_ACCELSIMPLESDI)); |
// Main message loop |
while (GetMessage(&msg, NIL, 0, 0)) // Retrieve next message |
if (!TranslateAccelerator(msg.hwnd, // Check for kbd accelerator |
hAccelTable, &msg)) { |
TranslateMessage(&msg); // Convert virtual key to character |
DispatchMessage(&msg); // Send message to window procedure |
} // end if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) |
ExitMovies(); // Terminate Toolbox |
TerminateQTML(); // Terminate QuickTime |
return msg.wParam; |
} // end WinMain |
Before calling ExitMovies
, be sure that you have closed your connections to any components that use the Movie Toolbox, such as movie controllers, sequence grabbers, and so on.
Introduced in QuickTime 3 or earlier.
Movies.h
Indicates to QuickTime that the client will no longer be using QuickTime on the current thread.
OSErr ExitMoviesOnThread ( void );
See Error Codes
in the QuickTime API Reference. Returns noErr
if there is no error. Returns an appropriate operating system or QuickTime error if the operation couldn't be completed. This might occur because a previous call to EnterMoviesOnThread
was not made.
This function should be called before exiting from a spawned thread that uses QuickTime. It undoes the setup performed by EnterMoviesOnThread
. Each call to EnterMoviesOnThread
should be matched with a call to this function. This function should not be called on a thread without a previous call to EnterMoviesOnThread
.
Introduced in QuickTime 6.4.
Movies.h
Performs actions attached to a specified button.
ComponentResult FlashMediaDoButtonActions ( MediaHandler mh, char *path, long buttonID, long transition );
The Toolbox's connection to your derived Flash media handler. You can obtain this reference from GetMediaHandler
.
Specifies the path to the button to which the action is attached.
The ID of the button.
Sends a mouse transition message to the object and whatever Flash actions are associated with that transition on the object that should be performed. The values are specific Flash transition constants.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 5.
Movies.h
Undocumented
ComponentResult FlashMediaFrameLabelToMovieTime ( MediaHandler mh, Ptr theLabel, TimeValue *movieTime );
The Toolbox's connection to your derived Flash media handler. You can obtain this reference from GetMediaHandler
.
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Undocumented
ComponentResult FlashMediaFrameNumberToMovieTime ( MediaHandler mh, long flashFrameNumber, TimeValue *movieTime );
The Toolbox's connection to your derived Flash media handler. You can obtain this reference from GetMediaHandler
.
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Undocumented
ComponentResult FlashMediaGetDisplayedFrameNumber ( MediaHandler mh, long *flashFrameNumber );
The Toolbox's connection to your derived Flash media handler. You can obtain this reference from GetMediaHandler
.
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Gets the value of a specified Flash action variable.
ComponentResult FlashMediaGetFlashVariable ( MediaHandler mh, char *path, char *name, Handle *theVariableCStringOut );
The Toolbox's connection to your derived Flash media handler. You can obtain this reference from GetMediaHandler
.
Specifies the path to the Flash button to which the variable is attached.
Specifies the name of the Flash variable.
A handle to the value of the Flash variable as a C string.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 5.
Movies.h
Undocumented
ComponentResult FlashMediaGetRefConBounds ( MediaHandler mh, long refCon, long *left, long *top, long *right, long *bottom );
The Toolbox's connection to your derived Flash media handler. You can obtain this reference from GetMediaHandler
.
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Undocumented
ComponentResult FlashMediaGetRefConID ( MediaHandler mh, long refCon, long *refConID );
The Toolbox's connection to your derived Flash media handler. You can obtain this reference from GetMediaHandler
.
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Identifies the version of Flash that this version of QuickTime supports.
ComponentResult FlashMediaGetSupportedSwfVersion ( MediaHandler mh, unsigned char *swfVersion );
The Toolbox's connection to your derived Flash media handler. You can obtain this reference from GetMediaHandler
.
The version number of the most current version of Flash that this version of QuickTime supports.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 5.
Movies.h
Undocumented
ComponentResult FlashMediaIDToRefCon ( MediaHandler mh, long refConID, long *refCon );
The Toolbox's connection to your derived Flash media handler. You can obtain this reference from GetMediaHandler
.
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Sets the specified Flash action variable to a value.
ComponentResult FlashMediaSetFlashVariable ( MediaHandler mh, char *path, char *name, char *value, Boolean updateFocus );
The Toolbox's connection to your derived Flash media handler. You can obtain this reference from GetMediaHandler
.
Specifies the path to the Flash button to which the variable is attached.
Specifies the name of the Flash variable.
Specifies the new value of the Flash variable.
Pass TRUE if the focus is to be changed.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 5.
Movies.h
Undocumented
ComponentResult FlashMediaSetPan ( MediaHandler mh, short xPercent, short yPercent );
Undocumented
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Undocumented
ComponentResult FlashMediaSetZoom ( MediaHandler mh, short factor );
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Undocumented
ComponentResult FlashMediaSetZoomRect ( MediaHandler mh, long left, long top, long right, long bottom );
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Retrieves the time base of a callback event.
TimeBase GetCallBackTimeBase ( QTCallBack cb );
The callback event for the operation. You obtain this value from the NewCallBack
function.
A pointer to a TimeBaseRecord
structure.
Introduced in QuickTime 3 or earlier.
Movies.h
Retrieves a callback event's type.
short GetCallBackType ( QTCallBack cb );
The callback event for the operation. You obtain this value from NewCallBack
.
The callback type constant (see below). If the high-order bit (defined by callBackAtInterrupt
) of the returned value is set to 1, the event can be invoked at interrupt time.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the first callback event associated with a specified time base.
QTCallBack GetFirstCallBack ( TimeBase tb );
Specifies the time base for the operation. Your component can obtain the time base reference from your ClockSetTimeBase
function or from the Movie Toolbox's GetCallBackTimeBase
function.
A pointer to a CallBackRecord
structure. Your software can pass this structure to other functions, such as ClockRateChanged
.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines whether a movie is currently active.
Boolean GetMovieActive ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
TRUE if the movie is currently active, FALSE otherwise.
The Movie Toolbox services only active movies.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines what portion of a movie is currently active for playing.
void GetMovieActiveSegment ( Movie theMovie, TimeValue *startTime, TimeValue *duration );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a time value. GetMovieActiveSegment
places the starting time of the active segment into the field referred to by this parameter. If the returned time value is set to -1, the entire movie is active. In this case, the Movie Toolbox does not return any duration information.
A pointer to a time value. GetMovieActiveSegment
places the duration of the active movie segment into the field referred to by this parameter. If the entire movie is active, the startTime
parameter is set to -1 and this parameter does not return any duration information.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the current audio context for a movie.
OSStatus GetMovieAudioContext ( Movie movie, QTAudioContextRef *audioContext );
The movie.
A pointer to a variable to receive the audio context.
An error code. Returns noErr
if there is no error.
Movies.h
Determines a movie's boundary region.
RgnHandle GetMovieBoundsRgn ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A handle to a MacRegion
structure that the function allocates. If the movie does not have a spatial representation at the current time, the function returns an empty region. If the function could not satisfy the request, it sets the returned handle to NIL
.
The Movie Toolbox derives the boundary region only from enabled tracks, and only from those tracks that are used in the current display mode (that is, movie or preview). The boundary region is valid for the current movie time.
Your application must dispose of the returned region when it is done with it.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns a movie's boundary rectangle, which is a rectangle that encompasses all of the movie's enabled tracks.
void GetMovieBox ( Movie theMovie, Rect *boxRect );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a rectangle. GetMovieBox
returns the coordinates of the movie's boundary rectangle into the structure referred to by this parameter.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
The movie box is in the coordinate system of the movie's graphics world and defines the movie's boundaries over the entire duration of the movie. The movie's boundary rectangle defines the size and shape of the movie before the Movie Toolbox applies the display clipping region. The following code sample illustrates the use of GetMovieBox
:
// GetMovieBox coding example |
// See "Discovering QuickTime," page 218 |
void main (void) |
{ |
WindowRef pMacWnd; |
Rect rectWnd; |
Rect rectMovie; |
Movie movie; |
Boolean bDone =FALSE; |
OSErr nErr; |
EventRecord er; |
WindowRef pWhichWnd; |
short nPart; |
InitGraf(&qd.thePort); |
InitFonts(); |
InitWindows(); |
InitMenus(); |
TEInit(); |
InitDialogs(NIL); |
nErr =EnterMovies(); |
if (nErr !=noErr) |
return; |
SetRect(&rectWnd, 100, 100, 200, 200); |
pMacWnd =NewCWindow(NIL, &rectWnd, "\pMovie", FALSE, |
noGrowDocProc, (WindowRef)-1, TRUE, 0); |
SetPort(pMacWnd); |
movie =GetMovie(); |
if (movie ==NIL) |
return; |
GetMovieBox(movie, &rectMovie); |
OffsetRect(&rectMovie, -rectMovie.left, -rectMovie.top); |
SetMovieBox(movie, &rectMovie); |
SizeWindow(pMacWnd, rectMovie.right, rectMovie.bottom, TRUE); |
ShowWindow(pMacWnd); |
SetMovieGWorld(movie, (CGrafPtr)pMacWnd, NIL); |
StartMovie(movie); |
. . . |
DisposeMovie(movie); |
DisposeWindow(pMacWnd); |
} |
Introduced in QuickTime 3 or earlier.
Movies.h
Determines a movie's clipping region.
RgnHandle GetMovieClipRgn ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A handle to a MacRegion
structure, which the function allocates, that represents the clipping region. If the function could not satisfy your request or if there is no clipping region defined for the movie, GetMovieClipRgn
sets the returned handle to NIL
.
The clipping region is saved with the movie when your application saves the movie.
Your application must dispose of this region when it is done with it.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the movie's creation date and time information.
unsigned long GetMovieCreationTime ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The movie's creation date and time.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines a movie's display boundary region.
RgnHandle GetMovieDisplayBoundsRgn ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A handle to a MacRegion
structure that the function allocates. If the movie does not have a spatial representation at the current time, the function returns an empty region. If the function could not satisfy the request, it sets the returned handle to NIL
.
The display boundary region encloses all of a movie's enabled tracks after the track matrix, track clip, movie matrix, and movie clip have been applied to them. This region is in the display coordinate system of the movie's graphics world. The Movie Toolbox derives the display boundary region only from enabled tracks, and only from those tracks that are used in the current display mode (that is, movie, poster, or preview). The display boundary region is valid for the current movie time.
Your application must dispose of the returned handle when it is done with it.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines a movie's current display clipping region.
RgnHandle GetMovieDisplayClipRgn ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A handle to a MacRegion
structure that the function allocates. If the movie does not have a spatial representation at the current time, the function returns an empty region. If the function could not satisfy the request, it sets the returned handle to NIL
.
Your application must dispose of the returned handle when it is done with it. Note that the display clipping region is not saved with the movie.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the duration of a movie.
TimeValue GetMovieDuration ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The duration of the designated movie.
This function returns a time value, expressed in the movie's time scale, that is calculated to be the maximum durations of all the tracks in the movie. The following code sample illustrates its use:
// GetMovieDuration coding example |
// See "Discovering QuickTime," page 363 |
Movie movie1; |
TimeValue lOldDuration; |
Movie movie2; |
long lIndex, lOrigTrackCount, lReferenceIndex; |
Track track, trackSprite; |
// get the first track in original movie and position at the start |
trackSprite =GetMovieIndTrack(movie1, 1); |
SetMovieSelection(movie1, 0, 0); |
// remove all tracks except video in modifier movie |
for (lIndex =1; lIndex <=GetMovieTrackCount(movie2); lIndex++) { |
Track track =GetMovieIndTrack(movie2, lIndex); |
OSType dwType; |
GetMediaHandlerDescription(GetTrackMedia(track), |
&dwType, NIL, NIL); |
if (dwType !=VideoMediaType) { |
DisposeMovieTrack(track); |
lIndex--; |
} |
} |
// add the modifier track to original movie |
lOldDuration =GetMovieDuration(movie1); |
AddMovieSelection(movie1, movie2); |
DisposeMovie(movie2); |
// truncate the movie to the length of the original track |
DeleteMovieSegment(movie1, lOldDuration, |
GetMovieDuration(movie1) - lOldDuration); |
// associate the modifier track with the original sprite track |
track =GetMovieIndTrack(movie1, lOrigTrackCount + 1); |
AddTrackReference(trackSprite, track, kTrackModifierReference, |
&lReferenceIndex); |
Introduced in QuickTime 3 or earlier.
Movies.h
Returns a movie's graphics world.
void GetMovieGWorld ( Movie theMovie, CGrafPtr *port, GDHandle *gdh );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a field that is to receive a pointer to a CGrafPort
structure. Set this parameter to NIL
if you don't want this information.
A pointer to a field that is to receive a handle to a GDevice
structure. Set this parameter to NIL
if you don't want this information.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Retrieves a movie's transformation matrix.
void GetMovieMatrix ( Movie theMovie, MatrixRecord *matrix );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a MatrixRecord
structure, where GetMovieMatrix
returns the movie's matrix.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns a movie's modification date and time.
unsigned long GetMovieModificationTime ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The movie's modification date and time.
Introduced in QuickTime 3 or earlier.
Movies.h
Gets a movie's natural boundary rectangle.
void GetMovieNaturalBoundsRect ( Movie theMovie, Rect *naturalBounds );
A movie identifier. Your application obtains this identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a Rect
structure that represents the movie's bounding rectangle.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Creates a QuickDraw picture from a specified movie at a specified time.
PicHandle GetMoviePict ( Movie theMovie, TimeValue time );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The movie time from which the image is to be taken.
A handle to a Picture
structure. If the function could not create the picture, the returned handle is set to NIL
.
This function uses only those movie tracks that are currently enabled and would therefore be used in playback. Your application may call this function even if the movie is inactive.
Your application must dispose of this picture handle.
Introduced in QuickTime 3 or earlier.
Movies.h
Creates a QuickDraw picture that contains a movie's poster.
PicHandle GetMoviePosterPict ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A handle to a Picture
structure. If the function could not create the picture, the returned handle is set to NIL
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the poster's time in a movie.
TimeValue GetMoviePosterTime ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The time in the movie from which its poster is taken.
Since a movie poster has no duration, it is defined by a point in time within the movie. The time value returned by GetMoviePosterTime
is in the time coordinate system of the movie and represents the starting time for the movie frame that contains the poster image.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns a movie's default playback rate.
Fixed GetMoviePreferredRate ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The movie's default playback rate.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns a movie's preferred volume setting.
short GetMoviePreferredVolume ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The movie's preferred volume setting.
A movie's tracks have their own volume settings. A track's volume is scaled by the movie's volume to produce the track's final volume. On Macintosh computers, the movie's volume is further scaled by the sound volume that the user controls from the Sound control panel.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines whether a movie is in preview mode.
Boolean GetMoviePreviewMode ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
TRUE if the movie is in preview mode; FALSE if the movie is in normal playback mode.
If a movie is in preview mode, only the movie's preview can be displayed.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the starting time and duration of the movie's preview.
void GetMoviePreviewTime ( Movie theMovie, TimeValue *previewTime, TimeValue *previewDuration );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a time value. The Movie Toolbox places the preview's starting time into the field referred to by this parameter. If the movie does not have a preview, the Movie Toolbox sets this returned value to 0.
A pointer to a time value. The Movie Toolbox places the preview's duration into the field referred to by this parameter. If the movie does not have a preview, the Movie Toolbox sets this returned value to 0.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns a movie's playback rate.
Fixed GetMovieRate ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The rate at which the movie is currently playing, expressed as a 32-bit fixed-point number. Positive integers indicate forward rates and negative integers indicate reverse rates. A value of 1 indicates normal speed, a value of 2 indicates double speed, -2 means the movie is playing backward at double speed, and so on. A value of 0 means the movie is paused or stopped.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the minimum and maximum delay you can get when a movie's rate is changed.
OSErr GetMovieRateChangeConstraints ( Movie theMovie, TimeRecord *minimumDelay, TimeRecord *maximumDelay );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a TimeRecord
structure. The function updates this structure to contain the minimum delay when a rate change happens.
A pointer to a TimeRecord
structure. The function updates this structure to contain the maximum delay when a rate change happens.
If the time base master clock of the movie is changed, this function must be called again to reflect the current constraints.
Introduced in QuickTime 6.4.
Movies.h
Returns information about a movie's current selection.
void GetMovieSelection ( Movie theMovie, TimeValue *selectionTime, TimeValue *selectionDuration );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a time value. The GetMovieSelection
function places the starting time of the current selection into the field referred to by this parameter. Set this parameter to NIL
if you don't want this information.
A pointer to a time value. The GetMovieSelection
function places the duration of the current selection into the field referred to by this parameter. Set this parameter to NIL
if you don't want this information.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the contents of the current error value and resets the current error value to 0.
OSErr GetMoviesError ( void );
See Error Codes
. Returns noErr
if there is no error in the current error value.
The Movie Toolbox provides two error values to your application: the current error and the sticky error. The current error is the result code from the last Movie Toolbox function; it is updated each time your application calls a Movie Toolbox function. The following code sample shows a typical use:
// GetMoviesError coding example |
// See "Discovering QuickTime," page 256 |
OSErr QTUtils_SaveMovie (Movie theMovie) |
{ |
StandardFileReply mySFReply; |
StringPtr myPrompt =QTUtils_ConvertCToPascalString(kSavePrompt); |
StringPtr myFileName = |
QTUtils_ConvertCToPascalString(kSaveMovieFileName); |
OSErr myErr =noErr; |
if (theMovie ==NIL) |
return(invalidMovie); |
StandardPutFile(myPrompt, myFileName, &mySFReply); |
if (mySFReply.sfGood) { |
FlattenMovieData( theMovie, |
flattenAddMovieToDataFork, |
&mySFReply.sfFile, |
FOUR_CHAR_CODE('TVOD'), |
smSystemScript, |
createMovieFileDeleteCurFile); |
myErr =GetMoviesError(); |
} |
free(myPrompt); |
free(myFileName); |
return(myErr); |
} |
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the contents of the sticky error value.
OSErr GetMoviesStickyError ( void );
See Error Codes
. Returns noErr
if there is no error in the sticky error value.
The sticky error value contains the first nonzero result code from any Movie Toolbox function that you called after having cleared the sticky error with ClearMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns a movie's current time both as a time value and in a time structure.
TimeValue GetMovieTime ( Movie theMovie, TimeRecord *currentTime );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a TimeRecord
structure. The function updates this time structure to contain the movie's current time. If you don't want this information, set this parameter to NIL
.
The time value of the current time.
This function returns the movie's current time value in two formats: as a time value and in a time structure.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns a movie's time base.
TimeBase GetMovieTimeBase ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The movie's TimeBaseRecord
structure.
The Movie Toolbox disposes of a movie's time base when you dispose of the movie.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the time scale of a movie.
TimeScale GetMovieTimeScale ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A long integer that contains the movie's time scale.
Introduced in QuickTime 3 or earlier.
Movies.h
Obtains access to a movie's user data list.
UserData GetMovieUserData ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The UserDataRecord
structure for the movie. If the function could not locate the movie's user data, it sets this return value to NIL
.
This function returns a reference to the movie's user data list, which is valid until you dispose of the movie. When you save the movie, the Movie Toolbox saves the user data as well.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the current visual context for a movie.
OSStatus GetMovieVisualContext ( Movie movie, QTVisualContextRef *visualContext );
The movie.
A pointer to a variable to receive the visual context.
An error code. Returns noErr
if there is no error. Returns memFullErr
if memory cannot be allocated. Returns kQTVisualContextRequiredErr
if the movie is not using a visual context. Returns paramErr
if the movie or visualContextOut
is NULL.
Returns the QTVisualContext
object associated with the movie. You are responsible for retaining and releasing the object as needed (that is, if the returned object has not been retained for you). If the visual context was set to NULL (see SetMovieVisualContext
), noErr
is returned and visualContextOut
receives NULL.
Movies.h
Returns a movie's current volume setting.
short GetMovieVolume ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The current volume setting for the movie.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the next callback event associated with a specified time base.
QTCallBack GetNextCallBack ( QTCallBack cb );
Specifies the starting callback event for the operation. Your clock component obtains this value from the GetFirstCallBack
function or from previous calls to the GetNextCallBack
function.
A pointer to a CallBackRecord
structure. Your software can pass this structure to other functions, such as ClockRateChanged
.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines the next track in a movie's compositing process.
Track GetNextTrackForCompositing ( Movie theMovie, Track theTrack );
A movie identifier. Your application obtains this identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The identifier of the track from which to start.
The returned identifier of the next track to be composited.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines the previous track in a movie's compositing process.
Track GetPrevTrackForCompositing ( Movie theMovie, Track theTrack );
A movie identifier. Your application obtains this identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The identifier of the track from which to start.
The returned identifier of the previous track in the compositing process.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the effective rate at which the specified time base is moving relative to its master clock.
Fixed GetTimeBaseEffectiveRate ( TimeBase tb );
The time base for this operation. Your application obtains this time base identifier from the NewTimeBase
function.
The effective rate at which the time base specified by tb
is moving relative to its master clock.
Introduced in QuickTime 3 or earlier.
Movies.h
Obtains the control flags of a time base.
long GetTimeBaseFlags ( TimeBase tb );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
Control flags (see below). Unused flags are set to 0.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines the clock component that is assigned to a time base.
ComponentInstance GetTimeBaseMasterClock ( TimeBase tb );
The time base for this operation. Your application obtains this time base identifier from the NewTimeBase
function.
A reference to a component instance. If a clock component is not assigned to the time base, the returned reference is NIL
. In this case, the time base relies on another time base for its time source. Use GetTimeBaseMasterTimeBase
to obtain the time base reference to that master time base.
This function returns a reference to a component instance of the clock component that provides a time source to the specified time base. Every time base derives its time from either a clock component or from another time base. If a time base derives its time from a clock component, use this function to obtain the component instance of the clock component.
The Component Manager allows a single component to serve multiple client applications at the same time. Each client application has a unique connection to the component, identified by a component instance. Don't close this connection; the time base is using it to maintain its time source.
Introduced in QuickTime 3 or earlier.
Movies.h
Allows an offset time base to retrieve the master time base it is attached to.
TimeBase GetTimeBaseMasterOffsetTimeBase ( TimeBase tb );
An offset time base.
The master time base for the offset time base passed in tb
. Returns NIL
if tb
does not contain an offset time base.
Introduced in QuickTime 6.4.
Movies.h
Determines the master time base that is assigned to a time base.
TimeBase GetTimeBaseMasterTimeBase ( TimeBase tb );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
A time base. If a master time base is not assigned to the time base, this function sets the returned reference to NIL
. In this case, the time base relies on a clock component for its time source. Use GetTimeBaseMasterClock
to obtain the component instance reference to that clock component.
This function returns a reference to the master time base that provides a time source to this time base. A time base derives its time from either a clock component or from another time base. If a time base derives its time from another time base, use this function to obtain the identifier for that master time base.
Introduced in QuickTime 3 or earlier.
Movies.h
Retrieves the rate of a time base.
Fixed GetTimeBaseRate ( TimeBase tb );
The time base for this operation. Your application obtains this time base identifier from the NewTimeBase
function.
The time base's rate. This rate value may be nonzero even if the time base has stopped, because it has reached its stop time. Rates may be set to negative values, which cause time to move backward for the time base.
This function returns the current rate of the time base as a fixed-point number.
Introduced in QuickTime 3 or earlier.
Movies.h
Lets a time base client determine the time base's last rate change status.
OSErr GetTimeBaseRateChangeStatus ( TimeBase tb, TimeScale scale, Fixed *ratedChangedTo, TimeBaseStatus *flags, TimeRecord *rateChangeTimeBaseTime, TimeRecord *rateChangeClockTime, TimeRecord *currentClockTime );
A pointer to a TimeBaseRecord
structure.
The scale to use for the returned time values. Pass 0 to retrieve the time in the preferred time scale of the time base.
The rate value changed to. Clients may pass NIL
if they do not want to receive this information.
A pointer to a flag (see below) that will be returned when the clock is waiting for a future time to start moving while its rate is nonzero. When set, the unpinned time will return a negative value telling how far you are from the real start time. Clients may pass NIL
if they do not want to receive this information. rateChangeTimeBaseTime
The time base time when the rate changed. Clients may pass NIL
if they do not want to receive this information. rateChangeClockTime
The clock time when the rate changed. Clients may pass NIL
if they do not want to receive this information. currentClockTime
The current clock time value. Clients may pass NIL
if they do not want to receive this information. timeBaseRateChanging
The clock is waiting for a future time to start moving while its rate is nonzero. When set, the unpinned time will return a negative value telling how far you are from the real start time. See these constants:
timeBaseRateChanging
The time base time when the rate changed. Clients may pass NIL
if they do not want to receive this information.
The clock time when the rate changed. Clients may pass NIL
if they do not want to receive this information.
The current clock time value. Clients may pass NIL
if they do not want to receive this information.
When the flag timeBaseRateChanging
is returned, the amount of time left before the time base ticks is equal to (rateChangeClockTime
- currentClockTime
).
Introduced in QuickTime 6.4.
Movies.h
Determines the start time of a time base.
TimeValue GetTimeBaseStartTime ( TimeBase tb, TimeScale s, TimeRecord *tr );
The time base for this operation. Your application obtains this time base identifier from the NewTimeBase
function.
The time scale in which to return the start time.
A pointer to a time structure that is to receive the start time. This is an optional parameter. If you don't want the time value represented in a time structure, set this parameter to NIL
.
The time base's start time.
This function returns a time value that contains the start time for the specified time base in the specified time scale. The function returns this value even if you specify a time structure with the tr
parameter.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines when the current time of a time base would fall outside of the range of values specified by the time base's start and stop times.
long GetTimeBaseStatus ( TimeBase tb, TimeRecord *unpinnedTime );
The time base for this operation. Your application obtains this time base identifier from the NewTimeBase
function.
A pointer to a time structure that is to receive the current time of the time base. Note that this time value may be outside the range of values specified by the start and stop times of the time base.
Status flags (see below).
The status information returned by this function allows you to determine when the current time of a time base would fall outside of the range of values specified by the start and stop times of the time base. This can happen when a time base relies on a master time base or when its time has reached the stop time.
This function returns no error codes.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines the stop time of a time base.
TimeValue GetTimeBaseStopTime ( TimeBase tb, TimeScale s, TimeRecord *tr );
The time base for this operation. Your application obtains this time base identifier from the NewTimeBase
function.
The time scale in which to return the stop time.
A pointer to a time structure that is to receive the stop time. This is an optional parameter. If you don't want the time value represented in a time structure, set this parameter to NIL
.
The time base's stop time.
This function returns a time value that contains the stop time for the specified time base in the specified time scale. The function returns this value even if you specify a time structure with the tr
parameter.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines whether a given time base is attached to a thread.
OSErr GetTimeBaseThreadAttachState ( TimeBase inTimeBase, Boolean *outAttachedToCurrentThread, Boolean *outAttachedToAnyThread );
A time base.
A pointer to a Boolean that on exit is TRUE if the time base is attached to the current thread, FALSE otherwise.
A pointer to a Boolean that on exit is TRUE if the time base is attached to any thread, FALSE otherwise.
See Error Codes
in the QuickTime API Reference. Returns noErr
if there is no error.
Introduced in QuickTime 6.4.
Movies.h
Obtains the current time value from a time base.
TimeValue GetTimeBaseTime ( TimeBase tb, TimeScale s, TimeRecord *tr );
The time base for this operation. Your application obtains this time base identifier from the NewTimeBase
function.
The time scale in which to return the current time value. Set this parameter to 0 to retrieve the time in the preferred time scale of the time base.
A pointer to a time structure that is to receive the current time value. This is an optional parameter. If you don't want the time value represented in a time structure, set this parameter to NIL
.
The time base's current time.
This function returns a time value that contains the current time from the specified time base in the specified time scale. The function returns this value even if you specify a time structure with the tr
parameter.
Introduced in QuickTime 3 or earlier.
Movies.h
Lets the media limit the size of a track boundary rectangle.
RgnHandle GetTrackBoundsRgn ( Track theTrack );
The track for this operation. Your application obtains this track identifier from such functions as NewMovieTrack
and GetMovieTrack
.
A handle to the region limited by the media.
Because the media limits the size of the track boundary rectangle, the region returned by GetTrackBoundsRgn
may not be rectangular and may be smaller than the track boundary region.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines the clipping region of a track.
RgnHandle GetTrackClipRgn ( Track theTrack );
The track for this operation. Your application obtains this track identifier from such functions as NewMovieTrack
and GetMovieTrack
.
A handle to the track's clipping region.
This function allocates the region and returns a handle to the region. Your application must dispose of this region when you are done with it. If the function could not satisfy your request or if there is no clipping region defined for the track, it sets the returned handle to NIL
.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines the region a track occupies in a movie's graphics world.
RgnHandle GetTrackDisplayBoundsRgn ( Track theTrack );
The track for this operation. Your application obtains this track identifier from such functions as NewMovieTrack
and GetMovieTrack
.
A handle to the region the specified track occupies in a movie's graphics world.
This function allocates the region and returns a handle to the region. If the track does not have a spatial representation at the current movie time, the function returns an empty region. If the function could not satisfy your request, it sets the returned handle to NIL
.
Your application must dispose of the returned region when you are done with it.
Introduced in QuickTime 3 or earlier.
Movies.h
Retrieves a copy of a track's matte.
PixMapHandle GetTrackMatte ( Track theTrack );
The track for this operation. Your application obtains this track identifier from such functions as NewMovieTrack
and GetMovieTrack
.
A handle to a PixMap
structure that represents the specified track's matte. If the function could not satisfy your request, it sets the returned handle to NIL
.
The matte defines which of the track's pixels are displayed in a movie, and it is valid for the entire duration of the movie.
You should use DisposeMatte
to dispose of the matte when you are finished with it.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines the region the track occupies in a movie's boundary region.
RgnHandle GetTrackMovieBoundsRgn ( Track theTrack );
The track for this operation. Your application obtains this track identifier from such functions as NewMovieTrack
and GetMovieTrack
.
A handle to the region the specified track occupies in its movie's boundary region. If the track does not have a spatial representation at the current movie time, the function returns an empty region. If the function could not satisfy your request, it sets the returned handle to NIL
.
This function determines the region by applying the track's clipping region and matrix. This region is valid only for the current movie time. The function allocates the region and returns a handle to it.
Your application must dispose of the returned region when you are done with it.
Introduced in QuickTime 3 or earlier.
Movies.h
Creates a QuickDraw picture from a specified track at a specified time.
PicHandle GetTrackPict ( Track theTrack, TimeValue time );
The track for this operation. Your application obtains this track identifier from such functions as NewMovieTrack
and GetMovieTrack
.
The time at which the image is taken.
A handle to the specified picture. If the function could not create the picture, the returned handle is set to NIL
.
Your application must dispose of the returned picture handle.
Introduced in QuickTime 3 or earlier.
Movies.h
Repositions a movie to play from its start.
void GoToBeginningOfMovie ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
If the movie is in preview mode, the function goes to the start of the preview segment of the movie. In all other cases, this function goes to the start of the movie, where the movie time value is 0. You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Repositions a movie to play from its end.
void GoToEndOfMovie ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Invalidates a small area of a movie.
OSErr InvalidateMovieRegion ( Movie theMovie, RgnHandle invalidRgn );
The movie whose area you wish to invalidate. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A region indicating the area of the movie to invalidate. If necessary, QuickTime will make a copy of this region. To invalidate the entire movie area, pass NIL
for this parameter.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Use this function instead of UpdateMovie
to invalidate a small area of a movie. It marks all areas of the movie that intersect the invalidRgn
parameter. The next time you call MoviesTask
, the Movie Toolbox redraws the marked areas. This provides a way to invalidate a portion of the movie's area instead of its entire area, as does UpdateMovie
. This allows for higher performance update handling when a movie has many tracks or covers a large area. For handling of update events, applications should continue to use UpdateMovie
.
Introduced in QuickTime 3 or earlier.
Movies.h
Determines if a particular movie has completely finished playing.
Boolean IsMovieDone ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
Returns TRUE if the specified movie has finished playing, otherwise returns FALSE.
A movie with a positive rate (playing forward) is considered done when its movie time reaches the movie end time. Conversely, a movie with a negative rate (playing backward) is considered done when its movie time reaches the movie start time. If your application has changed the movie's active segment, the status returned by this function is relative to the active segment, rather than to the entire movie. You can use SetMovieActiveSegment
to change a movie's active segment.
Introduced in QuickTime 3 or earlier.
Movies.h
Undocumented
OSErr ITextAddString ( QTAtomContainer container, QTAtom parentAtom, RegionCode theRegionCode, ConstStr255Param theString );
Undocumented
Undocumented
A 16-bit signed integer containing an international region code; see Localization Codes
.
The string to add.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Undocumented
OSErr ITextGetString ( QTAtomContainer container, QTAtom parentAtom, RegionCode requestedRegion, RegionCode *foundRegion, StringPtr theString );
Undocumented
Undocumented
Undocumented
On return, a 16-bit signed integer containing an international region code; see Localization Codes
.
The found string.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Undocumented
OSErr ITextRemoveString ( QTAtomContainer container, QTAtom parentAtom, RegionCode theRegionCode, long flags );
Undocumented
Undocumented
A 16-bit signed integer containing an international region code; see Localization Codes
.
Flags (see below) that modify the process. See these constants:
kITextRemoveEverythingBut
kITextRemoveLeaveSuggestedAlternate
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Loads a media's data into memory.
OSErr LoadMediaIntoRam ( Media theMedia, TimeValue time, TimeValue duration, long flags );
The media for this operation. Your application obtains this media identifier from such functions as NewTrackMedia
and GetTrackMedia
. See Media Identifiers
.
The starting time of the media segment to load. This time value must be expressed in the media's time coordinate system.
The length of the segment to load. Use GetMediaDuration
to determine the length of the entire media. Note that the media handler may load more data than you specify if the media data was added in larger pieces.
Flags that give you explicit control over what is loaded into memory and how long to keep it around. See RAM Loading Flags
. You can set these flags in any combination.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
The exact behavior of LoadMediaIntoRam
is dependent on the media handler.
If LoadMediaIntoRam
fails because it is out of memory, no data is purged.
Introduced in QuickTime 3 or earlier.
Movies.h
Loads a movie's data into memory.
OSErr LoadMovieIntoRam ( Movie theMovie, TimeValue time, TimeValue duration, long flags );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The starting time of the movie segment to load.
The length of the segment to load. Use GetMovieDuration
to determine the length of the entire movie. Note that the Movie Toolbox may load more data than you specify due to the way the data is loaded.
Flags that give you explicit control over what is loaded into memory and how long to keep it around. See RAM Loading Flags
. You can set these flags in any combination.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Loads a track's data into memory.
OSErr LoadTrackIntoRam ( Track theTrack, TimeValue time, TimeValue duration, long flags );
The track for this operation. Your application obtains this track identifier from such functions as NewMovieTrack
and GetMovieTrack
.
The starting time of the track segment to load. You must specify this time value in the movie's time coordinate system.
The length of the segment to load. Use GetTrackDuration
to determine the length of the entire movie. Note that the media handler may load more data than you specify.
Flags that give you explicit control over what is loaded into memory and how long to keep it around. See RAM Loading Flags
. You can set these flags in any combination.
If the track does not fit, the function returns an error. See Error Codes
. Returns noErr
if there is no error.
Introduced in QuickTime 3 or earlier.
Movies.h
Deprecated.
ComponentResult Media3DGetCameraAngleAspect ( MediaHandler mh, QTFloatSingle *fov, QTFloatSingle *aspectRatioXToY );
Introduced in QuickTime 4.
Movies.h
Deprecated.
ComponentResult Media3DGetCameraData ( MediaHandler mh, void *cameraData );
Introduced in QuickTime 4.
Movies.h
Deprecated.
ComponentResult Media3DGetCameraRange ( MediaHandler mh, void *tQ3CameraRange );
Introduced in QuickTime 4.
Movies.h
Deprecated.
ComponentResult Media3DGetCurrentGroup ( MediaHandler mh, void *group );
Introduced in QuickTime 4.
Movies.h
Deprecated.
ComponentResult Media3DGetNamedObjectList ( MediaHandler mh, QTAtomContainer *objectList );
Introduced in QuickTime 3 or earlier.
Movies.h
Deprecated.
ComponentResult Media3DGetRendererList ( MediaHandler mh, QTAtomContainer *rendererList );
Introduced in QuickTime 3 or earlier.
Movies.h
Deprecated.
ComponentResult Media3DGetViewObject ( MediaHandler mh, void *tq3viewObject );
Introduced in QuickTime 4.1.
Movies.h
Deprecated.
ComponentResult Media3DRotateNamedObjectTo ( MediaHandler mh, char *objectName, Fixed xDegrees, Fixed yDegrees, Fixed zDegrees );
Introduced in QuickTime 4.
Movies.h
Deprecated.
ComponentResult Media3DScaleNamedObjectTo ( MediaHandler mh, char *objectName, Fixed xScale, Fixed yScale, Fixed zScale );
Introduced in QuickTime 4.
Movies.h
Deprecated.
ComponentResult Media3DSetCameraAngleAspect ( MediaHandler mh, QTFloatSingle fov, QTFloatSingle aspectRatioXToY );
Introduced in QuickTime 4.
Movies.h
Deprecated.
ComponentResult Media3DSetCameraData ( MediaHandler mh, void *cameraData );
Introduced in QuickTime 4.
Movies.h
Deprecated.
ComponentResult Media3DSetCameraRange ( MediaHandler mh, void *tQ3CameraRange );
Introduced in QuickTime 4.
Movies.h
Deprecated.
ComponentResult Media3DTranslateNamedObjectTo ( MediaHandler mh, char *objectName, Fixed x, Fixed y, Fixed z );
Introduced in QuickTime 4.
Movies.h
Undocumented
ComponentResult MovieMediaGetChildDoMCActionCallback ( MediaHandler mh, DoMCActionUPP *doMCActionCallbackProc, long *refcon );
A media handler. You can obtain this reference from GetMediaHandler
.
A pointer to a Universal Procedure Pointer that accesses a DoMCActionProc
callback.
A pointer to a reference constant to be passed to your callback. Use this constant to point to a data structure containing any information your callback needs.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.1.
Movies.h
Undocumented
ComponentResult MovieMediaGetChildMovieDataReference ( MediaHandler mh, QTAtomID dataRefID, short dataRefIndex, OSType *dataRefType, Handle *dataRef, QTAtomID *dataRefIDOut, short *dataRefIndexOut );
A media handler. You can obtain this reference from GetMediaHandler
.
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.1.
Movies.h
Retrieves current properties from a media handler's movie.
ComponentResult MovieMediaGetCurrentMovieProperty ( MediaHandler mh, OSType whichProperty, void *value );
A media handler. You can obtain this reference from GetMediaHandler
.
A constant (see below) that designates the property to be retrieved. See these constants:
kMoviePropertyDuration
kMoviePropertyTimeScale
kMoviePropertyTime
kMoviePropertyNaturalBounds
kMoviePropertyMatrix
kMoviePropertyTrackList
A pointer to the returned property value.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.1.
Movies.h
Retrieves the media type property from a media handler's track.
ComponentResult MovieMediaGetCurrentTrackProperty ( MediaHandler mh, long trackID, OSType whichProperty, void *value );
A media handler. You can obtain this reference from GetMediaHandler
.
The ID value of the track for this operation.
A constant (see below) that designates the property to be retrieved. Only the track's media type property constant is currently defined. See these constants:
kTrackPropertyMediaType
A pointer to the returned property value.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.1.
Movies.h
Gets a DoMCActionProc callback for a media.
ComponentResult MovieMediaGetDoMCActionCallback ( MediaHandler mh, DoMCActionUPP *doMCActionCallbackProc, long *refcon );
A media handler. You can obtain this reference from GetMediaHandler
.
A pointer to a Universal Procedure Pointer that accesses a DoMCActionProc
callback.
A pointer to a reference constant to be passed to your callback. Use this constant to point to a data structure containing any information your callback needs.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.1.
Movies.h
Undocumented
ComponentResult MovieMediaLoadChildMovieFromDataReference ( MediaHandler mh, QTAtomID dataRefID );
A media handler. You can obtain this reference from GetMediaHandler
.
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.1.
Movies.h
Undocumented
ComponentResult MovieMediaSetChildMovieDataReference ( MediaHandler mh, QTAtomID dataRefID, OSType dataRefType, Handle dataRef );
A media handler. You can obtain this reference from GetMediaHandler
.
Undocumented
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.1.
Movies.h
Services active movies.
void MoviesTask ( Movie theMovie, long maxMilliSecToUse );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
. If you set this parameter to NIL
, the Movie Toolbox services all of your active movies.
Determines the maximum number of milliseconds that MoviesTask
can work before returning. If this parameter is 0, MoviesTask
services every active movie exactly once and then returns. If the parameter is nonzero, MoviesTask
services as many movies as it can in the allotted time before returning. Once the MoviesTask
function starts servicing a movie, it cannot stop until it has completely met the requirements of the movie. Consequently, the MoviesTask
function may execute for a longer time than that specified in maxMilliSecToUse
. However, the function does not start servicing a new movie if the time specified by maxMilliSecToUse
has elapsed. The preferred way to use MoviesTask
is to set the maxMilliSecToUse
parameter to 0; however, if you just want to play one movie, you can call MoviesTask
on that one. If your rate is 0, MoviesTask
draws that frame and no other.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
You should call MoviesTask
as often as possible from your application's main event loop. Note that you should call this function after you have performed your own event processing. MoviesTask
services only active movies, and only enabled tracks within those active movies.
Note that the MoviesTask
function services only your movies. Your application must give other applications the opportunity to call MoviesTask
for their movies.
Introduced in QuickTime 3 or earlier.
Movies.h
Creates a new callback event.
QTCallBack NewCallBack ( TimeBase tb, short cbType );
The callback event's time base. You obtain this identifier from NewTimeBase
.
Constants (see below) that specify when the callback event is to be invoked. The value of this field governs how the Movie Toolbox interprets the data supplied in the param1, param2, and param3 parameters to the CallMeWhen
function. In addition, if the high-order bit of the cbType
parameter is set to 1 (this bit is defined by the callBackAtInterrupt
flag), the event can be invoked at interrupt time. See these constants:
callBackAtTime
callBackAtRate
callBackAtTimeJump
callBackAtExtremes
callBackAtInterrupt
A pointer to a CallBackRecord
structure containing the new callback event.
The callback event created is not active until you schedule it by calling the CallMeWhen
function. You must not call this function at interrupt time.
Introduced in QuickTime 3 or earlier.
Movies.h
Creates a new movie in memory.
Movie NewMovie ( long flags );
Flags (see below) that specify control information for the new movie. Be sure to set unused flags to 0.
The identifier for the new movie. If NewMovie
fails, the returned identifier is set to NIL
. You can use GetMoviesError
to obtain the error result, or noErr
if there was no error. See Error Codes
.
You can use NewMovie
to create a new empty movie, which contains no tracks. The Movie Toolbox initializes the data structures for the new movie. Your application assigns the data to the movie by calling the functions that are described in NewMovieTrack
.
The Movie Toolbox sets many movie characteristics to default values. If you want to change these defaults, your application must call other Movie Toolbox functions. For example, the Movie Toolbox sets the movie's graphics world to the one that is active when you call NewMovie
. To change the graphics world for the new movie, your application should use SetMovieGWorld
. The default QuickTime movie time scale is 600 units per second; however, this number may change in the future. The default time scale was chosen because it is convenient for working with common video frame rates of 30, 25, 24, 15, 12, 10, and 8.
The Movie Toolbox automatically sets the movie's graphics world based on the current graphics port. Be sure that your application's graphics port is valid before you call this function, even if the movie is sound-only; you can use GetGWorld
to check for a valid port, or you can use NewGWorld
to create a port. The graphics port must remain valid for the life of the movie or until you set another valid graphics port for the movie using SetMovieGWorld
.
Introduced in QuickTime 3 or earlier.
Movies.h
Creates a new movie using movie properties.
OSStatus NewMovieFromProperties ( ItemCount inputPropertyCount, QTNewMoviePropertyElement *inputProperties, ItemCount outputPropertyCount, QTNewMoviePropertyElement *outputProperties, Movie *theMovie );
The number of properties in the array passed in inputProperties
.
A pointer to a property array describing how to instantiate the movie. See QTNewMoviePropertyElement
.
The number of properties in the array passed in outputProperties
.
A pointer to a property array to receive output parameters. See QTNewMoviePropertyElement
. You may pass NULL if you don't want this information. The caller is responsible for calling the appropriate routines to dispose of any property values returned here. Since callers specify the property classes and IDs, they know who to call to dispose of the property values.
A pointer to a variable that receives the new movie.
An error code. Returns memFullErr
if the function could not allocate memory, paramErr
if inputProperties
or theMovie
is NULL, or noErr
if there is no error.
This function can be used in all the cases where an existing NewMovieFrom
... call is used. When calling this function, you supply a set of input properties that describe the information required to instantiate the movie (its data reference, audio context, visual context, and so on). You can also supply a set of output properties that you may be interested in; for example, information about whether the data reference was changed. See New Movie Property Codes
.
Movies.h
Obtains a new time base.
TimeBase NewTimeBase ( void );
The ID of the new time base.
This function sets the rate of the time base to 0, the start time to its minimum value, the time value to 0, and the stop time to its maximum value. The function assigns the default clock component to the new time base.
Introduced in QuickTime 3 or earlier.
Movies.h
Plays a movie's preview.
void PlayMoviePreview ( Movie theMovie, MoviePreviewCallOutUPP callOutProc, long refcon );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a MoviePreviewCallOutProc
callback in your application. The Movie Toolbox calls this function repeatedly while the movie preview is playing. You can use this function to stop the preview. If you don't want to assign a function, set this parameter to NIL
.
A reference constant that the Movie Toolbox passes to your callback. Use this parameter to point to a data structure containing any information your callback needs.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
This function sets the movie into preview mode, plays the movie preview, sets the movie back to normal playback mode, and returns to your application. The Movie Toolbox plays the preview in the movie's graphics world. Note that if you call the GetMovieActiveSegment
function from within your movie callout function, the Movie Toolbox will have changed the active movie segment to be the preview segment of the movie. The Movie Toolbox restores the active segment when the preview is done playing.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets up any necessary network connections to receive streaming content.
OSErr PrePrerollMovie ( Movie m, TimeValue time, Fixed rate, MoviePrePrerollCompleteUPP proc, void *refcon );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The starting time of the movie segment to play.
The rate at which you anticipate playing the movie. You specify the movie rate as a 32-bit, fixed-point number. Positive integers indicate forward rates and negative integers indicate reverse rates.
The MoviePrePrerollCompleteProc
callback you want called when pre-prerolling is complete. If a completion proc
is specified, PrePrerollMovie
operates asynchronously. You must call MoviesTask
periodically during asynchronous operation. If no completion proc
is specified, PrePrerollMovie
operates synchronously.
A reference constant that is passed to your callback. Use this parameter to point to a data structure containing any information your callback needs.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Before a movie is played, it is normally prerolled. During preroll, the Movie Toolbox tells the appropriate media handlers to load the movie data, allocate sound channels, start up image-decompression sequences, and so on. Before a movie that contains streaming content is prerolled, it must be pre-prerolled. This sets up any necessary network connections between the client and the server. If a movie contains streaming content (one or more 'strm'
tracks), you must call this function before calling PrerollMovie
. If the movie does not contain streaming content, calling this function has no effect. If your application calls PrerollMovie
, it should always call this function first. If you play movies using a movie controller, you don't need to preroll or pre-preroll the movie explicitly; it is done for you automatically. If a completion proc
is specified in the proc
parameter, this function operates asynchronously; it returns almost immediately and calls the completion proc
when pre-prerolling is complete.
You must call MoviesTask
periodically to grant time for pre-prerolling during asynchronous operation. If no completion proc
is specified, this function operates synchronously; the function will not return until pre-prerolling is complete. This can take a long time, particularly if a dial-up network connection must be established.
Introduced in QuickTime 4. Beginning with QuickTime 4, your application should call this function any time it calls PrerollMovie
.
Movies.h
Prepares a portion of a movie for playback.
OSErr PrerollMovie ( Movie theMovie, TimeValue time, Fixed Rate );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The starting time of the movie segment to play.
The rate at which you anticipate playing the movie. You specify the movie rate as a 32-bit, fixed-point number. Positive integers indicate forward rates and negative integers indicate reverse rates.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
When your application calls PrerollMovie
, the Movie Toolbox tells the appropriate media handlers to prepare to play the movie. The media handlers may then load the movie data and perform any other necessary preparations to play the movie, such as allocating sound channels and starting up image-decompression sequences. In this manner, you can eliminate playback stutter when the movie starts playing.
If your application uses QuickTime's Movie Toolbox to play back movies, there are two choices for how to preroll the movie. Like the movie controller, the Movie Toolbox provides a single function call, StartMovie
, which will both preroll the movie and start it playing. Unlike the movie controller, the Movie Toolbox function doesn't allow you to specific the rate to play the movie at, but instead assumes the movie's preferred rate.
Calling StartMovie
, just like the movie controller's preroll and play action, first prerolls the movie and then sets it playing. If your application requires more control, the Movie Toolbox provides lower level functions that give you more control:
// PrerollMovie coding example |
StartMovie(theMovie); |
TimeValue timeNow; |
Fixed playRate; |
timeNow =GetMovieTime(theMovie, NIL); |
playRate =GetMoviePreferredRate(theMovie); |
PrePrerollMovie(theMovie, timeNow, playRate, NIL, NIL); |
PrerollMovie(theMovie, timeNow, playRate); |
SetMovieRate(theMovie, playRate); |
You should always call PrePrerollMovie
before calling this function.
Introduced in QuickTime 3 or earlier.
Movies.h
Puts a self-contained movie into a handle.
OSErr PutMovieForDataRefIntoHandle ( Movie theMovie, Handle dataRef, OSType dataRefType, Handle publicMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A handle to the storage in which the movie will be written.
The data reference type. See Data References
.
The handle that is to receive the new movie resource. The function resizes the handle if necessary.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
If the data reference and data reference type is passed, all media references to the same storage are converted to self-references in the resulting public movie handle. This 'moov'
atom can be then written to the storage.
Introduced in QuickTime 6.
Movies.h
Stores a movie in the data fork of a given file.
OSErr PutMovieIntoDataFork ( Movie theMovie, short fRefNum, long offset, long maxSize );
The movie to be stored in the data fork of an atom. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A file reference number for the data fork of the given file. You pass in an open write path in the fRefNum
parameter.
Indicates where the movie should be written.
The largest number of bytes that may be written.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Provides a 64-bit version of PutMovieIntoDataFork.
OSErr PutMovieIntoDataFork64 ( Movie theMovie, long fRefNum, const wide *offset, unsigned long maxSize );
A movie identifier. Your application obtains this identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A file reference number for the data fork of the given file. You pass in an open write path in the fRefNum
parameter.
Pointer to a 64-bit value that indicates where the movie should be written.
The largest number of bytes that may be written.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4. Superseded in QuickTime 6 by PutMovieIntoStorage
.
Movies.h
Creates a new movie resource.
OSErr PutMovieIntoHandle ( Movie theMovie, Handle publicMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The handle that is to receive the new movie resource. The function resizes the handle if necessary.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Use this handle to store a QuickTime movie in a specialized storage format.
Note that you cannot use this new movie with other Movie Toolbox functions, except for NewMovieFromHandle
.
Introduced in QuickTime 3 or earlier.
Movies.h
Writes a movie to a storage location managed by a data handler.
OSErr PutMovieIntoStorage ( Movie theMovie, DataHandler dh, const wide *offset, unsigned long maxSize );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A data handler for the data fork of the storage container. You pass an open write path in this parameter.
A pointer to a value that indicates where the movie should be written in the container.
The largest number of bytes that may be written.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
If you are writing a custom data handler, make sure it supports DataHGetDataRef
. It must also support DataHWrite64
, or DataHWrite
if 64-bit offsets are not supported.
Introduced in QuickTime 6. This function supersedes PutMovieIntoDataFork64
.
Movies.h
Creates a QTAudioContext object that encapsulates a connection to a CoreAudio output device.
OSStatus QTAudioContextCreateForAudioDevice ( CFAllocatorRef allocator, CFStringRef audioDeviceUID, CFDictionaryRef options, QTAudioContextRef *newAudioContextOut );
Allocator used to create the audio context.
CoreAudio device UID. NULL means the default device.
Reserved. Pass NULL.
Points to a variable to receive the new audio context.
An error code. Returns noErr
if there is no error.
This routine creates a QTAudioContext
object that encapsulates a connection to a CoreAudio output device. This object is suitable for passing to SetMovieAudioContext
or NewMovieFromProperties
, which targets the audio output of the movie to that device. A QTAudioContext
object cannot be associated with more than one movie. Each movie needs its own connection to the device. In order to play more than one movie to a particular device, create a QTAudioContext
object for each movie. You are responsible for releasing the QTAudioContext
object created by this routine. After calling SetMovieAudioContext
or NewMovieFromProperties
, you can release the object since these APIs will retain it for their own use.
Movies.h
Reports the duration until the next time QuickTime needs to run a task.
OSErr QTGetTimeUntilNextTask ( long *duration, long scale );
A pointer to the duration until the next time QuickTime needs access to the processor. If the returned duration is 0, QuickTime needs to run a task immediately.
The time scale in which to express the returned duration. For example, pass 60 if you want the duration value expressed in ticks (60ths of a second).
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Periodically, applications have to give processing time to QuickTime by calling a function such as MCIsPlayerEvent
. Instead of routinely calling MCIsPlayerEvent
10 to 20 times per second, you can call QTGetTimeUntilNextTask
to determine when QuickTime next needs access to the processor. The result is a more efficent use of processor resources. To handle cases when QuickTime may need to run a task earlier than projected by this function, you can install a QTNextTaskNeededSoonerCallbackProc
callback.
Introduced in QuickTime 6.
Movies.h
Returns the system's real-time time base.
OSErr QTGetWallClockTimeBase ( TimeBase *wallClockTimeBase );
A pointer to the wall clock's time base.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 6.
Movies.h
Closes the Mac OS Idle Manager.
OSErr QTIdleManagerClose ( IdleManager im );
A pointer to the opaque data structure that was returned by QTIdleManagerOpen
.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Your application should call this function after it no longer needs access to the Idle Manager.
Introduced in QuickTime 6.
Movies.h
Retrieves the next idle time known to the Idle Manager.
OSErr QTIdleManagerGetNextIdleTime ( IdleManager im, TimeRecord *nextIdle );
A pointer to an opaque data structure that belongs to the Mac OS Idle Manager. You get this pointer by calling QTIdleManagerOpen
.
A pointer to the next idle time.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 6.
Movies.h
Tells the Idle Manager whether an idle will be required.
OSErr QTIdleManagerNeedsAnIdle ( IdleManager im, Boolean *needsOne );
A pointer to an opaque data structure that belongs to the Mac OS Idle Manager. You get this pointer by calling QTIdleManagerOpen
.
Pass a pointer to a variable; on return, TRUE means that an idle will be required, FALSE means no idle will be required.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 6.
Movies.h
Opens the Mac OS Idle Manager.
IdleManager QTIdleManagerOpen ( void );
A pointer to an opaque data structure that belongs to the Mac OS Idle Manager.
You must call this function before using the Mac OS Idle Manager.
Introduced in QuickTime 6.
Movies.h
Informs the idle manager of the next required idle time.
OSErr QTIdleManagerSetNextIdleTime ( IdleManager im, TimeRecord *nextIdle );
A pointer to an opaque data structure that belongs to the Mac OS Idle Manager. You get this pointer by calling QTIdleManagerOpen
.
A pointer to the time of the next required idle.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
If a media handler needs to call this function, you must do wallclock time calculations. That means you may need to call QTGetWallClockTimeBase
and ConvertTime
to convert from track time or media time to wallclock time, plus ConvertTimeScale
to convert to the timescale you like to work in.
Introduced in QuickTime 6.
Movies.h
Informs the idle manager of the time from the currently set idle time to the next idle time required after it.
OSErr QTIdleManagerSetNextIdleTimeDelta ( IdleManager im, TimeValue duration, TimeScale scale );
A pointer to an opaque data structure that belongs to the Mac OS Idle Manager. You get this pointer by calling QTIdleManagerOpen
.
The time from the current idle time to the next one.
The time scale in which the duration is expressed.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
This routine lets you pass in a duration and a scale and it gives you a single idle. For example, if you need an idle a half second from now, you can pass in a duration of 500 and a scale of 1000, or a duration of 1 and scale of 2. This will get you one idle 0.5 seconds from now.
Every time you get idled, you need to call this function again to set your next idle. If you don't, QuickTime will assume a default duration to the next idle of 0 and you'll be idled all the time.
Introduced in QuickTime 6.
Movies.h
Sets the next idle time indefinitely in the future.
OSErr QTIdleManagerSetNextIdleTimeNever ( IdleManager im );
A pointer to an opaque data structure that belongs to the Mac OS Idle Manager. You get this pointer by calling QTIdleManagerOpen
.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 6.
Movies.h
Requests an idle as soon as possible.
OSErr QTIdleManagerSetNextIdleTimeNow ( IdleManager im );
A pointer to an opaque data structure that belongs to the Mac OS Idle Manager. You get this pointer by calling QTIdleManagerOpen
.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 6.
Movies.h
Sets the parent of an Idle Manager instance.
OSErr QTIdleManagerSetParent ( IdleManager im, IdleManager parent );
A pointer to an opaque data structure that belongs to the Mac OS Idle Manager. You get this pointer by calling QTIdleManagerOpen
.
A pointer to a different Idle Manager data structure. You get this pointer also by calling QTIdleManagerOpen
.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 6.
Movies.h
Installs a QTNextTaskNeededSoonerCallbackProc callback.
OSErr QTInstallNextTaskNeededSoonerCallback ( QTNextTaskNeededSoonerCallbackUPP callbackProc, TimeScale scale, unsigned long flags, void *refcon );
A Universal Procedure Pointer to a QTNextTaskNeededSoonerCallbackProc
callback.
The time scale that QuickTime will use when reporting the duration until the next time QuickTime needs to be called, via QTGetTimeUntilNextTask
.
Unused; set to 0.
A reference constant to be passed to your callback. Use this parameter to point to a data structure containing any information your callback needs.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
This routine installs a callback procedure that specifies when QuickTime next needs to be tasked. The callback procedure may be called at interrupt time or from another Mac OS X thread, so you must be careful not to cause race conditions. You can install or uninstall multiple callback procedures if necessary; they will be called in sequence. You can also install the same callback multiple times with different refcon
values, in which case it will be called once with each refcon
value.
Introduced in QuickTime 6.
Movies.h
Undocumented
OSErr QTParseTextHREF ( char *href, SInt32 hrefLen, QTAtomContainer inContainer, QTAtomContainer *outContainer );
A pointer to an HREF string.
The length of the HREF string.
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.1.
Movies.h
Converts a sound description from one version to another.
OSStatus QTSoundDescriptionConvert ( QTSoundDescriptionKind fromKind, SoundDescriptionHandle fromDescription, QTSoundDescriptionKind toKind, SoundDescriptionHandle *toDescription );
Reserved. Set to kSoundDescriptionKind_Movie_AnyVersion
.
A handle to the sound description to be converted.
The version you want fromDescription
to be.
A reference to the resulting SoundDescription
structure. You must dispose of the reference using DisposeHandle
.
An error code. Returns noErr
if there is no error.
The fromKind
parameter is reserved for future expansion; at present you must set it to kQTSoundDescriptionKind_Movie_AnyVersion
. Depending on the value you pass in toKind
, you can specify that you would like a specific SoundDescription
version, the lowest possible version (given the constraints of the format described by fromDescription
), or any version at all. Use these constants:
enum { |
kQTSoundDescriptionKind_Movie_Version1 = 'mvv1', |
kQTSoundDescriptionKind_Movie_Version2 = 'mvv2', |
kQTSoundDescriptionKind_Movie_LowestPossibleVersion = 'mvlo', |
kQTSoundDescriptionKind_Movie_AnyVersion = 'mvny' |
}; |
Movies.h
Creates a sound description structure of the requested kind from an AudioStreamBasicDescription, optional audio channel layout, and optional magic cookie.
OSStatus QTSoundDescriptionCreate ( AudioStreamBasicDescription *inASBD, AudioChannelLayout *inLayout, ByteCount inLayoutSize, void *inMagicCookie, ByteCount inMagicCookieSize, QTSoundDescriptionKind inRequestedKind, SoundDescriptionHandle *outSoundDesc );
A description of the format.
The audio channel layout (can be NULL if there isn't one).
The size of the audio channel layout (should be 0 if inLayout
is NULL).
The magic cookie for the decompressor (can be NULL if the decompressor doesn't require one).
The size of the magic cookie (should be 0 if the inMagicCookie
parameter is NULL).
The kind of sound description to create (see Discussion, below).
The resulting sound description. The caller must dispose of it with DisposeHandle
.
An error code. Returns noErr
if there is no error.
The value of inRequestedKind
can be taken from these values:
enum { |
kQTSoundDescriptionKind_Movie_Version1 = 'mvv1', |
kQTSoundDescriptionKind_Movie_Version2 = 'mvv2', |
kQTSoundDescriptionKind_Movie_LowestPossibleVersion = 'mvlo', |
kQTSoundDescriptionKind_Movie_AnyVersion = 'mvny' |
}; |
Movies.h
Gets a particular property of a sound description.
OSStatus QTSoundDescriptionGetProperty ( SoundDescriptionHandle inDesc, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, QTPropertyValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
The sound description being interrogated.
The class of the property being requested.
The ID of the property being requested.
The size of the property value buffer.
A pointer to the property value buffer.
The actual size of the returned property value (can be NULL).
An error code. Returns noErr
if there is no error.
The following constants identify sound description properties.
Movies.h
Gets information about a particular property of a sound description.
OSStatus QTSoundDescriptionGetPropertyInfo ( SoundDescriptionHandle inDesc, QTPropertyClass inPropClass, QTPropertyID inPropID, QTPropertyValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropertyFlags );
The sound description being interrogated.
The class of the property being requested.
The ID of the property being requested.
The type of the property returned here (can be NULL).
The size of the property returned here (can be NULL).
The property flags returned here (can be NULL).
An error code. Returns noErr
if there is no error.
The following constants identify sound description properties.
Movies.h
Sets a particular property of a sound description.
OSStatus QTSoundDescriptionSetProperty ( SoundDescriptionHandle inDesc, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, ConstQTPropertyValuePtr inPropValueAddress );
The sound description being modified.
The class of the property being set.
The ID of the property being set.
The size of the property value buffer.
A pointer to the property value buffer.
An error code. Returns noErr
if there is no error.
The following constants identify sound description properties.
Movies.h
Undocumented
OSErr QTTextToNativeText ( Handle theText, long encoding, long flags );
Undocumented
Undocumented
Flags (see below) that define the text
atom type. See these constants:
kITextAtomType
kITextStringAtomType
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Removes a QTNextTaskNeededSoonerCallbackProc callback.
OSErr QTUninstallNextTaskNeededSoonerCallback ( QTNextTaskNeededSoonerCallbackUPP callbackProc, void *refcon );
A Universal Procedure Pointer to a QTNextTaskNeededSoonerCallbackProc
callback that you installed by a previous call to QTInstallNextTaskNeededSoonerCallback
.
A pointer to the reference constant that you passed when the callback was installed.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
You pass this routine both a pointer to a callback procedure and a pointer to its reference constant, so you can uninstall one instance of a callback that you installed more than once with different refcon
values.
Introduced in QuickTime 6.
Movies.h
Removes a callback event from the list of scheduled callback events.
OSErr RemoveCallBackFromTimeBase ( QTCallBack cb );
The callback event for the operation. Your clock component obtains this value from the parameters passed to your ClockCallMeWhen
function.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Your clock component should call this function when your ClockCancelCallBack
function determines that your component can cancel the callback event.
Your component should call this function only for callback events that were successfully added to the schedule with AddCallBackToTimeBase
.
Introduced in QuickTime 3 or earlier.
Movies.h
Activates or deactivates a movie.
void SetMovieActive ( Movie theMovie, Boolean active );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
Activates or deactivates the movie
. Set this parameter to TRUE to activate the movie
; set this parameter to FALSE to deactivate the movie.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Defines a movie's active segment.
void SetMovieActiveSegment ( Movie theMovie, TimeValue startTime, TimeValue duration );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A time value specifying the starting point of the active segment. Set this parameter to -1 to make the entire movie active. In this case, the SetMovieActiveSegment
function ignores the duration
parameter.
A time value that specifies the duration of the active segment. If you are making the entire movie active (by setting the startTime
parameter to -1), the Movie Toolbox ignores this parameter.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Your application defines the active segment by specifying the starting time and duration of the segment. These values must be expressed in the movie's time coordinate system. By default, the entire movie is active.
Introduced in QuickTime 3 or earlier.
Movies.h
Targets a movie to render into an audio context.
OSStatus SetMovieAudioContext ( Movie movie, QTAudioContextRef audioContext );
The movie.
The audio context that the movie will render into.
An error code. Returns noErr
if there is no error. .
Movies.h
Sets a movie's boundary rectangle.
void SetMovieBox ( Movie theMovie, const Rect *boxRect );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a rectangle that contains the coordinates of the new boundary rectangle.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
The Movie Toolbox changes the rectangle by modifying the translation and scale values of the movie's matrix to accommodate the new boundary rectangle.
The movie box might not have its upper-left corner set at (0,0) in its display window when the movie is first loaded. Consequently, your application may need to adjust the position of the movie box so that it appears in the appropriate location within your application's document window. If you don't reset the movie position, the movie might not be visible when it starts playing. The following sample code demonstrates how to do this:
//Zeroing the boundary rectangle with SetMovieBox |
GetMovieBox (movie, &movieBox); |
OffsetRect (&movieBox, -movieBox.left, -movieBox.top); |
SetMovieBox (movie, &movieBox); |
Introduced in QuickTime 3 or earlier.
Movies.h
Establishes a movie's clipping region.
void SetMovieClipRgn ( Movie theMovie, RgnHandle theClip );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A handle to the movie's clipping region. The Movie Toolbox makes a copy of this region. Your application must dispose of the region referred to by this parameter when you are done with it. Set this parameter to NIL
to disable clipping for the movie.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
The clipping region is saved with the movie.
Introduced in QuickTime 3 or earlier.
Movies.h
Establishes a movie's current display clipping region.
void SetMovieDisplayClipRgn ( Movie theMovie, RgnHandle theClip );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A handle to the movie's display clipping region as a MacRegion
structure. The Movie Toolbox makes a copy of this region. Your application must dispose of the region referred to by this parameter when you are done with it. Set this parameter to NIL
to disable a movie's clipping region.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
The display clipping region is not saved with the movie. You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Assigns a drawing-complete function to a movie.
void SetMovieDrawingCompleteProc ( Movie theMovie, long flags, MovieDrawingCompleteUPP proc, long refCon );
The movie for this operation.
Contains flags (see below) that control when your drawing complete function is called. See these constants:
movieDrawingCallWhenChanged
movieDrawingCallAlways
A pointer to your MovieDrawingCompleteProc
callback. Set this parameter to NIL
if you want to remove your callback.
The reference constant you supplied when your application called your callback. Use this parameter to point to a data structure containing any information your callback needs.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
The Movie Toolbox calls this function based upon guidelines you establish when you assign the function to the movie.
Some media handlers may take less efficient playback paths when a drawing-complete function is used, so it should be used only when absolutely necessary.
Introduced in QuickTime 3 or earlier.
Movies.h
Establishes a movie's display coordinate system by setting the graphics world for displaying the movie.
void SetMovieGWorld ( Movie theMovie, CGrafPtr port, GDHandle gdh );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
Points to the movie's CGrafPort
structure or graphics world. Set this parameter to NIL
to use the current graphics port.
A handle to the movie's GDevice
structure. Set this parameter to NIL
to use the current device. If the port
parameter specifies a graphics world, set this parameter to NIL
to use that graphics world's graphics device.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
When you use this function, the Movie Toolbox remembers the current background color and background pattern. These are used for erasing in the default movie uncover function; see SetMovieCoverProcs
.
Introduced in QuickTime 3 or earlier.
Movies.h
Assigns a clock component to a movie.
void SetMovieMasterClock ( Movie theMovie, Component clockMeister, const TimeRecord *slaveZero );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The clock component to be assigned to this movie. Your application can obtain this component identifier from FindNextComponent
.
A pointer to the time, in the clock's time scale, that corresponds to a 0 time value for the movie
. This parameter allows you to set an offset between the clock component and the time base of the movie
. Set this parameter to NIL
if there is no offset.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Don't use SetTimeBaseMasterClock
to assign a clock component to a movie.
Introduced in QuickTime 3 or earlier.
Movies.h
Assigns a master time base to a movie.
void SetMovieMasterTimeBase ( Movie theMovie, TimeBase tb, const TimeRecord *slaveZero );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The master time base to be assigned to this movie. Your application obtains this time base identifier from NewTimeBase
.
A pointer to the time, in the time scale of the master time base, that corresponds to a 0 time value for the movie
. This parameter allows you to set an offset between the movie and the master time base. Set this parameter to NIL
if there is no offset.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets a movie's transformation matrix.
void SetMovieMatrix ( Movie theMovie, const MatrixRecord *matrix );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to the MatrixRecord
structure for the movie. If you set this parameter to NIL
, the Movie Toolbox uses the identity matrix.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
The Movie Toolbox uses a movie's matrix to map a movie from its display coordinate system to its graphics world.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets the poster time for the movie.
void SetMoviePosterTime ( Movie theMovie, TimeValue posterTime );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The starting time for the movie frame that contains the poster image, expressed in the movie's time coordinate system.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Since a movie poster is a still frame, it is defined by a point in time within the movie.
Introduced in QuickTime 3 or earlier.
Movies.h
Specifies a movie's default playback rate.
void SetMoviePreferredRate ( Movie theMovie, Fixed rate );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The new movie rate as a 32-bit, fixed-point number. Positive integers indicate forward rates and negative integers indicate reverse rates.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets a movie's preferred volume setting.
void SetMoviePreferredVolume ( Movie theMovie, short volume );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The preferred volume setting of the movie. The volume parameter must contain a 16-bit, fixed-point number that contains the movie's default volume. The high-order 8 bits contain the integer part of the value; the low-order 8 bits contain the fractional part. Volume values range from -1.0 to 1.0. Negative values play no sound but preserve the absolute value of the volume setting. You may find the constants shown below useful. See these constants:
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
A movie's tracks may have their own volume settings. Use SetTrackVolume
to set the volume of an individual track. A track's volume is scaled by the movie's volume to produce the track's final volume.
After calling this function you must save the changes it has made, for example by updating or flattening the movie.
Introduced in QuickTime 3 or earlier.
Movies.h
Places a movie into and out of preview mode.
void SetMoviePreviewMode ( Movie theMovie, Boolean usePreview );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The movie's mode. Set this parameter to TRUE to place the movie into preview mode. Set this parameter to FALSE to place the movie into normal playback mode.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
When a movie is in preview mode, only those tracks identified as preview tracks are serviced. You specify how a track is used by calling SetTrackUsage
.
When you place a movie into preview mode, the Movie Toolbox sets the active movie segment to be the preview segment of the movie. When you take a movie out of preview mode and place it back in normal playback mode, the toolbox sets the active movie segment to be the entire movie. For information about working with active movie segments, see PrerollMovie
.
Introduced in QuickTime 3 or earlier.
Movies.h
Defines the starting time and duration of the movie's preview.
void SetMoviePreviewTime ( Movie theMovie, TimeValue previewTime, TimeValue previewDuration );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A time value that specifies the preview's starting time.
A time value that specifies the preview's duration.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets a movie's playback rate.
void SetMovieRate ( Movie theMovie, Fixed rate );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The new movie rate as a 32-bit, fixed-point number. Positive integers indicate forward rates and negative integers indicate reverse rates. This value immediately changes the rate at which the movie is playing. A value of 1 starts the movie playing at normal speed, a value of 2 causes the movie to play at double speed, -2 starts the movie playing backward at double speed, and so on. A value of 0 stops the movie.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Use this function to change the speed at which a movie is playing. You do not normally use this function to start and stop movies; use the higher level functions StartMovie
and StopMovie
instead. If you start a movie using this function, you should call PrePrerollMovie
and PrerollMovie
first, to set up any network connections, buffers, and data structures necessary to play the movie.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets a movie's current selection.
void SetMovieSelection ( Movie theMovie, TimeValue selectionTime, TimeValue selectionDuration );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A time value specifying the starting point of the current selection.
A time value that specifies the duration of the current selection.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Performs custom error notification.
void SetMoviesErrorProc ( MoviesErrorUPP errProc, long refcon );
A MoviesErrorProc
callback.
A reference constant value. The Movie Toolbox passes this reference constant to your MoviesErrorProc
callback each time it calls it. Use this parameter to point to a data structure containing any information your callback needs.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Your application must identify its custom error-notification function to the Movie Toolbox. Once you have identified an error-notification function, the Movie Toolbox calls your function each time the current error value is to be set to a nonzero value. The Movie Toolbox calls your error-notification function only in response to errors generated by the Movie Toolbox.
Error-notification functions can be especially useful when you are debugging your program. The Movie Toolbox manages the sticky error value.
Introduced in QuickTime 3 or earlier.
Movies.h
Changes a movie's current time.
void SetMovieTime ( Movie theMovie, const TimeRecord *newtime );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
A pointer to a TimeRecord
structure containing the new time.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
The Movie Toolbox saves the movie's current time when you save the movie.
Introduced in QuickTime 3 or earlier.
Movies.h
Establishes a movie's time scale.
ComponentResult ADD_MEDIA_BASENAME() SetMovieTimeScale
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The movie's new time scale.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets a movie's time value.
void SetMovieTimeValue ( Movie theMovie, TimeValue newtime );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The new time value. You must ensure that the time value is in the movie's time scale.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Indicates to the ICM the video output component being used with a given movie.
void SetMovieVideoOutput ( Movie theMovie, ComponentInstance vout );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The video output component. Applications obtain this reference from OpenComponent
or OpenDefaultComponent
. Call the function and pass NIL
in this parameter as soon as the video output component is no longer in use.
As soon as you turn on the echo port on any video output component, you should make this call so the ICM keeps track of the video output in use.
Introduced in QuickTime 5.
Movies.h
Targets a movie to render into a visual context.
OSStatus SetMovieVisualContext ( Movie movie, QTVisualContextRef visualContext );
The movie.
The visual context that the movie will render into. May be NULL..
An error code. Returns noErr
if there is no error. Returns memFullErr
if memory cannot be allocated. Returns kQTVisualContextNotAllowed
if the movie is not able to render using a visual context. Returns paramErr
if the movie is NULL.
When SetMovieVisualContext
succeeds, it will retain the QTVisualContext
object for its own use. If visualContext
is NULL, the movie will not render any visual media. SetMovieVisualContext
will fail if a different movie is already using the visual context, so you should first disassociate
the other movie by calling SetMovieVisualContext
with a NULL visualContext
.
Movies.h
Sets a movie's current volume but does not store the setting in the movie.
void SetMovieVolume ( Movie theMovie, short volume );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
The current volume setting of the movie represented as a 16-bit, fixed-point number. The high-order 8 bits contain the integer part of the value; the low-order 8 bits contain the fractional part. Volume values range from -1.0 to 1.0. Negative values play no sound but preserve the absolute value of the volume setting. You can use the constants shown below. See these constants:
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
The setting made by this function is not persistent. To store a volume setting in the movie, call SetMoviePreferredVolume
.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets the contents of the control flags of a time base.
void SetTimeBaseFlags ( TimeBase tb, long timeBaseFlags );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
The control flags for this time base (see below). You may set only one flag to 1. Be sure to set unused flags to 0. See these constants:
loopTimeBase
palindromeLoopTimeBase
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Assigns a clock component to a time base.
void SetTimeBaseMasterClock ( TimeBase slave, Component clockMeister, const TimeRecord *slaveZero );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
The clock component to be assigned to this time base. Your application can obtain this component identifier from FindNextComponent
.
A pointer to the time, in the clock's time scale, that corresponds to a 0 time value for the slave time base. This parameter allows you to set an offset between the time base and the clock component. Set this parameter to NIL
if there is no offset.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
A time base derives its time from either a clock component or from another time base. Don't use this function to assign a clock to a movie's time base.
Introduced in QuickTime 3 or earlier.
Movies.h
Assigns a master time base to a time base.
void SetTimeBaseMasterTimeBase ( TimeBase slave, TimeBase master, const TimeRecord *slaveZero );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
The master time base to be assigned to this time base. Your application obtains this time base identifier from NewTimeBase
.
A pointer to the time, in the time scale of the master time base, that corresponds to a 0 time value for the slave time scale. This parameter allows you to set an offset between the time base and the master time base. Set this parameter to NIL
if there is no offset.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
A time base derives its time from either a clock component or another time base. Don't use this function to assign a master time base to a movie's time base.
Introduced in QuickTime 3 or earlier.
Movies.h
Attaches an offset time base to another time base.
OSErr SetTimeBaseOffsetTimeBase ( TimeBase tb, TimeBase offsettb, const TimeRecord *offsetZero );
The time base to which the offset time base is to be attached. A NIL
value can be passed when the offset time base has already be set but a new offset value is needed.
The offset time base to be attached.
A pointer to a TimeRecord
value set to the offset between the master time base and the offset time base. Passing a negative value means the offset time base will start sooner.
See Error Codes
in the QuickTime API Reference. Returns noErr
if there is no error.
Introduced in QuickTime 6.4.
Movies.h
Sets the rate of a time base.
void SetTimeBaseRate ( TimeBase tb, Fixed r );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
The rate of the time base.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Rates may be set to negative values. Negative rates cause time to move backward for the time base.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets the start time of a time base.
void SetTimeBaseStartTime ( TimeBase tb, const TimeRecord *tr );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
A pointer to a TimeRecord
structure that contains the start time value.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
The start time defines the time base's minimum time value. You must specify the new start time in a time structure.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets the stop time of a time base.
void SetTimeBaseStopTime ( TimeBase tb, const TimeRecord *tr );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
A pointer to a TimeRecord
structure that contains the stop time value.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
The stop time defines the time base's maximum time value. You must specify the new stop time in a time structure.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets the current time of a time base.
void SetTimeBaseTime ( TimeBase tb, const TimeRecord *tr );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
A pointer to a TimeRecord
structure that contains the current time value.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets the current time of a time base.
void SetTimeBaseValue ( TimeBase tb, TimeValue t, TimeScale s );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
The new time value.
The time scale of the new time value.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Changes the offset from a time base to either its master time base or its clock component.
void SetTimeBaseZero ( TimeBase tb, TimeRecord *zero );
The time base for this operation. Your application obtains this time base identifier from NewTimeBase
.
A pointer to the time that corresponds to a 0 time value for the slave time scale. This parameter allows you to set an offset between the time base and its time source. Set this parameter to NIL
if there is no offset.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
You establish the initial offset when you assign the time base to its time source.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets the clipping region of a track.
void SetTrackClipRgn ( Track theTrack, RgnHandle theClip );
The track for this operation. Your application obtains this track identifier from such functions as NewMovieTrack
and GetMovieTrack
.
A handle to the track's clipping region. The Movie Toolbox makes a copy of this region. Your application must dispose of the region referred to by this parameter when you are done with it. Set this parameter to NIL
to disable clipping for the track.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Forces a track to draw into a particular graphics world, which may be different from that of the movie.
void SetTrackGWorld ( Track theTrack, CGrafPtr port, GDHandle gdh, TrackTransferUPP proc, long refCon );
The track for this operation. Your application obtains this track identifier from such functions as NewMovieTrack
and GetMovieTrack
.
Points to the graphics port structure or graphics world to which to draw the track
. Set this parameter to NIL
to use the movie's graphics port.
A handle to the movie's graphics device structure. Set this parameter to NIL
to use the current device. If the port
parameter specifies a graphics world, set this parameter to NIL
to use that graphics world's graphics device.
A pointer to your TrackTransferProc
callback. Set this parameter to NIL
if you want to remove your callback.
A value to pass to your TrackTransferProc
callback. Use this parameter to point to a data structure containing any information your callback needs.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
After this function draws a track, it calls your transfer callback to copy the track to the actual movie graphics world. When your transfer callback is called, the current graphics world is set to the correct destination. You can also install a transfer callback and set the graphics world to NIL
. In this case, the function calls your callback only as a notification that the track has been drawn; no transfer needs to take place.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets a track's matte.
void SetTrackMatte ( Track theTrack, PixMapHandle theMatte );
The track for this operation. Your application obtains this track identifier from such functions as NewMovieTrack
and GetMovieTrack
.
A handle to the matte. The Movie Toolbox makes a copy of the matte, including its ColorTable
structure and pixels. Consequently, your application must dispose of the matte when you are done with it. Set this parameter to NIL
to remove the track's matte.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
This matte defines which of the track's pixels are displayed in a movie. You must specify the matte in a PixMap
structure. The Movie Toolbox displays the weighted average of the track and its destination based on the corresponding pixel in the matte.
Introduced in QuickTime 3 or earlier.
Movies.h
Displays a movie's poster.
void ShowMoviePoster ( Movie theMovie );
A movie identifier. Your application obtains this identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
The Movie Toolbox draws the movie poster once, in the movie's graphics world, using the movie's matrix and display clipping characteristics. You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
This function works on both active and inactive movies.
Introduced in QuickTime 3 or earlier.
Movies.h
Retrieves the number of images that currently exist in a sprite track.
ComponentResult SpriteMediaCountImages ( MediaHandler mh, short *numImages );
The sprite media handler for this operation.
A pointer to a short integer. On return, this integer contains the number of images for the sprite media's current time.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
This function determines the number of images that currently exist based on the key frame that is in effect.
Introduced in QuickTime 3 or earlier.
Movies.h
Retrieves the number of sprites that currently exist in a sprite track.
ComponentResult SpriteMediaCountSprites ( MediaHandler mh, short *numSprites );
The sprite media handler for this operation.
A pointer to a short integer. On return, this integer contains the number of sprites for the sprite media's current time.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
This function determines the number of sprites that currently exist based on the key frame that is in effect.
Introduced in QuickTime 3 or earlier.
Movies.h
Frees the memory allocated for a sprite image outside a movie and removes that image from the sprite track in which it appears.
ComponentResult SpriteMediaDisposeImage ( MediaHandler mh, short imageIndex );
The sprite media handler for this operation.
The index of a sprite image that was previously created by SpriteMediaNewImage
. If you know only the image ID, you can convert it to the index by calling SpriteMediaImageIDToIndex
.
See Error Codes
. Returns noErr
if there is no error.
The image disposed of is no longer available to the sprite track, and the image index location remains empty for the duration of the current key sample.
Introduced in QuickTime 6.
Movies.h
Disposes of memory allocated for a sprite.
ComponentResult SpriteMediaDisposeSprite ( MediaHandler mh, QTAtomID spriteID );
The sprite media handler for this operation.
The ID of the sprite for this operation.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Returns the value of the sprite track variable with the specified ID.
ComponentResult SpriteMediaGetActionVariable ( MediaHandler mh, QTAtomID variableID, float *value );
The sprite media handler for this operation.
A variable ID of the sprite variable.
A pointer to a floating-point value. If the specified variable has never been set, the value is set to 0 and the error cannotFindAtomErr
is returned.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Undocumented
ComponentResult SpriteMediaGetActionVariableAsString ( MediaHandler mh, QTAtomID variableID, Handle *theCString );
The sprite media handler for this operation.
A variable ID of the sprite variable.
A pointer to a handle to a C string.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Retrieves the number of the sprite media sample that is currently being displayed.
ComponentResult SpriteMediaGetDisplayedSampleNumber ( MediaHandler mh, long *sampleNum );
The sprite media handler for this operation.
A pointer to a long integer. On return, this integer contains the number of the sample that is currently being displayed.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the name of the image with the specified index from the current key frame sample.
ComponentResult SpriteMediaGetImageName ( MediaHandler mh, short imageIndex, Str255 imageName );
The sprite media handler for this operation.
The index of the image whose image name is to be retrieved. This value must be between 1 and the number of available images. You can determine how many images are available by calling SpriteMediaCountImages
.
Returns a Pascal string with the image name of the image, or an empty string if the image is unnamed.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Retrieves an image description for a specified image in a sprite track.
ComponentResult SpriteMediaGetIndImageDescription ( MediaHandler mh, short imageIndex, ImageDescriptionHandle imageDescription );
The sprite media handler for this operation.
The index of the image whose image description is to be retrieved. This value must be between 1 and the number of available images. You can determine how many images are available by calling SpriteMediaCountImages
.
Specifies an image description handle. On return, this handle contains the ImageDescription
structure that describes the specified image. This handle must be unlocked; the function resizes the handle if necessary.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns a property value for a sprite image specified by an index.
ComponentResult SpriteMediaGetIndImageProperty ( MediaHandler mh, short imageIndex, long imagePropertyType, void *imagePropertyValue );
The sprite media handler for this operation.
The index of the image whose property value is to be retrieved. This value must be between 1 and the number of available images. You can determine how many images are available by calling SpriteMediaCountImages
.
The property whose value should be retrieved (see below). See these constants:
kSpritePropertyMatrix
kSpritePropertyImageDescription
kSpritePropertyImageDataPtr
kSpritePropertyVisible
kSpritePropertyLayer
kSpritePropertyGraphicsMode
A pointer to a variable that will hold the selected property value on return.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Gets a sprite property; superseded by SpriteMediaGetSpriteProperty.
ComponentResult SpriteMediaGetProperty ( MediaHandler mh, short spriteIndex, long propertyType, void *propertyValue );
The sprite media handler for this operation.
The index of the sprite for this operation.
The property whose value should be retrieved (see below). See these constants:
kSpritePropertyMatrix
kSpritePropertyImageDescription
kSpritePropertyImageDataPtr
kSpritePropertyVisible
kSpritePropertyLayer
kSpritePropertyGraphicsMode
A pointer to a variable that will hold the selected property value on return.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Gets the sprite action atom for an event.
ComponentResult SpriteMediaGetSpriteActionsForQTEvent ( MediaHandler mh, QTEventRecordPtr event, QTAtomID spriteID, QTAtomContainer *container, QTAtom *atom );
The sprite media handler for this operation.
A pointer to a QTEventRecord
structure.
The ID of the sprite for this operation.
A pointer to a QT atom container.
A pointer to a QT atom in the container.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the name of the sprite with the specified ID from the currently displayed sample.
ComponentResult SpriteMediaGetSpriteName ( MediaHandler mh, QTAtomID spriteID, Str255 spriteName );
The sprite media handler for this operation.
The sprite ID of the sprite name.
Returns a Pascal string with the name of the sprite or an empty string if the sprite is unnamed.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Retrieves the value of the specified sprite or sprite track property.
ComponentResult SpriteMediaGetSpriteProperty ( MediaHandler mh, QTAtomID spriteID, long propertyType, void *propertyValue );
The sprite media handler for this operation.
The ID of the sprite for this operation. Pass 'Trck'
to return the properties of a whole sprite track.
A constant (see below) that specifies the property whose value should be retrieved. See these constants:
kSpritePropertyMatrix
kSpritePropertyImageDescription
kSpritePropertyImageDataPtr
kSpritePropertyVisible
kSpritePropertyLayer
kSpritePropertyGraphicsMode
kSpriteTrackPropertyAllSpritesHitTestingMode
kSpriteTrackPropertyPreferredDepthInterpretationMode
On return, a pointer to the value of the property
; the data
type of that value depends on the property.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Function introduced in QuickTime 3 or earlier. The kSpriteTrackPropertyAllSpritesHitTestingMode
and kSpriteTrackPropertyPreferredDepthInterpretationMode
constants were added in QuickTime 6.
Movies.h
Determines whether any sprites are at a specified location.
ComponentResult SpriteMediaHitTestAllSprites ( MediaHandler mh, long flags, Point loc, QTAtomID *spriteHitID );
The sprite media handler for this operation.
Specifies flags (see below) that control the hit testing operation. See these constants:
spriteHitTestBounds
spriteHitTestImage
spriteHitTestInvisibleSprites
spriteHitTestIsClick
spriteHitTestLocInDisplayCoordinates
A point in the coordinate system of the sprite track's movie to test for the existence of a sprite.
A pointer to a short integer. On return, this integer contains the ID of the frontmost sprite at the location specified by loc
. If no sprite exists at the location, the function sets the value
of this parameter to 0.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
You call this function to determine whether any sprites exist at a specified location in the coordinate system of a sprite track's movie. You can pass flags to this function to control the hit testing operation more precisely. For example, you may want the hit test operation to detect a sprite whose bounding box contains the specified location.
Introduced in QuickTime 3 or earlier.
Movies.h
Performs a hit testing operation on the sprite specified by a spriteID.
ComponentResult SpriteMediaHitTestOneSprite ( MediaHandler mh, QTAtomID spriteID, long flags, Point loc, Boolean *wasHit );
The sprite media handler for this operation.
The sprite ID of the sprite.
Flags (see below) that control the hit testing operation. See these constants:
spriteHitTestBounds
spriteHitTestImage
spriteHitTestInvisibleSprites
spriteHitTestIsClick
spriteHitTestLocInDisplayCoordinates
A point to test for the existence of a sprite. The point should be defined in the local coordinates of the sprite track, unless the spriteHitTestLocInDisplayCoordinates
flag is set.
A pointer to a Boolean. If the sprite is hit, wasHit
is set to TRUE; otherwise, it is set to FALSE.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
This routine allows you to hit test a sprite which is fully or partially covered by other sprites.
Introduced in QuickTime 3 or earlier.
Movies.h
Undocumented
ComponentResult SpriteMediaHitTestSprites ( MediaHandler mh, long flags, Point loc, short *spriteHitIndex );
The sprite media handler for this operation.
Flags (see below) that control the hit testing operation. See these constants:
spriteHitTestBounds
spriteHitTestImage
spriteHitTestInvisibleSprites
spriteHitTestIsClick
spriteHitTestLocInDisplayCoordinates
A point to test for the existence of a sprite.
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the index of an outside sprite image from the ID of that image.
ComponentResult SpriteMediaImageIDToIndex ( MediaHandler mh, QTAtomID imageID, short *imageIndex );
The sprite media handler for this operation.
The ID of a sprite image.
On return, a pointer to the index of the image.
See Error Codes
. Returns noErr
if there is no error.
Introduced in QuickTime 6.
Movies.h
Returns the ID of an outside sprite image from the index of that image.
ComponentResult SpriteMediaImageIndexToID ( MediaHandler mh, short imageIndex, QTAtomID *imageID );
The sprite media handler for this operation.
The index of a sprite image.
On return, a pointer to the ID of the image.
See Error Codes
. Returns noErr
if there is no error.
Introduced in QuickTime 6.
Movies.h
Creates a new movie sprite image outside a movie.
ComponentResult SpriteMediaNewImage ( MediaHandler mh, Handle dataRef, OSType dataRefType, QTAtomID desiredID );
The sprite media handler for this operation.
A pointer to a URL or an alias that references the image to be used as a sprite image.
A four character code for the type of the dataRef
parameter. See Component Identifiers
. For example, pass URLDataHandlerSubType
if dataRef
is a URL
The desired ID identifier for the image. If the requested ID is in use, the call returns an error. If you pass 0 the function assigns the next sequential integer ID, which is usually the same as the next available index unless that ID has been previously assigned.
See Error Codes
. Returns noErr
if there is no error.
The newly created image can be used in a sprite track like any other sprite image. It can be referenced by the next available image index, equal to the number of images in the track before the call was made +1, or by the ID that was requested via the desiredID
parameter.
Introduced in QuickTime 6.
Movies.h
Creates a new sprite.
ComponentResult SpriteMediaNewSprite ( MediaHandler mh, QTRuntimeSpriteDescPtr newSpriteDesc );
The sprite media handler for this operation.
A pointer to a QTRuntimeSpriteDescStruct
structure.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Sets the value of a sprite track variable to a specified value.
ComponentResult SpriteMediaSetActionVariable ( MediaHandler mh, QTAtomID variableID, const float *value );
The sprite media handler for this operation.
A variable ID of the sprite name.
A pointer to a floating-point number. The value is passed by reference.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
This function is specific to sprite tracks using wired sprites.
This function is specific to sprite tracks using wired sprites.
Introduced in QuickTime 3 or earlier.
Movies.h
Undocumented
ComponentResult SpriteMediaSetActionVariableToString ( MediaHandler mh, QTAtomID variableID, Ptr theCString );
The sprite media handler for this operation.
A variable ID of the sprite variable.
A pointer to a C string.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Sets a sprite property; superseded by SpriteMediaSetSpriteProperty.
ComponentResult SpriteMediaSetProperty ( MediaHandler mh, short spriteIndex, long propertyType, void *propertyValue );
The sprite media handler for this operation.
The index of the sprite for this operation.
The property whose value should be set (see below). See these constants:
kSpritePropertyMatrix
kSpritePropertyImageDescription
kSpritePropertyImageDataPtr
kSpritePropertyVisible
kSpritePropertyLayer
kSpritePropertyGraphicsMode
A pointer to a variable that contains the new value of the selected property. The type of data you pass for this parameter depends on the property
type.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets the specified property of a sprite or sprite track.
ComponentResult SpriteMediaSetSpriteProperty ( MediaHandler mh, QTAtomID spriteID, long propertyType, void *propertyValue );
The sprite media handler for this operation.
The ID of the sprite for this operation. Pass 'Trck'
to set the properties of a whole sprite track.
A constant (see below) that specifies the property whose value should be set. See these constants:
kSpritePropertyMatrix
kSpritePropertyImageDescription
kSpritePropertyImageDataPtr
kSpritePropertyVisible
kSpritePropertyLayer
kSpritePropertyGraphicsMode
kSpriteTrackPropertyAllSpritesHitTestingMode
kSpriteTrackPropertyPreferredDepthInterpretationMode
A pointer to the new value of the selected property. The type of data you pass for this parameter depends on the property
type.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Function introduced in QuickTime 3 or earlier. The kSpriteTrackPropertyAllSpritesHitTestingMode
and kSpriteTrackPropertyPreferredDepthInterpretationMode
constants were added in QuickTime 6.
Movies.h
Converts a sprite ID to the corresponding sprite index.
ComponentResult SpriteMediaSpriteIDToIndex ( MediaHandler mh, QTAtomID spriteID, short *spriteIndex );
The sprite media handler for this operation.
The ID of the sprite for this operation.
On return, a pointer to the index of the sprite.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the ID of a sprite specified by a sprite index.
ComponentResult SpriteMediaSpriteIndexToID ( MediaHandler mh, short spriteIndex, QTAtomID *spriteID );
The sprite media handler for this operation.
The index of the sprite for this operation.
A pointer to the sprite ID corresponding to the sprite index. If a sprite with the specified index does not exist, the error paramErr
is returned.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Starts the movie playing from the current movie time.
void StartMovie ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
You are not required to call this function to start a movie. It is included in the QuickTime API for convenience. Before playing the movie, the Movie Toolbox makes the movie active, prerolls the movie, and sets the movie to its preferred playback rate. You can use SetMoviePreferredRate
to change this setting.
A movie's current time is saved when a movie is stored in a movie file. Therefore, your application should appropriately position a movie before playing the movie. Use GoToBeginningOfMovie
to set a movie to play from its start.
Introduced in QuickTime 3 or earlier.
Movies.h
Stops the playback of a movie.
void StopMovie ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
Introduced in QuickTime 3 or earlier.
Movies.h
Subtracts one time from another.
void SubtractTime ( TimeRecord *dst, const TimeRecord *src );
A pointer to a TimeRecord
structure. This time structure contains one of the operands for the subtraction. This function returns the result of the subtraction into this time structure as a duration.
A pointer to a TimeRecord
structure. The Movie Toolbox subtracts this value from the time or duration specified by the dst
parameter.
You can access error returns from this function through GetMoviesError
and GetMoviesStickyError
. See Error Codes
.
If the two times are relative to different time scales or time bases, this function converts the times as appropriate to yield reasonable results. However, the time bases for both time values must rely on the same time source.
Introduced in QuickTime 3 or earlier.
Movies.h
Provides dynamic highlighting of text.
ComponentResult TextMediaAddHiliteSample ( MediaHandler mh, short hiliteStart, short hiliteEnd, RGBColor *rgbHiliteColor, TimeValue duration, TimeValue *sampleTime );
The media handler for the text media obtained by GetMediaHandler
.
Indicates the beginning of the text to be highlighted.
Indicates the ending of the text to be highlighted. If the value of the hiliteStart
parameter equals that of the hiliteEnd
parameter, then no text is highlighted (that is, highlighting is turned off for the duration of the specified sample).
A pointer to the RGBColor
structure that defines the color for highlighting. If this parameter is not NIL
, then the specified color is used when highlighting the text indicated by the hiliteStart
and hiliteEnd
parameters. Otherwise, the default system highlight color is used.
Specifies how long the text sample should last. This duration is expressed in the media's time base.
A pointer to a time value. The actual media time at which the sample was added is returned here.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Specifies a TextEdit handle to be added to a specified media.
ComponentResult TextMediaAddTESample ( MediaHandler mh, TEHandle hTE, RGBColor *backColor, short textJustification, Rect *textBox, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, RGBColor *rgbHiliteColor, TimeValue duration, TimeValue *sampleTime );
The media handler for the text media obtained by GetMediaHandler
.
A handle to a TERec
structure.
A pointer to an RGBColor
structure specifying the text background color. Passing NIL
for this parameter in defaults to white.
Indicates the justification of the text (see below). See these constants:
A pointer to a Rect
structure that defines the box within which the text is to be displayed. The box is relative to the track bounds.
Contains the text display flags (see below). See these constants:
dfDontDisplay
dfDontAutoScale
dfClipToTextBox
dfShrinkTextBoxToFit
dfScrollIn
dfScrollOut
dfHorizScroll
dfReverseScroll
dfContinuousScroll
dfFlowHoriz
dfContinuousKaraoke
dfDropShadow
dfAntiAlias
dfKeyedText
dfInverseHilite
dfTextColorHilite
Indicates the delay in scrolling associated with the setting of the dfScrollIn
and dfScrollOut
display flags. If the value of the scrollDelay
parameter is greater than 0 and the dfScrollIn
flag is set, the text pauses when it has scrolled all the way in for the amount of time specified by scrollDelay
. If the dfScrollOut
flag is set, the pause occurs first before the text scrolls out. If both these flags are set, the pause occurs at the midpoint between scrolling in and scrolling out.
The beginning of the text to be highlighted.
The end of the text to be highlighted. If the hiliteEnd
parameter is greater than the hiliteStart
parameter, then the text is highlighted from the selection specified by hiliteStart
to hiliteEnd
. To specify additional highlighting, you can use TextMediaAddHiliteSample
.
Contains a pointer to an RGBColor
structure that defines the color for highlighting. If this parameter is not NIL
, then the specified color is used when highlighting the text indicated by the hiliteStart
and hiliteEnd
parameters. Otherwise, the default system highlight color is used.
A time value that specifies how long the text sample should last. This duration is expressed in the media's time base.
Contains a pointer to a time value. The actual media time at which the sample was added is returned here.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Be sure to turn on the dfDropShadow
display flag after you call this function.
Introduced in QuickTime 3 or earlier.
Movies.h
Adds a single block of styled text to an existing media.
ComponentResult TextMediaAddTextSample ( MediaHandler mh, Ptr text, unsigned long size, short fontNumber, short fontSize, Style textFace, RGBColor *textColor, RGBColor *backColor, short textJustification, Rect *textBox, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, RGBColor *rgbHiliteColor, TimeValue duration, TimeValue *sampleTime );
The media handler for the text media obtained by GetMediaHandler
.
A pointer to a block of text.
Indicates the size of the text block, in bytes.
The number for the font in which to display the text.
Indicates the size of the font.
Indicates the typeface or style
of the text (that is, bold, italic, and so on).
A pointer to an RGBColor
structure specifying the color of the text. Passing NIL
for this parameter in defaults to black.
A pointer to an RGBColor
structure specifying the text background color. Passing NIL
for this parameter in defaults to white.
Indicates the justification of the text (see below). See these constants:
A pointer to a Rect
structure that defines the box within which the text is to be displayed. The box is relative to the track bounds.
Contains the text display flags (see below). See these constants:
dfDontDisplay
dfDontAutoScale
dfClipToTextBox
dfShrinkTextBoxToFit
dfScrollIn
dfScrollOut
dfHorizScroll
dfReverseScroll
dfContinuousScroll
dfFlowHoriz
dfContinuousKaraoke
dfDropShadow
dfAntiAlias
dfKeyedText
dfInverseHilite
dfTextColorHilite
Indicates the delay in scrolling associated with the setting of the dfScrollIn
and dfScrollOut
display flags. If the value of the scrollDelay
parameter is greater than 0 and the dfScrollIn
flag is set, the text pauses when it has scrolled all the way in for the amount of time specified by scrollDelay
. If the dfScrollOut
flag is set, the pause occurs first before the text scrolls out. If both these flags are set, the pause occurs at the midpoint between scrolling in and scrolling out.
The beginning of the text to be highlighted.
The end of the text to be highlighted. If the hiliteEnd
parameter is greater than the hiliteStart
parameter, then the text is highlighted from the selection specified by hiliteStart
to hiliteEnd
. To specify additional highlighting, you can use TextMediaAddHiliteSample
.
Contains a pointer to an RGBColor
structure that defines the color for highlighting. If this parameter is not NIL
, then the specified color is used when highlighting the text indicated by the hiliteStart
and hiliteEnd
parameters. Otherwise, the default system highlight color is used.
A time value that specifies how long the text sample should last. This duration is expressed in the media's time base.
Contains a pointer to a time value. The actual media time at which the sample was added is returned here.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Be sure to turn on the dfDropShadow
display flag after you call this function.
Introduced in QuickTime 3 or earlier.
Movies.h
Undocumented
ComponentResult TextMediaDrawRaw ( MediaHandler mh, GWorldPtr gw, GDHandle gd, void *data, long dataSize, TextDescriptionHandle tdh );
The text media handler obtained by GetMediaHandler
.
A pointer to a CGrafPort
structure that defines a graphics world.
A handle to a graphics device.
A pointer to the source data.
The size of the source data.
A handle to a TextDescription
structure.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Searches for text with a specified media handler starting at a given time.
ComponentResult TextMediaFindNextText ( MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime, TimeValue *foundTime, TimeValue *foundDuration, long *offset );
The media handler for the text media obtained by GetMediaHandler
.
Points to the text to be found.
The length of the text to be found.
Flags (see below) that determine the conditions of the search. See these constants:
findTextEdgeOK
findTextCaseSensitive
findTextReverseSearch
findTextWrapAround
findTextUseOffset
Indicates the time (expressed in the movie time scale) at which to begin the search.
A pointer to the movie time at which the text sample is found if the search is successful. Otherwise, it returns -1.
A pointer to the duration of the sample (in the movie time scale) that is found if the search is successful.
A pointer to the offset of the found text from the beginning of the text portion of the sample.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets properties of a text media.
ComponentResult TextMediaGetTextProperty ( MediaHandler mh, TimeValue atMediaTime, long propertyType, void *data, long dataSize );
The text media handler obtained by GetMediaHandler
.
The media time of the text.
A constant (see below) that identifies the text property to be set. See these constants:
kTextTextHandle
kTextTextPtr
kTextTEStyle
kTextBackColor
kTextForeColor
kTextFace
kTextFont
kTextSize
kTextAlignment
kTextHilite
kTextDropShadow
kTextDisplayFlags
kTextScroll
A pointer to text data.
The size of the data.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 5.
Movies.h
Specifies selected text to be highlighted for a given text media handler.
ComponentResult TextMediaHiliteTextSample ( MediaHandler mh, TimeValue sampleTime, short hiliteStart, short hiliteEnd, RGBColor *rgbHiliteColor );
The text media handler obtained by GetMediaHandler
.
The starting time in the sample.
The beginning of the text to be highlighted.
The end of the text to be highlighted. If the hiliteEnd
parameter is greater than the hiliteStart
parameter, then the text is highlighted from the selection specified by hiliteStart
to hiliteEnd
.
Contains a pointer to an RGBColor
structure that defines the color for highlighting. If this parameter is not NIL
, then the specified color is used when highlighting the text indicated by the hiliteStart
and hiliteEnd
parameters. Otherwise, the default system highlight color is used.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Undocumented
ComponentResult TextMediaRawIdle ( MediaHandler mh, GWorldPtr gw, GDHandle gd, TimeValue sampleTime, long flagsIn, long *flagsOut );
The text media handler obtained by GetMediaHandler
.
A pointer to a CGrafPort
structure that defines a graphics world.
A handle to a graphics device.
Undocumented
Undocumented
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Undocumented
ComponentResult TextMediaRawSetup ( MediaHandler mh, GWorldPtr gw, GDHandle gd, void *data, long dataSize, TextDescriptionHandle tdh, TimeValue sampleDuration );
The text media handler obtained by GetMediaHandler
.
A pointer to a CGrafPort
structure that defines a graphics world.
A handle to a graphics device.
A pointer to data.
The size of the data.
A handle to a TextDescription
structure.
Undocumented
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Specifies a custom function to be called whenever a text sample is displayed in a movie.
ComponentResult TextMediaSetTextProc ( MediaHandler mh, TextMediaUPP TextProc, long refcon );
The text media handler obtained by GetMediaHandler
.
A Universal Procedure Pointer that points to a TextMediaProc
callback.
Indicates a reference constant that will be passed to your callback. Use this parameter to point to a data structure containing any information your function needs. Set this parameter to 0 if you don't need it.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Sets properties of a text media.
ComponentResult TextMediaSetTextProperty ( MediaHandler mh, TimeValue atMediaTime, long propertyType, void *data, long dataSize );
The text media handler obtained by GetMediaHandler
.
The media time of the text.
A constant (see below) that identifies the text property to be set. See these constants:
kTextTextHandle
kTextTextPtr
kTextTEStyle
kTextBackColor
kTextForeColor
kTextFace
kTextFont
kTextSize
kTextAlignment
kTextHilite
kTextDropShadow
kTextDisplayFlags
kTextScroll
A pointer to text data.
The size of the data.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Sets values before calling TextMediaAddTextSample or TextMediaAddTESample.
ComponentResult TextMediaSetTextSampleData ( MediaHandler mh, void *data, OSType dataType );
A reference to the text media handler. You obtain this reference from GetMediaHandler
.
A pointer to the data, defined by the dataType
parameter.
The type of data.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
The following code sample demonstrates how to use this function:
// TextMediaSetTextSampleData coding example |
short trans =127; |
Point dropOffset; |
MediaHandler mh; |
dropOffset.h =dropOffset.v =4 |
TextMediaSetTextSampleData(mh,(void *)&dropOffset,dropShadowOffsetType); |
TextMediaSetTextSampleData(mh,(void *)&trans,dropShadowTranslucencyType); |
Introduced in QuickTime 3 or earlier.
Movies.h
Ensures that the Movie Toolbox properly displays your movie after it has been uncovered.
OSErr UpdateMovie ( Movie theMovie );
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie
, NewMovieFromFile
, and NewMovieFromHandle
.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Your application should call this function during window updating. Don't call MoviesTask
at this time; you will observe better display behavior if you call it at the end of your update processing.
This function does not actually update the movie's graphics world. Rather, it invalidates the movie's display state so that the Movie Toolbox redraws the movie the next time you call MoviesTask
. If you need to force a movie to be redrawn outside of a window update sequence, your application can call this function and then call MoviesTask
to service the movie. The Movie Toolbox determines the portion of the screen to update by examining the graphics port's visible region.
The following code snippet uses this function in a Macintosh Window Manager update sequence:
// UpdateMovie coding example |
#include <Events.h> |
#include <ToolUtils.h> |
#include "Movies.h" |
void DoUpdate (WindowRef theWindow, Movie theMovie) |
{ |
BeginUpdate (theWindow); |
UpdateMovie (theMovie); |
EndUpdate (theWindow); |
} /* DoUpdate */ |
Introduced in QuickTime 3 or earlier.
Movies.h
Undocumented
ComponentResult VideoMediaGetCodecParameter ( MediaHandler mh, CodecType cType, OSType parameterID, Handle outParameterData );
A reference to a video media handler. You obtain this reference from GetMediaHandler
.
A valid codec type constant; see Codec Identifiers
.
Undocumented
A handle to the returned data.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Undocumented
ComponentResult VideoMediaGetStallCount ( MediaHandler mh, unsigned long *stalls );
A reference to a video media handler. You obtain this reference from GetMediaHandler
.
The number of stalls.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 3 or earlier.
Movies.h
Returns the play-back frame rate of a movie.
ComponentResult VideoMediaGetStatistics ( MediaHandler mh );
A reference to a video media handler. You obtain this reference from GetMediaHandler
.
The average frame rate since the last time VideoMediaResetStatistics
was called. Because of sampling errors, the values returned from this function are accurate only after waiting at least one second after calling VideoMediaResetStatistics
.
This function can only be used on video or MPEG media handlers. Because not all QuickTime movies have a constant frame rate, the results of this call can be difficult to interpret correctly. For this reason, the results of this function should not be displayed in a place where a novice user is likely to see it.
Introduced in QuickTime 3 or earlier.
Movies.h
Resets the video media handler's counters before using VideoMediaGetStatistics to determine the frame rate of a movie.
ComponentResult VideoMediaResetStatistics ( MediaHandler mh );
A reference to a video media handler. You obtain this reference from GetMediaHandler
.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
This call can only be used on video or MPEG media handlers.
Introduced in QuickTime 3 or earlier.
Movies.h
Undocumented
ComponentResult VideoMediaSetCodecParameter ( MediaHandler mh, CodecType cType, OSType parameterID, long parameterChangeSeed, void *dataPtr, long dataSize );
A reference to a video media handler. You obtain this reference from GetMediaHandler
.
A valid codec type constant; see Codec Identifiers
.
Undocumented
Undocumented
A pointer to the data to be set.
The size of the data.
You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
, as well as in the function result. See Error Codes
.
Introduced in QuickTime 4.
Movies.h
Represents a type used by the Movie Manager API.
typedef ControlRecord * ControlPtr;
Controls.h
Represents a type used by the Movie Manager API.
typedef ControlPtr * ControlRef;
HIObject.h
Represents a type used by the Movie Manager API.
typedef Float32 QTFloatSingle;
Movies.h
Stores a movie property for NewMovieFromProperties.
struct QTNewMoviePropertyElement { QTPropertyClass propClass; QTPropertyID propID; ByteCount propValueSize; QTPropertyValuePtr propValueAddress; OSStatus propStatus; };
propClass
A four-character code designating the class of a movie property. See New Movie Property Codes
.
propID
The ID of the property.
propValueSize
The size in bytes of the property passed in propValueAddress
.
propValueAddress
A pointer to a movie property. Since the data
type is fixed for each element's property class and ID, these is no ambiguity about the data
type for its property value.
propStatus
Indicates any problems with the property. For example, if a property is not understood by the function it is passed to, this field is set appropriately. See the discussion in NewMovieFromProperties
.
When you call NewMovieFromProperties
, you allocate and own arrays of these elements to pass to it, as well as the property values that each element points to. You are responsible for disposing of all of these memory allocations.
NewMovieFromProperties
Movies.h
Represents a type used by the Movie Manager API.
typedef QTRuntimeSpriteDescStruct * QTRuntimeSpriteDescPtr;
Movies.h
Provides a sprite description for the SpriteMediaNewSprite function.
QTRuntimeSpriteDescStruct { long version; QTAtomID spriteID; short imageIndex; MatrixRecord matrix; short visible; short layer; ModifierTrackGraphicsModeRecord graphicsMode; QTAtomID actionHandlingSpriteID; };
version
Set to 0.
spriteID
The QT atom ID of the sprite atom.
imageIndex
The index of the sprite image. This value must be between 1 and the number of available images. You can determine how many images are available by calling SpriteMediaCountImages
.
matrix
A MatrixRecord
structure that defines the sprite's matrix.
visible
Undocumented
layer
The sprite's layer number.
graphicsMode
A ModifierTrackGraphicsModeRecord
structure that defines the graphics mode setting for the sprite.
actionHandlingSpriteID
Undocumented
Movies.h
Represents a type used by the Movie Manager API.
typedef SInt16 RegionCode;
MacTypes.h
Represents a type used by the Movie Manager API.
typedef unsigned char Style;
MacTypes.h
Represents a type used by the Movie Manager API.
typedef TEPtr * TEHandle;
TextEdit.h
Represents a type used by the Movie Manager API.
typedef TERec * TEPtr;
TextEdit.h
Represents a type used by the Movie Manager API.
typedef TextDescriptionPtr * TextDescriptionHandle;
Movies.h
Represents a type used by the Movie Manager API.
typedef TextDescription * TextDescriptionPtr;
Movies.h
Represents a type used by the Movie Manager API.
typedef unsigned long TimeBaseStatus;
Movies.h
Constants passed to TextMediaFindNextText.
enum { findTextEdgeOK = 1 << 0, /* Okay to find text at specified sample time*/ findTextCaseSensitive = 1 << 1, /* Case sensitive search*/ findTextReverseSearch = 1 << 2, /* Search from sampleTime backwards*/ findTextWrapAround = 1 << 3, /* Wrap search when beginning or end of movie is hit*/ findTextUseOffset = 1 << 4 /* Begin search at the given character offset into sample rather than edge*/ };
Movies.h
Constants passed to QTTextToNativeText.
enum { kITextAtomType = 'itxt', kITextStringAtomType = 'text' };
Movies.h
Constants passed to ITextRemoveString.
enum { kITextRemoveEverythingBut = 0 << 1, kITextRemoveLeaveSuggestedAlternate = 1 << 1 };
Movies.h
Constants passed to CreateMovieControl.
enum { kMovieControlOptionHideController = (1L << 0), kMovieControlOptionLocateTopLeft = (1L << 1), kMovieControlOptionEnableEditing = (1L << 2), kMovieControlOptionHandleEditingHI = (1L << 3), kMovieControlOptionSetKeysEnabled = (1L << 4), kMovieControlOptionManuallyIdled = (1L << 5) };
Movies.h
Constants passed to MovieMediaGetCurrentMovieProperty.
enum { kMoviePropertyDuration = 'dura', /* TimeValue **/ kMoviePropertyTimeScale = 'tims', /* TimeValue **/ kMoviePropertyTime = 'timv', /* TimeValue **/ kMoviePropertyNaturalBounds = 'natb', /* Rect **/ kMoviePropertyMatrix = 'mtrx', /* Matrix **/ kMoviePropertyTrackList = 'tlst' /* long ****/ };
Movies.h
Constants passed to EnterMoviesOnThread.
enum { kQTEnterMoviesFlagDontSetComponentsThreadMode = 1L << 0 };
Movies.h
Constants grouped with loopTimeBase.
enum { loopTimeBase = 1, palindromeLoopTimeBase = 2, maintainTimeBaseZero = 4 };
Movies.h
Constants passed to SetMovieDrawingCompleteProc.
enum { movieDrawingCallWhenChanged = 0, movieDrawingCallAlways = 1 };
Movies.h
Constants grouped with timeBaseAfterStopTime.
enum { timeBaseBeforeStartTime = 1, timeBaseAfterStopTime = 2, timeBaseRateChanging = 4 };
Movies.h
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-12-14)