mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Do not show unsupported grabbers
This commit is contained in:
parent
1c8a637d11
commit
545b33b647
@ -435,11 +435,12 @@ void MFGrabber::enumVideoCaptureDevices()
|
|||||||
{
|
{
|
||||||
QList<DeviceProperties> devicePropertyList;
|
QList<DeviceProperties> devicePropertyList;
|
||||||
QString dev = QString::fromUtf16((const ushort*)name);
|
QString dev = QString::fromUtf16((const ushort*)name);
|
||||||
Debug(_log, "Found capture device: %s", QSTRING_CSTR(dev));
|
|
||||||
|
|
||||||
IMFMediaSource *pSource = nullptr;
|
IMFMediaSource *pSource = nullptr;
|
||||||
if(SUCCEEDED(devices[i]->ActivateObject(IID_PPV_ARGS(&pSource))))
|
if(SUCCEEDED(devices[i]->ActivateObject(IID_PPV_ARGS(&pSource))))
|
||||||
{
|
{
|
||||||
|
Debug(_log, "Found capture device: %s", QSTRING_CSTR(dev));
|
||||||
|
|
||||||
IMFMediaType *pType = nullptr;
|
IMFMediaType *pType = nullptr;
|
||||||
IMFSourceReader* reader;
|
IMFSourceReader* reader;
|
||||||
if(SUCCEEDED(MFCreateSourceReaderFromMediaSource(pSource, NULL, &reader)))
|
if(SUCCEEDED(MFCreateSourceReaderFromMediaSource(pSource, NULL, &reader)))
|
||||||
@ -481,7 +482,8 @@ void MFGrabber::enumVideoCaptureDevices()
|
|||||||
pSource->Release();
|
pSource->Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
_deviceProperties.insert(dev, devicePropertyList);
|
if (!devicePropertyList.isEmpty())
|
||||||
|
_deviceProperties.insert(dev, devicePropertyList);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoTaskMemFree(symlink);
|
CoTaskMemFree(symlink);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user