Compartilhar via


IBasicVideo::GetCurrentImage (Compact 2013)

3/26/2014

This method retrieves the current image waiting at the renderer.

Syntax

HRESULT GetCurrentImage(
  long* pBufferSize,
  long* pDIBImage
);

Parameters

  • pBufferSize
    [in, out] Size of the buffer the caller is passing in.
  • pDIBImage
    [out] Pointer to a buffer where the complete image will be stored in device-independent bitmap (DIB) format. The buffer must be cast to a long pointer for the function.

Return Value

Returns an HRESULT value.

Remarks

An application can use this method to get a copy of the current image the video renderer holds when paused.

The size of the buffer required to hold the image can be obtained by calling the method with a null image pointer. In this case, the buffer size is filled out with the byte count required.

The buffer size pointer must always be valid. If the application calls this method and the buffer size is too small to hold the image, the renderer returns E_OUTOFMEMORY.

Pause the video renderer before calling this method. Calling this method in any other state than paused returns VFW_E_NOT_PAUSED.

Depending on what data the source filter has available, the video renderer is not guaranteed to service this request.

If no image is available, it returns E_FAIL.

When called successfully, the output image pointer is filled with the entire DIB image, including the Microsoft Win32 BITMAPINFOHEADER structure, required palette, and bit masks as defined in the Win32 BITMAPINFO structure.

The format of the image that is returned depends on the type provided by the source filter, and cannot be explicitly defined in advance.

Typically, the image will be a 24-bit, 16-bit, or 8-bit palletized image.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

IBasicVideo Interface