Jump to content

DEVESC_VIDEOHIDDEN

From EDM2

GreEscape DEVESC_VIDEOHIDDEN is called by EnDIVE users to specify that the video is hidden whenever the video is completely occluded (for example, clipped out, minimized, and so on). This will give the driver a chance to turn off video acceleration if necessary.

Simulation support
None.

Syntax

GreEscape(hdc, ICODE, lInCount, pbInData, plOutCount, pbOutData);

Parameters

hdc (HDC) - input
Device context handle.
ICODE (LONG) - input
DEVESC_VIDEOHIDDEN escape code.
lInCount (LONG) - input
Number of bytes pointed to by pbInData.
pbInData (PUCHAR) - input
Pointer to fBlitterEnabled.
plOutCount (PLONG) - input
Number of bytes pointed to by pbOutData.
pbOutData (PBYTE) - output
Pointer to VRAMREGISTEROUT data structure.

Returns

rc (LONG) - returns
Return Codes.
The handling routine returns:
DEV_OK
Successful
DEVESC_NOTIMPLEMENTED
Escape is not implemented for the specified code
DEVESC_ERROR
Error

Remarks

EnDIVE calls a driver escape (PutImage) for every frame to be put on the screen. When the window is completely obscured or minimized, there are no calls into the driver, even if the video continues to play. For devices that are blitting to the screen, this sequence is acceptable. However, for overlay devices, the video is still on. If another window uses the driver color key color in the area, there will be bleed through. Furthermore, there exists certain situations where RGB and YUV data can be present simultaneously in the frame buffer. If the YUV video data is overpainted by RGB graphics data without adjustments to the data mapping, some of the RGB data will be misinterpreted and cause large patches of video noise on the screen. DEVESC_VIDEOHIDDEN informs the driver that the video is hidden, so that the driver has a chance to turn off video acceleration if necessary.

Source Code Sample

Declaration:

#define INCL_GRE_DEVICE
#include <os2.h>

HDC      hdc;         /*  Device context handle */
LONG     ICODE;       /*  DEVESC_VIDEOHIDDEN escape code */
LONG     lInCount;    /*  sizeof(ULONG) */
PUCHAR   pbInData;    /*  fBlitterEnabled  (TRUE or FALSE) */
PLONG    plOutCount;  /*  Zero  */
PBYTE    pbOutData;   /*  Zero  */
LONG     rc;          /*  Return Codes */

rc = GreEscape(hdc, ICODE, lInCount, pbInData,
       plOutCount, pbOutData);