Contents
Navigation
Home User Reference Other Resources


The QTPlgCompressSound class provides QTPlugin developers with services to manage sequence compression process. This class uses the standard sound–compression dialog component to control the process of compressing a movie or a track.

Because the standard sound–compression dialog is a component, the class uses the Component Manager to open and close a connection to the component; QTPlugin developers do not worry about it, cause the QTPlgCompressSound class takes care about the details of opening and closing a connection to the standard sound–compression dialog component.

You can use the class to obtain sound compression parameters from the user (or set them by yourself) and to manage the process of compressing the sound. You can follow several ways to control the different steps involved into the compression process.

The simplest way is to use the standard sound–compression dialog component dialog box. The dialog box presents a consistent interface to the user; the QTPlgCompressSound eliminates the need for you to worry about the details of managing this dialog box. Also, provided that the requirements are met, this class features the class method as well. Once you have collected the parameter information from the user, you can use the class to instruct the Sound Compression Manager to perform the compression of sound. Again, the class manages the details for you.

Alternatively, you can use the methods the class provides you with to examine or modify the parameters to be used during the compression process. This way allows you to perform the process of compressing the sound without using any user interface.
Whatever way you follow, the class allows you to store the compression parameters you have set into files and restore them later.

Since version 6.0 of the QTPlugin, this class has been modified to take advantage of the new QuickTime APIs, introduced in QuickTime 7.1, that allow direct audio export with incorporated mixer and encoding, decoding, transcoding capabilitites







The QTPlgCompressSound class constructors are called when you create a new instance of the class, while the ˜QTPlgCompressSound 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. See the validity requirements for more details.

The class provides you with the following initializer methods:
()
This is the default constructor. The new class instance will try to open a connection to the standard image–compression dialog component; if the connection succeeds, the properties of the class will be initialized to the default settings of the the standard image–compression dialog component
(other as QTPlgCompressSound)
This is the copy constructor. The new class instance will try to open a connection to the standard image–compression dialog component; if the connection succeeds, the properties of the object to be copied will be used to initialize the new class instance properties
(fSettings as folderitem)
The new class instance will try to open a connection to the standard image–compression dialog component; if the connection succeeds, you can use this version of the class constructor to initialize the properties of the class with the settings in the file specified by the fSettings

specifies the active settings that will be applied to the compression process
[Deprecated]: since version 6.6 of the plugin this property is deprecated and will be removed from a future plugin version; use the class property instead
specifies if the standard sound–compression dialog should include into the list of compressors presented to the user both those performing fixed and variable compression; if this property is set to false only fixed compression codecs will be presented in the list. Since AAC only performs variable compression, it will not appear in the dialog unless this property is set to true
this property requires QuickTime 6 or later
informs the standard sound–compression dialog that we know the output sample rate might be changed by the audio codec. AAC, for example, may change the output sample rate if the user selects a low bit rate
this property requires QuickTime 6 or later
specifies the list of available output compression formats. You can walk through the list to access individual compression format informations by using the appropriate defined below
this property requires QuickTime 7 or later
specifies a list of available audio channel layout tags. This list is compression format specific, and takes into account any restrictions imposed by a client using the class property. You can walk through the list to access individual compression format informations by using the appropriate defined below
this property requires QuickTime 7 or later
specifies the quality with which QuickTime should render the audio stream during the compression/decompression/transcode operation. You can use one of the defined in the plugin module
this property requires QuickTime 7.1 or later

(source as , tmSel as , dst as folderitem)
use this method to perform the compression of sound samples collected from the movie or track specified by the source parameter and store them into the movie file specified by the dst parameter. If the destination file already exists, it will be overwritten by the new one.
You can instruct the method to re–compress either the entire movie or track or just a portion of it by setting the tmSel parameter as appropriate (a tmSel of nil indicates that you want to re–compress the entire data source). The values of the tmSel object must be expressed in movie’s time scale
returns nothing. Check the class property for errors


the user data type for the items that identify the human readable names for the of the sound formats contained into the user data list obtained by the class property. To access the data contained into these items you can use the method of the class
the user data type for the items that identify the four char code of the sound formats contained into the user data list obtained by the class property. To access the data contained into these items you can use the method of the class; the memoryblock returned contains a single UInt32 value that represents the type code of the sound format. You can use the class to retrieve the string representation of this value
the user data type for the items that identify the human readable names of the channel layout tags contained into the user data list obtained by the class property. To access the data contained into these items you can use the method of the class
the user data type for the items that identify the integer value of the channel layout tag contained into the user data list obtained by the class property. To access the data contained into these items you can use the method of the class; the memoryblock returned contains a single UInt32 value that represents the value identifying a specific channel layout tag