Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Called when the sample-grabber sink receives a new media sample.
Syntax
HRESULT OnProcessSampleEx(
  [in] REFGUID       guidMajorMediaType,
  [in] DWORD         dwSampleFlags,
  [in] LONGLONG      llSampleTime,
  [in] LONGLONG      llSampleDuration,
  [in] const BYTE    *pSampleBuffer,
  [in] DWORD         dwSampleSize,
  [in] IMFAttributes *pAttributes
);
Parameters
[in] guidMajorMediaType
The major type GUID that specifies the format of the data. For a list of possible values, see Major Media Types.
[in] dwSampleFlags
Sample flags. The sample-grabber sink gets the value of this parameter by calling the IMFSample::GetSampleFlags method of the media sample.
[in] llSampleTime
The presentation time for this sample, in 100-nanosecond units. If the sample does not have a presentation time, the value of this parameter is _I64_MAX
[in] llSampleDuration
The duration of the sample, in 100-nanosecond units.
If the sample does not have a duration, the value of this parameter is _I64_MAX.
[in] pSampleBuffer
A pointer to a buffer that contains the sample data.
[in] dwSampleSize
The size, in bytes, of the pSampleBuffer buffer.
[in] pAttributes
A pointer to the IMFAttributes interface. Use this interface to get the attributes for this sample (if any). For a list of sample attributes, see Sample Attributes.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
If you use the sample-grabber sink in a playback topology, this method should return quickly, or it might interfere with playback. Do not block the thread, wait on events, or perform other lengthy operations inside this method.
Requirements
| Requirement | Value | 
|---|---|
| Minimum supported client | Windows 7 [desktop apps only] | 
| Minimum supported server | Windows Server 2008 R2 [desktop apps only] | 
| Target Platform | Windows | 
| Header | mfidl.h |