From 545b33b647532718665cb3b1138a1d951c657666 Mon Sep 17 00:00:00 2001 From: Paulchen Panther Date: Sun, 14 Feb 2021 16:36:50 +0100 Subject: [PATCH 1/3] Do not show unsupported grabbers --- libsrc/grabber/mediafoundation/MFGrabber.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libsrc/grabber/mediafoundation/MFGrabber.cpp b/libsrc/grabber/mediafoundation/MFGrabber.cpp index b49f8d75..4252558f 100644 --- a/libsrc/grabber/mediafoundation/MFGrabber.cpp +++ b/libsrc/grabber/mediafoundation/MFGrabber.cpp @@ -435,11 +435,12 @@ void MFGrabber::enumVideoCaptureDevices() { QList 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); From 018651f09977e581c84765aeb183fd991d138807 Mon Sep 17 00:00:00 2001 From: Paulchen Panther Date: Sun, 14 Feb 2021 19:20:31 +0100 Subject: [PATCH 2/3] Copy Log to Clipboard --- assets/webconfig/js/content_logging.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/assets/webconfig/js/content_logging.js b/assets/webconfig/js/content_logging.js index 8ace208d..1e8ba516 100644 --- a/assets/webconfig/js/content_logging.js +++ b/assets/webconfig/js/content_logging.js @@ -93,11 +93,11 @@ $(document).ready(function() { if (sys.cpuRevision) info += 'CPU Revision: ' + sys.cpuRevision + '\n'; if (sys.cpuHardware) - info += 'CPU Hardware: ' + sys.cpuHardware + '\n'; + info += 'CPU Hardware: ' + sys.cpuHardware + '\n'; info += 'Kernel: ' + sys.kernelType+' ('+sys.kernelVersion+' (WS: '+sys.wordSize+'))' + '\n'; info += 'Qt Version: ' + sys.qtVersion + '\n'; - info += 'Python Version: ' + sys.pyVersion + '\n'; + info += 'Python Version: ' + sys.pyVersion + '\n'; info += 'Browser/OS: ' + navigator.userAgent + '\n\n'; //create prios @@ -169,12 +169,24 @@ $(document).ready(function() { messages = (event.response.result.messages); if(messages.length != 0 && !createdCont) { - $('#log_content').html('
'); + $('#log_content').html('\ +
\ + \ + '); createdCont = true; $('#btn_autoscroll').off().on('click',function() { toggleClass('#btn_autoscroll', "btn-success", "btn-danger"); }); + + $('#btn_clipboard').off().on('click',function() { + const temp = document.createElement('textarea'); + temp.textContent = document.getElementById("logmessages").textContent; + document.body.append(temp); + temp.select(); + document.execCommand("copy"); + temp.remove(); + }); } for(var idx = 0; idx < messages.length; idx++) From 74147d200f36ee910fc6d0d69a1631b6458e3b10 Mon Sep 17 00:00:00 2001 From: LordGrey Date: Mon, 15 Feb 2021 20:12:00 +0100 Subject: [PATCH 3/3] Update Grabber schema and Defaults --- config/hyperion.config.json.default | 1 - libsrc/grabber/mediafoundation/MFWrapper.cpp | 2 +- libsrc/grabber/v4l2/V4L2Wrapper.cpp | 2 +- libsrc/hyperion/schema/schema-grabberV4L2.json | 11 +++++------ 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/config/hyperion.config.json.default b/config/hyperion.config.json.default index 7b83dded..040187eb 100644 --- a/config/hyperion.config.json.default +++ b/config/hyperion.config.json.default @@ -68,7 +68,6 @@ "width" : 0, "height" : 0, "fps" : 15, - "standard" : "NO_CHANGE", "flip" : "NO_CHANGE", "fpsSoftwareDecimation" : 0, "sizeDecimation" : 8, diff --git a/libsrc/grabber/mediafoundation/MFWrapper.cpp b/libsrc/grabber/mediafoundation/MFWrapper.cpp index 155f4740..c70aa0cd 100644 --- a/libsrc/grabber/mediafoundation/MFWrapper.cpp +++ b/libsrc/grabber/mediafoundation/MFWrapper.cpp @@ -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( diff --git a/libsrc/grabber/v4l2/V4L2Wrapper.cpp b/libsrc/grabber/v4l2/V4L2Wrapper.cpp index 8a463ba3..2782f17f 100644 --- a/libsrc/grabber/v4l2/V4L2Wrapper.cpp +++ b/libsrc/grabber/v4l2/V4L2Wrapper.cpp @@ -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"))); } } diff --git a/libsrc/hyperion/schema/schema-grabberV4L2.json b/libsrc/hyperion/schema/schema-grabberV4L2.json index 1325998a..ddb63e15 100644 --- a/libsrc/hyperion/schema/schema-grabberV4L2.json +++ b/libsrc/hyperion/schema/schema-grabberV4L2.json @@ -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": { @@ -55,7 +54,7 @@ "type": "string", "title": "edt_conf_v4l2_resolution_title", "propertyOrder": 7, - "required": true + "required": false }, "width": { "type": "integer", @@ -87,7 +86,7 @@ "type": "string", "title": "edt_conf_v4l2_framerate_title", "propertyOrder": 10, - "required": true + "required": false }, "fps": { "type": "integer",