Contents
Navigation
Home User Reference Other Resources


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

Because the standard image–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 QTPlgCompressMovie class takes care about the details of opening and closing a connection to the standard image–compression dialog component.

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

The simplest way is to use the standard image–compression dialog component dialog box. The dialog box presents a consistent interface to the user; the QTPlgCompressMovie 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 Image Compression Manager to perform the movie or track compression. 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 movie or track 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 support the new advanced video codecs (such as H.264 codec) introduced in QuickTime 7.0







The QTPlgCompressMovie class constructors are called when you create a new instance of the class, while the ˜QTPlgCompressMovie 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 QTPlgCompressMovie)
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 parameter

specifies the active settings that will be applied to the compression process. If you want to compress the source movie without applying any scale or clipping area, you should let the and properties set to 0 and the property to an empty rectangle
if you specify either a valid region of interest (the property) or a scale (by using the and properties) or both, the class will apply them during the compression using the following order: first will be used the roi to delimit the original image area to compress, then the resulting image will be scaled as appropriate
[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
determines if the dialog box allows the user to specify a value for the frame rate. If you set this property to true, the user will not be able to specify any frame rate; in this case, the class itself will then determine the best frame rate for the movie
determines whether the dialog box allows the user to specify a value of 0 for the frame rate. If you set this property to true, the user will be able to specify either 0 or nothing for the frame rate. The dialog box then includes a "best rate" entry in the pop–up menu. If the user specifies 0, the class sets the parameter of the class property to 0. In this case, the class itself will then determine the best frame rate for the movie. If you set this property to false, the dialog box does not allow the user to enter 0 for the frame rate. In this case, the user must select a specific frame rate
specifies how the dialog box displays the maximum number of bytes of compressed data your application wants to receive per second. If you set this property to true, the current data rate will be displayed as kilobits per second rather than bytes per second
determines whether the component allows the user to specify a value of 0 for the key frame rate. If you set this property to true, the component allows the user to specify 0 for the frame rate. If the user specifies 0, the class sets the parameter of the of the class property to 0. It is the class itself that will determine the best key frame rate for the movie. If you disable this property, the component does not allow the user to specify 0 for the frame rate. In this case, if the user has enabled temporal compression by checking the key frame checkbox, the user must also select a specific key frame rate
determines whether the component allows the user to change the frame reordering setting if applicable
requires QuickTime 7.0 or later
determines whether the component allows the user to change the multi pass encoding setting if applicable
requires QuickTime 7.0 or later

(source as , tmSel as , dst as folderitem)
you can use this method to create a new movie by re–compressing the video frames coming from the source specified by the source parameter and store it into the file specified by the dst parameter. If the destination file already exists, it will be overwritten by the new one. The resulting movie has just one video track obtained by re–compressing all of the frames that can be played into the specified time interval. The data source can be either a or a class instance
You can instruct the method to re–compress either the entire duration of the data source or just a portion of it by setting the tmSel parameter as appropriate; setting this parameter to nil indicates that you want to recompress the movie or track for its entire duration. The values of the tmSel object must be expressed in movie’s time scale
returns nothing. Check the class property for errors