Partager via


IBasicVideo::GetCurrentImage

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment, Version 2.12 requires DXPAK 1.0 or later