Home > Software engineering >  MediaFoundation enumeration camera is can't find six rooms
MediaFoundation enumeration camera is can't find six rooms

Time:11-22

Problems such as the title, here is the code bosses have know how to solve?

Hr=MFCreateAttributes (& amp; PAttributes, 1);

//Ask for source type=video capture devices
If (SUCCEEDED (hr))
{
Hr=pAttributes - & gt; SetGUID (
MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE,
MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID
);

}

//Enumerate devices.
If (SUCCEEDED (hr))
{
Hr=MFEnumDeviceSources (pAttributes, & amp; M_ppDevices, & amp; M_cDevices);
}
  • Related