The MCI_SETVIDEO command sets values associated with video playback. Digital-video and VCR devices recognize this command.
To send this command, call the mciSendCommand function with the following parameters.
MCIERROR mciSendCommand( MCIDEVICEID wDeviceID, MCI_SETVIDEO, DWORD dwFlags, (DWORD) (LPMCI_GENERIC_PARMS) lpSetVideo );
Device identifier of the MCI device that is to receive the command message.
MCI_NOTIFY, MCI_WAIT, or MCI_TEST. For information about these flags, see The Wait, Notify, and Test Flags.
Pointer to an MCI_GENERIC_PARMS structure. (Devices with extended command sets might replace this structure with a device-specific structure.)
Returns zero if successful or an error otherwise.
The following additional flags are used with the digitalvideo device type:
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.
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.)
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.
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:
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.
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.
Indicates that the halftone palette should be used, instead of the default palette. This flag is recognized only by the MCIAVI digital-video driver.
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
The video brightness level is specified as a factor in the dwValue member of the structure identified by lpSetVideo.
The video color saturation level is specified as a factor in the dwValue member of the structure identified by lpSetVideo.
The video contrast level is specified as a factor in the dwValue member of the structure identified by lpSetVideo.
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.
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.
A key color is specified in the dwValue member of the structure identified by lpSetVideo. The key color is a Windows RGB value.
A key index value is specified in the dwValue member of the structure identified by lpSetVideo. The index parameter is a physical palette index.
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.
A video sharpness value is specified as a factor in the dwValue member of the structure identified by lpSetVideo.
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:
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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:
Sets the video recording to on or off. Used in conjunction with one of following flags:
Video recording on.
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.
The dwTrack member of the structure identified by lpSetVideo specifies which track is affected by the command.
Sets the video source, and must be used with the MCI_VCR_SETVIDEO_TO flag.
Sets the video source monitor, and must be used with the MCI_VCR_SETVIDEO_TO flag.
The dwTo member of the structure identified by lpSetVideo contains one of the following constants:
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.
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Mmsystem.h; include Windows.h.