Creates a media source that aggregates a collection of media sources.
HRESULT MFCreateAggregateSource(
IMFCollection *pSourceCollection,
_Outptr_ IMFMediaSource **ppAggSource
)
pSourceCollection
Type: IMFCollection *
A pointer to the IMFCollection interface of the collection object that contains a list of media sources.
ppAggSource
Type: Outptr IMFMediaSource **
Receives a pointer to the IMFMediaSource interface of the aggregated media source. The caller must release the interface.
Type: HRESULT
The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
| S_OK | The method succeeded. |
| E_INVALIDARG | The pSourceCollection collection does not contain any elements. |
Refer to Media Foundation return codes.
The aggregated media source is useful for combining streams from separate media sources. For example, you can use it to combine a video capture source and an audio capture source.
Header: Declared in mfidl.h.
Library: Use mf.lib.