共用方式為


ISampleGrabberCB::SampleCB

 
Microsoft DirectShow 9.0

ISampleGrabberCB::SampleCB

The SampleCB method is a 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 IMediaSample interface of the sample.

Return Value

Returns S_OK if successful, or an HRESULT error code otherwise.

Remarks

This callback method receives a pointer to the original media sample. To get a copy of the data, instead of the original data, use the BufferCB callback.

To set up the callback, call ISampleGrabber::SetCallback.

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