GetMovieVisualContext
ICMDecompressionSessionCreateForVisualContext
QTDirect3DTextureContextCreate
QTVisualContextCopyImageForTime
QTVisualContextGetAttribute
QTVisualContextGetTypeID
QTVisualContextIsNewImageAvailable
QTVisualContextSetAttribute
QTVisualContextSetImageAvailableCallback
QTVisualContextRelease
QTVisualContextRetain
QTVisualContextTask
SetMovieVisualContext
SetTrackApertureModeDimensionsUsingSampleDescription
GenerateMovieApertureModeDimensions
GenerateTrackApertureModeDimensions
RemoveMovieApertureModeDimensions
RemoveTrackApertureModeDimensions
MediaSetTrackApertureModeDimensionsUsingSampleDescription
MediaGetApertureModeClipRectForSampleDescriptionIndex
MediaGetApertureModeMatrixForSampleDescriptionIndex
MediaGenerateApertureModeDimensions
Examines a movie and sets up track aperture mode dimensions.
OSErr GenerateMovieApertureModeDimensions ( Movie movie );
The movie.
This function can be used to add information needed to support aperture modes to tracks created with applications and/or versions of QuickTime that did not support aperture mode dimensions. If the image descriptions in video tracks lack tags describing clean aperture and pixel aspect ratio information, the media data may be scanned to see if the correct values can be determined and attached. Then the aperture mode dimensions are calculated and set. Afterwards, the kQTVisualPropertyID_HasApertureModeDimensions
property will be set to TRUE
for these tracks. Tracks that do not support aperture modes are not changed.
Introduced in QuickTime 7.1.
Movies.h
Examines a track and sets up aperture mode dimensions.
OSErr GenerateTrackApertureModeDimensions ( Track track );
The track.
This function can be used to add information needed to support aperture modes to tracks created with applications and/or versions of QuickTime that did not support aperture mode dimensions. If the image descriptions in video tracks lack tags describing clean aperture and pixel aspect ratio information, the media data may be scanned to see if the correct values can be determined and attached. Then the aperture mode dimensions are calculated and set. Afterwards, the kQTVisualPropertyID_HasApertureModeDimensions
property will be set to TRUE
for these tracks. Tracks that do not support aperture modes are not changed.
Introduced in QuickTime 7.1.
Movies.h
Returns the current visual context for a movie.
OSStatus GetMovieVisualContext ( Movie movie, QTVisualContextRef *visualContext );
The movie.
A pointer to a variable to receive the visual context.
An error code. Returns noErr
if there is no error. Returns memFullErr
if memory cannot be allocated. Returns kQTVisualContextRequiredErr
if the movie is not using a visual context. Returns paramErr
if the movie or visualContextOut is NULL
.
Returns the QTVisualContext object associated with the movie. You are responsible for retaining and releasing the object as needed (that is, if the returned object has not been retained for you). If the visual context was set to NULL
(see SetMovieVisualContext
), noErr
is returned and visualContextOut receives NULL
.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
Movies.h
Creates a session for decompressing video frames.
OSStatus ICMDecompressionSessionCreateForVisualContext ( CFAllocatorRef allocator, ImageDescriptionHandle desc, ICMDecompressionSessionOptionsRef decompressionOptions, QTVisualContextRef visualContext, ICMDecompressionTrackingCallbackRecord *trackingCallback, ICMDecompressionSessionRef *decompressionSessionOut );
An allocator for the session. Pass NULL
to use the default allocator.
An image description for the source frames.
Options for the session. The session will retain this options object. You may change some options during the session by modifying the object.
The target visual context.
The callback to be called with information about queued frames and pixel buffers containing the decompressed frames.
Points to a variable to receive the new decompression session.
An error code. Returns noErr
if there is no error.
Frames will be output to a visual context. If desired, the trackingCallback may attach additional data to pixel buffers before they are sent to the visual context.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
ImageCompression.h
Examines media and sets up track aperture mode dimensions.
ComponentResult MediaGenerateApertureModeDimensions ( MediaHandler mh );
The media handler.
If the sample descriptions tracks lack tags describing clean aperture and pixel aspect ratio information, the media data may be scanned to see if the correct values can be determined and attached. Then the aperture mode dimensions should be calculated and set by MediaSetTrackApertureModeDimensionsUsingSampleDescription
.
Introduced in QuickTime 7.1
MediaHandlers.h
Calculates a source clip rectangle appropriate for the current aperture mode and the given sample description.
ComponentResult MediaGetApertureModeClipRectForSampleDescriptionIndex ( MediaHandler mh, long sampleDescIndex, FixedRect *clipFixedRectOut );
The media handler.
Indicates the sample description index of sample description in the media.
Points to a variable to receive the clip rectangle.
If the track’s aperture mode is kQTApertureMode_CleanAperture
, the rectangle should be the clean aperture as described by the sample description (see kICMImageDescriptionPropertyID_CleanApertureClipRect
); otherwise, it should be the full dimensions of the sample description.
Introduced in QuickTime 7.1.
MediaHandlers.h
Calculates a matrix appropriate for the current aperture mode and the given sample description.
ComponentResult MediaGetApertureModeMatrixForSampleDescriptionIndex ( MediaHandler mh, long sampleDescIndex, MatrixRecord *matrixOut );
The media handler.
Indicates the sample description index of sample description in the media.
Points to a variable to receive the matrix.
If the track’s aperture mode is kQTApertureMode_CleanAperture
or kQTApertureMode_ProductionAperture
, the matrix should scale horizontally to compensate for the pixel aspect ratio. Otherwise, the matrix should be identity. If the track’s aperture mode is kQTApertureMode_CleanAperture
, the matrix should translate the top-left point of the clean aperture to the origin. (See kICMImageDescriptionPropertyID_CleanApertureMatrix
and kICMImageDescriptionPropertyID_ProductionApertureMatrix
).
Introduced in QuickTime 7.1.
MediaHandlers.h
Sets the three aperture mode dimension properties on the track, calculating the values using the provided sample description.
ComponentResult MediaSetTrackApertureModeDimensionsUsingSampleDescription ( MediaHandler mh, SampleDescriptionHandle sampleDesc );
The media handler.
The sample description handle.
Use this function to calculate the values of the three aperture mode dimension properties on the track, using the provided sample description
Introduced in QuickTime 7.1.
MediaHandlers.h
Creates a Direct3D texture context for a specified Direct3D context and pixel format.
OSErr QTDirect3DTextureContextCreate ( CFAllocatorRef allocator, void* d3dDevice, // LPDIRECT3DDEVICE9 UInt32 d3dPixelFormat, CFDictionaryRef attributes, QTVisualContextRef *newTextureContext );
An allocator used to create the texture context.
A Direct3D device used to create textures.
The Direct3D pixel format used to create the Direct3D device.
A dictionary of attributes.
A pointer to a variable to receive the new Direct3D texture context.
An error code. Returns noErr
if there is no error.
kQTVisualContextNotAllowedErr
if the graphics hardware is not supported.
memFullErr
if there is insufficient memory to allocate the visual context.
This routine lets you create a visual context you can draw into, if given a Direct3D device. The routine works similar to QTOpenGLTextureContextCreate
in QuickTime 7 for Mac OS X.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
ImageCompression.h
Retrieves an image buffer from the visual context, indexed by the provided time.
OSStatus QTVisualContextCopyImageForTime ( QTVisualContextRef visualContext, CFAllocatorRef allocator, const CVTimeStamp *timeStamp, CVImageBufferRef *newImage );
The visual context.
Allocator used to create new CVImageBufferRef
.
Time in question. Pass NULL
to request the image at the current time.
Points to variable to receive the new image.
An error code. Returns noErr
if there is no error.
You should not request image buffers further ahead of the current time than the read-ahead time specified with the kQTVisualContextExpectedReadAheadKey
attribute. You may skip images by passing later times, but you may not pass an earlier time than passed to a previous call to this function.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
ImageCompression.h
Returns a visual context attribute.
OSStatus QTVisualContextGetAttribute ( QTVisualContextRef visualContext, CFStringRef attributeKey, CFTypeRef *attributeValueOut );
The visual context.
Identifier of attribute to get.
A pointer to a variable that will receive the attribute value or NULL
if the attribute is not set.
An error code. Returns noErr
if there is no error.
This routine returns a visual context attribute.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
ImageCompression.h
Returns the CFTypeID
for QTVisualContextRef
.
CFTypeID QTVisualContextGetTypeID ( void );
Use this function to test whether a CFTypeRef
that extracted from a CF container such as a CFArray was a QTVisualContextRef
.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
ImageCompression.h
Queries whether a new image is available for a given time.
Boolean QTVisualContextIsNewImageAvailable ( QTVisualContextRef visualContext, const CVTimeStamp *timeStamp );
The visual context.
Time in question.
A Boolean.
This function returns TRUE
if there is a image available for the specified time that is different from the last image retrieved from QTVisualContextCopyImageForTime
.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
ImageCompression.h
Releases a visual context object.
void QTVisualContextRelease ( QTVisualContextRef visualContext );
A reference to a visual context object. If you pass NULL
, nothing happens.
When the retain count decreases to zero, the visual context is disposed.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
ImageCompression.h
Retains a visual context object.
QTVisualContextRef QTVisualContextRetain ( QTVisualContextRef visualContext );
A reference to a visual context object. If you pass NULL
, nothing happens.
On return, a reference to the same visual context object, for convenience.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
ImageCompression.h
Sets a visual context attribute.
OSStatus QTVisualContextSetAttribute ( QTVisualContextRef visualContext, CFStringRef attributeKey, CFTypeRef attributeValue );
The visual context.
Identifier of attribute to set.
The value of the attribute to set, or NULL
to remove a value.
An error code. Returns noErr
if there is no error.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
ImageCompression.h
Installs a user-defined callback to receive notifications when a new image becomes available.
OSStatus QTVisualContextSetImageAvailableCallback ( QTVisualContextRef visualContext, QTVisualContextImageAvailableCallback imageAvailableCallback, void *refCon );
The visual context invoking the callback.
Time for which a new image has become available. May be NULL
.
A user-defined value passed to QTImageAvailableCallback
.
An error code. Returns noErr
if there is no error.
Due to unpredictible activity, such as user seeks or the arrival of streaming video packets from a network, new images may become available for times supposedly occupied by previous images. Applications using the CoreVideo display link to drive rendering probably do not need to install a callback of this type, since they will already be checking for new images at a sufficient rate.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
ImageCompression.h
Enables the visual context to release internally held resources for later use.
void QTVisualContextTask ( QTVisualContextRef visualContext );
The visual context.
For optimal resource management, this function should be called in every rendering pass. It should be called after old images have been released, new images have been used and all rendering has been flushed to the screen. The call is not mandatory.
Introduced in QuickTime 7
ImageCompression.h
Removes aperture mode dimension information from a movie.
OSErr RemoveMovieApertureModeDimensions ( Movie movie );
The movie.
This function removes aperture mode dimension information from a movie’s tracks. It does not attempt to modify sample descriptions, so it may not completely reverse the effect of GenerateMovieApertureModeDimensions
. It sets the kQTVisualPropertyID_HasApertureModeDimensions
property to FALSE
.
Introduced in QuickTime 7.1
Movies.h
Removes aperture mode dimension information from a track.
OSErr RemoveTrackApertureModeDimensions ( Track track );
The track.
This function removes aperture mode dimension information from a track. It does not attempt to modify sample descriptions, so it may not completely reverse the effect of GenerateTrackApertureModeDimensions
. It sets the kQTVisualPropertyID_HasApertureModeDimensions
property to FALSE
.
Introduced in QuickTime 7.1.
Movies.h
Used is used to pull compressed frames from the StdAudio component in kQTSCAudioPropertyID_BasicDescription
format.
ComponentResult SCAudioFillBuffer ( ComponentInstance ci, SCAudioInputDataProc inInputDataProc, void *inInputDataProcRefCon, UInt32 *ioOutputDataPacketSize, AudioBufferList *outOutputData, AudioStreamPacketDescription *outPacketDescription );
The client’s connection to a StdAudio Compression component.
The proc address of the function that will be called to supply data in the kQTSCAudioPropertyID_InputBasicDescription
format to SCAudio.
The client refcon that will be passed to the user-provided SCAudioInputDataProc
function.
On input, the number of desired packets. On output, the actual number of packets delivered (can be fewer than the input desired packets).
An AudioBufferList
providing sufficiently large buffers to hold the requested number of packets.
An array of AudioStreamPacketDescriptions. If the requested output format requires external framing information––that is, a VBR format such as AAC–– allocate and pass an array of packet descriptions as large as the number of packets you are requesting.
SCAudioFillBuffer
preserves the same style API as the Core Audio AudioConverterFillComplexBuffer
API, which is part of the AudioToolbox framework and resides in AudioConverter.h
.
This function has the same parameters as AudioConverterFillComplexBuffer
, but internally it has an audio converter, a matrix mixer, and another audio converter. It is based on a “pull” model: You pull on the audio converter for some output, and specify the buffer in which you want to put it. You have already configured the format that it is going to return to you. You also provide it with an input proc and it will call back that input proc and specify however many samples of audio you have. For example, if you want five packets of AAC audio coming out the back end, and at the front end you happen to have PCM de-interleaved, the routine will ask you for the samples. The difference is you can now have different numbers of channels going in or out. For example, at the same time you are doing the compression from PCM to AAC, you can also go from 5.1 to stereo.
SCAudioFillBuffer
is used to pull compressed frames from the StdAudio component in kQTSCAudioPropertyID_BasicDescription
format. The StdAudio component can perform any combination of decompression/mixing/compression, combining the facilities of Core Audio AudioConverters and Matrix Mixer AudioUnits. The behavior of the SCAudioFillBuffer
call (signalling end of data, and so on) is identical to the AudioConverter's AudioConverterFillComplexBuffer
API.
One important difference between the AudioConverter and SCAudio component is that the SCAudio compression APIs can do mixing as well as n -> n channels conversion. If you want to compress, decompress, or transcode audio using the SCAudioFillBuffer
interface, you configure the StandardCompressionSubTypeAudio
component with the desired input and output formats (or use the SCRequestImageSettings
API to present a dialog and let a user select an output format), then you call SCAudioFillBuffer
, providing an SCAudioInputDataProc
callback, which is called for audio in the specified source format.
Introduced in QuickTime 7.1 for Windows and QuickTime 7 for Mac OS X.
QuickTimeComponents.h
Targets a movie to render into a visual context.
OSStatus SetMovieVisualContext ( Movie movie, QTVisualContextRef visualContext );
The movie.
The visual context that the movie will render into. May be NULL
.
An error code. Returns noErr
if there is no error. Returns memFullErr
if memory cannot be allocated. Returns kQTVisualContextNotAllowed
if the movie is not able to render using a visual context. Returns paramErr
if the movie is NULL
.
When SetMovieVisualContext
succeeds, it will retain the QTVisualContext object for its own use. If visualContext is NULL
, the movie will not render any visual media. SetMovieVisualContext
will fail if a different movie is already using the visual context, so you should first disassociate the other movie by calling SetMovieVisualContext
with a NULL
visualContext.
Note that calling SetMovieGWorld
on a movie that is connected to a visual context will work, but it may still keep a reference to the visual context. If you wish to completely disconnect the visual context, make sure to first call SetMovieVisualContext
with a NULL
visualContext.
Introduced in QuickTime 7 for Mac OS X and in QuickTime 7.1 for Windows.
Movies.h
Sets a track’s aperture mode dimensions using values calculated using a sample description.
ComponentResult ADD_MEDIA_BASENAME() SetTrackApertureModeDimensionsUsingSampleDescription
The track.
The sample description handle.
This function should be used to add information needed to support aperture modes to newly created tracks. This information is calculated using the given sample description. If sampleDesc is NULL
, the track’s first sample description is used.
Introduced in QuickTime 7.1.
Movies.h
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-08-14)
|