Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Codec Components API
This chapter lists the data structures and functions that support codec components in QuickTime.
Data Structures
The following data structures are defined in the QuickTime API Reference:
The
ICMFrameTimeRecord
data type defines the frame time structure, which contains a frame’s time information for scheduled asynchronous decompression operations.The
CDSequenceDataSource
data type defines the decompression data source structure. This contains a linked list of all data sources for a decompression sequence. Because each data source contains a link to the next data source, a codec can access all data sources from this structure.The
CodecCapabilities
data type defines the compressor capability structure. Image compressor components use the compressor capability structure to report their capabilities to the Image Compression Manager. Before compressing or decompressing an image, the Image Compression Manager requests this capability information from the component that will be handling the operation by calling theImageCodecPreCompress
orImageCodecPreDecompress
function provided by that component. The compressor component examines the compression or decompression parameters and indicates any restrictions on its ability to satisfy the request in a formatted compressor capability structure. The Image Compression Manager then manages the operation according to the capabilities of the component.The
CodecDecompressParams
data type defines the decompression parameters structure. Decompressors accept the parameters that govern a decompression operation in this data structure. It is used by theImageCodecBandDecompress
andImageCodecPreDecompress
functions.The
CodecCompressParams
data type defines the compression pParameters structure. Compressor components accept the parameters that govern a compression operation in this data structure. This structure is used by theImageCodecBandCompress
andImageCodecPreCompress
functions.
Functions
This section lists the functions that image compressor components must support. It also lists the utility functions that the Image Compression Manager provides for use by compressors and decompressors. For details of these functions, see the QuickTime API Reference.
The function list is divided into two parts. Direct Functions lists image compressor component functions that are called by the Image Compression Manager in response to application requests. Indirect Functions lists image compressor component functions that may be called by the Image Compression Manager at any time. The next section, Image Compression Manager Utility Functions lists Image Compression Manager utility functions that are available to image compressor components.
You can use the following constants to refer to the request codes for each of the functions that your component must support.
#define kImageCodecGetCodecInfoSelect 0x00 |
#define kImageCodecGetCompressionTimeSelect 0x01 |
#define kImageCodecGetMaxCompressionSizeSelect 0x02 |
#define kImageCodecPreCompressSelect 0x03 |
#define kImageCodecBandCompressSelect 0x04 |
#define kImageCodecPreDecompressSelect 0x05 |
#define kImageCodecBandDecompressSelect 0x06 |
#define kImageCodecBusySelect 0x07 |
#define kImageCodecGetCompressedImageSizeSelect 0x08 |
#define kImageCodecGetSimilaritySelect 0x09 |
#define kImageCodecTrimImageSelect 0x0A |
Direct Functions
These functions are invoked by the Image Compression Manager in direct response to application functions:
ImageCodecGetCodecInfo
ImageCodecGetMaxCompressionSize
ImageCodecGetCompressionTime
ImageCodecGetSimilarity
ImageCodecGetCompressedImageSize
ImageCodecTrimImage
ImageCodecBusy
Indirect Functions
This section describes functions that are invoked by the Image Compression Manager but do not correspond to functions called by applications. The Image Compression Manager may call these functions at any time:
ImageCodecPreCompress
ImageCodecBandCompress
ImageCodecPreDecompress
ImageCodecBandDecompress
Image Compression Manager Utility Functions
The Image Compression Manager provides a number of utility functions for use by your compressor component. These utility functions allow compressor components to manipulate the Image Compression Manager’s image description structures:
SetImageDescriptionExtension
GetImageDescriptionExtension
RemoveImageDescriptionExtension
CountImageDescriptionExtensionType
GetNextImageDescriptionExtensionType
ICMShieldSequenceCursor
ICMDecompressComplete
Copyright © 2005, 2006 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2006-01-10