| Framework | Frameworks/QuickTime.framework |
| Declared in | MediaHandlers.h Sound.h |
QuickTime media handler components interpret and manipulate media types, such as sound, video, music, text, timecodes, and tweens.
MediaCompare
MediaGetMediaInfo
MediaGetName
MediaGetNextStepTime
MediaGetOffscreenBufferSize
MediaGetSampleDataPointer
MediaGetVideoParam
MediaGSetActiveSegment
MediaHasCharacteristic
MediaInvalidateRegion
MediaPreroll
MediaPutMediaInfo
MediaReleaseSampleDataPointer
MediaSampleDescriptionChanged
MediaSetActive
MediaSetHints
MediaSetMediaTimeScale
MediaSetMovieTimeScale
MediaSetNonPrimarySourceData
MediaSetRate
MediaSetTrackInputMapReference
MediaSetVideoParam
MediaTrackEdited
MediaTrackPropertyAtomChanged
MediaTrackReferencesChanged
MediaGetDrawingRgn
MediaGetNextBoundsChange
MediaGetSrcRgn
MediaGetTrackOpaque
MediaSetClip
MediaSetDimensions
MediaSetGWorld
MediaSetMatrix
MediaEmptyAllPurgeableChunks
MediaGetChunkManagementFlags
MediaGetPurgeableChunkMemoryAllowance
MediaSetChunkManagementFlags
MediaSetPurgeableChunkMemoryAllowance
CallComponentExecuteWiredAction
DisposePrePrerollCompleteUPP
MediaChangedNonPrimarySource
MediaCurrentMediaQueuedData
MediaDisposeTargetRefCon
MediaDoIdleActions
MediaEmptySampleCache
MediaEnterEmptyEdit
MediaFlushNonPrimarySourceData
MediaForceUpdate
MediaGetActionsForQTEvent
MediaGetClock
MediaGetEffectiveSoundBalance
MediaGetEffectiveVolume
MediaGetErrorString
MediaGetInvalidRegion
MediaGetMediaLoadState
MediaGetPublicInfo
MediaGetSoundBassAndTreble
MediaGetSoundEqualizerBandLevels
MediaGetSoundEqualizerBands
MediaGetSoundLevelMeterInfo
MediaGetSoundLevelMeteringEnabled
MediaGetSoundOutputComponent
MediaGetURLLink
MediaGetUserPreferredCodecs
MediaGSetVolume
MediaHitTestForTargetRefCon
MediaHitTestTargetRefCon
MediaMakeMediaTimeTable
MediaMCIsPlayerEvent
MediaPrePrerollBegin
MediaPrePrerollCancel
MediaQueueNonPrimarySourceData
MediaResolveTargetRefCon
MediaSampleDescriptionB2N
MediaSampleDescriptionN2B
MediaSetActionsCallback
MediaSetDoMCActionCallback
MediaSetHandlerCapabilities
MediaSetPublicInfo
MediaSetScreenLock
MediaSetSoundBassAndTreble
MediaSetSoundEqualizerBands
MediaSetSoundLevelMeteringEnabled
MediaSetSoundLocalizationData
MediaSetSoundOutputComponent
MediaSetUserPreferredCodecs
MediaTargetRefConsEqual
MediaTimeBaseChanged
MediaVideoOutputChanged
NewPrePrerollCompleteUPP
Undocumented
ComponentResult CallComponentExecuteWiredAction ( ComponentInstance ci, QTAtomContainer actionContainer, QTAtom actionAtom, QTCustomActionTargetPtr target, QTEventRecordPtr event );
A component instance. Your software obtains this reference from OpenComponent or OpenDefaultComponent.
A QT atom container that contains the action atom.
The action atom for this wired action.
A pointer to a QTCustomActionTargetRecord structure.
A pointer to a QTEventRecord structure.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hDisposes of a PrePrerollCompleteUPP pointer.
void DisposePrePrerollCompleteUPP ( PrePrerollCompleteUPP userUPP );
A PrePrerollCompleteUPP pointer. See Universal Procedure Pointers.
You can access this function's error returns through GetMoviesError and GetMoviesStickyError.
Introduced in QuickTime 4.1.
MediaHandlers.hInforms a media handler of a change in the source of media data from another media handler.
ComponentResult MediaChangedNonPrimarySource ( MediaHandler mh, long inputIndex );
A reference to a media handler. You can obtain this reference from GetMediaHandler.
The ID of the entry in the media's input map to which the changed data corresponds.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hLets a media handler determine whether the Movie Toolbox should allow one track to be pasted into another.
ComponentResult MediaCompare ( MediaHandler mh, Boolean *isOK, Media srcMedia, ComponentInstance srcMediaComponent );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to a Boolean value. Your media handler must set this value to TRUE if the source media and the media associated with the media handler have equivalent media settings, so that pasting the two together would cause no media information loss.
The source media for this operation.
The source media component for this operation.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hRetrieves the timing of the current media in queued data.
ComponentResult MediaCurrentMediaQueuedData ( MediaHandler mh, long *milliSecs );
A media handler. You can obtain this reference from GetMediaHandler.
A pointer to the number of milliseconds to the current data.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hDisposes any resources allocated as part of calling MediaHitTestForTargetRefCon.
ComponentResult MediaDisposeTargetRefCon ( MediaHandler mh, long targetRefCon );
A media handler. You can obtain this reference from GetMediaHandler.
A reference constant set by the media handler in a call to MediaHitTestForTargetRefCon.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hForces a media handler to perform its idle-time actions.
ComponentResult MediaDoIdleActions ( MediaHandler mh );
A media handler. You can obtain this reference from GetMediaHandler.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hForce QuickTime to empty all purgeable media chunks in this application.
ComponentResult MediaEmptyAllPurgeableChunks ( MediaHandler mh );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 6. Can be used only with Mac OS X 10.1 and later.
MediaHandlers.hDeletes any sample data that the media handler has cached.
ComponentResult MediaEmptySampleCache ( MediaHandler mh, long sampleNum, long sampleCount );
A media handler. You can obtain this reference from GetMediaHandler.
The ID of the first sample to delete.
The number of samples to delete. Passing -1 means delete sampleNum and all samples after it.
See Error Codes. Returns noErr if there is no error.
This is an optional media handler function. Most developers will not need to call it.
Introduced in QuickTime 5.
MediaHandlers.hUndocumented
ComponentResult MediaEnterEmptyEdit ( MediaHandler mh );
A media handler. You can obtain this reference from GetMediaHandler.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hFlushes data that a media handler gets from another media handler.
ComponentResult MediaFlushNonPrimarySourceData ( MediaHandler mh, long inputIndex );
A media handler. You can obtain this reference from GetMediaHandler.
The ID of the entry in the media's input map to which the flushed data corresponds.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hForces a media update.
ComponentResult MediaForceUpdate ( MediaHandler mh, long forceUpdateFlags );
A media handler. You can obtain this reference from GetMediaHandler.
Flags (see below) that define the update to be forced. See these constants:
forceUpdateRedraw
forceUpdateNewBuffer
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hReturns an event handler for your media handler.
ComponentResult MediaGetActionsForQTEvent ( MediaHandler mh, QTEventRecordPtr event, long targetRefCon, QTAtomContainer *container, QTAtom *atom );
A media handler. You can obtain this reference from GetMediaHandler.
A pointer to a QTEventRecord structure.
A reference constant set by the media handler in MediaHitTestForTargetRefCon.
An atom container that you can pass back to the standard controller used for implementing sprite actions.
An atom you can pass back to the standard controller used for implementing sprite actions.
See Error Codes. Returns qtEventWasHandledErr if the event was handled by the media handler. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hReturns the current settings of the media chunk management flags.
ComponentResult MediaGetChunkManagementFlags ( MediaHandler mh, UInt32 *flags );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to the constants (see below) that were set by a previous call to MediaSetChunkManagementFlags. See these constants:
kEmptyPurgableChunksOverAllowance
See Error Codes. Returns noErr if there is no error.
Do not call this function under QuickTime 5. It could cause a crash.
Introduced in QuickTime 6. Can be used only with Mac OS X 10.1 and later.
MediaHandlers.hGets the clock component associated with a media.
ComponentResult MediaGetClock ( MediaHandler mh, ComponentInstance *clock );
A media handler. You can obtain this reference from GetMediaHandler.
A pointer to a clock component.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hSpecifies a portion of the screen that must be redrawn, defined in the movie's display coordinate system.
ComponentResult MediaGetDrawingRgn ( MediaHandler mh, RgnHandle *partialRgn );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to a handle to a MacRegion structure that defines the screen region to be redrawn, using the movie's display coordinate system. Note that your component is responsible for disposing of this region once drawing is complete. Since the base media handler will use this region during redrawing, it is best to dispose of it when your component is closed.
See Error Codes. Returns noErr if there is no error.
The Movie Toolbox calls this function in order to determine what part of the screen needs to be redrawn. By default, theMovie Toolbox redraws the entire region that belongs to your component. If your component determines that only a portion of the screen has changed, and has indicated this to the toolbox by setting the mPartialDraw flag to 1 in the flagsOut parameter of the MediaIdle function, the toolbox calls your component's MediaGetDrawingRgn function. Your component returns a region that defines the changed portion of the track's display region.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hGets the effective sound balance setting of a media handler.
ComponentResult MediaGetEffectiveSoundBalance ( MediaHandler mh, short *balance );
A media handler. You can obtain this reference from GetMediaHandler.
A pointer to an integer. The Movie Toolbox returns the current balance setting of the media handler as a 16-bit, fixed-point value. The high-order 8 bits contain the integer part of the value; the low-order 8 bits contain the fractional part. Valid balance values range from -1.0 to 1.0. Negative values emphasize the left sound channel, and positive values emphasize the right sound channel; a value of 0 specifies neutral balance.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hGets the effective volume setting for a media handler.
ComponentResult MediaGetEffectiveVolume ( MediaHandler mh, short *volume );
A media handler. You can obtain this reference from GetMediaHandler.
The media's current volume setting. This value is represented as a 16-bit, fixed-point number. The high-order 8 bits contain the integer portion; 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.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hUndocumented
ComponentResult MediaGetErrorString ( MediaHandler mh, ComponentResult theError, Str255 errorString );
A media handler. You can obtain this reference from GetMediaHandler.
An error identifier; see Error Codes.
A text string that describes the error.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hObtains the graphics mode and blend color values currently in use by any media handler.
ComponentResult MediaGetGraphicsMode ( MediaHandler mh, long *mode, RGBColor *opColor );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to a long integer. The media handler returns the graphics mode currently in use by the media handler; see Graphics Transfer Modes.
A pointer to an RGBColor structure. The Movie Toolbox returns the color currently in use by the media handler. This is the blend value for blends and the transparent color for transparent operations. The toolbox supplies this value to QuickDraw when you draw in addPin, subPin, blend, transparent, or graphicsModeStraightAlphaBlend mode.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hGets the invalid region for a media handler's current display.
ComponentResult MediaGetInvalidRegion ( MediaHandler mh, RgnHandle rgn );
A media handler. You can obtain this reference from GetMediaHandler.
A handle to a MacRegion structure that defines an invalid region.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hLets a derived media handler obtain the private data stored in its media.
ComponentResult MediaGetMediaInfo ( MediaHandler mh, Handle h );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A handle to storage containing your media handler's proprietary information. Your media handler creates this private data when the Movie Toolbox calls your MediaPutMediaInfo function. Do not dispose of this handle; it is owned by the Movie Toolbox.
See Error Codes. Returns noErr if there is no error.
Your derived media handler should support this function if you store private data in your media.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hQueried by GetMovieLoadState to help determine a movie's load state.
ComponentResult MediaGetMediaLoadState ( MediaHandler mh, long *mediaLoadState );
A media handler. You can obtain this reference from GetMediaHandler.
Undocumented
See Error Codes. Returns noErr if there is no error.
GetMovieLoadState queries any idling importers associated with a movie, checks if the movie is fast starting, and queries media handlers. The minimum load state of all of these is then considered to be the load state of the movie.
Introduced in QuickTime 4.1.
MediaHandlers.hReturns the name of the media type.
ComponentResult MediaGetName ( MediaHandler mh, Str255 name, long requestedLanguage, long *actualLanguage );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The name of the media type; for example, the video media handler returns the string 'video'.
The language in which you want the name returned; see Localization Codes.
A pointer to the actual language in which the name is returned; see Localization Codes
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hDetermines when a media causes a spatial change to a movie.
ComponentResult MediaGetNextBoundsChange ( MediaHandler mh, TimeValue *when );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to a movie time value, which your media handler must set. Be sure to use the movie's time base. Use the current effective rate to determine the direction your media is playing. Set this value to -1 if there are no more changes in the specified direction.
See Error Codes. Returns noErr if there is no error.
Your derived media handler should support this function if you change the shape of your media's spatial representation during playback. The Movie Toolbox calls this function only if you have set the handlerHasSpatial flag to 1 in the flags parameter of MediaSetHandlerCapabilities.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hSearches for the next forward or backward step time from the given media time.
ComponentResult MediaGetNextStepTime ( MediaHandler mh, short flags, TimeValue mediaTimeIn, TimeValue *mediaTimeOut, Fixed rate );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
Flags (see below) that specify search parameters. See these constants:
nextTimeStep
A time value that establishes the starting point for the search. This time value is in the media's time scale.
The step time (the time of the next frame) calculated by the media handler. The media handler should return the first time value it finds that meets the search criteria specified in the flags parameter. This time value is in the media's time scale.
The search direction. Negative values search backward from the starting point specified in the mediaTimeIn parameter. Other values cause a forward search.
See Error Codes. Returns noErr if there is no error.
This function allows a derived media handler to return the next step time from the specified media time. The mechanism in QuickTime used for stepping backwards and forwards a frame at a time are the interesting time calls: GetMovieNextInterestingTime, GetTrackNextInterestingTime, and GetMediaNextInterestingTime.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hDetermines the dimensions of the offscreen buffer.
ComponentResult MediaGetOffscreenBufferSize ( MediaHandler mh, Rect *bounds, short depth, CTabHandle ctab );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A Rect structure that defines the boundaries of your offscreen buffer.
The depth of the offscreen.
A handle to the ColorTable structure associated with the offscreen buffer.
See Error Codes. Returns noErr if there is no error.
Before the base media handler allocates an offscreen buffer for your derived media handler, it calls this function. The depth and color table used for the buffer are also passed. When this function is called, the bounds parameter specifies the size that the base media handler intends to use for your offscreen buffer. You can modify this as appropriate before returning. This capability is useful if your media handler can draw only at particular sizes. It is also useful for implementing antialiased drawing; you can request a buffer that is larger than your destination area and have the base media handler scale the image down for you.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hUndocumented
ComponentResult MediaGetPublicInfo ( MediaHandler mh, OSType infoSelector, void *infoDataPtr, Size *ioDataSize );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
Undocumented
Undocumented
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 5.
MediaHandlers.hReturns the current purgeable chunk memory allowance.
ComponentResult MediaGetPurgeableChunkMemoryAllowance ( MediaHandler mh, Size *allowance );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to the allowance in bytes.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 6. Can be used only with Mac OS X 10.1 and later.
MediaHandlers.hAllows a derived media handler to obtain a pointer to the sample data for a particular sample number, the size of that sample, and the index of the sample description associated with that sample.
ComponentResult MediaGetSampleDataPointer ( MediaHandler mh, long sampleNum, Ptr *dataPtr, long *dataSize, long *sampleDescIndex );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The number of the sample that is to be loaded.
A pointer to a pointer to receive the address of the loaded sample data.
A pointer to a field that is to receive the size, in bytes, of the sample.
A pointer to a long integer. This function returns an index value to the sample description that corresponds to the returned sample data. If you do not want this information, set the parameter to NIL.
See Error Codes. Returns noErr if there is no error.
This function returns a pointer to the data for a particular sample number from a movie data file. It provides access to the base media handler's caching services for sample data. It is a service provided by the base media handler for its clients.
Each call to this function must be balanced by a call to MediaReleaseSampleDataPointer or the memory will not be released. This function generally provides better overall performance than GetMediaSample.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hObtains the right/left sound balance of a track.
ComponentResult MediaGetSoundBalance ( MediaHandler mh, short *balance );
A media handler. You can obtain this reference from GetMediaHandler.
On return, a pointer to the balance setting for the media handler's track. The balance setting is a signed 16-bit integer that controls the relative volume of the left and right sound channels. A value of 0 sets the balance to neutral. Positive values shift the balance to the right channel, negative values to the left channel. The valid range is 127 (right channel only) to -128 (left channel only).
See Error Codes. Returns noErr if there is no error.
Use this function to get the audio balance on a per-track basis. It works with both mono and stereo sources. The actual volume of the audio is not changed by this setting, only its relative distribution. This function operates on sound tracks, music tracks, and Flash tracks containing audio. It may operate on other audio track types as well; if the the chosen media handler does not support this function, it returns badComponentSelector. To obtain the media handler for a track, call GetTrackMedia and then GetMediaHandler.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hGets the bass and treble settings for a media handler.
ComponentResult MediaGetSoundBassAndTreble ( MediaHandler mh, short *bass, short *treble );
A media handler. You can obtain this reference from GetMediaHandler.
Undocumented
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hGets the sound equalizer band levels for a media handler.
ComponentResult MediaGetSoundEqualizerBandLevels ( MediaHandler mh, UInt8 *bandLevels );
A media handler. You can obtain this reference from GetMediaHandler.
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hGets the sound equalizer settings for a media handler.
ComponentResult MediaGetSoundEqualizerBands ( MediaHandler mh, MediaEQSpectrumBandsRecordPtr spectrumInfo );
A media handler. You can obtain this reference from GetMediaHandler.
A pointer to a MediaEQSpectrumBandsRecord structure.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hGets the right and left sound level meter values for a media handler.
ComponentResult MediaGetSoundLevelMeterInfo ( MediaHandler mh, LevelMeterInfoPtr levelInfo );
A media handler. You can obtain this reference from GetMediaHandler.
A pointer to a LevelMeterInfo structure.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hDetermines if a media handler's sound level metering capability is enabled.
ComponentResult MediaGetSoundLevelMeteringEnabled ( MediaHandler mh, Boolean *enabled );
A media handler. You can obtain this reference from GetMediaHandler.
A pointer to a Boolean; it is TRUE if sound level metering is enabled, FALSE otherwise.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hGets the sound output component associated with a media handler.
ComponentResult MediaGetSoundOutputComponent ( MediaHandler mh, Component *outputComponent );
A media handler. You can obtain this reference from GetMediaHandler.
An instance of a sound output component.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hSpecifies an irregular destination display region to the Movie Toolbox.
ComponentResult MediaGetSrcRgn ( MediaHandler mh, RgnHandle rgn, TimeValue atMediaTime );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A handle to a MacRegion structure. When the Movie Toolbox calls your function, this region is initialized to the track's boundary rectangle, which is defined by the width and height fields in the GetMovieCompleteParams structure that you obtain when the Movie Toolbox calls your MediaInitialize function. Your media handler may then alter this region as appropriate, so that it corresponds to the boundaries of your media's display image. Note that this region is in the track's coordinate system, not the movie's. Do not dispose of this region; it is owned by the Movie Toolbox.
The time value at which the Movie Toolbox wants to know what the source region is.
See Error Codes. Returns noErr if there is no error.
Your derived media handler should support this function if your media does not completely fill the track rectangle during playback. The Movie Toolbox calls this function only if you have set the handlerHasSpatial flag to 1 in the flags parameter of the MediaSetHandlerCapabilities function.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hDetermines whether a media is transparent or opaque when displayed.
ComponentResult MediaGetTrackOpaque ( MediaHandler mh, Boolean *trackIsOpaque );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to a Boolean value. Your media handler must set this value to TRUE if your media is semitransparent (that is, you draw in blend mode); otherwise, leave the flag unchanged.
See Error Codes. Returns noErr if there is no error.
Your derived media handler should support this function if your media is semitransparent when displayed or if you handle display transfer modes. The Movie Toolbox calls this function only if you have set the handlerHasSpatial or handlerCanTransferMode flag to 1 in the flags parameter of the MediaSetHandlerCapabilities function.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hUndocumented
ComponentResult MediaGetURLLink ( MediaHandler mh, Point displayWhere, Handle *urlLink );
A media handler. You can obtain this reference from GetMediaHandler.
Undocumented
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hRetrieves the list of components last passed to the media handler by a call to MediaSetUserPreferredCodecs.
ComponentResult MediaGetUserPreferredCodecs ( MediaHandler mh, CodecComponentHandle *userPreferredCodecs );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to a handle containing component identifiers. If the media handler currently has a preferred component list, it will copy that list into a new handle and store the new handle in this variable. If the media handler does not currently have a preferred component list, it will store NIL in this variable. The caller must dispose of this handle.
See Error Codes. Returns badComponentSelector if the media handler component does not support this call. Returns noErr if there is no error.
Introduced in QuickTime 5.
MediaHandlers.hRetrieves the value of the brightness, contrast, hue, sharpness, saturation, black level, or white level of a video image.
ComponentResult MediaGetVideoParam ( MediaHandler mh, long whichParam, unsigned short *value );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A constant (see below) that specifies the video parameter whose value you want to retrieve. See these constants:
kMediaVideoParamBrightness
kMediaVideoParamContrast
kMediaVideoParamHue
kMediaVideoParamSharpness
kMediaVideoParamSaturation
kMediaVideoParamBlackLevel
kMediaVideoParamWhiteLevel
The actual value of the requested video parameter. The meaning of the values vary depending on the implementation.
See Error Codes. Returns noErr if there is no error.
This function and MediaSetVideoParam are currently used by the MPEG media handler.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hRetrieves an Idle Manager object from a derived media handler.
ComponentResult MediaGGetIdleManager ( MediaHandler mh, IdleManager *pim );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to a pointer to an opaque data structure that belongs to the Mac OS Idle Manager. You can get the pointer this parameter points to by calling QTIdleManagerOpen.
See Error Codes. Returns noErr if there is no error.
This routine must be implemented by a derived media handler if the handler needs to report its idling requirements.
Introduced in QuickTime 6.
MediaHandlers.hReports error conditions to the Movie Toolbox.
ComponentResult MediaGGetStatus ( MediaHandler mh, ComponentResult *statusErr );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to a component result field. If you have error information that you would like to report to the Movie Toolbox, place an appropriate result code into the field referred to by this pointer. See Error Codes.
See Error Codes. Returns noErr if there is no error.
Your derived media handler should support this function if you anticipate that you may encounter an error when playing your media. Because these errors may include such conditions as low memory or missing hardware, you should only rarely create a derived media handler that does not support this function. If your media handler does not support this function, the base media handler always sets the returned result code to noErr.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hInforms your derived media handlers of the current active segment.
ComponentResult MediaGSetActiveSegment ( MediaHandler mh, TimeValue activeStart, TimeValue activeDuration );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The starting time of the active segment to play. This time value is expressed in your movie's time scale.
A time value that specifies the duration of the active segment. This value is expressed in the movie's time scale.
See Error Codes. Returns noErr if there is no error.
Using SetMovieActiveSegment, an application can limit the time segment of the movie that will be used for play back. Derived media handlers are given the values for the active segment when this function is called by the Movie Toolbox. Active segment information is usually only needed by media handlers that perform their own scheduling.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hLets a derived media handler report its idling needs.
ComponentResult MediaGSetIdleManager ( MediaHandler mh, IdleManager im );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to an opaque data structure that belongs to the Mac OS Idle Manager. You get this pointer by calling QTIdleManagerOpen.
See Error Codes. Returns noErr if there is no error.
This routine must be implemented by a derived media handler if the handler needs to retrieve and report its idling requirements.
Introduced in QuickTime 6.
MediaHandlers.hSpecifies changes to the sound volume setting.
ComponentResult MediaGSetVolume ( MediaHandler mh, short volume );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The media's current volume setting. This value is represented as a 16-bit, fixed-point number. The high-order 8 bits contain the integer portion; 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. The Movie Toolbox scales your media's volume in light of the track's and movie's volume settings, but it does not take into account the system speaker volume setting. This value is appropriate for use with the Sound Manager.
See Error Codes. Returns noErr if there is no error.
Your derived media handler should support this function if it can play sounds.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hCalled by Movie Toolbox with a specified characteristic to allow tracks to be identified by various attributes.
ComponentResult MediaHasCharacteristic ( MediaHandler mh, OSType characteristic, Boolean *hasIt );
The Movie Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A constant that specifies the attribute of a track. Examples of characteristics that are currently defined are the constants VisualMediaCharacteristic and AudioMediaCharacteristic.
A pointer to a Boolean value that specifies whether the track has the attribute specified in the characteristic parameter. Set this value to TRUE if the attribute applies to your media handler; otherwise, set this value to FALSE.
See Error Codes. Returns noErr if there is no error.
You should implement this function for any media handler that has characteristics in addition to spatial ones. If you have set the handlerHasSpatial capabilities flag, the base media handler automatically handles the VisualMediaCharacteristic constant for you.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hLocates an object for hit testing.
ComponentResult MediaHitTestForTargetRefCon ( MediaHandler mh, long flags, Point loc, long *targetRefCon );
A media handler. You can obtain this reference from GetMediaHandler.
Flags (see below) that define the hit. The mHitTestImage and mHitTestInvisible flags are set by the Standard Controller before this call is made. See these constants:
mHitTestBounds
mHitTestImage
mHitTestInvisible
mHitTestIsClick
The location of the mouse.
Returns a reference constant representing an object you're interested in. If this reference constant is not 0, your media handler will receive calls to MediaGetActionsForQTEvent.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hDetects if the mouse click and its release are in the same location and within the object.
ComponentResult MediaHitTestTargetRefCon ( MediaHandler mh, long targetRefCon, long flags, Point loc, Boolean *wasHit );
A media handler. You can obtain this reference from GetMediaHandler.
A reference constant set by the media handler in a call to MediaHitTestForTargetRefCon.
Flags (see below) that define the hit. See these constants:
mHitTestBounds
mHitTestImage
mHitTestInvisible
mHitTestIsClick
The location of the mouse.
A pointer to a Boolean; it is TRUE if there was a hit, FALSE otherwise.
See Error Codes. Returns noErr if there is no error.
This function is called after MediaGetActionsForQTEvent if a reference constant was set in MediaHitTestForTargetRefCon.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hProvides processing time to a derived media handler during movie playback.
ComponentResult MediaIdle ( MediaHandler mh, TimeValue atMediaTime, long flagsIn, long *flagsOut, const TimeRecord *movieTime );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The current time, in your media's time base. You can use this value to obtain the appropriate samples and sample descriptions from your media (using the Movie Toolbox's GetMediaSample function). Your media handler may then work with the sample data and descriptions as appropriate.
Contains flags (see below) that indicate what the Movie Toolbox wants your media handler to do. These flags are applicable only to media handlers that perform their own scheduling. The toolbox may use none, or it may set one or more flag to 1. Your handler should examine the flagsIn parameter each time the Movie Toolbox calls its MediaIdle function. The flags in this parameter indicate the actions that your handler may perform. In addition, when you return from your MediaIdle function, you should report what you did using the flagsOut parameter. You tell the base media handler that you perform your own scheduling by setting the handlerNoScheduler flag to 1 in the flags parameter of the MediaSetHandlerCapabilities function. See these constants:
mMustDraw
mAtEnd
mPartialDraw
mPreflightDraw
Flags (see below) that are contained in a pointer to a long integer that your media handler uses to indicate to the Movie Toolbox what the handler did. You must always set the values of these flags appropriately. See these constants:
mDidDraw
mNeedsToDraw
A pointer to the movie time value corresponding to the atMediaTime parameter. Note that this may differ from the current value returned by GetMovieTime.
See Error Codes. Returns noErr if there is no error.
From time to time, your derived media handler component may determine that only a portion of the available drawing area needs to be redrawn. You can signal that condition to the base media handler component by setting the mPartialDraw flag to 1 in the flags your component returns to the Movie Toolbox from your MediaIdle function. You return these flags using the flagsOut parameter. Whenever you set this flag to 1, the Movie Toolbox calls your component's MediaGetDrawingRgn function in order to determine the portion of the image that needs to be redrawn.
As an example, consider a full-screen animation. Only rarely is the entire image in motion. Typically, only a small portion of the screen image moves. By using partial redrawing, you can significantly improve the playback performance of such a movie.
Your derived media handler should support this function if you need to do work during movie playback. If you set the handlerNoIdle flag to 1 in the flags parameter of MediaSetHandlerCapabilities, the Movie Toolbox does not call your MediaIdle function. If you encounter an error, save the result code. The Movie Toolbox polls you for status information using MediaGGetStatus.
If your media handler changes any of the settings of the movie's graphics port or graphics world, be sure to restore the original settings before you exit. In addition, note that you may be drawing into a black-and-white graphics port. Finally, be aware that the Movie Toolbox also uses this function to obtain data for QuickDraw pictures. Therefore, if your media handler does not use QuickDraw when drawing to the screen, be sure to examine the picSave field in the graphics port so that you can detect when the Movie Toolbox wants to save an image. Your media handler is then responsible for performing the appropriate display processing.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hPrepares a derived media handler component to provide access to its media.
ComponentResult MediaInitialize ( MediaHandler mh, GetMovieCompleteParams *gmc );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to a GetMovieCompleteParams structure. You can obtain information about the current media from this structure. You should copy any values you need to save into your derived media handler's local data area. Because this data structure is owned by the Movie Toolbox, you do not need to worry about disposing of any of the data in it.
See Error Codes. Returns noErr if there is no error. If you return an error, the Movie Toolbox disables the track that uses your media. In cases where your media has just been created, the Movie Toolbox immediately disposes of your media.
This function gives your media handler an opportunity to get ready to support the Movie Toolbox. As part of these preparations, your derived media handler should report its capabilities to the base media handler by calling MediaSetHandlerCapabilities. You may choose to examine the data in the GetMovieCompleteParams structure; you may also save values from this structure. If you save references to structures (such as the matte pixel map), do not dispose of the memory associated with these structures. The Movie Toolbox owns these structures.
Note that the Movie Toolbox may call other functions supported by your media handler before it calls your MediaInitialize function. In particular, it may call your MediaGetMediaInfo and MediaPutMediaInfo functions. However, before the Movie Toolbox tries to do anything with the data in your media, it will call your MediaInitialize function. The Movie Toolbox loads the movie's data using functions that are supported by the base media handler; your media handler does not have to support those functions.
All derived media handlers should support this function. In addition, if your media handler saves values from the GetMovieCompleteParams structure that may change, be sure to support the corresponding functions that allow the Movie Toolbox to report changes to your media handler. For example, if your handler saves the movie time scale from the movieScale field, you should also support the MediaSetMovieTimeScale function.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hUpdates the invalidated display region the next time MediaIdle is called.
ComponentResult MediaInvalidateRegion ( MediaHandler mh, RgnHandle invalRgn );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A handle to a region that has been invalidated. Your media handler should not dispose or modify this region. The invalRgn parameter is never NIL.
See Error Codes. Returns noErr if there is no error.
This function is called by the Movie Toolbox when UpdateMovie or InvalidateMovieRegion is called with a region that intersects your media's track. Derived media handlers need to implement MediaInvalidateRegion only if they can perform efficient updates on a portion of their display area.
If a media handler implements this function, it is responsible for ensuring that the appropriate areas of the screen are updated on the next call to MediaIdle. If a media handler does not implement this function, the base media handler sets the mMustDraw flag the next time MediaIdle is called.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hCalled by the base media handler to create a media time table.
ComponentResult MediaMakeMediaTimeTable ( MediaHandler mh, long **offsets, TimeValue startTime, TimeValue endTime, TimeValue timeIncrement, short firstDataRefIndex, short lastDataRefIndex, long *retDataRefSkew );
The media handler to create the time table. You can obtain this reference from GetMediaHandler.
A handle to an unlocked relocatable memory block that is allocated by an application or other software when it calls QTMovieNeedsTimeTable, GetMaxLoadedTimeInMovie, MakeTrackTimeTable, or MakeMediaTimeTable. Your derived media handler returns the time table for the media in this block. Your media handler has to resize the handle.
The first point of the media to be included in the time table. This time value is expressed in the media's time coordinate system.
The last point of the media to be included in the time table. This time value is expressed in the media's time coordinate system.
The resolution of the time table. The values in a time table are for a points in the media, and these points are separated by the amount of time specified by this parameter. The time value is expressed in the media's time coordinate system.
The first in the range of data reference indexes you are querying.
The last in the range of data reference indexes you are querying.
A pointer to the number of entries, i.e., the number of entries in the offset table per data reference.
See Error Codes. Returns noErr if there is no error.
The Movie Toolbox calls your derived media handler's MediaMakeMediaTimeTable function whenever an application or other software calls the Toolbox's QTMovieNeedsTimeTable, GetMaxLoadedTimeInMovie, MakeTrackTimeTable, or MakeMediaTimeTable function. When an application or other software calls one of these functions, it allocates an unlocked relocatable memory block for the time table to be returned and passes a handle to it in the offsets parameter. Your derived media handler must resize the block to accommodate the time table it returns.
The time table your derived media handler returns is a two-dimensional array of long integers that is organized so that each row in the table contains values for one data reference. The first column in the table contains values for the time in the media specified by the startTime parameter, and each subsequent column contains values for the point in the media that is later by the value specified by the timeIncrement parameter. Each long integer value in the table specifies the offset, in bytes, from the beginning of the data reference for that point in the media.
The number of columns in the table returned by your derived media handler must be equal to (endTime - , rounded up. It must also return the offset to the next row of the time table, in long integers, in the startTime) / timeIncrementretdataRefSkew parameter. Because of alignment issues, this value is not always equal to (endTime - rounded up.startTime) / timeIncrement
Introduced in QuickTime 3 or earlier.
MediaHandlers.hUndocumented
ComponentResult MediaMCIsPlayerEvent ( MediaHandler mh, const EventRecord *e, Boolean *handledIt );
A media handler. You can obtain this reference from GetMediaHandler.
A pointer to an EventRecord structure.
A pointer to a Boolean; it is TRUE if the event was handled, FALSE otherwise.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.1.
MediaHandlers.hLocates the object for keyboard focus.
ComponentResult MediaNavigateTargetRefCon ( MediaHandler mh, long navigation, long *refCon );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
Flags (see below) that define the direction of navigation. These flags are set by the standard controller, which follows the user's interaction with the tab key, shift key, and mouse. See these constants:
kRefConNavigationNext
kRefConNavigationPrevious
Returns a reference constant representing an object you're interested in. If this reference constant is not 0, your media handler will receive calls to MediaRefConSetProperty and MediaRefConGetProperty.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 6.
MediaHandlers.hUndocumented
ComponentResult MediaPrePrerollBegin ( MediaHandler mh, TimeValue time, Fixed rate, PrePrerollCompleteUPP completeProc, void *refcon );
A media handler. You can obtain this reference from GetMediaHandler.
Undocumented
Undocumented
A PrePrerollCompleteProc callback.
A reference constant to be passed to your callback. Use this parameter to point to a data structure containing any information your function needs.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hCancels a media handler pre-preroll operation that was started by MediaPrePrerollBegin.
ComponentResult MediaPrePrerollCancel ( MediaHandler mh, void *refcon );
A media handler. You can obtain this reference from GetMediaHandler.
The reference constant that was passed to your PrePrerollCompleteProc callback.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hPrepares a media handler for playback.
ComponentResult MediaPreroll ( MediaHandler mh, TimeValue time, Fixed rate );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The starting time of the media segment to play. This time value is expressed in your movie's time scale.
The rate at which the Movie Toolbox expects to play the media. This is a 32-bit, fixed-point number. Positive values indicate forward rates; negative values correspond to reverse rates.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hLets a derived media handler store proprietary information in its media.
ComponentResult MediaPutMediaInfo ( MediaHandler mh, Handle h );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A handle to storage into which your media handler may place its proprietary information. You determine the format and content of the data that you store in this handle. Your media handler must resize the handle as appropriate before you exit this function. Do not dispose of this handle; it is owned by the Movie Toolbox. The Movie Toolbox uses the base media handler to write this data to your media.
See Error Codes. Returns noErr if there is no error.
Whenever the Movie Toolbox opens your media, it provides this private data to your media handler by calling your MediaGetMediaInfo function. Note that the Movie Toolbox may call this function before it calls your MediaInitialize function. Your derived media handler should support this function if you need to store private data in your media.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hUndocumented
ComponentResult MediaQueueNonPrimarySourceData ( MediaHandler mh, long inputIndex, long dataDescriptionSeed, Handle dataDescription, void *data, long dataSize, ICMCompletionProcRecordPtr asyncCompletionProc, const ICMFrameTimeRecord *frameTime, ICMConvertDataFormatUPP transferProc, void *refCon );
A media handler. You can obtain this reference from GetMediaHandler.
The ID of the entry in the media's input map to which the queued data corresponds.
Undocumented
Undocumented
Undocumented
Undocumented
A pointer to an ICMCompletionProcRecord structure.
A pointer to an ICMFrameTimeRecord structure.
Undocumented
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hReturns the current media handler state based on the property type.
ComponentResult MediaRefConGetProperty ( MediaHandler mh, long refCon, long propertyType, void *propertyValue );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The reference constant set by the media handler in MediaNavigateTargetRefCon.
The property type sent from the standard controller. Property type values are listed below. See these constants:
kRefConPropertyCanHaveFocus
kRefConPropertyHasFocus
A pointer to the value that was assigned. Its size is based on the property type.
See Error Codes. Returns noErr if there is no error.
This routine is called with the reference constant set in MediaNavigateTargetRefCon to get the current media handler state for a given property type.
Introduced in QuickTime 6.
MediaHandlers.hSets a new media handler state based on the property type.
ComponentResult MediaRefConSetProperty ( MediaHandler mh, long refCon, long propertyType, void *propertyValue );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The reference constant set by the media handler in MediaNavigateTargetRefCon.
The property type sent from the standard controller. Property type values are listed below. See these constants:
kRefConPropertyCanHaveFocus
kRefConPropertyHasFocus
A pointer to the value to assign. Its size is based on the property type.
See Error Codes. Returns noErr if there is no error.
This function is called with the reference constant that was set by MediaNavigateTargetRefCon to set a new media handler state for a given property type.
Introduced in QuickTime 6.
MediaHandlers.hBalances calls to MediaGetSampleDataPointer to release allocated memory.
ComponentResult MediaReleaseSampleDataPointer ( MediaHandler mh, long sampleNum );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The number of the sample that is to be released.
See Error Codes. Returns noErr if there is no error.
This function should be used only by derived media handlers.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hUndocumented
ComponentResult MediaResolveTargetRefCon ( MediaHandler mh, QTAtomContainer container, QTAtom atom, long *targetRefCon );
A media handler. You can obtain this reference from GetMediaHandler.
Undocumented
Undocumented
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hUndocumented
ComponentResult MediaSampleDescriptionB2N ( MediaHandler mh, SampleDescriptionHandle sampleDescriptionH );
A media handler. You can obtain this reference from GetMediaHandler.
A handle to a SampleDescription structure.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hInforms a media handler that SetMediaSampleDescription has been called for a specified sample description.
ComponentResult MediaSampleDescriptionChanged ( MediaHandler mh, long index );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The index of the sample description that has been changed.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hUndocumented
ComponentResult MediaSampleDescriptionN2B ( MediaHandler mh, SampleDescriptionHandle sampleDescriptionH );
A media handler. You can obtain this reference from GetMediaHandler.
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hSets an ActionsProc callback for a media handler.
ComponentResult MediaSetActionsCallback ( MediaHandler mh, ActionsUPP actionsCallbackProc, void *refcon );
A media handler. You can obtain this reference from GetMediaHandler.
A Universal Procedure Pointer to an ActionsProc 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 function needs.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hEnables and disables media.
ComponentResult MediaSetActive ( MediaHandler mh, Boolean enableMedia );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A Boolean value that indicates whether your media is enabled or disabled. If this parameter is set to TRUE, your media is enabled; if the parameter is FALSE, your media is disabled.
See Error Codes. Returns noErr if there is no error.
Your derived media handler should support this function if you perform your own scheduling or if your media handler uses significant amounts of temporary storage. If you are doing your own scheduling (that is, you have set the handlerNoScheduler flag to 1 in the flags parameter of the MediaSetHandlerCapabilities function), your media handler needs to keep account of the media's active state so that you can properly respond to Movie Toolbox requests. When your media is disabled, you may choose to dispose of temporary storage you have allocated, so that the storage is available to other programs.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hSets application-global flags that control media chunk management.
ComponentResult MediaSetChunkManagementFlags ( MediaHandler mh, UInt32 flags, UInt32 flagsMask );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
Constants (see below) that determine chunk management. See these constants:
kEmptyPurgableChunksOverAllowance
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 6. Can be used only with Mac OS X 10.1 and later.
MediaHandlers.hSpecifies changes to a derived media handler's clipping region.
ComponentResult MediaSetClip ( MediaHandler mh, RgnHandle theClip );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A handle to your media's clipping region. Your media handler is responsible for disposing of this region when you are done with it. Note that this region is defined in the movie's coordinate system.
See Error Codes. Returns noErr if there is no error.
Your derived media handler should support this function if you draw during playback. The Movie Toolbox calls this function only if you have set the handlerHasSpatial and handlerCanClip flags to 1 in the flags parameter of the MediaSetHandlerCapabilities function.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hInforms a media handler when its media's spatial dimensions change.
ComponentResult MediaSetDimensions ( MediaHandler mh, Fixed width, Fixed height );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The width, in pixels, of the track rectangle. This field, along with the height field, specifies a rectangle that surrounds the image that is displayed when the current media is played. This value corresponds to the x coordinate of the lower-right corner of the rectangle and is expressed as a fixed-point number.
The height, in pixels, of the track rectangle. This value corresponds to the y coordinate of the lower-right corner of the rectangle and is expressed as a fixed-point number.
See Error Codes. Returns noErr if there is no error.
You obtain the initial dimension information from the width and height fields of the GetMovieCompleteParams structure that the Movie Toolbox provides to your MediaInitialize function. Your derived media handler should support this function if you draw during playback.
The Movie Toolbox calls this function only if you have set the handlerHasSpatial flag to 1 in the flags parameter of the MediaSetHandlerCapabilities function.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hSets a DoMCActionProc callback for a media handler.
ComponentResult MediaSetDoMCActionCallback ( MediaHandler mh, DoMCActionUPP doMCActionCallbackProc, void *refcon );
A media handler. You can obtain this reference from GetMediaHandler.
A Universal Procedure Pointer to 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.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hSets the graphics mode and blend color of any media handler.
ComponentResult MediaSetGraphicsMode ( MediaHandler mh, long mode, const RGBColor *opColor );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The graphics mode of the media handler; see Graphics Transfer Modes.
A pointer to the color for use in blending and transparent operations. The media handler passes this color to QuickDraw as appropriate when you draw in addPin, subPin, blend, transparent, or graphicsModeStraightAlphaBlend mode.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hLets a derived media handler learn about changes to its media's graphic environment.
ComponentResult MediaSetGWorld ( MediaHandler mh, CGrafPtr aPort, GDHandle aGD );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to the new graphics port. Note that this may be either a color or a black-and-white port.
A handle to the new graphics device.
See Error Codes. Returns noErr if there is no error.
Your derived media handler should support this function if you perform specialized graphics processing or if you are using the Image Compression Manager to decompress your media. Note that when the Movie Toolbox calls your MediaIdle function, it supplies you with information about the current graphics environment. Consequently, you do not need to support the MediaSetGWorld function in order to draw during playback. However, if your media data is compressed and you are using the Image Compression Manager to decompress sequences, you may need to provide updated graphics environment information before playback.
You obtain the initial graphics environment information from the moviePort and movieGD fields of the GetMovieCompleteParams structure that the Movie Toolbox provides to your MediaInitialize function. The Movie Toolbox calls this function only if you have set the handlerHasSpatial flag to 1 in the flags parameter of the MediaSetHandlerCapabilities function.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hLets a derived media handler report its capabilities to the base media handler.
ComponentResult MediaSetHandlerCapabilities ( MediaHandler mh, long flags, long flagsMask );
A media handler. You can obtain this reference from GetMediaHandler.
Flags (see below) that specify the capabilities of your derived media handler. This parameter contains a number of flags, each of which corresponds to a particular feature. You may work with more than one flag at a time. Be sure to set unused flags to 0. See these constants:
handlerHasSpatial
handlerCanClip
handlerCanMatte
handlerCanTransferMode
handlerNeedsBuffer
handlerNoIdle
handlerNoScheduler
handlerWantsTime
handlerCGrafPortOnly
Indicates which flags in the flags parameter are to be considered in this operation. For each bit in the flags parameter that you want the base media handler to consider, you must set the corresponding bit in the flagsMask parameter to 1. Set unused flags to 0. This allows you to work with a single flag without altering the settings of other flags.
See Error Codes. Returns noErr if there is no error.
Your media handler may call this function at any time. In general, you should call it from your MediaInitialize function , so that you report your capabilities to the base media handler before the Movie Toolbox starts working with your media. You may call this function again later, in response to changing conditions. For example, if your media handler receives a matrix that it cannot accommodate from the MediaSetMatrix function, you can allow the base media handler to handle your drawing by calling this function and setting the handlerNeedsBuffer flag in both the flags parameter and the flagsMask parameter to 1.
Note that this function is provided by the base media handler; your media handler does not support this function.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hImplements the appropriate behavior for the various media hints such as scrub mode and high-quality mode.
ComponentResult MediaSetHints ( MediaHandler mh, long hints );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
All hint bits that currently apply to the given media.
See Error Codes. Returns noErr if there is no error.
When an application calls SetMoviePlayHints or SetMediaPlayHints, your media handler's MediaSetHints routine is called.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hTells a media handler about changes to either the movie matrix or the track matrix.
ComponentResult MediaSetMatrix ( MediaHandler mh, MatrixRecord *trackMovieMatrix );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A pointer to the matrix that transforms your media's pixels into the movie's coordinate system. The Movie Toolbox obtains this matrix by concatenating the track matrix and the movie matrix. You should use this matrix whenever you are displaying graphical data from your media.
See Error Codes. Returns noErr if there is no error.
You obtain the initial matrix from the trackMovieMatrix field of the GetMovieCompleteParams structure that the Movie Toolbox provides to your MediaInitialize function. Your derived media handler should support this function if you draw during playback.
The Movie Toolbox calls this function only if you have set the handlerHasSpatial flag to 1 in the flags parameter of the MediaSetHandlerCapabilities function.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hInforms a media handler that its media's time scale has been changed.
ComponentResult MediaSetMediaTimeScale ( MediaHandler mh, TimeScale newTimeScale );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
Specifies your media's new time scale.
See Error Codes. Returns noErr if there is no error.
You obtain the initial media time scale information from the mediaScale field of the GetMovieCompleteParams structure that the Movie Toolbox provides to your MediaInitialize function.
Your derived media handler should support this function if your media handler stores time information that pertains to its media.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hInforms a media handler that the movie's time scale has been changed.
ComponentResult MediaSetMovieTimeScale ( MediaHandler mh, TimeScale newTimeScale );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The movie's new time scale.
See Error Codes. Returns noErr if there is no error.
You obtain the initial movie time scale information from the movieScale field of the GetMovieCompleteParams structure that the Movie Toolbox provides to your MediaInitialize function.
Your derived media handler should support this function if your media handler stores time information in the movie's time coordinate system.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hAllows a media handler to support receiving media data from other media handlers.
ComponentResult MediaSetNonPrimarySourceData ( MediaHandler mh, long inputIndex, long dataDescriptionSeed, Handle dataDescription, void *data, long dataSize, ICMCompletionProcRecordPtr asyncCompletionProc, ICMConvertDataFormatUPP transferProc, void *refCon );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
This value is the ID of the entry in the media's input map to which the data provided by the call corresponds.
This value is changed each time the dataDescription has changed. This allows for a quick check by the media handler to see if the dataDescription has changed.
A handle to a data structure describing the input data.
A pointer to the input data. This pointer must contain a 32-bit address.
The size of the sample in bytes.
A pointer to a ICMCompletionProcRecord structure. If asyncCompletionProc is set to NIL, the data pointer will be valid only for the duration of this call. If asyncCompletionProc is not NIL, it contains an ICMCompletionProcRecord structure that must be called when your media handler is done with the provided data pointer.
A routine that allows the application to transform the type of the input data to the kind of data preferred by the codec. The client of the codec passes the source data in the form most convenient for it. If the codec needs the data in another form, it can negotiate with the caller or directly with the Image Compression Manager to obtain the required data format.
A reference constant, defined as a void pointer. Your application specifies the value of this reference constant in the function structure you pass to the media handler.
See Error Codes. Returns noErr if there is no error.
There are two tasks required to support modifier tracks in a derived media handler: sending and receiving. The base media handler takes care of sending data for all its clients. Therefore, authors of derived media handlers do not usually need to implement sending data support.
Receiving data is a more complex situation. The base media handler takes care of input types that it understands. The base media handler supports the following types of data: If a media handler wants to support receiving other types of data it must implement MediaSetNonPrimarySourceData. MediaSetNonPrimarySourceData is called by modified tracks to supply the current data for each input. All unrecognized input types should be delegated to the base media handler so that they can be handled.
The following is a basic shell implementation of a derived media handler's MediaSetNonPrimarySourceData function. Note that your derived media handler must delegate all input types it does not handle to the base media handler:
// MySetNonPrimarySourceData coding example |
kTrackModifierTypeMatrix |
kTrackModifierTypeGraphicsMode |
kTrackModifierTypeClip |
kTrackModifierTypeVolume |
kTrackModifierTypeBalance |
pascal ComponentResult MySetNonPrimarySourceData( MyGlobals store, |
long inputIndex, long dataDescriptionSeed, Handle dataDescription, |
void *data, long dataSize, |
ICMCompletionProcRecordPtr asyncCompletionProc, |
UniversalProcPtr transferProc, void *refCon ) |
{ |
ComponentResult err =noErr; |
QTAtom inputAtom; |
QTAtom typesAtom; |
long inputType; |
// determine what kind of input this is |
inputAtom =QTFindChildByID(store-> |
inputMap, |
kParentAtomIsContainer, kTrackModifierInput, inputIndex, NIL); |
if (!inputAtom) { |
err =cannotFindAtomErr; |
goto bail; |
} |
typesAtom =QTFindChildByID(store-> |
inputMap, inputAtom, |
kTrackModifierType, 1, NIL); |
err =QTCopyAtomDataToPtr(store-> |
inputMap, typesAtom, FALSE, |
sizeof(inputType), &inputType, NIL); |
if (err) goto bail; |
switch(inputType) { |
case kMyInputType: |
if (data ==NIL) { |
// no data, reset to default value |
} |
else { |
// use this data |
// when done, notify caller we're done with this data |
if (asyncCompletionProc) |
CallICMCompletionProc( |
asyncCompletionProc-> |
completionProc, |
noErr, codecCompletionSource | codecCompletionDest, |
asyncCompletionProc-> |
completionRefCon); |
} |
break; |
Introduced in QuickTime 3 or earlier.
MediaHandlers.hUndocumented
ComponentResult MediaSetPublicInfo ( MediaHandler mh, OSType infoSelector, void *infoDataPtr, Size dataSize );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
Undocumented
Undocumented
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 5.
MediaHandlers.hSets the maximum amount of memory that QuickTime will allow purgeable chunks to occupy.
ComponentResult MediaSetPurgeableChunkMemoryAllowance ( MediaHandler mh, Size allowance );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The number of bytes allowed.
See Error Codes. Returns noErr if there is no error.
This is an application-global setting.
Introduced in QuickTime 6. Can be used only with Mac OS X 10.1 and later.
MediaHandlers.hSets a media's playback rate.
ComponentResult MediaSetRate ( MediaHandler mh, Fixed rate );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A 32-bit, fixed-point number that indicates your media's new effective playback rate. This effective rate accounts for any master time bases that may be in use with the current movie. Positive values represent forward rates and negative values indicate reverse rates.
See Error Codes. Returns noErr if there is no error.
You obtain the initial rate information from the effectiveRate field of the GetMovieCompleteParams structure that the Movie Toolbox provides to your MediaInitialize function. Your derived media handler should support this function if you perform your own scheduling; that is, you have set the handlerNoScheduler flag to 1 in the flags parameter of MediaSetHandlerCapabilities. Your media handler can use this function to determine when your media is playing, and the direction and rate of playback. This information can help you prepare for playback more efficiently.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hLocks the display screen for a media handler.
ComponentResult MediaSetScreenLock ( MediaHandler mh, Boolean lockIt );
A media handler. You can obtain this reference from GetMediaHandler.
Pass TRUE to lock the screen, FALSE to unlock it.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hSets the right/left sound balance of a track.
ComponentResult MediaSetSoundBalance ( MediaHandler mh, short balance );
A media handler. You can obtain this reference from GetMediaHandler.
The new balance setting for the media handler's track. The balance setting is a signed 16-bit integer that controls the relative volume of the left and right sound channels. A value of 0 sets the balance to neutral. Positive values shift the balance to the right channel, negative values to the left channel. The valid range is 127 (right channel only) to -128 (left channel only).
See Error Codes. Returns noErr if there is no error.
Use this function to alter the audio balance on a per-track basis. It works with both mono and stereo sources. The actual volume of the audio is not changed by this setting, only its relative distribution. This function operates on sound tracks, music tracks, and Flash tracks containing audio. It may operate on other audio track types as well; if the the chosen media handler does not support this function, it returns badComponentSelector. To obtain the media handler for a track, call GetTrackMedia and then GetMediaHandler.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hSets the bass and treble controls for a media handler.
ComponentResult MediaSetSoundBassAndTreble ( MediaHandler mh, short bass, short treble );
A media handler. You can obtain this reference from GetMediaHandler.
Undocumented
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hSets sound equalizer bands for a media handler.
ComponentResult MediaSetSoundEqualizerBands ( MediaHandler mh, MediaEQSpectrumBandsRecordPtr spectrumInfo );
A media handler. You can obtain this reference from GetMediaHandler.
A pointer to a MediaEQSpectrumBandsRecord structure.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hEnables or disables sound level metering for a media handler.
ComponentResult MediaSetSoundLevelMeteringEnabled ( MediaHandler mh, Boolean enable );
A media handler. You can obtain this reference from GetMediaHandler.
Pass TRUE to enable sound level metering, FALSE to disable it.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 4.
MediaHandlers.hSupports 3D sound capabilities in a media handler that plays sound.
ComponentResult MediaSetSoundLocalizationData ( MediaHandler mh, Handle data );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The data passed to your media handler, in the format of a Macintosh Sound Sprockets SSpLocalizationData structure.
See Error Codes. Returns noErr if there is no error.
This routine is passed a handle containing the new SSpLocalizationData structure to use. If the handle is NIL, it indicates that no 3D sound effects should be used. If you implement this routine, and return noErr as the result, it is assumed that your media handle assumes responsibility for disposing of the data handle passed. If the implementation of this routine returns an error, the caller will dispose of the handle. The reason for this behavior is to minimize the copying of the settings handle, making it easier for developers to implement this function. This function is called regardless of whether the 3D sound settings were set on the track using SetTrackSoundLocalizationSettings or via a modifier track mechanism.
If you are creating a media handler that plays sound and wish to support 3D sound capabilities, you need to implement this routine.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hSets the sound output component for a media handler.
ComponentResult MediaSetSoundOutputComponent ( MediaHandler mh, Component outputComponent );
A media handler. You can obtain this reference from GetMediaHandler.
An instance of a sound output component. Your software obtains this reference when calling OpenComponent or OpenDefaultComponent.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hProvides a derived media handler with an updated input map.
ComponentResult MediaSetTrackInputMapReference ( MediaHandler mh, QTAtomContainer inputMap );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
The media input map for this operation. Do not modify or dispose of the input map provided.
See Error Codes. Returns noErr if there is no error.
When an application modifies the media input map, this function provides the derived media handler with the updated input map. When this function is called, the media handler should store the updated input map and recheck the types of all inputs, if it is caching this information. The input map reference passed to this function should not be disposed of or modified by the media handler.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hRequests that a media handler favor specified codec components when selecting components with which to play media.
ComponentResult MediaSetUserPreferredCodecs ( MediaHandler mh, CodecComponentHandle userPreferredCodecs );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A handle containing component identifiers. The media handler component will make its own copy of this handle. The components should be specified in order from most preferred to least preferred. Pass NIL to invalidate the standing request without substituting another.
See Error Codes. Returns badComponentSelector if the media handler component does not support this call. Returns noErr if there is no error.
This method does not guarantee that the specified components will be used; other factors may take precedence. Components that are preferred may not be used if they can't be part of the chain required to play the media; for example, if they don't handle the pixel format or the video output.
Here is an example of code that uses this function:
CodecComponentHandle userPreferredCodecs =nil; |
ComponentDescription cd ={ decompressorComponentType, |
myPreferredCodecType, |
myPreferredCodecManufacturer, |
0, |
0 }; |
CodecComponent c =FindNextComponent( 0, &cd ); |
MediaHandler myMedia; |
OSErr err; |
PtrToHand( &c, (Handle*)&userPreferredCodecs, sizeof(c) ); |
myMedia =GetMediaHandler( GetTrackMedia( track ) ); |
err =MediaSetUserPreferredCodecs( myMedia, userPreferredCodecs ); |
DisposeHandle( (Handle)userPreferredCodecs ); |
Introduced in QuickTime 5.
MediaHandlers.hLets you dynamically adjust the brightness, contrast, hue, sharpness, saturation, black level, and white level of a video image.
ComponentResult MediaSetVideoParam ( MediaHandler mh, long whichParam, unsigned short *value );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
A constant (see below) that specifies the video parameter you want to adjust. See these constants:
kMediaVideoParamBrightness
kMediaVideoParamContrast
kMediaVideoParamHue
kMediaVideoParamSharpness
kMediaVideoParamSaturation
kMediaVideoParamBlackLevel
kMediaVideoParamWhiteLevel
The actual value of the video parameter. The meaning of the values vary depending on the implementation.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hUndocumented
ComponentResult MediaTargetRefConsEqual ( MediaHandler mh, long firstRefCon, long secondRefCon, Boolean *equal );
A media handler. You can obtain this reference from GetMediaHandler.
Undocumented
Undocumented
A pointer to a Boolean; it is TRUE if firstRefCon and secondRefCon are equal, FALSE otherwise.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hUndocumented
ComponentResult MediaTimeBaseChanged ( MediaHandler mh );
A media handler. You can obtain this reference from GetMediaHandler.
Undocumented
Introduced in QuickTime 4.
MediaHandlers.hInforms a derived media handler about edits to its track.
ComponentResult MediaTrackEdited ( MediaHandler mh );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
See Error Codes. Returns noErr if there is no error.
Your derived media handler should support this function if you are caching location information about track edits, or if you are using any time values in the movie's time base. Whenever the Movie Toolbox calls this function, your media handler should recalculate this type of information.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hNotifies the derived media handler whenever its media property atom has changed.
ComponentResult MediaTrackPropertyAtomChanged ( MediaHandler mh );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
See Error Codes. Returns noErr if there is no error.
MediaTrackPropertyAtomChanged is called whenever SetMediaPropertyAtom is called. If the media handler uses information from the property atom, it should rebuild the information at this time.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hNotifies the derived media handler whenever the track references in the movie change.
ComponentResult MediaTrackReferencesChanged ( MediaHandler mh );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
See Error Codes. Returns noErr if there is no error.
When an application creates, modifies, or deletes a track reference, the media handler's MediaTrackReferencesChanged function is called. When this function is called, a media handler should rebuild all information about track references and reset its values for all media inputs to their default values.
Introduced in QuickTime 3 or earlier.
MediaHandlers.hUndocumented
ComponentResult MediaVideoOutputChanged ( MediaHandler mh, ComponentInstance vout );
The Toolbox's connection to your derived media handler. You can obtain this reference from GetMediaHandler.
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 5.
MediaHandlers.hAllocates a Universal Procedure Pointer for the PrePrerollCompleteProc callback.
PrePrerollCompleteUPP NewPrePrerollCompleteUPP ( PrePrerollCompleteProcPtr userRoutine );
A pointer to your application-defined function.
A new UPP; see Universal Procedure Pointers.
This function is used with Macintosh PowerPC systems. See Inside Macintosh: PowerPC System Software.
Introduced in QuickTime 4.1. Replaces NewPrePrerollCompleteProc.
MediaHandlers.h
Undocumented
typedef void (*PrePrerollCompleteProcPtr) (MediaHandler mh, OSErr err, void *refcon);
If you name your function MyPrePrerollCompleteProc, you would declare it this way:
void MyPrePrerollCompleteProc ( MediaHandler mh, OSErr err, void *refcon );
A media handler.
An error code; see Error Codes.
Pointer to a reference constant that the client code supplies to your callback. You can use this reference to point to a data structure containing any information your callback needs.
MediaHandlers.h
Defines the layout of the complete movie parameter structure used by MediaInitialize.
struct GetMovieCompleteParams {
short version;
Movie theMovie;
Track theTrack;
Media theMedia;
TimeScale movieScale;
TimeScale mediaScale;
TimeValue movieDuration;
TimeValue trackDuration;
TimeValue mediaDuration;
Fixed effectiveRate;
TimeBase timeBase;
short volume;
Fixed width;
Fixed height;
MatrixRecord trackMovieMatrix;
CGrafPtr moviePort;
GDHandle movieGD;
PixMapHandle trackMatte;
QTAtomContainer inputMap;
};
versionSpecifies the version of this structure. This field is always set to 1.
theMovieIdentifies the movie that contains the current media's track. This movie identifier is supplied by the Movie Toolbox. Your component may use this identifier to obtain information about the movie that is using your media.
theTrackIdentifies the track that contains the current media. This track identifier is supplied by the Movie Toolbox. Your component may use this identifier to obtain information about the track that contains your media. For example, you might call GetTrackNextInterestingTime to examine the track's edit list.
theMediaIdentifies the current media. This media identifier is supplied by the Movie Toolbox. Your derived media handler can use this identifier to read samples or sample descriptions from the current media, using GetMediaSample and GetMediaSampleDescription.
movieScaleSpecifies the time scale of the movie that contains the current media's track. If the Movie Toolbox changes the movie's time scale, the toolbox calls your derived media handler's MediaSetMovieTimeScale function.
mediaScaleSpecifies the time scale of the current media. If the Movie Toolbox changes your media's time scale, the toolbox calls your derived media handler's MediaSetMediaTimeScale function.
movieDurationContains the movie's duration. This value is expressed in the movie's time scale.
trackDurationContains the track's duration. This value is expressed in the movie's time scale.
mediaDurationContains the media's duration. This value is expressed in the media's time scale.
effectiveRateContains the media's effective rate. This rate ties the media's time scale to the passage of absolute time, and does not necessarily correspond to the movie's rate. This value takes into account any master time bases that may be serving the media's time base. The value of this field indicates the number of time units (in the media's time scale) that pass each second. This rate is represented as a 32-bit, fixed-point number. The high-order 16 bits contain the integer portion, and the low-order 16 bits contain the fractional portion. The rate is negative when time is moving backward for the media. Whenever the Movie Toolbox changes your media's effective rate, it calls your derived media handler's MediaSetRate function.
timeBaseIdentifies the media's time base.
volumeContains the media's current volume setting. This value is represented as a 16-bit, fixed-point number. The high-order 8 bits contain the integer portion; 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. If QuickTime changes your media's volume, it calls your derived media handler's MediaGSetVolume function.
widthIndicates the width, in pixels, of the track rectangle. This field, along with the height field, specifies a rectangle that surrounds the image that is displayed when the current media is played. This value corresponds to the x coordinate of the lower-right corner of the rectangle and is expressed as a fixed-point number. If the Movie Toolbox modifies this rectangle, the toolbox calls your derived media handler's MediaSetDimensions function. Note that your media need not present only a rectangular image. The Movie Toolbox can use a clipping region to cause your media's image to be displayed in a region of arbitrary shape, and it can use a matte to control the image's transparency. The toolbox calls your derived media handler's MediaSetClip function whenever it changes your media's clipping region. The trackMatte field in this structure specifies a matte region.
heightIndicates the height, in pixels, of the track rectangle. This value corresponds to the y coordinate of the lower-right corner of the rectangle and is expressed as a fixed-point number.
trackMovieMatrixSpecifies the matrix that transforms your media's pixels into the movie's coordinate system. The Movie Toolbox obtains this matrix by concatenating the track matrix and the movie matrix. You should use this matrix whenever you are displaying graphical data from your media. Whenever the Movie Toolbox modifies this matrix, it calls your derived media handler's MediaSetMatrix function.
moviePortIndicates the movie's graphics port. Whenever the Movie Toolbox changes the movie's graphics world, it calls your derived media handler's MediaSetGWorld function.
movieGDSpecifies the movie's graphics device. Whenever the Movie Toolbox changes the movie's graphics world, it calls your derived media handler's MediaSetGWorld function.
trackMatteIdentifies the matte region assigned to the track that uses your media. This field contains a handle to a pixel map that contains a blend matte. Your component is not responsible for disposing of this matte. If there is no matte, this field is set to NIL.
inputMapA reference to the media's input map. The media input map should not be modified or disposed.
MediaInitialize MediaHandlers.h
Contains sound level meter readings.
struct LevelMeterInfo {
short numChannels;
UInt8 leftMeter;
UInt8 rightMeter;
};
numChannelsContains 1 for mono or 2 for stereo source.
leftMeterLeft meter level, 0-255 range.
rightMeterRight meter level, 0-255 range.
MediaGetSoundLevelMeterInfo MediaHandlers.h
Represents a type used by the Media Handler API.
typedef LevelMeterInfo * LevelMeterInfoPtr;
Sound.h
Provides data for MediaGetSoundEqualizerBands and MediaSetSoundEqualizerBands.
struct MediaEQSpectrumBandsRecord {
short count;
UnsignedFixedPtr frequency;
};
countNumber of frequencies in this structure.
frequencyPointer to array of frequencies.
MediaGetSoundEqualizerBandsMediaSetSoundEqualizerBands MediaHandlers.h
Represents a type used by the Media Handler API.
typedef MediaEQSpectrumBandsRecord * MediaEQSpectrumBandsRecordPtr;
MediaHandlers.h
Represents a type used by the Media Handler API.
typedef STACK_UPP_TYPE(PrePrerollCompleteProcPtr) PrePrerollCompleteUPP;
MediaHandlers.h
Represents a type used by the Media Handler API.
typedef QTCustomActionTargetRecord * QTCustomActionTargetPtr;
MediaHandlers.h
Defines a target for CallComponentExecuteWiredAction.
struct QTCustomActionTargetRecord {
Movie movie;
DoMCActionUPP doMCActionCallbackProc;
long callBackRefcon;
Track track;
long trackObjectRefCon;
Track defaultTrack;
long defaultObjectRefCon;
long reserved1;
long reserved2;
};
movieA movie identifier obtained from such functions as NewMovie, NewMovieFromFile, and NewMovieFromHandle.
doMCActionCallbackProcA Universal Procedure Pointer that accesses a DoMCActionProc callback.
callBackRefconA reference constant to be passed to the DoMCActionProc callback. Use this value to point to a data structure containing any information the callback needs.
trackA track identifier obtained from such functions as NewMovieTrack and GetMovieTrack.
trackObjectRefConUndocumented
defaultTrackThe identifier of a default track, obtained from such functions as NewMovieTrack and GetMovieTrack.
defaultObjectRefConUndocumented
reserved1Reserved.
reserved2Reserved.
MediaHandlers.h
Constants passed to MediaForceUpdate.
enum {
forceUpdateRedraw = 1 << 0,
forceUpdateNewBuffer = 1 << 1
};
MediaHandlers.h
Constants that represent data handler flags.
enum {
handlerHasSpatial = 1 << 0,
handlerCanClip = 1 << 1,
handlerCanMatte = 1 << 2,
handlerCanTransferMode = 1 << 3,
handlerNeedsBuffer = 1 << 4,
handlerNoIdle = 1 << 5,
handlerNoScheduler = 1 << 6,
handlerWantsTime = 1 << 7,
handlerCGrafPortOnly = 1 << 8,
handlerCanSend = 1 << 9,
handlerCanHandleComplexMatrix = 1 << 10,
handlerWantsDestinationPixels = 1 << 11,
handlerCanSendImageData = 1 << 12,
handlerCanPicSave = 1 << 13
};
MediaHandlers.h
Constants passed to MediaSetChunkManagementFlags.
enum {
kEmptyPurgableChunksOverAllowance = 1
};
MediaHandlers.h
Constants passed to MediaSetVideoParam.
enum {
kMediaVideoParamBrightness = 1,
kMediaVideoParamContrast = 2,
kMediaVideoParamHue = 3,
kMediaVideoParamSharpness = 4,
kMediaVideoParamSaturation = 5,
kMediaVideoParamBlackLevel = 6,
kMediaVideoParamWhiteLevel = 7
};
MediaHandlers.h
Constants passed to MediaNavigateTargetRefCon.
enum {
kRefConNavigationNext = 0,
kRefConNavigationPrevious = 1
};
MediaHandlers.h
Constants passed to MediaRefConSetProperty.
enum {
kRefConPropertyCanHaveFocus = 1, /* Boolean */
kRefConPropertyHasFocus = 2 /* Boolean */
};
MediaHandlers.h
Constants that represent flags for media tasks.
enum {
mDidDraw = 1 << 0,
mNeedsToDraw = 1 << 2,
mDrawAgain = 1 << 3,
mPartialDraw = 1 << 4,
mWantIdleActions = 1 << 5
};
enum {
mMustDraw = 1 << 3,
mAtEnd = 1 << 4,
mPreflightDraw = 1 << 5,
mSyncDrawing = 1 << 6,
mPrecompositeOnly = 1 << 9,
mSoundOnly = 1 << 10,
mDoIdleActionsBeforeDraws = 1 << 11,
mDisableIdleActions = 1 << 12
};
enum {
mOpaque = 1L << 0,
mInvisible = 1L << 1
};
MediaHandlers.h
Constants passed to MediaHitTestTargetRefCon.
enum {
mHitTestBounds = 1L << 0, /* point must only be within targetRefCon's bounding box */
mHitTestImage = 1L << 1, /* point must be within the shape of the targetRefCon's image */
mHitTestInvisible = 1L << 2, /* invisible targetRefCon's may be hit tested */
mHitTestIsClick = 1L << 3 /* for codecs that want mouse events */
};
MediaHandlers.h
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-11-10)