MFCombineSamples function (mfapi.h)

Concatenates a media sample onto another sample if their combined duration does not exceed the specified duration.

Syntax

HRESULT MFCombineSamples(
  IMFSample *pSample,
  IMFSample *pSampleToAdd,
  DWORD     dwMaxMergedDurationInMS,
  BOOL      *pMerged
);

Parameters

pSample

A pointer to an IMFSample to which the sample provided in the pSampleToAdd parameter is appended.

pSampleToAdd

A pointer to an IMFSample to append to the sample provided in the pSample parameter.

dwMaxMergedDurationInMS

The maximum duration in milliseconds that the combined sample can fill for the operation to be successful.

pMerged

Output parameter that receives a BOOL indicating whether the sample was successfully appended.

Return value

Returns HRESULT.

Remarks

Split combined samples by calling MFSplitSample

Requirements

Requirement Value
Minimum supported client Windows 10, version 2004 (10.0; Build 19041)
Minimum supported server Windows Server, version 2004 (10.0; Build 19041)
Header mfapi.h
Library Mfplat.lib