Microsoft DirectX 8.0 |
This interface provides callback methods for the ISampleGrabber::SetCallback method. If your application calls that method, it must implement this interface. For more information, see ISampleGrabber.
Requirements
Requires Qedit.h.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. ISampleGrabberCB methods Description SampleCB Callback method that receives a pointer to the media sample. BufferCB Callback method that receives a pointer to the sample buffer.
Callback method that receives a pointer to the sample buffer.
Syntax
HRESULT BufferCB( double SampleTime, BYTE *pBuffer, long BufferLen );
Parameters
- SampleTime
- Starting time of the sample, in seconds.
- pBuffer
- Pointer to a buffer that contains the sample data.
- BufferLen
- Length of the buffer pointed to by pBuffer, in bytes.
Return Value
Returns S_OK if successful, or an HRESULT error code otherwise.
Remarks
Call the ISampleGrabber::SetBufferSamples method to activate sample buffering. Otherwise, the buffer will be empty.
Callback method that receives a pointer to the media sample.
Syntax
HRESULT SampleCB( double SampleTime, IMediaSample *pSample );
Parameters
- SampleTime
- Starting time of the sample, in seconds.
- pSample
- Pointer to the sample's IMediaSample interface.
Return Value
Returns S_OK if successful, or an HRESULT error code otherwise.