< Previous PageNext Page > Hide TOC

Functions Used To Control Video Output Components

This section discusses the functions used to control video output components.

In this section:

Controlling the Display Mode
Registering the Name of Your Software
Controlling Video Output
Finding Associated Components
Saving and Restoring Component Configurations
Data Types
Constants


Controlling the Display Mode

Each video output device has a finite number of display modes. Each mode has several characteristics, including width and height of the display, pixel depth, and video refresh rate. This section describes functions for getting and setting the display mode.

To get a list of the display modes supported by a video output component, call the QTVideoOutputGetDisplayModeList function. The list is a QT atom container, and list atoms contain the characteristics of each mode. You use QT atom container functions, such as QTFindChildByIndex, to extract the contents of the list.

To specify a display mode to use, call the QTVideoOutputSetDisplayMode function.

To find out the current display mode, call the QTVideoOutputGetDisplayMode function.

Registering the Name of Your Software

After your software has established a connection to a video output component, you can register its name with the instance of that component by calling the QTVideoOutputSetClientName function. The name can then be used by QTVideoOutputGetCurrentClientName to specify which software has exclusive access to the video output device controlled by the component.

Although several applications or other software can connect to a video output component at the same time, only one of them at a time can have access to the video output device controlled by the component. Use QTVideoOutputBegin to gain exclusive access to the video output device and QTVideoOutputEnd to relinquish exclusive access when your software has finished using the device.

To get the name of the application or other software that is registered with an instance of a video output component, call QTVideoOutputGetClientName.

Controlling Video Output

Video output components provide functions for configuring the video display, for starting and stopping video output, and for specifying the graphics world used for the display:

Finding Associated Components

Video output components provide functions for finding other components associated with them:

Saving and Restoring Component Configurations

Video output components provide functions for saving the current configuration of a video output component and later restoring the configuration:

Data Types

This section describes the QT atom container used to specify the display modes that are supported by a video display component.

Display Mode QT Atom Container

The QTVideoOutputGetDisplayModeList function returns a list of the display modes supported by a video display component. This list is contained in the QT atom container described in this section.

At the root of the QT atom container returned by the QTVideoOutputGetDisplayModeList function are one or more atoms of type kQTVODisplayModeItem, each containing a definition of a display mode. Your software can traverse the display mode atoms by calling the QTFindChildByIndex function.

Within each kQTVODisplayModeItem atom are the following atoms:

By storing resolutions rather than an aspect ratio, QuickTime makes it easy for your software to compare values with values in QuickTime ImageDescription records. Your software can calculate the aspect ratio for the display mode by dividing the value for the horizontal resolution by the value for the vertical resolution.

Because kQTVODecompressors atoms are not required to have consecutive IDs, your software must use the QTFindChildByIndex function to iterate through the decompressors.

Within each kQTVODecompressors atom are one or more atoms:

Constants

This section provides details on component type, atom type, and function selector constants.

Component Instance, Type, and Subtype

typedef ComponentInstance QTVideoOutputComponent;
enum {
    QTVideoOutputComponentType = FOUR_CHAR_CODE('vout'),
    QTVideoOutputComponentBaseSubType = FOUR_CHAR_CODE('base')
};

Video Output Component Flag

The following flag indicates that a video output component is not connected to a display and should not be included in a list of components that are available to the user.

enum {
    kQTVideoOutputDontDisplayToUser = 1L << 0
};

Display Mode Atom Types

The following atom type constants specify atom types:

enum {
    kQTVODisplayModeItem = FOUR_CHAR_CODE('qdmi'),
    kQTVODimensions = FOUR_CHAR_CODE('dimn'),
        /* atom contains two longs - pixel count - width, height */
    kQTVOResolution = FOUR_CHAR_CODE('resl'),
        /* atom contains two Fixed - hRes, vRes in dpi */
    kQTVORefreshRate = FOUR_CHAR_CODE('refr'),
        /* atom contains one Fixed - refresh rate in Hz */
    kQTVOPixelType = FOUR_CHAR_CODE('pixl'),
        /* atom contains one OSType - pixel format of mode */
    kQTVOName = FOUR_CHAR_CODE('name'),
        /* atom contains string (no length byte) --
           name of mode for display to user */
    kQTVODecompressors = FOUR_CHAR_CODE('deco'),
        /* atom contains other atoms indicating supported decompressors */
        /* kQTVODecompressors sub-atoms */
    kQTVODecompressorType = FOUR_CHAR_CODE('dety'),
        /* atom contains one OSType - decompressor type code */
    kQTVODecompressorContinuous = FOUR_CHAR_CODE('cont'),
        /* atom contains one Boolean --
           true if this type is displayed continuously */
    kQTVODecompressorComponent = FOUR_CHAR_CODE('cmpt')
        /* atom contains one component id of decompressor */
};


< Previous PageNext Page > Hide TOC


© 2005, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-01-10)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.