Merge branch 'mediafoundation' of https://github.com/Paulchen-Panther/hyperion.ng into mediafoundation

This commit is contained in:
Lord-Grey
2021-02-17 23:26:49 +01:00
6 changed files with 26 additions and 14 deletions

View File

@@ -435,11 +435,12 @@ void MFGrabber::enumVideoCaptureDevices()
{
QList<DeviceProperties> devicePropertyList;
QString dev = QString::fromUtf16((const ushort*)name);
Debug(_log, "Found capture device: %s", QSTRING_CSTR(dev));
IMFMediaSource *pSource = nullptr;
if(SUCCEEDED(devices[i]->ActivateObject(IID_PPV_ARGS(&pSource))))
{
Debug(_log, "Found capture device: %s", QSTRING_CSTR(dev));
IMFMediaType *pType = nullptr;
IMFSourceReader* reader;
if(SUCCEEDED(MFCreateSourceReaderFromMediaSource(pSource, NULL, &reader)))
@@ -481,7 +482,8 @@ void MFGrabber::enumVideoCaptureDevices()
pSource->Release();
}
_deviceProperties.insert(dev, devicePropertyList);
if (!devicePropertyList.isEmpty())
_deviceProperties.insert(dev, devicePropertyList);
}
CoTaskMemFree(symlink);

View File

@@ -127,7 +127,7 @@ void MFWrapper::handleSettingsUpdate(settings::type type, const QJsonDocument& c
_grabber.setPixelDecimation(obj["sizeDecimation"].toInt(8));
// flip mode
_grabber.setFlipMode(obj["flip"].toString("no-change"));
_grabber.setFlipMode(obj["flip"].toString("NO_CHANGE"));
// image cropping
_grabber.setCropping(

View File

@@ -151,6 +151,6 @@ void V4L2Wrapper::handleSettingsUpdate(settings::type type, const QJsonDocument&
obj["blueSignalThreshold"].toDouble(0.0)/100.0);
_grabber.setDeviceVideoStandard(
obj["device"].toString("auto"),
parseVideoStandard(obj["standard"].toString("no-change")));
parseVideoStandard(obj["standard"].toString("NO_CHANGE")));
}
}

View File

@@ -7,7 +7,7 @@
"type": "string",
"title": "edt_conf_v4l2_device_title",
"propertyOrder": 1,
"required": true
"required": false
},
"device": {
"type": "string",
@@ -23,7 +23,7 @@
"type": "string",
"title": "edt_conf_v4l2_input_title",
"propertyOrder": 3,
"required": true
"required": false
},
"input": {
"type": "integer",
@@ -40,8 +40,7 @@
"standard": {
"type": "string",
"title": "edt_conf_v4l2_standard_title",
"default": "auto",
"required": true,
"required": false,
"propertyOrder": 5
},
"encoding": {
@@ -56,7 +55,7 @@
"type": "string",
"title": "edt_conf_v4l2_resolution_title",
"propertyOrder": 7,
"required": true
"required": false
},
"width": {
"type": "integer",
@@ -88,7 +87,7 @@
"type": "string",
"title": "edt_conf_v4l2_framerate_title",
"propertyOrder": 10,
"required": true
"required": false
},
"fps": {
"type": "integer",