I'm using UWP API from C++ via WinRT and want to check if a camera is in use (before trying to access or open it):
using namespace winrt;
using namespace Windows::Devices::Enumeration;
auto cameras = DeviceInformation::FindAllAsync(DeviceClass::VideoCapture);
// choose camera...
for (const auto camera_info : camera_results)
{
// camera_info.IsEnabled() returns 1, I guess it's not about in use or not
}
Is there a way to get device (camera in this case) state, if it's in use or not?
Even using WinAPI not WinRT