Contents
Navigation
Home User Reference Other Resources


Data codecs are components delegated to compress or decompress data; for example, QuickTime uses image and sound codecs to compress and decompress video and sound tracks.

This class allows you to retrieve detailed information about a single compressor component; you can use this information to select a compressor or decompressor component appropriate to your specific needs. For example, you could examine the properties of the compressor component set into the property of the class, to establish if it is appropriate to use it in a .

Since version 6.7 of the plugin this class can be used in Console Applications






The QTPlgCodec class constructors are called when you create a new instance of the class, while the ˜QTPlgCodec class destructor, is called automatically when the class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.
Once a new class instance is returned, it is good practice to check the class property to be sure that the new object can be used. A QTPlgCodec object is valid its is set to some valid value.

The class provides you with the following initializer methods:
(type as string)
creates a new class instance referring to the compressor component specified by the four char code string type. If the component is not available, the object will be not .
illustrates how to use this constructor version to retrieve informations about the Cinepak codec.
(other as QTPlgCodec)
This is the copy constructor. The properties of the object to be copied will be used to initialize the new class instance properties

returns a pointer to a CodecInfo C structure. useful for toolbox programmers
indicates the compression algorithm used by the component; for example, "Animation". This string may be used to identify the compression algorithm to the user
indicates the version of compressed data this component supports. The contents of this field should indicate the most recent version of the compression algorithm that the component can understand
an integer value that indicates the version of the component; for example, 0x00010001 (1.0.1)
Indicates the relative accuracy of the compression algorithm employed by the component. Valid values for this field range from 0 to 255. A value of 0 means that the accuracy is unknown. Values from 1 to 255 provide a gauge for the relative accuracy of the compression algorithm — higher values indicate better accuracy. The Image Compression Manager examines this field to determine which compressor component can most accurately compress a given image. This value can only approximate the accuracy of a compression algorithm. Typically, compression algorithms produce results of varying quality based on a variety of parameters, including image size and content. Since this information is not available until a compression request is issued, a precise measure of accuracy is not possible. However, this value should still give a rough idea of the accuracy of the supported algorithm
Indicates the relative accuracy of the decompression algorithm employed by the component. Valid values for this field range from 0 to 255. A value of 0 means that the accuracy is unknown. Values from 1 to 255 provide a gauge for the relative accuracy of the decompression algorithm — higher values indicate better accuracy. The Image Compression Manager examines this field to determine which compressor component can most accurately decompress a given image. This value can only approximate the accuracy of a decompression algorithm. Typically, decompression algorithms produce results of varying quality based on a variety of parameters, including image size and content. Since this information is not available until a decompression request is issued, a precise measure of accuracy is not possible. However, this value should still give a rough idea of the accuracy of the supported algorithm
indicates the relative compression achieved by this component. Valid values for this field lie in the range from 0 to 255. A value of 0 means that the compression level is unknown. Values from 1 to 255 map to percentage values of relative compression—lower values mean lesser compression. A value of 1 means no compression (0 percent); a value of 255 means maximum compression (100 percent). The Image Compression Manager examines this field to determine which available compressor component will yield the smallest resulting data for a given image. The compressionLevel field can only approximate the effectiveness of a compression algorithm. Typically, compression algorithms produce results of varying quality based on a variety of parameters, including image size and content. Since this information is not available until a compression request is issued, a precise measure of compression is not possible. However, the value of this field should still give a rough idea of the effectiveness of the supported algorithm
indicates the relative speed of the component for compression operations. Valid values for this field lie in the range from 0 to 65535. A value of 0 means that the speed is unknown. Values from 1 to 65535 correspond to the number of milliseconds the component requires to compress a 320–by–240 pixel image on a Macintosh II computer
indicates the relative speed of the component for decompression operations. Valid values for this field lie in the range from 0 to 65535. A value of 0 means that the speed is unknown. Values from 1 to 65535 correspond to the number of milliseconds the component requires to decompress a 320–by–240 pixel image on a Macintosh II computer
specifies the width in pixels of the smallest image the component can handle. Together with value seen above, this field defines the block size for the component. The Image Compression Manager does not issue compression or decompression requests for images smaller than the block size
specifies the height in pixels of the smallest image the component can handle. Together with the following value, this field defines the block size for the component. The Image Compression Manager does not issue compression or decompression requests for images smaller than the block size
specifies the compression pipeline latency in milliseconds, for asynchronous codecs
specifies the decompression pipeline latency in milliseconds, for asynchronous codecs
specifies if the selected codec can perform temporal compression
specifies if the selected codec can rearrange frames during compression
requires QuickTime 7.0 or later
specifies if the selected codec can perform multi–pass encoding during compression
requires QuickTime 7.0 or later
specifies if the selected codec can constrain data rate to a specified rate
specifies if the selected codec can recompress image without accumulating errors
specifies if the selected codec can store data in lossless format
specifies if the codec will appear in a list of the currently installed effects components. You can obtain a list of effects by using instances of both and plugin classes
specifies if compressed data are available at 8 bit–per–pixel depth
specifies if compressed data are available at 16 bit–per–pixel depth
specifies if compressed data are available at 24 bit–per–pixel depth
specifies if compressed data are available at 32 bit–per–pixel depth
specifies if compressed data are available at 1 bit–per–pixel monochrome depth
specifies if compressed data are available at 8 bit–per–pixel grayscale depth



dim c as new QTPlgCodec("cvid")
if c=nil or not c.isValid then
msgBox "Codec not found"
else
msgBox c.name
end if