Skip to main content
IMFCaptureEngineOnSampleCallback::OnSample method

Called when the capture sink receives a sample.

Syntax


HRESULT OnSample(
  [in, optional]  IMFSample pSample
);

Parameters

pSample [in, optional]

A pointer to the IMFSample interface. Use this interface to get the time stamp, duration, and stream data. For more information, see Media Samples. This parameter can be NULL, so make sure to check for a NULL value before you dereference the pointer.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Mfcaptureengine.h

See also

IMFCaptureEngineOnSampleCallback