mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Boblight fix
- The default Boblight priority has been set to 128. If the sent priority differs from the default priority, it is registered (https://hyperion-project.org/threads/hyperion-ng-enigmalight-boblight-server.3558/#post-15006) - Submodule flatbuffer updated to current master Signed-off-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
parent
97c03f3653
commit
fe204a8a33
@ -432,6 +432,7 @@
|
|||||||
"edt_conf_enum_bbdefault" : "Standard",
|
"edt_conf_enum_bbdefault" : "Standard",
|
||||||
"edt_conf_enum_bbclassic" : "Klassisch",
|
"edt_conf_enum_bbclassic" : "Klassisch",
|
||||||
"edt_conf_enum_bbosd" : "OSD",
|
"edt_conf_enum_bbosd" : "OSD",
|
||||||
|
"edt_conf_enum_automatic" : "Automatisch",
|
||||||
"edt_conf_gen_heading_title" : "Allgemeine Einstellungen",
|
"edt_conf_gen_heading_title" : "Allgemeine Einstellungen",
|
||||||
"edt_conf_gen_name_title" : "Name der Konfiguration",
|
"edt_conf_gen_name_title" : "Name der Konfiguration",
|
||||||
"edt_conf_gen_name_expl" : "Der Name wird verwendet, um Hyperion besser zu identifizieren. (Hilfreich bei mehreren Instanzen)",
|
"edt_conf_gen_name_expl" : "Der Name wird verwendet, um Hyperion besser zu identifizieren. (Hilfreich bei mehreren Instanzen)",
|
||||||
|
@ -433,6 +433,7 @@
|
|||||||
"edt_conf_enum_bbdefault" : "Default",
|
"edt_conf_enum_bbdefault" : "Default",
|
||||||
"edt_conf_enum_bbclassic" : "Classic",
|
"edt_conf_enum_bbclassic" : "Classic",
|
||||||
"edt_conf_enum_bbosd" : "OSD",
|
"edt_conf_enum_bbosd" : "OSD",
|
||||||
|
"edt_conf_enum_automatic" : "Automatic",
|
||||||
"edt_conf_gen_heading_title" : "General Settings",
|
"edt_conf_gen_heading_title" : "General Settings",
|
||||||
"edt_conf_gen_name_title" : "Configuration name",
|
"edt_conf_gen_name_title" : "Configuration name",
|
||||||
"edt_conf_gen_name_expl" : "A user defined name which is used to detect Hyperion. (Helpful with more than one Hyperion instance)",
|
"edt_conf_gen_name_expl" : "A user defined name which is used to detect Hyperion. (Helpful with more than one Hyperion instance)",
|
||||||
|
@ -253,12 +253,12 @@
|
|||||||
/// The configuration of the boblight server which enables the boblight remote interface
|
/// The configuration of the boblight server which enables the boblight remote interface
|
||||||
/// * enable : Enable or disable the boblight server (true/false)
|
/// * enable : Enable or disable the boblight server (true/false)
|
||||||
/// * port : Port at which the boblight server is started
|
/// * port : Port at which the boblight server is started
|
||||||
/// * priority : Priority of the boblight server (Default=201) HINT: lower value result in HIGHER priority!
|
/// * priority : Priority of the boblight server (Default=128) HINT: lower value result in HIGHER priority!
|
||||||
"boblightServer" :
|
"boblightServer" :
|
||||||
{
|
{
|
||||||
"enable" : false,
|
"enable" : false,
|
||||||
"port" : 19333,
|
"port" : 19333,
|
||||||
"priority" : 201
|
"priority" : 128
|
||||||
},
|
},
|
||||||
|
|
||||||
/// The configuration of the udp listener
|
/// The configuration of the udp listener
|
||||||
|
@ -147,7 +147,7 @@
|
|||||||
{
|
{
|
||||||
"enable" : false,
|
"enable" : false,
|
||||||
"port" : 19333,
|
"port" : 19333,
|
||||||
"priority" : 201
|
"priority" : 128
|
||||||
},
|
},
|
||||||
|
|
||||||
"udpListener" :
|
"udpListener" :
|
||||||
|
@ -105,7 +105,7 @@ private:
|
|||||||
bool init();
|
bool init();
|
||||||
void uninit();
|
void uninit();
|
||||||
|
|
||||||
void open_device();
|
bool open_device();
|
||||||
|
|
||||||
void close_device();
|
void close_device();
|
||||||
|
|
||||||
|
@ -192,6 +192,9 @@ void BoblightClientConnection::handleMessage(const QString & message)
|
|||||||
{
|
{
|
||||||
// clear the current channel
|
// clear the current channel
|
||||||
_hyperion->clear(_priority);
|
_hyperion->clear(_priority);
|
||||||
|
|
||||||
|
// register new priority
|
||||||
|
_hyperion->registerInput(prio, hyperion::COMP_BOBLIGHTSERVER, QString("Boblight@%1").arg(_socket->peerAddress().toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
_priority = prio;
|
_priority = prio;
|
||||||
|
@ -23,8 +23,6 @@
|
|||||||
|
|
||||||
#include "grabber/V4L2Grabber.h"
|
#include "grabber/V4L2Grabber.h"
|
||||||
|
|
||||||
using namespace hyperion;
|
|
||||||
|
|
||||||
#define CLEAR(x) memset(&(x), 0, sizeof(x))
|
#define CLEAR(x) memset(&(x), 0, sizeof(x))
|
||||||
|
|
||||||
V4L2Grabber::V4L2Grabber(const QString & device
|
V4L2Grabber::V4L2Grabber(const QString & device
|
||||||
@ -140,10 +138,12 @@ bool V4L2Grabber::init()
|
|||||||
// do not init with unknown device
|
// do not init with unknown device
|
||||||
if(_deviceName != "unknown")
|
if(_deviceName != "unknown")
|
||||||
{
|
{
|
||||||
open_device();
|
if (open_device())
|
||||||
opened = true;
|
{
|
||||||
init_device(_videoStandard, _input);
|
opened = true;
|
||||||
_initialized = true;
|
init_device(_videoStandard, _input);
|
||||||
|
_initialized = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(std::exception& e)
|
catch(std::exception& e)
|
||||||
@ -239,20 +239,20 @@ void V4L2Grabber::stop()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void V4L2Grabber::open_device()
|
bool V4L2Grabber::open_device()
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
if (-1 == stat(QSTRING_CSTR(_deviceName), &st))
|
if (-1 == stat(QSTRING_CSTR(_deviceName), &st))
|
||||||
{
|
{
|
||||||
throw_errno_exception("Cannot identify '" + _deviceName + "'");
|
throw_errno_exception("Cannot identify '" + _deviceName + "'");
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!S_ISCHR(st.st_mode))
|
if (!S_ISCHR(st.st_mode))
|
||||||
{
|
{
|
||||||
throw_exception("'" + _deviceName + "' is no device");
|
throw_exception("'" + _deviceName + "' is no device");
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_fileDescriptor = open(QSTRING_CSTR(_deviceName), O_RDWR | O_NONBLOCK, 0);
|
_fileDescriptor = open(QSTRING_CSTR(_deviceName), O_RDWR | O_NONBLOCK, 0);
|
||||||
@ -260,13 +260,14 @@ void V4L2Grabber::open_device()
|
|||||||
if (-1 == _fileDescriptor)
|
if (-1 == _fileDescriptor)
|
||||||
{
|
{
|
||||||
throw_errno_exception("Cannot open '" + _deviceName + "'");
|
throw_errno_exception("Cannot open '" + _deviceName + "'");
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the notifier for when a new frame is available
|
// create the notifier for when a new frame is available
|
||||||
_streamNotifier = new QSocketNotifier(_fileDescriptor, QSocketNotifier::Read);
|
_streamNotifier = new QSocketNotifier(_fileDescriptor, QSocketNotifier::Read);
|
||||||
_streamNotifier->setEnabled(false);
|
_streamNotifier->setEnabled(false);
|
||||||
connect(_streamNotifier, SIGNAL(activated(int)), this, SLOT(read_frame()));
|
connect(_streamNotifier, SIGNAL(activated(int)), this, SLOT(read_frame()));
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void V4L2Grabber::close_device()
|
void V4L2Grabber::close_device()
|
||||||
@ -1006,7 +1007,7 @@ void V4L2Grabber::process_image(const uint8_t * data, int size)
|
|||||||
delete _decompress;
|
delete _decompress;
|
||||||
delete _error;
|
delete _error;
|
||||||
|
|
||||||
if (imageFrame.isNull())
|
if (imageFrame.isNull() || _error->pub.num_warnings > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QRect rect(_cropLeft, _cropTop, imageFrame.width() - _cropLeft - _cropRight, imageFrame.height() - _cropTop - _cropBottom);
|
QRect rect(_cropLeft, _cropTop, imageFrame.width() - _cropLeft - _cropRight, imageFrame.height() - _cropTop - _cropBottom);
|
||||||
@ -1132,9 +1133,9 @@ void V4L2Grabber::setDeviceVideoStandard(QString device, VideoStandard videoStan
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void V4L2Grabber::componentStateChanged(const Components component, bool enable)
|
void V4L2Grabber::componentStateChanged(const hyperion::Components component, bool enable)
|
||||||
{
|
{
|
||||||
if (component == COMP_V4L)
|
if (component == hyperion::COMP_V4L)
|
||||||
{
|
{
|
||||||
if (_initialized != enable)
|
if (_initialized != enable)
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
"title" : "edt_conf_general_priority_title",
|
"title" : "edt_conf_general_priority_title",
|
||||||
"minimum" : 100,
|
"minimum" : 100,
|
||||||
"maximum" : 254,
|
"maximum" : 254,
|
||||||
"default" : 201,
|
"default" : 128,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
{
|
{
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"title" : "edt_conf_general_enable_title",
|
"title" : "edt_conf_general_enable_title",
|
||||||
|
"required" : true,
|
||||||
|
"default" : false,
|
||||||
"propertyOrder" : 1
|
"propertyOrder" : 1
|
||||||
},
|
},
|
||||||
"json" :
|
"json" :
|
||||||
@ -15,6 +17,7 @@
|
|||||||
"type" : "array",
|
"type" : "array",
|
||||||
"title" : "edt_conf_fw_json_title",
|
"title" : "edt_conf_fw_json_title",
|
||||||
"required" : true,
|
"required" : true,
|
||||||
|
"default" : ["127.0.0.1:19446"],
|
||||||
"items" : {
|
"items" : {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title" : "edt_conf_fw_json_itemtitle"
|
"title" : "edt_conf_fw_json_itemtitle"
|
||||||
@ -25,6 +28,8 @@
|
|||||||
{
|
{
|
||||||
"type" : "array",
|
"type" : "array",
|
||||||
"title" : "edt_conf_fw_proto_title",
|
"title" : "edt_conf_fw_proto_title",
|
||||||
|
"required" : true,
|
||||||
|
"default" : ["127.0.0.1:19401"],
|
||||||
"items" : {
|
"items" : {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title" : "edt_conf_fw_proto_itemtitle"
|
"title" : "edt_conf_fw_proto_itemtitle"
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
"type" : "string",
|
"type" : "string",
|
||||||
"title" : "edt_conf_fg_type_title",
|
"title" : "edt_conf_fg_type_title",
|
||||||
"enum" : ["auto","dispmanx","amlogic","x11","framebuffer","qt"],
|
"enum" : ["auto","dispmanx","amlogic","x11","framebuffer","qt"],
|
||||||
|
"options":
|
||||||
|
{
|
||||||
|
"enum_titles": ["edt_conf_enum_automatic","DispmanX","AMLogic","X11","Framebuffer","QT"]
|
||||||
|
},
|
||||||
"default" : "auto",
|
"default" : "auto",
|
||||||
"propertyOrder" : 2
|
"propertyOrder" : 2
|
||||||
},
|
},
|
||||||
|
@ -5,12 +5,14 @@
|
|||||||
"items":
|
"items":
|
||||||
{
|
{
|
||||||
"type":"object",
|
"type":"object",
|
||||||
|
"required" : true,
|
||||||
"properties":
|
"properties":
|
||||||
{
|
{
|
||||||
"index":
|
"index":
|
||||||
{
|
{
|
||||||
"type":"integer",
|
"type":"integer",
|
||||||
"required":true
|
"required":true,
|
||||||
|
"default" : 0
|
||||||
},
|
},
|
||||||
"clone":
|
"clone":
|
||||||
{
|
{
|
||||||
@ -19,6 +21,7 @@
|
|||||||
"hscan":
|
"hscan":
|
||||||
{
|
{
|
||||||
"type":"object",
|
"type":"object",
|
||||||
|
"required" : true,
|
||||||
"properties":
|
"properties":
|
||||||
{
|
{
|
||||||
"minimum":
|
"minimum":
|
||||||
@ -26,14 +29,16 @@
|
|||||||
"type":"number",
|
"type":"number",
|
||||||
"minimum" : 0,
|
"minimum" : 0,
|
||||||
"maximum" : 1,
|
"maximum" : 1,
|
||||||
"required":true
|
"required":true,
|
||||||
|
"default" : 0
|
||||||
},
|
},
|
||||||
"maximum":
|
"maximum":
|
||||||
{
|
{
|
||||||
"type":"number",
|
"type":"number",
|
||||||
"minimum" : 0,
|
"minimum" : 0,
|
||||||
"maximum" : 1,
|
"maximum" : 1,
|
||||||
"required":true
|
"required":true,
|
||||||
|
"default" : 0.1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties" : false
|
"additionalProperties" : false
|
||||||
@ -41,6 +46,7 @@
|
|||||||
"vscan":
|
"vscan":
|
||||||
{
|
{
|
||||||
"type":"object",
|
"type":"object",
|
||||||
|
"required" : true,
|
||||||
"properties":
|
"properties":
|
||||||
{
|
{
|
||||||
"minimum":
|
"minimum":
|
||||||
@ -48,14 +54,16 @@
|
|||||||
"type":"number",
|
"type":"number",
|
||||||
"minimum" : 0,
|
"minimum" : 0,
|
||||||
"maximum" : 1,
|
"maximum" : 1,
|
||||||
"required":true
|
"required":true,
|
||||||
|
"default" : 0
|
||||||
},
|
},
|
||||||
"maximum":
|
"maximum":
|
||||||
{
|
{
|
||||||
"type":"number",
|
"type":"number",
|
||||||
"minimum" : 0,
|
"minimum" : 0,
|
||||||
"maximum" : 1,
|
"maximum" : 1,
|
||||||
"required":true
|
"required":true,
|
||||||
|
"default" : 0.1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties" : false
|
"additionalProperties" : false
|
||||||
@ -63,7 +71,10 @@
|
|||||||
"colorOrder":
|
"colorOrder":
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum" : ["rgb", "bgr", "rbg", "brg", "gbr", "grb"]
|
"enum" : ["rgb", "bgr", "rbg", "brg", "gbr", "grb"],
|
||||||
|
"options" : {
|
||||||
|
"enum_titles" : ["edt_conf_enum_rgb", "edt_conf_enum_bgr", "edt_conf_enum_rbg", "edt_conf_enum_brg", "edt_conf_enum_gbr", "edt_conf_enum_grb"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties" : false
|
"additionalProperties" : false
|
||||||
|
Loading…
Reference in New Issue
Block a user