Microsoft DirectX 8.1 (C++) |
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 for a poster 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.
See Also