Compartir a través de


CBaseControlVideo::GetImageSize

 
Microsoft DirectShow 9.0

CBaseControlVideo::GetImageSize

The GetImageSize method retrieves video image size information.

Syntax

  HRESULT GetImageSize(
    VIDEOINFOHEADER *pVideoInfo,
    long *pBufferSize,
    RECT *pSourceRect
);

Parameters

pVideoInfo

Pointer to a VIDEOINFOHEADER structure to be filled in.

pBufferSize

Pointer to the size of the video buffer.

pSourceRect

Pointer to the rectangle dimensions of the source video.

Return Value

Returns an HRESULT value that depends on the implementation; can be one of the following values, or other values not listed.

Value Description
E_FAIL Failure.
E_INVALIDARG Invalid argument. The data format is not compatible.
E_UNEXPECTED Unexpected error occurred. One or more arguments are NULL.
NOERROR Success.

Remarks

This member function is a helper function used for creating memory image renderings of DIB images. It is called from the base class implementation of CBaseControlVideo::GetCurrentImage when a null pVideoImage parameter is passed to that member function. As a result, this member function constructs and returns a VIDEOINFOHEADER structure, using the information in pBufferSize and pSourceRect.

Requirements

**  Header:** Declared in Ctlutil.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also