| Framework | Frameworks/QuickTime.framework |
| Declared in | IOMacOSTypes.h ImageCodec.k.h ImageCompression.h MacTypes.h OSUtils.h |
QuickTime compression and decompression APIs help applications compress and decompress movie data.
GetCSequenceMaxCompressionSize
GetCSequencePrevBuffer
SetCSequenceFlushProc
SetCSequenceKeyFrameRate
SetCSequencePreferredPacketSize
SetCSequencePrev
SetCSequenceQuality
GetDSequenceImageBuffer
GetDSequenceScreenBuffer
PtInDSequenceData
SetDSequenceAccuracy
SetDSequenceDataProc
SetDSequenceMask
SetDSequenceMatrix
SetDSequenceMatte
SetDSequenceSrcRect
SetDSequenceTimeCode
SetDSequenceTransferMode
ImageTranscodeDisposeFrameData
ImageTranscodeFrame
ImageTranscodeSequenceBegin
ImageTranscodeSequenceEnd
ConcatMatrix
CopyMatrix
EqualMatrix
GetMatrixType
InverseMatrix
MapMatrix
RectMatrix
RotateMatrix
ScaleMatrix
SetIdentityMatrix
SkewMatrix
TranslateMatrix
AddImageDescriptionExtension
CountImageDescriptionExtensionType
GetImageDescriptionExtension
GetNextImageDescriptionExtensionType
QTGetPixelFormatDepthForImageDescription
RemoveImageDescriptionExtension
CompressPicture
CompressPictureFile
DrawPictureFile
DrawTrimmedPicture
DrawTrimmedPictureFile
FCompressPicture
FCompressPictureFile
GetPictureFileHeader
CompressImage
ConvertImage
DecompressImage
FCompressImage
FDecompressImage
GetImageDescriptionCTable
SetImageDescriptionCTable
TrimImage
CDSequenceBusy
CDSequenceChangedSourceData
CDSequenceDisposeDataSource
CDSequenceDisposeMemory
CDSequenceEnd
CDSequenceEquivalentImageDescription
CDSequenceFlush
CDSequenceInvalidate
CDSequenceNewDataSource
CDSequenceNewMemory
CDSequenceSetSourceData
CompressSequenceBegin
CompressSequenceFrame
DecompressSequenceBegin
DecompressSequenceBeginS
DecompressSequenceFrame
DecompressSequenceFrameS
DecompressSequenceFrameWhen
SetSequenceProgressProc
CDSequenceEquivalentImageDescriptionS
CDSequenceGetDataSource
CDSequenceSetSourceDataQueue
CDSequenceSetTimeBase
CompAdd
CompCompare
CompDiv
CompFixMul
CompMul
CompMulDiv
CompMulDivTrunc
CompNeg
CompShift
CompSquareRoot
CompSub
FixExp2
FixLog2
FixMulDiv
FixPow
FracSinCos
GetCSequenceFrameNumber
GetCSequenceKeyFrameRate
GetDSequenceMatrix
GetDSequenceNonScheduledDisplayDirection
GetDSequenceNonScheduledDisplayTime
GetGraphicsImporterForFileWithFlags
HitTestDSequenceData
ICMDecompressCompleteS
ICMGetPixelFormatInfo
ICMSequenceGetChainMember
ICMSequenceGetInfo
ICMSequenceLockBits
ICMSequenceSetInfo
ICMSequenceUnlockBits
ICMSetPixelFormatInfo
MakeImageDescriptionForPixMap
QTGetFileNameExtension
QTGetPixelSize
QTGetPixMapHandleGammaLevel
QTGetPixMapHandleRequestedGammaLevel
QTGetPixMapHandleRowBytes
QTGetPixMapPtrGammaLevel
QTGetPixMapPtrRequestedGammaLevel
QTGetPixMapPtrRowBytes
QTNewGWorld
QTNewGWorldFromPtr
QTSetPixMapHandleGammaLevel
QTSetPixMapHandleRequestedGammaLevel
QTSetPixMapHandleRowBytes
QTSetPixMapPtrGammaLevel
QTSetPixMapPtrRequestedGammaLevel
QTSetPixMapPtrRowBytes
QTUpdateGWorld
QuadToQuadMatrix
ReplaceDSequenceImageDescription
SetCSequenceFrameNumber
SetDSequenceFlags
SetDSequenceNonScheduledDisplayDirection
SetDSequenceNonScheduledDisplayTime
UnsignedFixMulDiv
Adds a preview to a file.
OSErr AddFilePreview ( short resRefNum, OSType previewType, Handle previewData );
The resource file for this operation. You must have opened this resource file with write permission. If there is a preview in the specified file, the Movie Toolbox replaces that preview with a new one.
The resource type to be assigned to the preview. This type should correspond to the type of data stored in the preview. For example, if you have created a QuickDraw picture that you want to use as a preview for a file, you should set the previewType parameter to 'PICT'.
A handle to the preview data. For example, if the preview data is a picture, you would provide a picture handle.
See Error Codes. Returns noErr if there is no error.
You must have created the preview data yourself. If the specified file already has a preview defined, the AddFilePreview function replaces it with the new preview.
Introduced in QuickTime 3 or earlier.
ImageCompression.hAdds an extension to an ImageDescription structure.
OSErr AddImageDescriptionExtension ( ImageDescriptionHandle desc, Handle extension, long idType );
A handle to the ImageDescription structure to add the extension to.
The handle containing the extension data.
A four-byte signature identifying the type of data being added to the ImageDescription.
See Error Codes. Returns noErr if there is no error.
This function allows the application to add custom data to an ImageDescriptionHandle. This data could be specific to the compressor component referenced by the ImageDescription structure.
The Image Compression Manager makes a copy of the data referred to by the extension parameter. Thus, your application should dispose its copy of the data when it is no longer needed.
Introduced in QuickTime 3 or earlier.
ImageCompression.hAligns a specified rectangle to the strictest screen that the rectangle intersects.
void AlignScreenRect ( Rect *rp, ICMAlignmentProcRecordPtr alignmentProc );
A pointer to a rectangle defined in global screen coordinates.
Points to your own alignment behavior function. Set this parameter to NIL to use the standard behavior.
For a specification of your alignment function, see ICMAlignmentProc.
Introduced in QuickTime 3 or earlier.
ImageCompression.hMoves a specified window to the nearest optimal alignment position.
void AlignWindow ( WindowRef wp, Boolean front, const Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc );
Points to the window to be aligned.
The frontmost window. If the front parameter is TRUE and the window specified in the wp parameter isn't the active window, AlignWindow makes it the active window.
A pointer to a rectangle in window coordinates that allows you to align the window to a rectangle within the window. Set this parameter to NIL to align using the bounds of the window.
Points to a function that allows you to provide your own alignment behavior. Set this parameter to NIL to use the standard behavior.
For a specification of your alignment function, see ICMAlignmentProc.
Introduced in QuickTime 3 or earlier.
ImageCompression.hChecks the status of an asynchronous compression or decompression operation.
OSErr CDSequenceBusy ( ImageSequence seqID );
Contains the unique sequence identifier that was returned by DecompressSequenceBegin or CompressSequenceBegin.
If there is no asynchronous operation in progress, CDSequenceBusy returns a 0 result code. If there is an asynchronous operation in progress, the result code is 1. Negative result codes indicate an error.
Introduced in QuickTime 3 or earlier.
ImageCompression.hNotifies the compressor that the image source data has changed.
OSErr CDSequenceChangedSourceData ( ImageSequenceDataSource sourceID );
Contains the source identifier of the data source.
See Error Codes. Returns noErr if there is no error.
Use this function to indicate that the image has changed but the data pointer to that image has not changed. For example, if the data pointer points to the base address of a PixMap structure, the image in the PixMap can change, but the data pointer remains constant.
Introduced in QuickTime 3 or earlier.
ImageCompression.hDisposes of a data source.
OSErr CDSequenceDisposeDataSource ( ImageSequenceDataSource sourceID );
The data source identifier that was returned by the CDSequenceNewDataSource function.
See Error Codes. Returns noErr if there is no error.
Use this function to dispose of a data source created by the CDSequenceNewDataSource function. All data sources are automatically disposed when the sequence they are associated with is disposed.
Introduced in QuickTime 3 or earlier.
ImageCompression.hDisposes of memory allocated by the codec.
OSErr CDSequenceDisposeMemory ( ImageSequence seqID, Ptr data );
Contains the unique sequence identifier that was returned by the DecompressSequenceBegin function.
Points to the previously allocated memory block.
See Error Codes. Returns noErr if there is no error.
You call this function to release memory allocated by the CDSequenceNewMemory function.
Do not call CDSequenceDisposeMemory at interrupt time.
Introduced in QuickTime 3 or earlier.
ImageCompression.hIndicates the end of processing for an image sequence.
OSErr CDSequenceEnd ( ImageSequence seqID );
Contains the unique sequence identifier that was returned by DecompressSequenceBegin or CompressSequenceBegin.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
ImageCompression.hReports whether two image descriptions are the same.
OSErr CDSequenceEquivalentImageDescription ( ImageSequence seqID, ImageDescriptionHandle newDesc, Boolean *equivalent );
Contains the unique sequence identifier that was returned by the DecompressSequenceBegin function.
A handle to the ImageDescription structure structure that describes the compressed image.
A pointer to a Boolean value. If the ImageDescriptionHandle provided in the newDesc parameter is equivalent to the ImageDescription structure currently in use by the image sequence, this value is set to TRUE. If the ImageDescriptionHandle is not equivalent, and therefore a new image sequence must be created to display an image using the new image description, this value is set to FALSE.
See Error Codes. Returns noErr if there is no error.
This function allows an application to ask whether two image descriptions are the same. If they are, the decompressor does not have to create a new image decompression sequence to display those images.
The Image Compression Manager can only implement part of this function by itself. There are some fields in the ImageDescription structure that it knows are irrelevant to the decompressor. If the Image Compression Manager determines that there are differences in fields that may be significant to the codec, it calls the function ImageCodecIsImageDescriptionEquivalent to ask the codec.
Introduced in QuickTime 3 or earlier.
ImageCompression.hUndocumented
OSErr CDSequenceEquivalentImageDescriptionS ( ImageSequence seqID, ImageDescriptionHandle newDesc, Boolean *equivalent, Boolean *canSwitch );
Contains the unique sequence identifier that was returned by the DecompressSequenceBegin function.
A handle to the ImageDescription structure structure that describes the compressed image.
A pointer to a Boolean value. If the ImageDescriptionHandle provided in the newDesc parameter is equivalent to the ImageDescription structure currently in use by the image sequence, this value is set to TRUE. If the ImageDescriptionHandle is not equivalent, and therefore a new image sequence must be created to display an image using the new image description, this value is set to FALSE.
Undocumented
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 5.
ImageCompression.hStops a decompression sequence, aborting processing of any queued frames.
OSErr CDSequenceFlush ( ImageSequence seqID );
Contains the unique sequence identifier that was returned by DecompressSequenceBegin.
See Error Codes. Returns noErr if there is no error.
This function is used to tell a decompressor component to stop processing of any queued scheduled asynchronous decompression. This is useful when several frames have been queued for decompression in the future and the application needs to suspend playback of the sequence.
For any outstanding frames, your application's completion routine, passed to DecompressSequenceFrameWhen, will be called with an error result of -1, indicating that the frame was cancelled. If any frames are currently being decompressed and cannot be cancelled, CDSequenceFlush waits until the frame has finished decompressing before returning.
Introduced in QuickTime 2.0.
ImageCompression.hGets a data source for a decompression sequence.
OSErr CDSequenceGetDataSource ( ImageSequence seqID, ImageSequenceDataSource *sourceID, OSType sourceType, long sourceInputNumber );
The image sequence that this source is associated with.
A pointer to the source reference identifying this source.
A four-character code describing how the input will be used. This value is passed by CDSequenceNewDataSource when the source is created.
A value passed by CDSequenceNewDataSource when the source is created.
See Error Codes. Returns noErr if there is no error.
Introduced in QuickTime 3 or earlier.
ImageCompression.hNotifies the Image Compression Manager that the destination port for the given image decompression sequence has been invalidated.
OSErr CDSequenceInvalidate ( ImageSequence seqID, RgnHandle invalRgn );
Contains the unique sequence identifier that was returned by DecompressSequenceBegin.
A handle to the region specifying the invalid portion of the image.
See Error Codes. Returns noErr if there is no error.
You call this function to force the Image Compression Manager to redraw the screen bits on the next decompression operation.
Introduced in QuickTime 3 or earlier.
ImageCompression.hCreates a new data source.
OSErr CDSequenceNewDataSource ( ImageSequence seqID, ImageSequenceDataSource *sourceID, OSType sourceType, long sourceInputNumber, Handle dataDescription, ICMConvertDataFormatUPP transferProc, void *refCon );
The unique sequence identifier that was returned by the DecompressSequenceBegin function.
Returns the new data source identifier.
A four-character code describing how the input will be used. This code is usually derived from the information returned by the codec. For example, if a mask plane was passed, this field might contain 'mask'.
More than one instance of a given source type may exist. The first occurrence should have a source input number of 1, the second a source input number of 2, and so on.
A handle to a data structure describing the input data. For compressed image data, this is an ImageDescriptionHandle.
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 client or directly with the Image Compression Manager to obtain the required data format.
A reference constant to be passed to the transfer procedure. 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.
This function returns a sourceID parameter which must be passed to all other functions that reference the source. All data sources are automatically disposed when the sequence they are associated with is disposed.
// CDSequenceNewDataSource coding example |
// See "Discovering QuickTime," page 309 |
{ |
ImageSequenceDataSource lSrc1 =0; |
// Store a description of the first GWorld in hImageDesc1 |
nErr =MakeImageDescriptionForPixMap(GetGWorldPixMap(gWorld1), |
&hImageDesc1); |
// Create a source from the GWorld description. |
nErr =CDSequenceNewDataSource(gEffectSequenceID, |
&lSrc1, |
'srcA', |
1, |
(Handle)hImageDesc1, |
NIL, |
0); |
// Set the data for source srcA to be the pixMap of gWorld1 |
CDSequenceSetSourceData(lSrc1, |
GetPixBaseAddr(GetGWorldPixMap(gWorld1)), |
(**hImageDesc1).dataSize); |
} |
Introduced in QuickTime 3 or earlier.
ImageCompression.hRequests codec-allocated memory.
OSErr CDSequenceNewMemory ( ImageSequence seqID, Ptr *data, Size dataSize, long dataUse, ICMMemoryDisposedUPP memoryGoneProc, void *refCon );
Contains the unique sequence identifier that was returned by the DecompressSequenceBegin function.
Returns a pointer to the allocated memory.
The requested size of the data buffer.
A code (see below) that indicates how the memory is to be used. For example, the memory may be used to store compressed image or mask plane data, or used as an offscreen image buffer. If there is no benefit to storing a particular kind of data in codec memory, the codec should deny the request for the memory allocation. See these constants:
A pointer to a callback function that will be called before disposing of the memory allocated by a codec, as described in ICMMemoryDisposedProc.
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.
Because many hardware decompression boards contain dedicated on-board memory, significant performance gains can be realized if this memory is used to store data before it is decompressed. When memory is allocated, a callback function must be provided, as described in ICMMemoryDisposedProc. The decompressor can dispose of all memory it has allocated at any time, but it calls the callback routine before disposing of the