|Microsoft DirectX 9.0|
The implementation of this method is provided as sample code with the DirectShow SDK. It is not a supported DirectShow API.
The SetCallback method specifies a callback method that the Grabber filter will call whenever it receives a media sample.
Pointer to the callback function. Specify NULL to cancel the callback. See Remarks for details.
The callback function must have the following signature:
typedef HRESULT (*SAMPLECALLBACK) ( IMediaSample *pSample, REFERENCE_TIME *StartTime, REFERENCE_TIME *StopTime, BOOL TypeChanged );
The pSample parameter is a pointer to the media sample's IMediaSample interface. The StartTime and StopTime parameters are pointers to the sample start and stop times. The TypeChanged parameter equals TRUE if the connect type has changed since the last sample. However, the Grabber filter does not check for dynamic format changes on the media sample. The application should do this inside the callback function. For more information, see QueryAccept (Downstream).