Microsoft DirectX 9.0

IMediaDet::GetSampleGrabber

The GetSampleGrabber method retrieves a pointer to the ISampleGrabber interface, which enables an application to retrieve individual samples from a media stream.

Syntax

HRESULT GetSampleGrabber( 
    ISampleGrabber **ppVal 
);

Parameters

ppVal

[out] Address of a pointer to receive the ISampleGrabber interface.

Return Value

Returns one of the following HRESULT values:

Value Description
S_OK Success.
E_NOINTERFACE Cannot retrieve the interface because the media detector is not in bitmap grab mode.
E_POINTER NULL pointer argument.

Remarks

Call IMediaDet::EnterBitmapGrabMode before calling this method. The ISampleGrabber interface enables you to retrieve individual media samples from the stream. If you just need a bitmap from a video frame, call the IMediaDet::GetBitmapBits method instead. The ISampleGrabber interface is more flexible, but requires more work by the application.

If this method succeeds, the ISampleGrabber interface that it returns has an outstanding reference count. Be sure to release the interface when you are finished using it.

Requirements

Header: Include Qedit.h. This header file is not compatible with Microsoft® Direct3D® headers later than version 7.

Library: Use strmiids.lib.

See Also