|Microsoft DirectX 9.0|
Retrieves the current media stream's format and, optionally, its desired format.
HRESULT GetFormat( DDSURFACEDESC *pDDSDCurrent, IDirectDrawPalette **ppDirectDrawPalette, DDSURFACEDESC *pDDSDDesired, DWORD *pdwFlags );
[out] Pointer to a DirectDraw surface description that will contain the current media stream's format.
[out] Address of a pointer to an IDirectDrawPalette interface if one exists.
[out] Pointer to a DirectDraw surface description that will contain the current media stream's desired format.
[out] Pointer to the flags set in a DDSURFACEDESC structure. Flags of interest include:
|DDSD_CAPS||Indicates that the surface capability member of the structure is valid.|
|DDSD_HEIGHT||Indicates that the height member of the structure is valid.|
|DDSD_PIXELFORMAT||Indicates that the pixel format member of the structure is valid.|
|DDSD_WIDTH||Indicates that the width member of the structure is valid.|
Returns one of the following values.
|DDERR_INVALIDPARAMS||One of the DirectDraw surface parameters is invalid.|
|E_POINTER||One or more of the required parameters is invalid.|
After you call this method, you can either conform to the current format or attempt to change the format by calling the IDirectDrawMediaStream::SetFormat method.
All of this method's parameters are optional; set any of them to NULL to indicate that you don't want to retrieve that information.
To perform a progressive render, create a single sample and repeatedly use that sample for successive frames of video. Video decompressors use this technique to do partial updates to the previous frame.
You must initialize the dwSize member of the DDSURFACEDESC structure before calling this method.
The DDSD_CAPS flag will return one of the values listed in the DDSCAPS structure or DDSCAPS_DATAEXCHANGE, which is defined as DDSCAPS_SYSTEMMEMORY|DDSCAPS_VIDEOMEMORY in Ddrawex.h.