Platform SDK: DirectX

IDirectDrawVideoPort::GetBandwidthInfo

The IDirectDrawVideoPort::GetBandwidthInfo method retrieves the minimum required overlay zoom factors and device limitations of a video port that uses the provided output pixel format.

HRESULT GetBandwidthInfo( 
  LPDDPIXELFORMAT lpddpfFormat,       
  DWORD dwWidth,                      
  DWORD dwHeight,                     
  DWORD dwFlags,                      
  LPDDVIDEOPORTBANDWIDTH lpBandwidth  
);

Parameters

lpddpfFormat
Address of a DDPIXELFORMAT structure that describes the output pixel format for which bandwidth information is retrieved.
dwWidth and dwHeight
Dimensions of an overlay or video data. These parameters depend on the value specified in the dwFlags parameter.
dwFlags
Flags indicating how the method is to interpret the dwWidth and dwHeight parameters. Can be one of the following values:
DDVPB_OVERLAY
The dwWidth and dwHeight parameters indicate the size of the source overlay surface. Use this flag when the video port is dependent on the overlay source size.
DDVPB_TYPE
The dwWidth and dwHeight parameters are not set. The method retrieves the device's dependency type in the dwCaps member of the associated DDVIDEOPORTBANDWIDTH structure. Use this flag when you call this method the first time.
DDVPB_VIDEOPORT
The dwWidth and dwHeight parameters indicate the prescale size of the video data that the video port writes to the frame buffer. Use this flag when the video port is dependent on the overlay zoom factor.
lpBandwidth
Address of a DDVIDEOPORTBANDWIDTH structure to be filled with the retrieved bandwidth and device dependency information.

Return Values

If the method succeeds, the return value is DD_OK.

If it fails, the method can return one of the following error values:

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS

Remarks

This method is usually called twice. When you make the first call, specify the DDVPB_TYPE flag in the dwFlags parameter to retrieve information about the device's overlay dependency type. Subsequent calls using the DDVPB_VIDEOPORT or DDVPB_OVERLAY flags must be interpreted considering the device's dependency type.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dvp.h.
  Import Library: Use ddraw.lib.