Overview
Group
Quick Info

MCI_SETVIDEO

The MCI_SETVIDEO command sets values associated with video playback. Digital-video and VCR devices recognize this command.

MCIERROR mciSendCommand(MCIDEVICEID wDeviceID, MCI_SETVIDEO,
DWORD dwFlags, (DWORD) (LPMCI_GENERIC_PARMS) lpSetVideo);

Parameters

wDeviceID

Device identifier of the MCI device that is to receive the command message.

dwFlags

MCI_NOTIFY, MCI_WAIT, or MCI_TEST. For information about these flags, see The Wait, Notify, and Test Flags.

lpSetVideo

Address of an MCI_GENERIC_PARMS structure. (Devices with extended command sets might replace this structure with a device-specific structure.)

Return Values

Returns zero if successful or an error otherwise.

Remarks

The following additional flags are used with the digitalvideo device type:

MCI_DGV_SETVIDEO_ALG

The lpstrAlgorithm member of the structure identified by lpSetVideo contains an address of a buffer containing the name of a video compression algorithm. The compression algorithm is used by subsequent MCI_RESERVE or MCI_RECORD commands. The available algorithms are device dependent.

If the specified algorithm is incompatible with the current file format, the file format is changed to the default format for the algorithm.

MCI_DGV_SETVIDEO_CLOCKTIME

When used with MCI_DGV_SETVIDEO_OVER, indicates time is specified in milliseconds and is absolute time. (This time is not in step with the playing of the workspace.)

MCI_DGV_SETVIDEO_INPUT

Modifies the MCI_DGV_SETVIDEO_BRIGHTNESS, MCI_DGV_SETVIDEO_COLOR, MCI_DGV_SETVIDEO_CONTRAST, MCI_DGV_SETVIDEO_GAMMA, MCI_DGV_SETVIDEO_SHARPNESS, or MCI_DGV_SETVIDEO_TINT so that it affects the input signal and modifies what is recorded. If possible, this is the default when monitoring the input.

MCI_DGV_SETVIDEO_ITEM

A video constant is specified in the dwItem member of the structure identified by lpSetVideo. The constant identifies the value that is being set. You can specify the following constants with this flag:

MCI_AVI_SETVIDEO_DRAW_PROCEDURE

A new drawing procedure address is specified in the dwValue member of the structure identified by lpSetVideo. You can specify a new drawing procedure only when the device is idle. This flag is recognized only by the MCIAVI digital-video driver. There is no equivalent to this flag in the string command interface.

MCI_AVI_SETVIDEO_PALETTE_COLOR

A new palette color is specified in the dwOver and dwValue members of the structure identified by lpSetVideo. The dwOver member specifies the palette index of the color to be changed and the dwValue member specifies the new color, as an RGB value. You must also specify the MCI_DGV_SETVIDEO_OVER and MCI_DGV_SETVIDEO_VALUE flags with MCI_DGV_SETVIDEO_ITEM when you use this constant. This flag is recognized only by the MCIAVI digital-video driver.

MCI_AVI_SETVIDEO_PALETTE_HALFTONE

Indicates that the halftone palette should be used, instead of the default palette. This flag is recognized only by the MCIAVI digital-video driver.

MCI_DGV_SETVIDEO_BITSPERPEL

The number of bits per pixel is specified in the dwValue member of the structure identified by lpSetVideo. The number of bits per pixel is used for saving captured or recorded data

MCI_DGV_SETVIDEO_BRIGHTNESS

The video brightness level is specified as a factor in the dwValue member of the structure identified by lpSetVideo.

MCI_DGV_SETVIDEO_COLOR

The video color saturation level is specified as a factor in the dwValue member of the structure identified by lpSetVideo.

MCI_DGV_SETVIDEO_CONTRAST

The video contrast level is specified as a factor in the dwValue member of the structure identified by lpSetVideo.

MCI_DGV_SETVIDEO_FRAME_RATE

