Export (0) Print
Expand All
Expand Minimize

MFCreateDeviceSourceActivate function

Creates an activation object that represents a hardware capture device.

Syntax


STDAPI MFCreateDeviceSourceActivate(
  _In_   IMFAttributes *pAttributes,
  _Out_  IMFActivate **ppActivate
);

Parameters

pAttributes [in]

Pointer to the IMFAttributes interface of an attribute store, which is used to select the device. See Remarks.

ppActivate [out]

Receives a pointer to the IMFActivate interface. The caller must release the interface.

Remarks

This function creates an activation object that can be used to create a media source for a hardware device. To create the media source itself, call IMFActivate::ActivateObject.

The pAttributes parameter specifies an attribute store. To create the attribute store, call the MFCreateAttributes function. You must set the MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE attribute, which specifies the type of device (audio or video).

For audio capture devices, optionally set one of the following attributes:

AttributeDescription

MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID

Specifies the audio endpoint ID of the audio capture device.

MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE

Specifies the device role. If this attribute is set, the function uses the default audio capture device for that device role.

Do not combine this attribute with the MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID attribute.

 

If neither attribute is specified, the function selects the default audio capture device for the eCommunications role.

For video capture devices, you must set the following attribute:

AttributeDescription

MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK

Specifies the symbolic link to the device.

 

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Mfidl.h

Library

Mf.lib

DLL

Mf.dll

See also

Activation Objects
Audio/Video Capture in Media Foundation
Capture Device Attributes
Media Foundation Functions
MFCreateDeviceSource

 

 

Community Additions

ADD
Show:
© 2014 Microsoft