mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Split global capture from instance capture config
This commit is contained in:
parent
ed87d0fd65
commit
980ef90834
@ -3,19 +3,6 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<h3 class="page-header"><i class="fa fa-camera fa-fw"></i><span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span></h3>
|
<h3 class="page-header"><i class="fa fa-camera fa-fw"></i><span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span></h3>
|
||||||
|
|
||||||
<div class="panel panel-default" style="border:0px;">
|
|
||||||
<div class="panel-heading panel-instance" style="border-radius:3px; border-bottom:0px;">
|
|
||||||
<div class="dropdown">
|
|
||||||
<a id="active_instance_dropdown" class="dropdown-toggle" data-toggle="dropdown" href="#" style="text-decoration:none;display:flex;align-items:center;">
|
|
||||||
<div id="active_instance_friendly_name"></div>
|
|
||||||
<div id="btn_hypinstanceswitch" style="white-space:nowrap;"><span class="mdi mdi-lightbulb-group mdi-24px" style="margin-right:0; margin-left:5px;"></span><span class="mdi mdi-menu-down mdi-24px"></span></div>
|
|
||||||
</a>
|
|
||||||
<ul id="hyp_inst_listing" class="dropdown-menu dropdown-alerts" style="cursor:pointer;"></ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="conf_cont"></div>
|
<div id="conf_cont"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
24
assets/webconfig/content/conf_instcapture.html
Normal file
24
assets/webconfig/content/conf_instcapture.html
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<h3 class="page-header"><i class="fa fa-camera fa-fw"></i><span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span></h3>
|
||||||
|
|
||||||
|
<div class="panel panel-default" style="border:0px;">
|
||||||
|
<div class="panel-heading panel-instance" style="border-radius:3px; border-bottom:0px;">
|
||||||
|
<div class="dropdown">
|
||||||
|
<a id="active_instance_dropdown" class="dropdown-toggle" data-toggle="dropdown" href="#" style="text-decoration:none;display:flex;align-items:center;">
|
||||||
|
<div id="active_instance_friendly_name"></div>
|
||||||
|
<div id="btn_hypinstanceswitch" style="white-space:nowrap;"><span class="mdi mdi-lightbulb-group mdi-24px" style="margin-right:0; margin-left:5px;"></span><span class="mdi mdi-menu-down mdi-24px"></span></div>
|
||||||
|
</a>
|
||||||
|
<ul id="hyp_inst_listing" class="dropdown-menu dropdown-alerts" style="cursor:pointer;"></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="conf_cont"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="/js/content_instcapture.js"></script>
|
@ -16,6 +16,34 @@
|
|||||||
<span id="dash_config_status">Status</span>
|
<span id="dash_config_status">Status</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
<table class="table borderless">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="3">
|
||||||
|
<i class="mdi mdi-camera"></i>
|
||||||
|
<span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td data-i18n="edt_conf_fg_heading_title">Screen-Grabber</td>
|
||||||
|
<td style="text-align: right; padding-right: 0">
|
||||||
|
<span id="dash_screen_grabber">disabled</span>
|
||||||
|
<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem('MenuItemGrabber', 'editor_container_screengrabber')" style="text-decoration: none; cursor: pointer"></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td data-i18n="edt_conf_v4l2_heading_title">Video-Grabber</td>
|
||||||
|
<td style="text-align: right; padding-right: 0">
|
||||||
|
<span id="dash_video_grabber">disabled</span>
|
||||||
|
<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem('MenuItemGrabber', 'editor_container_videograbber')" style="text-decoration: none; cursor: pointer"></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
<table class="table borderless">
|
<table class="table borderless">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -367,11 +367,15 @@
|
|||||||
"edt_conf_grabber_discovered_title": "Device discovered",
|
"edt_conf_grabber_discovered_title": "Device discovered",
|
||||||
"edt_conf_grabber_discovered_title_info": "Select your capture device discovered",
|
"edt_conf_grabber_discovered_title_info": "Select your capture device discovered",
|
||||||
"edt_conf_grabber_discovery_inprogress": "Discovery in progress",
|
"edt_conf_grabber_discovery_inprogress": "Discovery in progress",
|
||||||
|
"edt_conf_instC_screen_grabber_device_expl": "The screen capture device used",
|
||||||
|
"edt_conf_instC_screen_grabber_device_title": "Screen capture device",
|
||||||
"edt_conf_instC_systemEnable_expl": "Enables the screen capture for this led hardware instance",
|
"edt_conf_instC_systemEnable_expl": "Enables the screen capture for this led hardware instance",
|
||||||
"edt_conf_instC_systemEnable_title": "Enable screen capture",
|
"edt_conf_instC_systemEnable_title": "Enable screen capture",
|
||||||
"edt_conf_instC_v4lEnable_expl": "Enables the USB capture for this led hardware instance",
|
"edt_conf_instC_v4lEnable_expl": "Enables the USB capture for this led hardware instance",
|
||||||
"edt_conf_instC_v4lEnable_title": "Enable USB capture",
|
"edt_conf_instC_v4lEnable_title": "Enable USB capture",
|
||||||
"edt_conf_instCapture_heading_title": "Instance Capture",
|
"edt_conf_instC_video_grabber_device_expl": "The video capture device used",
|
||||||
|
"edt_conf_instC_video_grabber_device_title": "Video capture device",
|
||||||
|
"edt_conf_instCapture_heading_title": "Capture Devices",
|
||||||
"edt_conf_js_heading_title": "JSON Server",
|
"edt_conf_js_heading_title": "JSON Server",
|
||||||
"edt_conf_log_heading_title": "Logging",
|
"edt_conf_log_heading_title": "Logging",
|
||||||
"edt_conf_log_level_expl": "Depending on loglevel you see less or more messages in your log.",
|
"edt_conf_log_level_expl": "Depending on loglevel you see less or more messages in your log.",
|
||||||
@ -775,11 +779,11 @@
|
|||||||
"general_comp_BOBLIGHTSERVER": "Boblight Server",
|
"general_comp_BOBLIGHTSERVER": "Boblight Server",
|
||||||
"general_comp_FLATBUFSERVER": "Flatbuffers Server",
|
"general_comp_FLATBUFSERVER": "Flatbuffers Server",
|
||||||
"general_comp_FORWARDER": "Forwarder",
|
"general_comp_FORWARDER": "Forwarder",
|
||||||
"general_comp_GRABBER": "Screen Capture",
|
"general_comp_GRABBER": "Capture Screen",
|
||||||
"general_comp_LEDDEVICE": "LED device",
|
"general_comp_LEDDEVICE": "LED Output",
|
||||||
"general_comp_PROTOSERVER": "Protocol Buffers Server",
|
"general_comp_PROTOSERVER": "Protocol Buffers Server",
|
||||||
"general_comp_SMOOTHING": "Smoothing",
|
"general_comp_SMOOTHING": "Smoothing",
|
||||||
"general_comp_V4L": "USB Capture",
|
"general_comp_V4L": "Capture USB-Input",
|
||||||
"general_country_cn": "China",
|
"general_country_cn": "China",
|
||||||
"general_country_de": "Germany",
|
"general_country_de": "Germany",
|
||||||
"general_country_es": "Spain",
|
"general_country_es": "Spain",
|
||||||
@ -851,7 +855,8 @@
|
|||||||
"main_menu_general_conf_token": "General",
|
"main_menu_general_conf_token": "General",
|
||||||
"main_menu_grabber_conf_token": "Capturing Hardware",
|
"main_menu_grabber_conf_token": "Capturing Hardware",
|
||||||
"main_menu_input_selection_token": "Input Selection",
|
"main_menu_input_selection_token": "Input Selection",
|
||||||
"main_menu_leds_conf_token": "LED Hardware",
|
"main_menu_instcapture_conf_token": "Sources",
|
||||||
|
"main_menu_leds_conf_token": "LED Output",
|
||||||
"main_menu_logging_token": "Log",
|
"main_menu_logging_token": "Log",
|
||||||
"main_menu_network_conf_token": "Network Services",
|
"main_menu_network_conf_token": "Network Services",
|
||||||
"main_menu_remotecontrol_token": "Remote Control",
|
"main_menu_remotecontrol_token": "Remote Control",
|
||||||
|
@ -214,11 +214,12 @@
|
|||||||
<a class="inactive"><i class="fa fa-cog fa-fw"></i><span data-i18n="main_menu_configuration_token">LED-Instances</span><span class="fa arrow"></span></a>
|
<a class="inactive"><i class="fa fa-cog fa-fw"></i><span data-i18n="main_menu_configuration_token">LED-Instances</span><span class="fa arrow"></span></a>
|
||||||
<ul class="nav nav-second-level">
|
<ul class="nav nav-second-level">
|
||||||
<li> <a class="inactive mnava" id="MenuItemLeds" href="#conf_leds"><i class="mdi mdi-lightbulb-on fa-fw"></i><span data-i18n="main_menu_leds_conf_token">LED Hardware</span></a> </li>
|
<li> <a class="inactive mnava" id="MenuItemLeds" href="#conf_leds"><i class="mdi mdi-lightbulb-on fa-fw"></i><span data-i18n="main_menu_leds_conf_token">LED Hardware</span></a> </li>
|
||||||
<li> <a class="inactive mnava" id="MenuItemGrabber" href="#conf_grabber"><i class="fa fa-camera fa-fw"></i><span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span></a> </li>
|
<li> <a class="inactive mnava" id="MenuItemInstCapture" href="#conf_instcapture"><i class="fa fa-camera fa-fw"></i><span data-i18n="main_menu_instcapture_conf_token">Sources</span></a> </li>
|
||||||
<li> <a class="inactive mnava" href="#conf_effect"><i class="fa fa-spinner fa-fw"></i><span data-i18n="main_menu_effect_conf_token">Effects</span></a> </li>
|
<li> <a class="inactive mnava" href="#conf_effect"><i class="fa fa-spinner fa-fw"></i><span data-i18n="main_menu_effect_conf_token">Effects</span></a> </li>
|
||||||
<li> <a class="inactive mnava" href="#conf_colors"><i class="fa fa-photo fa-fw"></i><span data-i18n="main_menu_colors_conf_token">Image Processing</span></a> </li>
|
<li> <a class="inactive mnava" href="#conf_colors"><i class="fa fa-photo fa-fw"></i><span data-i18n="main_menu_colors_conf_token">Image Processing</span></a> </li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li> <a class="inactive mnava" id="MenuItemGrabber" href="#conf_grabber"><i class="fa fa-camera fa-fw"></i><span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span></a> </li>
|
||||||
<li> <a class="inactive mnava" id="MenuItemNetwork" href="#conf_network"><i class="fa fa-sitemap fa-fw"></i><span data-i18n="main_menu_network_conf_token">Network</span></a> </li>
|
<li> <a class="inactive mnava" id="MenuItemNetwork" href="#conf_network"><i class="fa fa-sitemap fa-fw"></i><span data-i18n="main_menu_network_conf_token">Network</span></a> </li>
|
||||||
<li> <a class="inactive mnava" href="#remote"><i class="fa fa-wifi fa-fw"></i><span data-i18n="main_menu_remotecontrol_token">Remote Control</span></a> </li>
|
<li> <a class="inactive mnava" href="#remote"><i class="fa fa-wifi fa-fw"></i><span data-i18n="main_menu_remotecontrol_token">Remote Control</span></a> </li>
|
||||||
<li> <a class="inactive mnava" href="#effects_configurator"><i class="fa fa-cogs fa-fw"></i><span data-i18n="main_menu_effectsconfigurator_token">Effects Configurator</span></a> </li>
|
<li> <a class="inactive mnava" href="#effects_configurator"><i class="fa fa-cogs fa-fw"></i><span data-i18n="main_menu_effectsconfigurator_token">Effects Configurator</span></a> </li>
|
||||||
|
@ -26,8 +26,6 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
requestServerConfig();
|
|
||||||
|
|
||||||
var instBtn = '<span style="display:block; margin:3px"><input id="instanceButton"'
|
var instBtn = '<span style="display:block; margin:3px"><input id="instanceButton"'
|
||||||
+ (hyperion_enabled ? "checked" : "") + ' type="checkbox" data-toggle="toggle" data-size="small" data-onstyle="success" data-on="'
|
+ (hyperion_enabled ? "checked" : "") + ' type="checkbox" data-toggle="toggle" data-size="small" data-onstyle="success" data-on="'
|
||||||
+ $.i18n('general_btn_on') + '" data-off="'
|
+ $.i18n('general_btn_on') + '" data-off="'
|
||||||
@ -46,16 +44,6 @@ $(document).ready(function () {
|
|||||||
instances_html += '<span>' + window.serverConfig.device.type + '</span>';
|
instances_html += '<span>' + window.serverConfig.device.type + '</span>';
|
||||||
instances_html += '<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem(\'MenuItemLeds\')" style="text-decoration:none;cursor:pointer"></a>';
|
instances_html += '<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem(\'MenuItemLeds\')" style="text-decoration:none;cursor:pointer"></a>';
|
||||||
instances_html += '</td></tr>';
|
instances_html += '</td></tr>';
|
||||||
instances_html += '<tr><td></td><td>' + $.i18n('edt_conf_fg_heading_title') + '</td>';
|
|
||||||
instances_html += '<td style="text-align:right; padding-right:0">';
|
|
||||||
instances_html += '<span id="dash_screen_grabber">disabled</span>';
|
|
||||||
instances_html += '<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem(\'MenuItemGrabber\')" style="text-decoration:none;cursor:pointer"></a>';
|
|
||||||
instances_html += '</td></tr>';
|
|
||||||
instances_html += '<tr><td></td><td>' + $.i18n('edt_conf_v4l2_heading_title') + '</td>';
|
|
||||||
instances_html += '<td style="text-align:right; padding-right:0">';
|
|
||||||
instances_html += '<span id="dash_video_grabber">disabled</span>';
|
|
||||||
instances_html += '<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem(\'MenuItemGrabber\')" style="text-decoration:none;cursor:pointer"></a>';
|
|
||||||
instances_html += '</td></tr>';
|
|
||||||
instances_html += '</tbody></table>';
|
instances_html += '</tbody></table>';
|
||||||
|
|
||||||
instances_html += '<table class="table first_cell_borderless">';
|
instances_html += '<table class="table first_cell_borderless">';
|
||||||
@ -69,8 +57,8 @@ $(document).ready(function () {
|
|||||||
for (var idx = 0; idx < components.length; idx++) {
|
for (var idx = 0; idx < components.length; idx++) {
|
||||||
if (components[idx].name != "ALL") {
|
if (components[idx].name != "ALL") {
|
||||||
if ((components[idx].name === "FORWARDER" && window.currentHyperionInstance != 0) ||
|
if ((components[idx].name === "FORWARDER" && window.currentHyperionInstance != 0) ||
|
||||||
(components[idx].name === "GRABBER" && !window.serverConfig.instCapture.systemEnable) ||
|
(components[idx].name === "GRABBER" && !window.serverConfig.framegrabber.enable) ||
|
||||||
(components[idx].name === "V4L" && !window.serverConfig.instCapture.v4lEnable))
|
(components[idx].name === "V4L" && !window.serverConfig.grabberV4L2.enable))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var comp_enabled = components[idx].enabled ? "checked" : "";
|
var comp_enabled = components[idx].enabled ? "checked" : "";
|
||||||
@ -113,6 +101,12 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add more info
|
// add more info
|
||||||
|
|
||||||
|
var screenGrabber = window.serverConfig.framegrabber.enable ? $.i18n('general_enabled') : $.i18n('general_disabled');
|
||||||
|
$('#dash_screen_grabber').html(screenGrabber);
|
||||||
|
var videoGrabber = window.serverConfig.grabberV4L2.enable ? $.i18n('general_enabled') : $.i18n('general_disabled');
|
||||||
|
$('#dash_video_grabber').html(videoGrabber);
|
||||||
|
|
||||||
var fbPort = window.serverConfig.flatbufServer.enable ? window.serverConfig.flatbufServer.port : $.i18n('general_disabled');
|
var fbPort = window.serverConfig.flatbufServer.enable ? window.serverConfig.flatbufServer.port : $.i18n('general_disabled');
|
||||||
$('#dash_fbPort').html(fbPort);
|
$('#dash_fbPort').html(fbPort);
|
||||||
var pbPort = window.serverConfig.protoServer.enable ? window.serverConfig.protoServer.port : $.i18n('general_disabled');
|
var pbPort = window.serverConfig.protoServer.enable ? window.serverConfig.protoServer.port : $.i18n('general_disabled');
|
||||||
|
@ -1,108 +1,22 @@
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
performTranslation();
|
performTranslation();
|
||||||
|
|
||||||
// update instance listing
|
|
||||||
updateHyperionInstanceListing();
|
|
||||||
|
|
||||||
var conf_editor_video = null;
|
var conf_editor_video = null;
|
||||||
var conf_editor_screen = null;
|
var conf_editor_screen = null;
|
||||||
var conf_editor_instCapt = null;
|
|
||||||
var VIDEOGRABBER_AVAIL = window.serverInfo.grabbers.available.includes("v4l2");
|
|
||||||
|
|
||||||
|
// Screen-Grabber
|
||||||
|
$('#conf_cont').append(createRow('conf_cont_screen'));
|
||||||
|
$('#conf_cont_screen').append(createOptPanel('fa-camera', $.i18n("edt_conf_fg_heading_title"), 'editor_container_screengrabber', 'btn_submit_screengrabber', 'panel-system', 'screengrabberPanelId'));
|
||||||
if (window.showOptHelp) {
|
if (window.showOptHelp) {
|
||||||
// Instance Capture
|
|
||||||
$('#conf_cont').append(createRow('conf_cont_instCapt'));
|
|
||||||
$('#conf_cont_instCapt').append(createOptPanel('fa-camera', $.i18n("edt_conf_instCapture_heading_title"), 'editor_container_instCapt', 'btn_submit_instCapt', ''));
|
|
||||||
$('#conf_cont_instCapt').append(createHelpTable(window.schema.instCapture.properties, $.i18n("edt_conf_instCapture_heading_title")));
|
|
||||||
|
|
||||||
// Screen-Grabber
|
|
||||||
$('#conf_cont').append(createRow('conf_cont_screen'));
|
|
||||||
$('#conf_cont_screen').append(createOptPanel('fa-camera', $.i18n("edt_conf_fg_heading_title"), 'editor_container_screengrabber', 'btn_submit_screengrabber', '', 'screengrabberPanelId'));
|
|
||||||
$('#conf_cont_screen').append(createHelpTable(window.schema.framegrabber.properties, $.i18n("edt_conf_fg_heading_title"), "screengrabberHelpPanelId"));
|
$('#conf_cont_screen').append(createHelpTable(window.schema.framegrabber.properties, $.i18n("edt_conf_fg_heading_title"), "screengrabberHelpPanelId"));
|
||||||
|
|
||||||
// Video-Grabber - hide if not available
|
|
||||||
if (VIDEOGRABBER_AVAIL) {
|
|
||||||
$('#conf_cont').append(createRow('conf_cont_video'));
|
|
||||||
$('#conf_cont_video').append(createOptPanel('fa-camera', $.i18n("edt_conf_v4l2_heading_title"), 'editor_container_videograbber', 'btn_submit_videograbber', '', 'videograbberPanelId'));
|
|
||||||
$('#conf_cont_video').append(createHelpTable(window.schema.grabberV4L2.properties, $.i18n("edt_conf_v4l2_heading_title"), "videograbberHelpPanelId"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$('#conf_cont').addClass('row');
|
|
||||||
$('#conf_cont').append(createOptPanel('fa-camera', $.i18n("edt_conf_instCapture_heading_title"), 'editor_container_instCapt', 'btn_submit_instCapt'));
|
|
||||||
$('#conf_cont').append(createOptPanel('fa-camera', $.i18n("edt_conf_fg_heading_title"), 'editor_container_screengrabber', 'btn_submit_screengrabber', '', 'screengrabberPanelId'));
|
|
||||||
if (VIDEOGRABBER_AVAIL) {
|
|
||||||
$('#conf_cont').append(createOptPanel('fa-camera', $.i18n("edt_conf_v4l2_heading_title"), 'editor_container_videograbber', 'btn_submit_videograbber', '', 'videograbberPanelId'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Instance Capture
|
$('#conf_cont').append(createRow('conf_cont_video'));
|
||||||
conf_editor_instCapt = createJsonEditor('editor_container_instCapt', {
|
$('#conf_cont_video').append(createOptPanel('fa-camera', $.i18n("edt_conf_v4l2_heading_title"), 'editor_container_videograbber', 'btn_submit_videograbber', 'panel-system', 'videograbberPanelId'));
|
||||||
instCapture: window.schema.instCapture
|
if (window.showOptHelp) {
|
||||||
}, true, true);
|
$('#conf_cont_video').append(createHelpTable(window.schema.grabberV4L2.properties, $.i18n("edt_conf_v4l2_heading_title"), "videograbberHelpPanelId"));
|
||||||
|
|
||||||
// Hide Video-Grabber elements, if not available
|
|
||||||
if (!VIDEOGRABBER_AVAIL) {
|
|
||||||
showInputOptions("instCapture", ["v4lEnable"], false);
|
|
||||||
showInputOptions("instCapture", ["v4lPriority"], false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
conf_editor_instCapt.on('change', function () {
|
|
||||||
var screenEnable = conf_editor_instCapt.getEditor("root.instCapture.systemEnable").getValue();
|
|
||||||
if (screenEnable) {
|
|
||||||
showInputOptions("instCapture", ["systemPriority"], true);
|
|
||||||
$('#screengrabberPanelId').show();
|
|
||||||
if (window.showOptHelp) {
|
|
||||||
$('#screengrabberHelpPanelId').show();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$('#screengrabberPanelId').hide();
|
|
||||||
$('#screengrabberHelpPanelId').hide();
|
|
||||||
showInputOptions("instCapture", ["systemPriority"], false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (VIDEOGRABBER_AVAIL) {
|
|
||||||
var videoEnable = conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").getValue();
|
|
||||||
if (videoEnable) {
|
|
||||||
showInputOptions("instCapture", ["v4lPriority"], true);
|
|
||||||
$('#videograbberPanelId').show();
|
|
||||||
if (window.showOptHelp) {
|
|
||||||
$('#videograbberHelpPanelId').show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
showInputOptions("instCapture", ["v4lPriority"], false);
|
|
||||||
$('#videograbberPanelId').hide();
|
|
||||||
$('#videograbberHelpPanelId').hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
conf_editor_instCapt.validate().length || window.readOnlyMode ? $('#btn_submit_instCapt').attr('disabled', true) : $('#btn_submit_instCapt').attr('disabled', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
conf_editor_instCapt.watch('root.instCapture.systemEnable', () => {
|
|
||||||
var systemEnable = conf_editor_instCapt.getEditor("root.instCapture.systemEnable").getValue();
|
|
||||||
if (systemEnable) {
|
|
||||||
showInputOptionsForKey(conf_editor_screen, "framegrabber", "available_devices", false);
|
|
||||||
discoverInputSources("screen");
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
conf_editor_instCapt.watch('root.instCapture.v4lEnable', () => {
|
|
||||||
if (VIDEOGRABBER_AVAIL) {
|
|
||||||
var videoEnable = conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").getValue();
|
|
||||||
if (videoEnable) {
|
|
||||||
showInputOptionsForKey(conf_editor_video, "grabberV4L2", "available_devices", false);
|
|
||||||
discoverInputSources("video");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#btn_submit_instCapt').off().on('click', function () {
|
|
||||||
requestWriteConfig(conf_editor_instCapt.getValue());
|
|
||||||
});
|
|
||||||
|
|
||||||
JSONEditor.defaults.custom_validators.push(function (schema, value, path) {
|
JSONEditor.defaults.custom_validators.push(function (schema, value, path) {
|
||||||
var errors = [];
|
var errors = [];
|
||||||
|
|
||||||
@ -160,25 +74,20 @@ $(document).ready(function () {
|
|||||||
}, true, true);
|
}, true, true);
|
||||||
|
|
||||||
conf_editor_screen.on('ready', function () {
|
conf_editor_screen.on('ready', function () {
|
||||||
|
// Trigger conf_editor_screen.watch - 'root.framegrabber.enable'
|
||||||
var screenEnable = conf_editor_instCapt.getEditor("root.instCapture.systemEnable").getValue();
|
var screenEnable = window.serverConfig.framegrabber.enable;
|
||||||
if (screenEnable) {
|
conf_editor_screen.getEditor("root.framegrabber.enable").setValue(screenEnable);
|
||||||
showInputOptionsForKey(conf_editor_screen, "framegrabber", "available_devices", false);
|
|
||||||
discoverInputSources("screen");
|
|
||||||
}
|
|
||||||
|
|
||||||
updateCropForWidth(conf_editor_screen, "root.framegrabber");
|
|
||||||
updateCropForHeight(conf_editor_screen, "root.framegrabber");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
conf_editor_screen.on('change', function () {
|
conf_editor_screen.on('change', function () {
|
||||||
|
|
||||||
if (!conf_editor_screen.validate().length) {
|
if (!conf_editor_screen.validate().length) {
|
||||||
var deviceSelected = conf_editor_screen.getEditor("root.framegrabber.available_devices").getValue();
|
var deviceSelected = conf_editor_screen.getEditor("root.framegrabber.available_devices").getValue();
|
||||||
switch (deviceSelected) {
|
switch (deviceSelected) {
|
||||||
case "SELECT":
|
case "SELECT":
|
||||||
showInputOptionsForKey(conf_editor_screen, "framegrabber", "available_devices", false);
|
showInputOptionsForKey(conf_editor_screen, "framegrabber", "available_devices", false);
|
||||||
break;
|
break;
|
||||||
case "NONE":
|
case "NONE": conf_editor_video.on
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
window.readOnlyMode ? $('#btn_submit_screengrabber').attr('disabled', true) : $('#btn_submit_screengrabber').attr('disabled', false);
|
window.readOnlyMode ? $('#btn_submit_screengrabber').attr('disabled', true) : $('#btn_submit_screengrabber').attr('disabled', false);
|
||||||
@ -190,6 +99,24 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
conf_editor_screen.watch('root.framegrabber.enable', () => {
|
||||||
|
|
||||||
|
var screenEnable = conf_editor_screen.getEditor("root.framegrabber.enable").getValue();
|
||||||
|
if (screenEnable) {
|
||||||
|
showInputOptionsForKey(conf_editor_screen, "framegrabber", "enable", true);
|
||||||
|
if (window.showOptHelp) {
|
||||||
|
$('#screengrabberHelpPanelId').show();
|
||||||
|
}
|
||||||
|
discoverInputSources("screen");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
showInputOptionsForKey(conf_editor_screen, "framegrabber", "enable", false);
|
||||||
|
$('#screengrabberHelpPanelId').hide();
|
||||||
|
$('#btn_submit_screengrabber').attr('disabled', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
conf_editor_screen.watch('root.framegrabber.available_devices', () => {
|
conf_editor_screen.watch('root.framegrabber.available_devices', () => {
|
||||||
|
|
||||||
var deviceSelected = conf_editor_screen.getEditor("root.framegrabber.available_devices").getValue();
|
var deviceSelected = conf_editor_screen.getEditor("root.framegrabber.available_devices").getValue();
|
||||||
@ -383,298 +310,308 @@ $(document).ready(function () {
|
|||||||
var discoveredInputSources = {};
|
var discoveredInputSources = {};
|
||||||
var deviceProperties = {};
|
var deviceProperties = {};
|
||||||
|
|
||||||
if (VIDEOGRABBER_AVAIL) {
|
conf_editor_video = createJsonEditor('editor_container_videograbber', {
|
||||||
conf_editor_video = createJsonEditor('editor_container_videograbber', {
|
grabberV4L2: window.schema.grabberV4L2
|
||||||
grabberV4L2: window.schema.grabberV4L2
|
}, true, true);
|
||||||
}, true, true);
|
|
||||||
|
|
||||||
conf_editor_video.on('ready', function () {
|
conf_editor_video.on('ready', function () {
|
||||||
var v4lEnable = conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").getValue();
|
// Trigger conf_editor_video.watch - 'root.grabberV4L2.enable'
|
||||||
if (v4lEnable) {
|
var videoEnable = window.serverConfig.grabberV4L2.enable;
|
||||||
showInputOptionsForKey(conf_editor_video, "grabberV4L2", "available_devices", false);
|
conf_editor_video.getEditor("root.grabberV4L2.enable").setValue(videoEnable);
|
||||||
discoverInputSources("video");
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
conf_editor_video.on('change', function () {
|
conf_editor_video.on('change', function () {
|
||||||
|
|
||||||
if (!conf_editor_video.validate().length) {
|
if (!conf_editor_video.validate().length) {
|
||||||
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
|
||||||
switch (deviceSelected) {
|
|
||||||
case "SELECT":
|
|
||||||
showInputOptionsForKey(conf_editor_video, "grabberV4L2", "available_devices", false);
|
|
||||||
break;
|
|
||||||
case "NONE":
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
window.readOnlyMode ? $('#btn_submit_videograbber').attr('disabled', true) : $('#btn_submit_videograbber').attr('disabled', false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('#btn_submit_videograbber').attr('disabled', true);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
conf_editor_video.watch('root.grabberV4L2.available_devices', () => {
|
|
||||||
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
||||||
if (deviceSelected === "SELECT" || deviceSelected === "NONE" || deviceSelected === "") {
|
switch (deviceSelected) {
|
||||||
$('#btn_submit_videograbber').attr('disabled', true);
|
case "SELECT":
|
||||||
showInputOptionsForKey(conf_editor_video, "grabberV4L2", "available_devices", false);
|
showInputOptionsForKey(conf_editor_video, "grabberV4L2", "available_devices", false);
|
||||||
|
break;
|
||||||
|
case "NONE":
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
window.readOnlyMode ? $('#btn_submit_videograbber').attr('disabled', true) : $('#btn_submit_videograbber').attr('disabled', false);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
showInputOptionsForKey(conf_editor_video, "grabberV4L2", "available_devices", true);
|
else {
|
||||||
var addSchemaElements = {};
|
$('#btn_submit_videograbber').attr('disabled', true);
|
||||||
var enumVals = [];
|
}
|
||||||
var enumTitelVals = [];
|
});
|
||||||
var enumDefaultVal = "";
|
|
||||||
|
|
||||||
var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
|
conf_editor_video.watch('root.grabberV4L2.enable', () => {
|
||||||
|
|
||||||
//Update hidden input element
|
var videoEnable = conf_editor_video.getEditor("root.grabberV4L2.enable").getValue();
|
||||||
conf_editor_video.getEditor("root.grabberV4L2.device").setValue(deviceProperties.device);
|
if (videoEnable) {
|
||||||
|
showInputOptionsForKey(conf_editor_video, "grabberV4L2", "enable", true);
|
||||||
var video_inputs = deviceProperties.video_inputs;
|
if (window.showOptHelp) {
|
||||||
if (video_inputs.length <= 1) {
|
$('#videograbberHelpPanelId').show();
|
||||||
addSchemaElements.access = "expert";
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const video_input of video_inputs) {
|
|
||||||
enumVals.push(video_input.inputIdx);
|
|
||||||
enumTitelVals.push(video_input.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enumVals.length > 0) {
|
|
||||||
if (deviceSelected === configuredDevice) {
|
|
||||||
var configuredVideoInput = window.serverConfig.grabberV4L2.input;
|
|
||||||
if ($.inArray(configuredVideoInput, enumVals) != -1) {
|
|
||||||
enumDefaultVal = configuredVideoInput.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
updateJsonEditorSelection(conf_editor_video.getEditor('root.grabberV4L2'),
|
|
||||||
'device_inputs', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (conf_editor_video.validate().length && !window.readOnlyMode) {
|
|
||||||
$('#btn_submit_videograbber').attr('disabled', false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
discoverInputSources("video");
|
||||||
|
}
|
||||||
conf_editor_video.watch('root.grabberV4L2.device_inputs', () => {
|
else {
|
||||||
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
$('#btn_submit_videograbber').attr('disabled', true);
|
||||||
var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
|
showInputOptionsForKey(conf_editor_video, "grabberV4L2", "enable", false);
|
||||||
|
$('#videograbberHelpPanelId').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
conf_editor_video.watch('root.grabberV4L2.available_devices', () => {
|
||||||
|
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
||||||
|
if (deviceSelected === "SELECT" || deviceSelected === "NONE" || deviceSelected === "") {
|
||||||
|
$('#btn_submit_videograbber').attr('disabled', true);
|
||||||
|
showInputOptionsForKey(conf_editor_video, "grabberV4L2", "available_devices", false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
showInputOptionsForKey(conf_editor_video, "grabberV4L2", "available_devices", true);
|
||||||
var addSchemaElements = {};
|
var addSchemaElements = {};
|
||||||
var enumVals = [];
|
var enumVals = [];
|
||||||
var enumTitelVals = [];
|
var enumTitelVals = [];
|
||||||
var enumDefaultVal = "";
|
var enumDefaultVal = "";
|
||||||
|
|
||||||
var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
|
var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
|
||||||
var formats = deviceProperties.video_inputs[videoInputSelected].formats;
|
|
||||||
|
|
||||||
addSchemaElements.access = "advanced";
|
|
||||||
|
|
||||||
for (var i = 0; i < formats.length; i++) {
|
|
||||||
if (formats[i].format) {
|
|
||||||
enumVals.push(formats[i].format);
|
|
||||||
enumTitelVals.push(formats[i].format.toUpperCase());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
enumVals.push("NONE");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enumVals.length > 0) {
|
|
||||||
if (deviceSelected === configuredDevice) {
|
|
||||||
var configuredEncoding = window.serverConfig.grabberV4L2.encoding;
|
|
||||||
if ($.inArray(configuredEncoding, enumVals) != -1) {
|
|
||||||
enumDefaultVal = configuredEncoding;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
updateJsonEditorSelection(conf_editor_video.getEditor('root.grabberV4L2'),
|
|
||||||
'encoding', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
var enumVals = [];
|
|
||||||
var enumDefaultVal = "";
|
|
||||||
|
|
||||||
var standards = deviceProperties.video_inputs[videoInputSelected].standards;
|
|
||||||
if (!standards) {
|
|
||||||
enumVals.push("NONE");
|
|
||||||
addSchemaElements.options = { "hidden": true };
|
|
||||||
} else {
|
|
||||||
enumVals = standards;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enumVals.length > 0) {
|
|
||||||
if (deviceSelected === configuredDevice) {
|
|
||||||
var configuredStandard = window.serverConfig.grabberV4L2.standard;
|
|
||||||
if ($.inArray(configuredStandard, enumVals) != -1) {
|
|
||||||
enumDefaultVal = configuredStandard;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
updateJsonEditorSelection(conf_editor_video.getEditor('root.grabberV4L2'),
|
|
||||||
'standard', addSchemaElements, enumVals, [], enumDefaultVal, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (conf_editor_video.validate().length && !window.readOnlyMode) {
|
|
||||||
$('#btn_submit_videograbber').attr('disabled', false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
conf_editor_video.watch('root.grabberV4L2.encoding', () => {
|
|
||||||
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
|
||||||
var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
|
|
||||||
var formatSelected = conf_editor_video.getEditor("root.grabberV4L2.encoding").getValue();
|
|
||||||
|
|
||||||
//Update hidden input element
|
//Update hidden input element
|
||||||
conf_editor_video.getEditor("root.grabberV4L2.input").setValue(parseInt(videoInputSelected));
|
conf_editor_video.getEditor("root.grabberV4L2.device").setValue(deviceProperties.device);
|
||||||
|
|
||||||
var addSchemaElements = {};
|
var video_inputs = deviceProperties.video_inputs;
|
||||||
var enumVals = [];
|
if (video_inputs.length <= 1) {
|
||||||
var enumTitelVals = [];
|
|
||||||
var enumDefaultVal = "";
|
|
||||||
|
|
||||||
var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
|
|
||||||
|
|
||||||
var formats = deviceProperties.video_inputs[videoInputSelected].formats;
|
|
||||||
var formatIdx = 0;
|
|
||||||
if (formatSelected !== "NONE") {
|
|
||||||
formatIdx = formats.findIndex(x => x.format === formatSelected);
|
|
||||||
}
|
|
||||||
|
|
||||||
var resolutions = formats[formatIdx].resolutions;
|
|
||||||
if (resolutions.length <= 1) {
|
|
||||||
addSchemaElements.access = "advanced";
|
|
||||||
} else {
|
|
||||||
resolutions.sort(compareTwoValues('width', 'height', 'asc'));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0; i < resolutions.length; i++) {
|
|
||||||
enumVals.push(i);
|
|
||||||
var resolutionText = resolutions[i].width + "x" + resolutions[i].height;
|
|
||||||
enumTitelVals.push(resolutionText);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enumVals.length > 0) {
|
|
||||||
if (deviceSelected === configuredDevice) {
|
|
||||||
var configuredResolutionText = window.serverConfig.grabberV4L2.width + "x" + window.serverConfig.grabberV4L2.height;
|
|
||||||
var idx = $.inArray(configuredResolutionText, enumTitelVals)
|
|
||||||
if (idx != -1) {
|
|
||||||
enumDefaultVal = idx.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
updateJsonEditorSelection(conf_editor_video.getEditor('root.grabberV4L2'),
|
|
||||||
'resolutions', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (conf_editor_video.validate().length && !window.readOnlyMode) {
|
|
||||||
$('#btn_submit_videograbber').attr('disabled', false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
conf_editor_video.watch('root.grabberV4L2.resolutions', () => {
|
|
||||||
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
|
||||||
var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
|
|
||||||
var formatSelected = conf_editor_video.getEditor("root.grabberV4L2.encoding").getValue();
|
|
||||||
var resolutionSelected = conf_editor_video.getEditor("root.grabberV4L2.resolutions").getValue();
|
|
||||||
|
|
||||||
var addSchemaElements = {};
|
|
||||||
var enumVals = [];
|
|
||||||
var enumDefaultVal = "";
|
|
||||||
|
|
||||||
var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
|
|
||||||
|
|
||||||
var formats = deviceProperties.video_inputs[videoInputSelected].formats;
|
|
||||||
var formatIdx = 0;
|
|
||||||
if (formatSelected !== "NONE") {
|
|
||||||
formatIdx = formats.findIndex(x => x.format === formatSelected);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Update hidden resolution related elements
|
|
||||||
var width = parseInt(formats[formatIdx].resolutions[resolutionSelected].width);
|
|
||||||
conf_editor_video.getEditor("root.grabberV4L2.width").setValue(width);
|
|
||||||
|
|
||||||
var height = parseInt(formats[formatIdx].resolutions[resolutionSelected].height);
|
|
||||||
conf_editor_video.getEditor("root.grabberV4L2.height").setValue(height);
|
|
||||||
|
|
||||||
//Update crop rage depending on selected resolution
|
|
||||||
updateCropForWidth(conf_editor_video, "root.grabberV4L2");
|
|
||||||
updateCropForHeight(conf_editor_video, "root.grabberV4L2");
|
|
||||||
|
|
||||||
var fps = formats[formatIdx].resolutions[resolutionSelected].fps;
|
|
||||||
if (!fps) {
|
|
||||||
enumVals.push("NONE");
|
|
||||||
addSchemaElements.options = { "hidden": true };
|
|
||||||
} else {
|
|
||||||
fps.sort((a, b) => a - b);
|
|
||||||
for (var i = 0; i < fps.length; i++) {
|
|
||||||
enumVals.push(fps[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enumVals.length <= 1) {
|
|
||||||
addSchemaElements.access = "expert";
|
addSchemaElements.access = "expert";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const video_input of video_inputs) {
|
||||||
|
enumVals.push(video_input.inputIdx);
|
||||||
|
enumTitelVals.push(video_input.name);
|
||||||
|
}
|
||||||
|
|
||||||
if (enumVals.length > 0) {
|
if (enumVals.length > 0) {
|
||||||
if (deviceSelected === configuredDevice) {
|
if (deviceSelected === configuredDevice) {
|
||||||
var configuredFps = window.serverConfig.grabberV4L2.fps;
|
var configuredVideoInput = window.serverConfig.grabberV4L2.input;
|
||||||
if ($.inArray(configuredFps, enumVals) != -1) {
|
if ($.inArray(configuredVideoInput, enumVals) != -1) {
|
||||||
enumDefaultVal = configuredFps.toString();
|
enumDefaultVal = configuredVideoInput.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateJsonEditorSelection(conf_editor_video.getEditor('root.grabberV4L2'),
|
updateJsonEditorSelection(conf_editor_video.getEditor('root.grabberV4L2'),
|
||||||
'framerates', addSchemaElements, enumVals, [], enumDefaultVal, false);
|
'device_inputs', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conf_editor_video.validate().length && !window.readOnlyMode) {
|
if (conf_editor_video.validate().length && !window.readOnlyMode) {
|
||||||
$('#btn_submit_videograbber').attr('disabled', false);
|
$('#btn_submit_videograbber').attr('disabled', false);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
conf_editor_video.watch('root.grabberV4L2.framerates', () => {
|
conf_editor_video.watch('root.grabberV4L2.device_inputs', () => {
|
||||||
//Update hidden fps element
|
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
||||||
var fps = 0;
|
var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
|
||||||
var framerates = conf_editor_video.getEditor("root.grabberV4L2.framerates").getValue();
|
|
||||||
if (framerates !== "NONE") {
|
|
||||||
fps = parseInt(framerates);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Show Frameskipping only when more than 2 fps
|
var addSchemaElements = {};
|
||||||
if (fps > 2 && storedAccess === "expert") {
|
var enumVals = [];
|
||||||
showInputOptions(["fpsSoftwareDecimation"], true);
|
var enumTitelVals = [];
|
||||||
|
var enumDefaultVal = "";
|
||||||
|
|
||||||
|
var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
|
||||||
|
var formats = deviceProperties.video_inputs[videoInputSelected].formats;
|
||||||
|
|
||||||
|
addSchemaElements.access = "advanced";
|
||||||
|
|
||||||
|
for (var i = 0; i < formats.length; i++) {
|
||||||
|
if (formats[i].format) {
|
||||||
|
enumVals.push(formats[i].format);
|
||||||
|
enumTitelVals.push(formats[i].format.toUpperCase());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showInputOptions(["fpsSoftwareDecimation"], false);
|
enumVals.push("NONE");
|
||||||
}
|
}
|
||||||
conf_editor_video.getEditor("root.grabberV4L2.fps").setValue(fps);
|
}
|
||||||
});
|
|
||||||
|
|
||||||
$('#btn_submit_videograbber').off().on('click', function () {
|
if (enumVals.length > 0) {
|
||||||
var saveOptions = conf_editor_video.getValue();
|
if (deviceSelected === configuredDevice) {
|
||||||
|
var configuredEncoding = window.serverConfig.grabberV4L2.encoding;
|
||||||
|
if ($.inArray(configuredEncoding, enumVals) != -1) {
|
||||||
|
enumDefaultVal = configuredEncoding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
updateJsonEditorSelection(conf_editor_video.getEditor('root.grabberV4L2'),
|
||||||
|
'encoding', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
|
||||||
|
}
|
||||||
|
|
||||||
var instCaptOptions = window.serverConfig.instCapture;
|
var enumVals = [];
|
||||||
instCaptOptions.v4lEnable = true;
|
var enumDefaultVal = "";
|
||||||
saveOptions.instCapture = instCaptOptions;
|
|
||||||
|
|
||||||
requestWriteConfig(saveOptions);
|
var standards = deviceProperties.video_inputs[videoInputSelected].standards;
|
||||||
});
|
if (!standards) {
|
||||||
}
|
enumVals.push("NONE");
|
||||||
|
addSchemaElements.options = { "hidden": true };
|
||||||
|
} else {
|
||||||
|
enumVals = standards;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (enumVals.length > 0) {
|
||||||
|
if (deviceSelected === configuredDevice) {
|
||||||
|
var configuredStandard = window.serverConfig.grabberV4L2.standard;
|
||||||
|
if ($.inArray(configuredStandard, enumVals) != -1) {
|
||||||
|
enumDefaultVal = configuredStandard;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
updateJsonEditorSelection(conf_editor_video.getEditor('root.grabberV4L2'),
|
||||||
|
'standard', addSchemaElements, enumVals, [], enumDefaultVal, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (conf_editor_video.validate().length && !window.readOnlyMode) {
|
||||||
|
$('#btn_submit_videograbber').attr('disabled', false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
conf_editor_video.watch('root.grabberV4L2.encoding', () => {
|
||||||
|
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
||||||
|
var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
|
||||||
|
var formatSelected = conf_editor_video.getEditor("root.grabberV4L2.encoding").getValue();
|
||||||
|
|
||||||
|
//Update hidden input element
|
||||||
|
conf_editor_video.getEditor("root.grabberV4L2.input").setValue(parseInt(videoInputSelected));
|
||||||
|
|
||||||
|
var addSchemaElements = {};
|
||||||
|
var enumVals = [];
|
||||||
|
var enumTitelVals = [];
|
||||||
|
var enumDefaultVal = "";
|
||||||
|
|
||||||
|
var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
|
||||||
|
|
||||||
|
var formats = deviceProperties.video_inputs[videoInputSelected].formats;
|
||||||
|
var formatIdx = 0;
|
||||||
|
if (formatSelected !== "NONE") {
|
||||||
|
formatIdx = formats.findIndex(x => x.format === formatSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
var resolutions = formats[formatIdx].resolutions;
|
||||||
|
if (resolutions.length <= 1) {
|
||||||
|
addSchemaElements.access = "advanced";
|
||||||
|
} else {
|
||||||
|
resolutions.sort(compareTwoValues('width', 'height', 'asc'));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < resolutions.length; i++) {
|
||||||
|
enumVals.push(i);
|
||||||
|
var resolutionText = resolutions[i].width + "x" + resolutions[i].height;
|
||||||
|
enumTitelVals.push(resolutionText);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (enumVals.length > 0) {
|
||||||
|
if (deviceSelected === configuredDevice) {
|
||||||
|
var configuredResolutionText = window.serverConfig.grabberV4L2.width + "x" + window.serverConfig.grabberV4L2.height;
|
||||||
|
var idx = $.inArray(configuredResolutionText, enumTitelVals)
|
||||||
|
if (idx != -1) {
|
||||||
|
enumDefaultVal = idx.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
updateJsonEditorSelection(conf_editor_video.getEditor('root.grabberV4L2'),
|
||||||
|
'resolutions', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (conf_editor_video.validate().length && !window.readOnlyMode) {
|
||||||
|
$('#btn_submit_videograbber').attr('disabled', false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
conf_editor_video.watch('root.grabberV4L2.resolutions', () => {
|
||||||
|
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
||||||
|
var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
|
||||||
|
var formatSelected = conf_editor_video.getEditor("root.grabberV4L2.encoding").getValue();
|
||||||
|
var resolutionSelected = conf_editor_video.getEditor("root.grabberV4L2.resolutions").getValue();
|
||||||
|
|
||||||
|
var addSchemaElements = {};
|
||||||
|
var enumVals = [];
|
||||||
|
var enumDefaultVal = "";
|
||||||
|
|
||||||
|
var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
|
||||||
|
|
||||||
|
var formats = deviceProperties.video_inputs[videoInputSelected].formats;
|
||||||
|
var formatIdx = 0;
|
||||||
|
if (formatSelected !== "NONE") {
|
||||||
|
formatIdx = formats.findIndex(x => x.format === formatSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Update hidden resolution related elements
|
||||||
|
var width = parseInt(formats[formatIdx].resolutions[resolutionSelected].width);
|
||||||
|
conf_editor_video.getEditor("root.grabberV4L2.width").setValue(width);
|
||||||
|
|
||||||
|
var height = parseInt(formats[formatIdx].resolutions[resolutionSelected].height);
|
||||||
|
conf_editor_video.getEditor("root.grabberV4L2.height").setValue(height);
|
||||||
|
|
||||||
|
//Update crop rage depending on selected resolution
|
||||||
|
updateCropForWidth(conf_editor_video, "root.grabberV4L2");
|
||||||
|
updateCropForHeight(conf_editor_video, "root.grabberV4L2");
|
||||||
|
|
||||||
|
var fps = formats[formatIdx].resolutions[resolutionSelected].fps;
|
||||||
|
if (!fps) {
|
||||||
|
enumVals.push("NONE");
|
||||||
|
addSchemaElements.options = { "hidden": true };
|
||||||
|
} else {
|
||||||
|
fps.sort((a, b) => a - b);
|
||||||
|
for (var i = 0; i < fps.length; i++) {
|
||||||
|
enumVals.push(fps[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (enumVals.length <= 1) {
|
||||||
|
addSchemaElements.access = "expert";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (enumVals.length > 0) {
|
||||||
|
if (deviceSelected === configuredDevice) {
|
||||||
|
var configuredFps = window.serverConfig.grabberV4L2.fps;
|
||||||
|
if ($.inArray(configuredFps, enumVals) != -1) {
|
||||||
|
enumDefaultVal = configuredFps.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
updateJsonEditorSelection(conf_editor_video.getEditor('root.grabberV4L2'),
|
||||||
|
'framerates', addSchemaElements, enumVals, [], enumDefaultVal, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (conf_editor_video.validate().length && !window.readOnlyMode) {
|
||||||
|
$('#btn_submit_videograbber').attr('disabled', false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
conf_editor_video.watch('root.grabberV4L2.framerates', () => {
|
||||||
|
//Update hidden fps element
|
||||||
|
var fps = 0;
|
||||||
|
var framerates = conf_editor_video.getEditor("root.grabberV4L2.framerates").getValue();
|
||||||
|
if (framerates !== "NONE") {
|
||||||
|
fps = parseInt(framerates);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Show Frameskipping only when more than 2 fps
|
||||||
|
if (fps > 2 && storedAccess === "expert") {
|
||||||
|
showInputOptions(["fpsSoftwareDecimation"], true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
showInputOptions(["fpsSoftwareDecimation"], false);
|
||||||
|
}
|
||||||
|
conf_editor_video.getEditor("root.grabberV4L2.fps").setValue(fps);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#btn_submit_videograbber').off().on('click', function () {
|
||||||
|
var saveOptions = conf_editor_video.getValue();
|
||||||
|
|
||||||
|
var instCaptOptions = window.serverConfig.instCapture;
|
||||||
|
instCaptOptions.v4lEnable = true;
|
||||||
|
saveOptions.instCapture = instCaptOptions;
|
||||||
|
|
||||||
|
requestWriteConfig(saveOptions);
|
||||||
|
});
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
//create introduction
|
//create introduction
|
||||||
if (window.showOptHelp) {
|
if (window.showOptHelp) {
|
||||||
createHint("intro", $.i18n('conf_grabber_fg_intro'), "editor_container_screengrabber");
|
createHint("intro", $.i18n('conf_grabber_fg_intro'), "editor_container_screengrabber");
|
||||||
if (VIDEOGRABBER_AVAIL) {
|
createHint("intro", $.i18n('conf_grabber_v4l_intro'), "editor_container_videograbber");
|
||||||
createHint("intro", $.i18n('conf_grabber_v4l_intro'), "editor_container_videograbber");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
removeOverlay();
|
removeOverlay();
|
||||||
|
93
assets/webconfig/js/content_instcapture.js
Normal file
93
assets/webconfig/js/content_instcapture.js
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
$(document).ready(function () {
|
||||||
|
performTranslation();
|
||||||
|
|
||||||
|
// update instance listing
|
||||||
|
updateHyperionInstanceListing();
|
||||||
|
|
||||||
|
var conf_editor_instCapt = null;
|
||||||
|
|
||||||
|
// Instance Capture
|
||||||
|
$('#conf_cont').append(createRow('conf_cont_instCapt'));
|
||||||
|
$('#conf_cont_instCapt').append(createOptPanel('fa-camera', $.i18n("edt_conf_instCapture_heading_title"), 'editor_container_instCapt', 'btn_submit_instCapt', ''));
|
||||||
|
if (window.showOptHelp) {
|
||||||
|
$('#conf_cont_instCapt').append(createHelpTable(window.schema.instCapture.properties, $.i18n("edt_conf_instCapture_heading_title")));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Instance Capture
|
||||||
|
conf_editor_instCapt = createJsonEditor('editor_container_instCapt', {
|
||||||
|
instCapture: window.schema.instCapture
|
||||||
|
}, true, true);
|
||||||
|
|
||||||
|
conf_editor_instCapt.on('ready', function () {
|
||||||
|
|
||||||
|
if (!window.serverConfig.framegrabber.enable) {
|
||||||
|
conf_editor_instCapt.getEditor("root.instCapture.systemEnable").setValue(false);
|
||||||
|
conf_editor_instCapt.getEditor("root.instCapture.systemEnable").disable();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
conf_editor_instCapt.getEditor("root.instCapture.systemEnable").setValue(window.serverConfig.instCapture.systemEnable);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!window.serverConfig.grabberV4L2.enable) {
|
||||||
|
conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").setValue(false);
|
||||||
|
conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").disable();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").setValue(window.serverConfig.instCapture.v4lEnable);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
conf_editor_instCapt.on('change', function () {
|
||||||
|
|
||||||
|
if (!conf_editor_instCapt.validate().length) {
|
||||||
|
if (!window.serverConfig.framegrabber.enable && !window.serverConfig.grabberV4L2.enable) {
|
||||||
|
$('#btn_submit_instCapt').attr('disabled', true);
|
||||||
|
} else {
|
||||||
|
window.readOnlyMode ? $('#btn_submit_instCapt').attr('disabled', true) : $('#btn_submit_instCapt').attr('disabled', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#btn_submit_instCapt').attr('disabled', true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
conf_editor_instCapt.watch('root.instCapture.systemEnable', () => {
|
||||||
|
|
||||||
|
var screenEnable = conf_editor_instCapt.getEditor("root.instCapture.systemEnable").getValue();
|
||||||
|
if (screenEnable) {
|
||||||
|
conf_editor_instCapt.getEditor("root.instCapture.systemGrabberDevice").setValue(window.serverConfig.framegrabber.available_devices);
|
||||||
|
conf_editor_instCapt.getEditor("root.instCapture.systemGrabberDevice").disable();
|
||||||
|
showInputOptions("instCapture", ["systemGrabberDevice"], true);
|
||||||
|
showInputOptions("instCapture", ["systemPriority"], true);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
showInputOptions("instCapture", ["systemGrabberDevice"], false);
|
||||||
|
showInputOptions("instCapture", ["systemPriority"], false);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
conf_editor_instCapt.watch('root.instCapture.v4lEnable', () => {
|
||||||
|
var videoEnable = conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").getValue();
|
||||||
|
if (videoEnable) {
|
||||||
|
conf_editor_instCapt.getEditor("root.instCapture.v4lGrabberDevice").setValue(window.serverConfig.grabberV4L2.available_devices);
|
||||||
|
conf_editor_instCapt.getEditor("root.instCapture.v4lGrabberDevice").disable();
|
||||||
|
showInputOptions("instCapture", ["v4lGrabberDevice"], true);
|
||||||
|
showInputOptions("instCapture", ["v4lPriority"], true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (!window.serverConfig.grabberV4L2.enable) {
|
||||||
|
conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").disable();
|
||||||
|
}
|
||||||
|
showInputOptions("instCapture", ["v4lGrabberDevice"], false);
|
||||||
|
showInputOptions("instCapture", ["v4lPriority"], false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#btn_submit_instCapt').off().on('click', function () {
|
||||||
|
requestWriteConfig(conf_editor_instCapt.getValue());
|
||||||
|
});
|
||||||
|
|
||||||
|
removeOverlay();
|
||||||
|
});
|
@ -273,7 +273,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
var obj = event.response.data
|
var obj = event.response.data
|
||||||
if (obj.leds || obj.grabberV4L2) {
|
if (obj.leds || obj.grabberV4L2) {
|
||||||
console.log("ledsim: cmd-settings-update", event.response.data);
|
//console.log("ledsim: cmd-settings-update", event.response.data);
|
||||||
Object.getOwnPropertyNames(obj).forEach(function (val, idx, array) {
|
Object.getOwnPropertyNames(obj).forEach(function (val, idx, array) {
|
||||||
window.serverInfo[val] = obj[val];
|
window.serverInfo[val] = obj[val];
|
||||||
});
|
});
|
||||||
|
@ -188,8 +188,6 @@ function initLanguageSelection() {
|
|||||||
|
|
||||||
function updateUiOnInstance(inst) {
|
function updateUiOnInstance(inst) {
|
||||||
$("#active_instance_friendly_name").text(window.serverInfo.instance[inst].friendly_name);
|
$("#active_instance_friendly_name").text(window.serverInfo.instance[inst].friendly_name);
|
||||||
$('#dash_screen_grabber').text(window.serverConfig.instCapture.systemEnable ? $.i18n('general_enabled') : $.i18n('general_disabled'));
|
|
||||||
$('#dash_video_grabber').text(window.serverConfig.instCapture.v4lEnable ? $.i18n('general_enabled') : $.i18n('general_disabled'));
|
|
||||||
if (window.serverInfo.instance.filter(entry => entry.running).length > 1) {
|
if (window.serverInfo.instance.filter(entry => entry.running).length > 1) {
|
||||||
$('#btn_hypinstanceswitch').toggle(true);
|
$('#btn_hypinstanceswitch').toggle(true);
|
||||||
$('#active_instance_dropdown').prop('disabled', false);
|
$('#active_instance_dropdown').prop('disabled', false);
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
{
|
{
|
||||||
"type" : "object",
|
"type" : "object",
|
||||||
"title" : "edt_conf_fg_heading_title",
|
"title" : "edt_conf_fg_heading_title",
|
||||||
"properties": {
|
"properties":
|
||||||
|
{
|
||||||
|
"enable": {
|
||||||
|
"type": "boolean",
|
||||||
|
"title": "edt_conf_general_enable_title",
|
||||||
|
"required": true,
|
||||||
|
"default": false,
|
||||||
|
"propertyOrder": 1
|
||||||
|
},
|
||||||
"available_devices": {
|
"available_devices": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "edt_conf_grabber_discovered_title",
|
"title": "edt_conf_grabber_discovered_title",
|
||||||
@ -9,7 +17,7 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"infoText": "edt_conf_grabber_discovered_title_info"
|
"infoText": "edt_conf_grabber_discovered_title_info"
|
||||||
},
|
},
|
||||||
"propertyOrder": 1,
|
"propertyOrder": 2,
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"device": {
|
"device": {
|
||||||
@ -19,13 +27,13 @@
|
|||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"comment": "The 'available_devices' settings are dynamically inserted into the WebUI under PropertyOrder '1'.",
|
"comment": "The 'available_devices' settings are dynamically inserted into the WebUI under PropertyOrder '2'.",
|
||||||
"propertyOrder": 2
|
"propertyOrder": 3
|
||||||
},
|
},
|
||||||
"device_inputs": {
|
"device_inputs": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "edt_conf_v4l2_input_title",
|
"title": "edt_conf_v4l2_input_title",
|
||||||
"propertyOrder": 3,
|
"propertyOrder": 4,
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"input": {
|
"input": {
|
||||||
@ -37,13 +45,13 @@
|
|||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 4,
|
"propertyOrder": 5,
|
||||||
"comment": "The 'device_inputs' settings are dynamically inserted into the WebUI under PropertyOrder '3'."
|
"comment": "The 'device_inputs' settings are dynamically inserted into the WebUI under PropertyOrder '4'."
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "edt_conf_v4l2_resolution_title",
|
"title": "edt_conf_v4l2_resolution_title",
|
||||||
"propertyOrder": 5,
|
"propertyOrder": 6,
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"width": {
|
"width": {
|
||||||
@ -56,8 +64,8 @@
|
|||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 8,
|
"propertyOrder": 9,
|
||||||
"comment": "The 'resolutions' settings are dynamically inserted into the WebUI under PropertyOrder '5'."
|
"comment": "The 'resolutions' settings are dynamically inserted into the WebUI under PropertyOrder '6'."
|
||||||
},
|
},
|
||||||
"height": {
|
"height": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -67,13 +75,13 @@
|
|||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 9,
|
"propertyOrder": 10,
|
||||||
"comment": "The 'resolutions' settings are dynamically inserted into the WebUI under PropertyOrder '5'."
|
"comment": "The 'resolutions' settings are dynamically inserted into the WebUI under PropertyOrder '6'."
|
||||||
},
|
},
|
||||||
"framerates": {
|
"framerates": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "edt_conf_fg_frequency_Hz_title",
|
"title": "edt_conf_fg_frequency_Hz_title",
|
||||||
"propertyOrder": 10,
|
"propertyOrder": 11,
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"fps": {
|
"fps": {
|
||||||
@ -85,8 +93,8 @@
|
|||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 11,
|
"propertyOrder": 12,
|
||||||
"comment": "The 'framerates' setting is dynamically inserted into the WebUI under PropertyOrder '10'."
|
"comment": "The 'framerates' setting is dynamically inserted into the WebUI under PropertyOrder '11'."
|
||||||
},
|
},
|
||||||
"pixelDecimation": {
|
"pixelDecimation": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -95,7 +103,7 @@
|
|||||||
"maximum": 30,
|
"maximum": 30,
|
||||||
"default": 8,
|
"default": 8,
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 12
|
"propertyOrder": 13
|
||||||
},
|
},
|
||||||
"cropLeft": {
|
"cropLeft": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -103,7 +111,7 @@
|
|||||||
"minimum": 0,
|
"minimum": 0,
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"append": "edt_append_pixel",
|
"append": "edt_append_pixel",
|
||||||
"propertyOrder": 13
|
"propertyOrder": 14
|
||||||
},
|
},
|
||||||
"cropRight": {
|
"cropRight": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -111,7 +119,7 @@
|
|||||||
"minimum": 0,
|
"minimum": 0,
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"append": "edt_append_pixel",
|
"append": "edt_append_pixel",
|
||||||
"propertyOrder": 14
|
"propertyOrder": 15
|
||||||
},
|
},
|
||||||
"cropTop": {
|
"cropTop": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -119,7 +127,7 @@
|
|||||||
"minimum": 0,
|
"minimum": 0,
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"append": "edt_append_pixel",
|
"append": "edt_append_pixel",
|
||||||
"propertyOrder": 15
|
"propertyOrder": 16
|
||||||
},
|
},
|
||||||
"cropBottom": {
|
"cropBottom": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -127,7 +135,7 @@
|
|||||||
"minimum": 0,
|
"minimum": 0,
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"append": "edt_append_pixel",
|
"append": "edt_append_pixel",
|
||||||
"propertyOrder": 16
|
"propertyOrder": 17
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties" : false
|
"additionalProperties" : false
|
||||||
|
@ -2,7 +2,15 @@
|
|||||||
"type" : "object",
|
"type" : "object",
|
||||||
"required" : true,
|
"required" : true,
|
||||||
"title" : "edt_conf_v4l2_heading_title",
|
"title" : "edt_conf_v4l2_heading_title",
|
||||||
"properties": {
|
"properties":
|
||||||
|
{
|
||||||
|
"enable": {
|
||||||
|
"type": "boolean",
|
||||||
|
"title": "edt_conf_general_enable_title",
|
||||||
|
"required": true,
|
||||||
|
"default": false,
|
||||||
|
"propertyOrder": 1
|
||||||
|
},
|
||||||
"available_devices": {
|
"available_devices": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "edt_conf_grabber_discovered_title",
|
"title": "edt_conf_grabber_discovered_title",
|
||||||
@ -10,7 +18,7 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"infoText": "edt_conf_grabber_discovered_title_info"
|
"infoText": "edt_conf_grabber_discovered_title_info"
|
||||||
},
|
},
|
||||||
"propertyOrder": 1,
|
"propertyOrder": 2,
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"device": {
|
"device": {
|
||||||
@ -20,13 +28,13 @@
|
|||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"comment": "The 'available_devices' settings are dynamically inserted into the WebUI under PropertyOrder '1'.",
|
"comment": "The 'available_devices' settings are dynamically inserted into the WebUI under PropertyOrder '2'.",
|
||||||
"propertyOrder": 2
|
"propertyOrder": 3
|
||||||
},
|
},
|
||||||
"device_inputs": {
|
"device_inputs": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "edt_conf_v4l2_input_title",
|
"title": "edt_conf_v4l2_input_title",
|
||||||
"propertyOrder": 3,
|
"propertyOrder": 4,
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"input": {
|
"input": {
|
||||||
@ -37,15 +45,15 @@
|
|||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 4,
|
"propertyOrder": 5,
|
||||||
"comment": "The 'device_inputs' settings are dynamically inserted into the WebUI under PropertyOrder '3'."
|
"comment": "The 'device_inputs' settings are dynamically inserted into the WebUI under PropertyOrder '4'."
|
||||||
},
|
},
|
||||||
|
|
||||||
"standard": {
|
"standard": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "edt_conf_v4l2_standard_title",
|
"title": "edt_conf_v4l2_standard_title",
|
||||||
"required": false,
|
"required": false,
|
||||||
"propertyOrder": 5
|
"propertyOrder": 6
|
||||||
},
|
},
|
||||||
"encoding": {
|
"encoding": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -53,12 +61,12 @@
|
|||||||
"default": "auto",
|
"default": "auto",
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "advanced",
|
"access": "advanced",
|
||||||
"propertyOrder": 6
|
"propertyOrder": 7
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "edt_conf_v4l2_resolution_title",
|
"title": "edt_conf_v4l2_resolution_title",
|
||||||
"propertyOrder": 7,
|
"propertyOrder": 8,
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"width": {
|
"width": {
|
||||||
@ -71,8 +79,8 @@
|
|||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 8,
|
"propertyOrder": 9,
|
||||||
"comment": "The 'resolutions' settings are dynamically inserted into the WebUI under PropertyOrder '7'."
|
"comment": "The 'resolutions' settings are dynamically inserted into the WebUI under PropertyOrder '8'."
|
||||||
},
|
},
|
||||||
"height": {
|
"height": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -84,13 +92,13 @@
|
|||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 9,
|
"propertyOrder": 10,
|
||||||
"comment": "The 'resolutions' settings are dynamically inserted into the WebUI under PropertyOrder '7'."
|
"comment": "The 'resolutions' settings are dynamically inserted into the WebUI under PropertyOrder '8'."
|
||||||
},
|
},
|
||||||
"framerates": {
|
"framerates": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "edt_conf_v4l2_framerate_title",
|
"title": "edt_conf_v4l2_framerate_title",
|
||||||
"propertyOrder": 10,
|
"propertyOrder": 11,
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"fps": {
|
"fps": {
|
||||||
@ -103,8 +111,8 @@
|
|||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 11,
|
"propertyOrder": 12,
|
||||||
"comment": "The 'framerates' setting is dynamically inserted into the WebUI under PropertyOrder '10'."
|
"comment": "The 'framerates' setting is dynamically inserted into the WebUI under PropertyOrder '11'."
|
||||||
},
|
},
|
||||||
"fpsSoftwareDecimation": {
|
"fpsSoftwareDecimation": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -114,7 +122,7 @@
|
|||||||
"default": 0,
|
"default": 0,
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 12
|
"propertyOrder": 13
|
||||||
},
|
},
|
||||||
"flip": {
|
"flip": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -126,7 +134,7 @@
|
|||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "advanced",
|
"access": "advanced",
|
||||||
"propertyOrder": 13
|
"propertyOrder": 14
|
||||||
},
|
},
|
||||||
"sizeDecimation": {
|
"sizeDecimation": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -135,7 +143,7 @@
|
|||||||
"maximum": 30,
|
"maximum": 30,
|
||||||
"default": 8,
|
"default": 8,
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 14
|
"propertyOrder": 15
|
||||||
},
|
},
|
||||||
"hardware_brightness": {
|
"hardware_brightness": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -143,7 +151,7 @@
|
|||||||
"default": 0,
|
"default": 0,
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 15
|
"propertyOrder": 16
|
||||||
},
|
},
|
||||||
"hardware_contrast": {
|
"hardware_contrast": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -151,7 +159,7 @@
|
|||||||
"default": 0,
|
"default": 0,
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 16
|
"propertyOrder": 17
|
||||||
},
|
},
|
||||||
"hardware_saturation": {
|
"hardware_saturation": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -159,7 +167,7 @@
|
|||||||
"default": 0,
|
"default": 0,
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 17
|
"propertyOrder": 18
|
||||||
},
|
},
|
||||||
"hardware_hue": {
|
"hardware_hue": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -167,7 +175,7 @@
|
|||||||
"default": 0,
|
"default": 0,
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 18
|
"propertyOrder": 19
|
||||||
},
|
},
|
||||||
"cropLeft": {
|
"cropLeft": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -176,7 +184,7 @@
|
|||||||
"default": 0,
|
"default": 0,
|
||||||
"append": "edt_append_pixel",
|
"append": "edt_append_pixel",
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 19
|
"propertyOrder": 20
|
||||||
},
|
},
|
||||||
"cropRight": {
|
"cropRight": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -185,7 +193,7 @@
|
|||||||
"default": 0,
|
"default": 0,
|
||||||
"append": "edt_append_pixel",
|
"append": "edt_append_pixel",
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 20
|
"propertyOrder": 21
|
||||||
},
|
},
|
||||||
"cropTop": {
|
"cropTop": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -194,7 +202,7 @@
|
|||||||
"default": 0,
|
"default": 0,
|
||||||
"append": "edt_append_pixel",
|
"append": "edt_append_pixel",
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 21
|
"propertyOrder": 22
|
||||||
},
|
},
|
||||||
"cropBottom": {
|
"cropBottom": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -203,7 +211,7 @@
|
|||||||
"default": 0,
|
"default": 0,
|
||||||
"append": "edt_append_pixel",
|
"append": "edt_append_pixel",
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 22
|
"propertyOrder": 23
|
||||||
},
|
},
|
||||||
"cecDetection": {
|
"cecDetection": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
@ -211,7 +219,7 @@
|
|||||||
"default": false,
|
"default": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "advanced",
|
"access": "advanced",
|
||||||
"propertyOrder": 23
|
"propertyOrder": 24
|
||||||
},
|
},
|
||||||
"signalDetection": {
|
"signalDetection": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
@ -219,7 +227,7 @@
|
|||||||
"default": false,
|
"default": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 24
|
"propertyOrder": 25
|
||||||
},
|
},
|
||||||
"redSignalThreshold": {
|
"redSignalThreshold": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -235,7 +243,7 @@
|
|||||||
},
|
},
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"required": true,
|
"required": true,
|
||||||
"propertyOrder": 25
|
"propertyOrder": 26
|
||||||
},
|
},
|
||||||
"greenSignalThreshold": {
|
"greenSignalThreshold": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -251,7 +259,7 @@
|
|||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 26
|
"propertyOrder": 27
|
||||||
},
|
},
|
||||||
"blueSignalThreshold": {
|
"blueSignalThreshold": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -267,7 +275,7 @@
|
|||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 27
|
"propertyOrder": 28
|
||||||
},
|
},
|
||||||
"noSignalCounterThreshold": {
|
"noSignalCounterThreshold": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -282,7 +290,7 @@
|
|||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 28
|
"propertyOrder": 29
|
||||||
},
|
},
|
||||||
"sDVOffsetMin": {
|
"sDVOffsetMin": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
@ -298,7 +306,7 @@
|
|||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 29
|
"propertyOrder": 30
|
||||||
},
|
},
|
||||||
"sDVOffsetMax": {
|
"sDVOffsetMax": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
@ -314,7 +322,7 @@
|
|||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 30
|
"propertyOrder": 31
|
||||||
},
|
},
|
||||||
"sDHOffsetMin": {
|
"sDHOffsetMin": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
@ -330,7 +338,7 @@
|
|||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 31
|
"propertyOrder": 32
|
||||||
},
|
},
|
||||||
"sDHOffsetMax": {
|
"sDHOffsetMax": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
@ -346,7 +354,7 @@
|
|||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"access": "expert",
|
"access": "expert",
|
||||||
"propertyOrder": 32
|
"propertyOrder": 33
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -2,43 +2,52 @@
|
|||||||
"type" : "object",
|
"type" : "object",
|
||||||
"required" : true,
|
"required" : true,
|
||||||
"title" : "edt_conf_instC_heading_title",
|
"title" : "edt_conf_instC_heading_title",
|
||||||
"properties" :
|
"properties": {
|
||||||
{
|
"systemEnable": {
|
||||||
"systemEnable" :
|
"type": "boolean",
|
||||||
{
|
"required": true,
|
||||||
"type" : "boolean",
|
"title": "edt_conf_instC_systemEnable_title",
|
||||||
"required" : true,
|
"default": true,
|
||||||
"title" : "edt_conf_instC_systemEnable_title",
|
"propertyOrder": 1
|
||||||
"default" : true,
|
|
||||||
"propertyOrder" : 1
|
|
||||||
},
|
},
|
||||||
"systemPriority" :
|
"systemGrabberDevice": {
|
||||||
{
|
"type": "string",
|
||||||
"type" : "integer",
|
"required": true,
|
||||||
"required" : true,
|
"title": "edt_conf_instC_screen_grabber_device_title",
|
||||||
"title" : "edt_conf_general_priority_title",
|
"default": "NONE",
|
||||||
"minimum" : 100,
|
"propertyOrder": 2
|
||||||
"maximum" : 253,
|
|
||||||
"default" : 250,
|
|
||||||
"propertyOrder" : 2
|
|
||||||
},
|
},
|
||||||
"v4lEnable" :
|
"systemPriority": {
|
||||||
{
|
"type": "integer",
|
||||||
"type" : "boolean",
|
"required": true,
|
||||||
"required" : true,
|
"title": "edt_conf_general_priority_title",
|
||||||
"title" : "edt_conf_instC_v4lEnable_title",
|
"minimum": 100,
|
||||||
"default" : false,
|
"maximum": 253,
|
||||||
"propertyOrder" : 3
|
"default": 250,
|
||||||
|
"propertyOrder": 3
|
||||||
},
|
},
|
||||||
"v4lPriority" :
|
"v4lEnable": {
|
||||||
{
|
"type": "boolean",
|
||||||
"type" : "integer",
|
"required": true,
|
||||||
"required" : true,
|
"title": "edt_conf_instC_v4lEnable_title",
|
||||||
"title" : "edt_conf_general_priority_title",
|
"default": false,
|
||||||
"minimum" : 100,
|
"propertyOrder": 4
|
||||||
"maximum" : 253,
|
},
|
||||||
"default" : 240,
|
"v4lGrabberDevice": {
|
||||||
"propertyOrder" : 4
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"title": "edt_conf_instC_video_grabber_device_title",
|
||||||
|
"default": "NONE",
|
||||||
|
"propertyOrder": 5
|
||||||
|
},
|
||||||
|
"v4lPriority": {
|
||||||
|
"type": "integer",
|
||||||
|
"required": true,
|
||||||
|
"title": "edt_conf_general_priority_title",
|
||||||
|
"minimum": 100,
|
||||||
|
"maximum": 253,
|
||||||
|
"default": 240,
|
||||||
|
"propertyOrder": 6
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties" : false
|
"additionalProperties" : false
|
||||||
|
Loading…
Reference in New Issue
Block a user