A frame rate is specified in the dwValue member of the structure identified by lpSetVideo. The rate is specified in units of frames per second times 1000. For example, 29.97 frames per second is specified as 29970.

MCI_DGV_SETVIDEO_GAMMA

A gamma correction exponent value is specified in the dwValue member of the structure identified by lpSetVideo. Gamma correction adjusts the mapping between the intensity encoded in the presentation source and the displayed brightness. The value is the exponent multiplied by 1000. For example, 2200 indicates an exponent of 2.2. A value of 1000 indicates an exponent of 1, which applies no gamma correction.

MCI_DGV_SETVIDEO_KEY_COLOR

A key color is specified in the dwValue member of the structure identified by lpSetVideo. The key color is a Windows RGB value.

MCI_DGV_SETVIDEO_KEY_INDEX

A key index value is specified in the dwValue member of the structure identified by lpSetVideo. The index parameter is a physical palette index.

MCI_DGV_SETVIDEO_PALHANDLE

A palette handle is specified in the dwValue member of the structure identified by lpSetVideo. The palette handle is contained in the low-order word. Digital-video devices should not free the palette passed with this command. Applications should free it after they close the device. This flag is supported only by devices that use palettes. If this specified palette handle is zero, then the default palette is used.

MCI_DGV_SETVIDEO_SHARPNESS

A video sharpness value is specified as a factor in the dwValue member of the structure identified by lpSetVideo.

MCI_DGV_SETVIDEO_SOURCE

A constant specifying the source of the video input is specified in the dwValue member of the structure identified by lpSetVideo. The following constants are defined:

MCI_DGV_SETVIDEO_SRC_NTSC

Specifies NTSC.

MCI_DGV_SETVIDEO_SRC_PAL

Specifies PAL.

MCI_DGV_SETVIDEO_SRC_RGB

Specifies RGB.

MCI_DGV_SETVIDEO_SRC_SECAM

Specifies SECAM.

MCI_DGV_SETVIDEO_SRC_SVIDEO

Specifies SVIDEO.

MCI_DGV_SETVIDEO_STREAM

A video stream is specified in the dwValue member of the structure identified by lpSetVideo. The integer value specifies the video stream played back from the workspace. If the stream is not specified and the file format does not define a default stream, the first physically interleaved video stream is played.

MCI_DGV_SETVIDEO_TINT

A video tint value is specified as a factor in the dwValue member of the structure identified by lpSetVideo. Typically, this adjustment is modeled after the tint control of many color television sets, with 250 defined as green, 750 defined as red, and 0 (or 1000) defined as blue. The nominal value is always 500.

MCI_DGV_SETVIDEO_OUTPUT

The MCI_DGV_SETVIDEO_BRIGHTNESS, MCI_DGV_SETVIDEO_COLOR, MCI_DGV_SETVIDEO_CONTRAST, MCI_DGV_SETVIDEO_GAMMA, MCI_DGV_SETVIDEO_SHARPNESS, or MCI_DGV_SETVIDEO_TINT flag is modified so that it affects only the displayed signal and not what is recorded. If possible, this is the default when monitoring a file.

MCI_DGV_SETVIDEO_OVER

A transition length parameter is included in the dwOver member of the structure identified by lpSetVideo. The transition length specifies how long (in the current time format) it should take to make a change. If this flag is not used, the change occurs immediately.

MCI_DGV_SETVIDEO_QUALITY

The lpstrQuality member of the structure identified by lpSetVideo contains an address of a buffer describing the video quality. A text-string in the buffer specifies the characteristics of the video compression algorithm.

The MCI_DGV_SETVIDEO_ALG flag can be used to select a quality descriptor for the specified algorithm. If this flag is omitted, then the current algorithm is used.

The algorithms and descriptor names available depend on the device. Each device supplies documentation for the available algorithms and a description of the applicable descriptor names. The MCI_QUALITY command can define additional descriptor names. All devices support the descriptors "low", "medium", and "high". The default is driver specific.

