DEVESC_EXTQUERY
GreEscape DEVESC_EXTQUERY is called by EnDIVE users to get information describing the characteristics of the motion video accelerator.
- Simulation support
- None.
Syntax
GreEscape(hdc, ICODE, lInCount, pbInData, plOutCount, pbOutData);
Parameters
- hdc (HDC) - input
- Device context handle.
- ICODE (LONG) - input
- DEVESC_EXTQUERY escape code.
- lInCount (LONG) - input
- Zero (0).
- pbInData (PBYTE) - input
- NULL.
- plOutCount (PLONG) - input
- Number of bytes pointed to by pbOutData.
- pbOutData (PLONG) - input
- Pointer to IMAGECAPS 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
The function returns the capabilities and formats supported by the device. When called, GreEscape DEVESC_EXTQUERY returns a pointer to an array of filled-in IMAGECAPS structures. The number of structures in the array is returned in the ulENDIVEDrivers field of the FBINFO data structure, which is returned by the GreEscape DEVESC_QUERYFB function.
The IMAGECAPS data structure contains capabilities flags and arrays of supported CODECs and color space definitions for both source and target data. For source color spaces, the COLORINFO data structure is organized in order of preference from the driver's perspective, from the most preferable to the least.
To use GreEscape DEVESC_EXTQUERY, the caller allocates enough memory for 8 CODECs, 8 source color formats, and 8 target color formats. If the allocated memory is insufficient for a particular configuration, the driver returns an error code with the suggested values in the appropriate ulNumxxxx field in the IMAGECAPS data structure. The caller must then reallocate enough memory and call the driver again.
The GreEscape DEVESC_EXTPUT and GreEscape DEVESC_EXTGET functions are related to GreEscape DEVESC_EXTQUERY.
Source Code Sample
Declaration:
#define INCL_GRE_DEVICE #include <os2.h> HDC hdc; /* Device context handle. */ LONG ICODE; /* DEVESC_EXTQUERY escape code. */ LONG lInCount; /* Zero (0). */ PBYTE pbInData; /* NULL. */ PLONG plOutCount; /* Number of bytes pointed to by pbOutData. */ PLONG pbOutData; /* Pointer to IMAGECAPS data structure. */ LONG rc; /* Return Codes. */ rc = GreEscape(hdc, ICODE, lInCount, pbInData, plOutCount, pbOutData);