Digital Video Extensions

DWORD lParam1

The following additional flags apply to digital-video devices supporting MCI_PUT:

MCI_DGV_RECT

Specifies that the rc field of the data structure identified by lParam2 contains a valid rectangle. The rectangle defines an area for the MCI_DGV_PUT_SOURCE, MCI_DGV_PUT_DESTINATION, MCI_DGV_PUT_FRAME, MCI_DGV_PUT_VIDEO, or MCI_DGV_PUT_WINDOW flag. The four integers of the rectangle denote the coordinates of the upper-left pixel and the width and height of the rectangle. If MCI_PUT is not used to define a region, the rectangle defaults to the full image. Some devices can recognize negative values used for the height and width. The interpretation of negative values is device dependent. The pixel origin is defined such that pixel (0, 0) is in the upper-left corner of the client rectangle, frame buffer, or input depending on the specific region.

Some devices recognize negative values used for the height and width. The interpretation of negative values is device dependent.

MCI_DGV_PUT_DESTINATION

Indicates the rectangle defined for MCI_DGV_RECT applies to the destination rectangle. The destination rectangle specifies which portion of the client window associated with this device driver instance is used to show the image or video. The destination rectangle is specified relative to the upper-left corner of the client window in pixel coordinates. If the specified rectangle is outside the client region, then no pixels are drawn. The default rectangle is the full client area.

The device driver will attempt to linearly scale the rectangle to the specified portion of the display. Device drivers that do not support stretching, or cannot perform the specific stretch indicated, might display a different sized image starting at the upper-left pixel. Devices that cannot shrink the image to the requested size will crop the right and bottom of the image or video to avoid drawing outside the specified destination rectangle.

MCI_DGV_PUT_SOURCE

Indicates the rectangle defined for MCI_DGV_RECT applies to the source rectangle. The source rectangle specifies which portion of the frame buffer is scaled to fit into the destination rectangle.

MCI_DGV_PUT_FRAME

Indicates the rectangle defined for MCI_DGV_RECT applies to the frame rectangle. The frame rectangle specifies the portion of the frame buffer used as the destination of the video images obtained from the video rectangle. The video should be scaled to fit within the frame buffer rectangle.

The rectangle is specified in frame buffer coordinates. The default rectangle is the full frame buffer. Specifying this rectangle lets the device scale the image as it digitizes the data. Devices that cannot scale the image reject this command with MCIERR_UNSUPPORTED_FUNCTION. You can use the MCI_GETDEVCAPS_CAN_STRETCH_INPUT flag with MCI_GETDEVCAPS to determine if a device scales the image. A device returns FALSE if it cannot scale the image.

MCI_DGV_PUT_VIDEO

Indicates that the rectangle defined for MCI_DGV_RECT applies to the video rectangle. The video rectangle specifies which portion of the current presentation source is stored in the frame buffer. The rectangle is specified using the natural coordinates of the presentation source. It allows the specification of cropping that occurs prior to storing images and video in the frame buffer. The default rectangle is the full active scan area or the full decompressed images and video.

MCI_DGV_PUT_WINDOW

Indicates that the rectangle defined for MCI_DGV_RECT applies to the display window. This rectangle is relative to the parent window of the display window (usually the desktop). If the window is not specified, it defaults to the initial window size and position. (This is usually set to an optimum size and aspect ratio.)

MCI_DGV_PUT_CLIENT

Indicates that the rectangle defined for MCI_DGV_RECT applies to the position of the client window. The rectangle specified with MCI_DGV_RECT is relative to the parent window of the display window. MCI_DGV_PUT_WINDOW can be sent concurrently with this flag.

LPMCI_DGV_PUT_PARMS lParam2

Specifies a far pointer to a MCI_DGV_PUT_PARMS data structure.

Return Value

Returns zero if successful. Otherwise, it returns an MCI error code.

Comments

A flag specifying the video source or destination must be used with this command.

See Also

MCI_WHERE