MCI_DGV_SETVIDEO_RECORD

Specifies whether recording includes or excludes video data. When combined with MCI_SET_ON, video data is recorded. When combined with MCI_SET_OFF, video data is excluded. The default includes video data.

MCI_DGV_SETVIDEO_SRC_NUMBER

A number for the video source is specified in the dwSourceNumber member of the structure identified by lpSetVideo. If there is more than one input of the type specified by MCI_DGV_SETVIDEO_VALUE, the value selects the input. This flag must always be used with MCI_DGV_SETVIDEO_SOURCE. If MCI_DGV_SETVIDEO_VALUE is omitted, however, the specified source number indicates the absolute source to use as specified in the MCI_LIST command.

MCI_DGV_SETVIDEO_STILL

The algorithm name or quality value specified applies to still images.

Every device driver must support an algorithm of "none", which means no compression. This is the default. In this case, digital-video devices save still images as RGB format device-independent bitmaps (DIBs).

MCI_DGV_SETVIDEO_VALUE

A value is included in the dwValue member of the structure identified by lpSetVideo. The meaning of the value is specified by the MCI_DGV_SETVIDEO_ITEM flag.

MCI_SET_OFF

Disables video output. For digital-video devices, disabling video sets the pixels in the destination rectangle defined by the MCI_PUT command (or its default, the client region of the current window) to a solid color, but it has no effect on the frame buffer. You can hide the window with the MCI_WINDOW command if desired. The source of video, whether it's the workspace or an external input, might continue to store new images in the frame buffer, but they are not displayed until the video is enabled. While applications should use the MCI_SETVIDEO command to control this function, digital-video devices must still support this flag. The default value after an open is on.

MCI_SET_ON

Enables video output.

For digital-video devices, the lpSetVideo parameter points to an MCI_DGV_SETVIDEO_PARMS structure.

The following additional flags are used with the vcr device type:

MCI_VCR_SETVIDEO_RECORD

Sets the video recording to on or off. Used in conjunction with one of following flags:

MCI_SET_ON

Video recording on.

MCI_SET_OFF

Video recording off. It might be necessary to first turn off the assemble recording (using the MCI_SET command with the MCI_VCR_SET_ASSEMBLE_RECORD flag set to off) before the video recording can be turned off.

MCI_TRACK

The dwTrack member of the structure identified by lpSetVideo specifies which track is affected by the command.

MCI_VCR_SETVIDEO_SOURCE

Sets the video source, and must be used with the MCI_VCR_SETVIDEO_TO flag.

MCI_VCR_SETVIDEO_MONITOR

Sets the video source monitor, and must be used with the MCI_VCR_SETVIDEO_TO flag.

MCI_VCR_SETVIDEO_TO

The dwTo member of the structure identified by lpSetVideo contains one of the following constants:

MCI_VCR_SRC_TYPE_TUNER
MCI_VCR_SRC_TYPE_LINE
MCI_VCR_SRC_TYPE_AUX
MCI_VCR_SRC_TYPE_GENERIC
MCI_VCR_SRC_TYPE_MUTE
MCI_VCR_SRC_TYPE_OUTPUT
MCI_VCR_SRC_TYPE_RGB

MCI_VCR_SETVIDEO_NUMBER

The dwNumber member of the structure identified by lpSetVideo contains the video input (of the type specified in the dwTo member) to use.

For VCR devices, the lpSetVideo parameter points to an MCI_VCR_SETVIDEO_PARMS structure.

See Also

MCI_DGV_SETVIDEO_PARMS
, MCI_GENERIC_PARMS, MCI_LIST, MCI_PUT, MCI_QUALITY, MCI_RECORD, MCI_RESERVE, MCI_SET, MCI_VCR_SETVIDEO_PARMS, MCI_WINDOW, RGB

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database