![]() The symbolic link uniquely identifies the device on the system, but is not a readable string. For video devices, the MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK attribute contains the symbolic link to the device.The display name is suitable for showing to the user, but might not be unique. The MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME attribute contains the display name of the device.You can query the activation objects for various attributes, including the following: Hr = ppDevices->ActivateObject(IID_PPV_ARGS(ppSource)) Create a media source for the first device in the list. Hr = MFEnumDeviceSources(pConfig, &ppDevices, &count) ![]() HRESULT hr = MFCreateAttributes(&pConfig, 1) Create an attribute store to hold the search criteria. The following example creates a media source for the first video capture device in the enumeration list: HRESULT CreateVideoCaptureDevice(IMFMediaSource **ppSource) Each pointer represents an activation object for one device on the system.Ĭall the IMFActivate::ActivateObject method to create an instance of the media source from one of the activation objects. This function allocates an array of IMFActivate pointers. MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUIDĬall the MFEnumDeviceSources function. MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_GUID Set the MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE attribute to one of the following values: Value To enumerate the capture devices on the system, perform the following steps:Ĭall the MFCreateAttributes function to create an attribute store. In most cases, the application will not use this interface directly, but will use a higher-level API such as the Source Reader to control the capture device. Audio capture devices are supported through Windows Audio Session API (WASAPI).Ī capture device is represented in Media Foundation by a media source object, which exposes the IMFMediaSource interface. ![]() Video capture devices are supported through the UVC class driver and must be compatible with UVC 1.1. Microsoft Media Foundation supports audio and video capture. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |