IMFSampleGrabberSinkCallback interface (mfidl.h)

Callback interface to get media data from the sample-grabber sink.


The IMFSampleGrabberSinkCallback interface inherits from IMFClockStateSink. IMFSampleGrabberSinkCallback also has these types of members:


The IMFSampleGrabberSinkCallback interface has these methods.


Called when the sample-grabber sink receives a new media sample.

Called when the presentation clock is set on the sample-grabber sink.

Called when the sample-grabber sink is shut down.


The sample-grabber sink enables an application to get data from the Media Foundation pipeline without implementing a custom media sink. To use the sample-grabber sink, the application must perform the following steps:

  1. Implement the IMFSampleGrabberSinkCallback interface.
  2. Call MFCreateSampleGrabberSinkActivate, passing in the IMFSampleGrabberSinkCallback interface pointer. This function returns an IMFActivate object.
  3. Create a topology that includes an output node with the sink's IMFActivate object.
  4. Pass this topology to the Media Session.
During playback, the sample-grabber sink calls methods on the application's callback.

You cannot use the sample-grabber sink to get protected content.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header mfidl.h

See also


Media Foundation Interfaces