mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
update adjustments and ui (#384)
* update
* update
* testit
* Revert "testit"
This reverts commit b1cc645161
.
* update schema
* update
* add adjustment to serverinfo
* remove Adjustbool
* remove v4l2only
* fix json check for create effect
* update deb
* update
* update remote adjust
* update
* add eff schemas
This commit is contained in:
@@ -392,7 +392,7 @@ Hyperion::Hyperion(const QJsonObject &qjsonConfig, const QString configFile)
|
||||
, _timer()
|
||||
, _log(CORE_LOGGER)
|
||||
, _hwLedCount(_ledString.leds().size())
|
||||
, _colorAdjustmentV4Lonly(false)
|
||||
|
||||
, _sourceAutoSelectEnabled(true)
|
||||
, _configHash()
|
||||
, _ledGridSize(getLedLayoutGridSize(qjsonConfig["leds"]))
|
||||
@@ -405,11 +405,6 @@ Hyperion::Hyperion(const QJsonObject &qjsonConfig, const QString configFile)
|
||||
}
|
||||
// set color correction activity state
|
||||
const QJsonObject& color = qjsonConfig["color"].toObject();
|
||||
_adjustmentEnabled = color["channelAdjustment_enable"].toBool(true);
|
||||
_colorAdjustmentV4Lonly = color["channelAdjustment_v4l_only"].toBool(false);
|
||||
|
||||
InfoIf(!_adjustmentEnabled , _log, "Color adjustment disabled" );
|
||||
InfoIf(_colorAdjustmentV4Lonly , _log, "Color adjustment for v4l inputs only" );
|
||||
|
||||
// initialize the image processor factory
|
||||
_ledMAppingType = ImageProcessor::mappingTypeToInt(color["imageToLedMappingType"].toString());
|
||||
@@ -721,7 +716,7 @@ void Hyperion::update()
|
||||
_ledBuffer.reserve(_hwLedCount);
|
||||
_ledBuffer = priorityInfo.ledColors;
|
||||
|
||||
if ( _adjustmentEnabled && priority < PriorityMuxer::LOWEST_PRIORITY && (!_colorAdjustmentV4Lonly || priorityInfo.componentId == hyperion::COMP_V4L) )
|
||||
if ( priority < PriorityMuxer::LOWEST_PRIORITY)
|
||||
{
|
||||
_raw2ledAdjustment->applyAdjustment(_ledBuffer);
|
||||
}
|
||||
|
@@ -114,30 +114,17 @@
|
||||
},
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"channelAdjustment_enable" :
|
||||
{
|
||||
"type" : "boolean",
|
||||
"title" : "edt_conf_color_channelAdjustment_enable_title",
|
||||
"default" : true,
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"channelAdjustment_v4l_only" :
|
||||
{
|
||||
"type" : "boolean",
|
||||
"title" : "edt_conf_color_channelAdjustment_v4l_only_title",
|
||||
"default" : false,
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"channelAdjustment" :
|
||||
{
|
||||
"type" : "array",
|
||||
"title" : "edt_conf_color_channelAdjustment_header_title",
|
||||
"required" : true,
|
||||
"propertyOrder" : 4,
|
||||
"propertyOrder" : 3,
|
||||
"items" :
|
||||
{
|
||||
"type" : "object",
|
||||
"required" : true,
|
||||
"title" : "edt_conf_color_channelAdjustment_header_itemtitle",
|
||||
"properties" :
|
||||
{
|
||||
"id" :
|
||||
@@ -287,7 +274,7 @@
|
||||
"brightnessMin" :
|
||||
{
|
||||
"type" : "number",
|
||||
"title" : "edt_conf_color_brightness_min_title",
|
||||
"title" : "edt_conf_color_brightnessMin_title",
|
||||
"required" : true,
|
||||
"minimum" : 0.0,
|
||||
"maximum": 1.0,
|
||||
@@ -309,7 +296,7 @@
|
||||
"gammaRed" :
|
||||
{
|
||||
"type" : "number",
|
||||
"title" : "edt_conf_color_gamma_red_title",
|
||||
"title" : "edt_conf_color_gammaRed_title",
|
||||
"required" : true,
|
||||
"minimum" : 0.0,
|
||||
"maximum": 100.0,
|
||||
@@ -320,7 +307,7 @@
|
||||
"gammaGreen" :
|
||||
{
|
||||
"type" : "number",
|
||||
"title" : "edt_conf_color_gamma_green_title",
|
||||
"title" : "edt_conf_color_gammaGreen_title",
|
||||
"required" : true,
|
||||
"minimum" : 0.0,
|
||||
"maximum": 100.0,
|
||||
@@ -331,7 +318,7 @@
|
||||
"gammaBlue" :
|
||||
{
|
||||
"type" : "number",
|
||||
"title" : "edt_conf_color_gamma_blue_title",
|
||||
"title" : "edt_conf_color_gammaBlue_title",
|
||||
"required" : true,
|
||||
"minimum" : 0.0,
|
||||
"maximum": 100.0,
|
||||
|
@@ -668,7 +668,6 @@ void JsonClientConnection::handleServerInfoCommand(const QJsonObject&, const QSt
|
||||
|
||||
info["priorities"] = priorities;
|
||||
info["priorities_autoselect"] = _hyperion->sourceAutoSelectEnabled();
|
||||
|
||||
|
||||
// collect adjustment information
|
||||
QJsonArray adjustmentArray;
|
||||
@@ -684,29 +683,65 @@ void JsonClientConnection::handleServerInfoCommand(const QJsonObject&, const QSt
|
||||
QJsonObject adjustment;
|
||||
adjustment["id"] = QString::fromStdString(adjustmentId);
|
||||
|
||||
QJsonArray blackAdjust;
|
||||
blackAdjust.append(colorAdjustment->_rgbBlackAdjustment.getAdjustmentR());
|
||||
blackAdjust.append(colorAdjustment->_rgbBlackAdjustment.getAdjustmentG());
|
||||
blackAdjust.append(colorAdjustment->_rgbBlackAdjustment.getAdjustmentB());
|
||||
adjustment.insert("black", blackAdjust);
|
||||
|
||||
QJsonArray whiteAdjust;
|
||||
whiteAdjust.append(colorAdjustment->_rgbWhiteAdjustment.getAdjustmentR());
|
||||
whiteAdjust.append(colorAdjustment->_rgbWhiteAdjustment.getAdjustmentG());
|
||||
whiteAdjust.append(colorAdjustment->_rgbWhiteAdjustment.getAdjustmentB());
|
||||
adjustment.insert("white", whiteAdjust);
|
||||
|
||||
QJsonArray redAdjust;
|
||||
redAdjust.append(colorAdjustment->_rgbRedAdjustment.getAdjustmentR());
|
||||
redAdjust.append(colorAdjustment->_rgbRedAdjustment.getAdjustmentG());
|
||||
redAdjust.append(colorAdjustment->_rgbRedAdjustment.getAdjustmentB());
|
||||
adjustment.insert("redAdjust", redAdjust);
|
||||
adjustment.insert("red", redAdjust);
|
||||
|
||||
QJsonArray greenAdjust;
|
||||
greenAdjust.append(colorAdjustment->_rgbGreenAdjustment.getAdjustmentR());
|
||||
greenAdjust.append(colorAdjustment->_rgbGreenAdjustment.getAdjustmentG());
|
||||
greenAdjust.append(colorAdjustment->_rgbGreenAdjustment.getAdjustmentB());
|
||||
adjustment.insert("greenAdjust", greenAdjust);
|
||||
adjustment.insert("green", greenAdjust);
|
||||
|
||||
QJsonArray blueAdjust;
|
||||
blueAdjust.append(colorAdjustment->_rgbBlueAdjustment.getAdjustmentR());
|
||||
blueAdjust.append(colorAdjustment->_rgbBlueAdjustment.getAdjustmentG());
|
||||
blueAdjust.append(colorAdjustment->_rgbBlueAdjustment.getAdjustmentB());
|
||||
adjustment.insert("blueAdjust", blueAdjust);
|
||||
adjustment.insert("blue", blueAdjust);
|
||||
|
||||
QJsonArray cyanAdjust;
|
||||
cyanAdjust.append(colorAdjustment->_rgbCyanAdjustment.getAdjustmentR());
|
||||
cyanAdjust.append(colorAdjustment->_rgbCyanAdjustment.getAdjustmentG());
|
||||
cyanAdjust.append(colorAdjustment->_rgbCyanAdjustment.getAdjustmentB());
|
||||
adjustment.insert("cyan", cyanAdjust);
|
||||
|
||||
QJsonArray magentaAdjust;
|
||||
magentaAdjust.append(colorAdjustment->_rgbMagentaAdjustment.getAdjustmentR());
|
||||
magentaAdjust.append(colorAdjustment->_rgbMagentaAdjustment.getAdjustmentG());
|
||||
magentaAdjust.append(colorAdjustment->_rgbMagentaAdjustment.getAdjustmentB());
|
||||
adjustment.insert("magenta", magentaAdjust);
|
||||
|
||||
QJsonArray yellowAdjust;
|
||||
yellowAdjust.append(colorAdjustment->_rgbYellowAdjustment.getAdjustmentR());
|
||||
yellowAdjust.append(colorAdjustment->_rgbYellowAdjustment.getAdjustmentG());
|
||||
yellowAdjust.append(colorAdjustment->_rgbYellowAdjustment.getAdjustmentB());
|
||||
adjustment.insert("yellow", yellowAdjust);
|
||||
|
||||
adjustment["brightnessMin"] = colorAdjustment->_rgbTransform.getBrightnessMin();
|
||||
adjustment["brightness"] = colorAdjustment->_rgbTransform.getBrightness();
|
||||
adjustment["gammaRed"] = colorAdjustment->_rgbTransform.getGammaR();
|
||||
adjustment["gammaGreen"] = colorAdjustment->_rgbTransform.getGammaG();
|
||||
adjustment["gammaBlue"] = colorAdjustment->_rgbTransform.getGammaB();
|
||||
|
||||
adjustmentArray.append(adjustment);
|
||||
}
|
||||
|
||||
info["adjustment"] = adjustmentArray;
|
||||
|
||||
|
||||
// collect effect info
|
||||
QJsonArray effects;
|
||||
const std::list<EffectDefinition> & effectsDefinitions = _hyperion->getEffects();
|
||||
@@ -806,76 +841,76 @@ void JsonClientConnection::handleAdjustmentCommand(const QJsonObject& message, c
|
||||
return;
|
||||
}
|
||||
|
||||
if (adjustment.contains("redAdjust"))
|
||||
if (adjustment.contains("red"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["redAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["red"].toArray();
|
||||
colorAdjustment->_rgbRedAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbRedAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbRedAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
|
||||
if (adjustment.contains("greenAdjust"))
|
||||
if (adjustment.contains("green"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["greenAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["green"].toArray();
|
||||
colorAdjustment->_rgbGreenAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbGreenAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbGreenAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
|
||||
if (adjustment.contains("blueAdjust"))
|
||||
if (adjustment.contains("blue"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["blueAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["blue"].toArray();
|
||||
colorAdjustment->_rgbBlueAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbBlueAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbBlueAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
if (adjustment.contains("cyanAdjust"))
|
||||
if (adjustment.contains("cyan"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["cyanAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["cyan"].toArray();
|
||||
colorAdjustment->_rgbCyanAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbCyanAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbCyanAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
if (adjustment.contains("magentaAdjust"))
|
||||
if (adjustment.contains("magenta"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["magentaAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["magenta"].toArray();
|
||||
colorAdjustment->_rgbMagentaAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbMagentaAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbMagentaAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
if (adjustment.contains("yellowAdjust"))
|
||||
if (adjustment.contains("yellow"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["yellowAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["yellow"].toArray();
|
||||
colorAdjustment->_rgbYellowAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbYellowAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbYellowAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
if (adjustment.contains("blackAdjust"))
|
||||
if (adjustment.contains("black"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["blackAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["black"].toArray();
|
||||
colorAdjustment->_rgbBlackAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbBlackAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbBlackAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
if (adjustment.contains("whiteAdjust"))
|
||||
if (adjustment.contains("white"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["whiteAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["white"].toArray();
|
||||
colorAdjustment->_rgbWhiteAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbWhiteAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbWhiteAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
|
||||
if (adjustment.contains("gammaR"))
|
||||
if (adjustment.contains("gammaRed"))
|
||||
{
|
||||
colorAdjustment->_rgbTransform.setGamma(adjustment["gammaR"].toDouble(), colorAdjustment->_rgbTransform.getGammaG(), colorAdjustment->_rgbTransform.getGammaB());
|
||||
colorAdjustment->_rgbTransform.setGamma(adjustment["gammaRed"].toDouble(), colorAdjustment->_rgbTransform.getGammaG(), colorAdjustment->_rgbTransform.getGammaB());
|
||||
}
|
||||
if (adjustment.contains("gammaG"))
|
||||
if (adjustment.contains("gammaGreen"))
|
||||
{
|
||||
colorAdjustment->_rgbTransform.setGamma(colorAdjustment->_rgbTransform.getGammaR(), adjustment["gammaG"].toDouble(), colorAdjustment->_rgbTransform.getGammaB());
|
||||
colorAdjustment->_rgbTransform.setGamma(colorAdjustment->_rgbTransform.getGammaR(), adjustment["gammaGreen"].toDouble(), colorAdjustment->_rgbTransform.getGammaB());
|
||||
}
|
||||
if (adjustment.contains("gammaB"))
|
||||
if (adjustment.contains("gammaBlue"))
|
||||
{
|
||||
colorAdjustment->_rgbTransform.setGamma(colorAdjustment->_rgbTransform.getGammaR(), colorAdjustment->_rgbTransform.getGammaG(), adjustment["gammaB"].toDouble());
|
||||
colorAdjustment->_rgbTransform.setGamma(colorAdjustment->_rgbTransform.getGammaR(), colorAdjustment->_rgbTransform.getGammaG(), adjustment["gammaBlue"].toDouble());
|
||||
}
|
||||
|
||||
if (adjustment.contains("brightnessMin"))
|
||||
|
@@ -18,7 +18,7 @@
|
||||
"type" : "string",
|
||||
"required" : false
|
||||
},
|
||||
"redAdjust": {
|
||||
"red": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -29,7 +29,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"greenAdjust": {
|
||||
"green": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -40,7 +40,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"blueAdjust": {
|
||||
"blue": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -51,7 +51,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"yellowAdjust": {
|
||||
"yellow": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -62,7 +62,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"magentaAdjust": {
|
||||
"magenta": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -73,7 +73,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"cyanAdjust": {
|
||||
"cyan": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -84,7 +84,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"blackAdjust": {
|
||||
"black": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -95,7 +95,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"whiteAdjust": {
|
||||
"white": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -106,19 +106,19 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"gammaR": {
|
||||
"gammaRed": {
|
||||
"type" : "number",
|
||||
"required" : false,
|
||||
"minimum" : 0.0,
|
||||
"maximum" : 100.0
|
||||
},
|
||||
"gammaG": {
|
||||
"gammaGreen": {
|
||||
"type" : "number",
|
||||
"required" : false,
|
||||
"minimum" : 0.0,
|
||||
"maximum" : 100.0
|
||||
},
|
||||
"gammaB": {
|
||||
"gammaBlue": {
|
||||
"type" : "number",
|
||||
"required" : false,
|
||||
"minimum" : 0.0,
|
||||
|
@@ -492,13 +492,13 @@ void KODIVideoChecker::setVideoMode(VideoMode newVideoMode)
|
||||
switch (newVideoMode)
|
||||
{
|
||||
case VIDEO_2D:
|
||||
Info(_log, "KODICHECK INFO: switching to 2D mode");
|
||||
Info(_log, "switching to 2D mode");
|
||||
break;
|
||||
case VIDEO_3DSBS:
|
||||
Info(_log, "KODICHECK INFO: switching to 3D SBS mode");
|
||||
Info(_log, "switching to 3D SBS mode");
|
||||
break;
|
||||
case VIDEO_3DTAB:
|
||||
Info(_log, "KODICHECK INFO: switching to 3D TAB mode");
|
||||
Info(_log, "switching to 3D TAB mode");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -110,7 +110,7 @@ void QJsonSchemaChecker::validate(const QJsonValue & value, const QJsonObject &s
|
||||
else if (attribute == "id")
|
||||
; // references have already been collected
|
||||
else if (attribute == "title" || attribute == "description" || attribute == "default" || attribute == "format"
|
||||
|| attribute == "defaultProperties" || attribute == "propertyOrder" || attribute == "append" || attribute == "step" || attribute == "access" || attribute == "options")
|
||||
|| attribute == "defaultProperties" || attribute == "propertyOrder" || attribute == "append" || attribute == "step" || attribute == "access" || attribute == "options" || attribute == "script")
|
||||
; // nothing to do.
|
||||
else
|
||||
{
|
||||
|
@@ -49,7 +49,7 @@ void StaticFileServing::onServerStarted (quint16 port)
|
||||
|
||||
BonjourServiceRegister *bonjourRegister_http = new BonjourServiceRegister();
|
||||
bonjourRegister_http->registerService(
|
||||
BonjourRecord(mDNSDescr.c_str(), "_http._tcp", QString()),
|
||||
BonjourRecord(mDNSDescr.c_str(), "_hyperiond-http._tcp", QString()),
|
||||
port
|
||||
);
|
||||
Debug(_log, "Web Config mDNS responder started");
|
||||
|
Reference in New Issue
Block a user