mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
make all prios settable and make prios more consistent
Former-commit-id: f1d1c35063e98389d627f3535d2a94da33a22da4
This commit is contained in:
@@ -21,14 +21,14 @@
|
||||
// project includes
|
||||
#include "BoblightClientConnection.h"
|
||||
|
||||
BoblightClientConnection::BoblightClientConnection(QTcpSocket *socket, Hyperion * hyperion) :
|
||||
BoblightClientConnection::BoblightClientConnection(QTcpSocket *socket, const int priority, Hyperion * hyperion) :
|
||||
QObject(),
|
||||
_locale(QLocale::C),
|
||||
_socket(socket),
|
||||
_imageProcessor(ImageProcessorFactory::getInstance().newImageProcessor()),
|
||||
_hyperion(hyperion),
|
||||
_receiveBuffer(),
|
||||
_priority(255),
|
||||
_priority(priority),
|
||||
_ledColors(hyperion->getLedCount(), ColorRgb::BLACK)
|
||||
{
|
||||
// initalize the locale. Start with the default C-locale
|
||||
|
@@ -26,7 +26,7 @@ public:
|
||||
/// @param socket The Socket object for this connection
|
||||
/// @param hyperion The Hyperion server
|
||||
///
|
||||
BoblightClientConnection(QTcpSocket * socket, Hyperion * hyperion);
|
||||
BoblightClientConnection(QTcpSocket * socket, const int priority, Hyperion * hyperion);
|
||||
|
||||
///
|
||||
/// Destructor
|
||||
|
@@ -5,11 +5,12 @@
|
||||
#include <boblightserver/BoblightServer.h>
|
||||
#include "BoblightClientConnection.h"
|
||||
|
||||
BoblightServer::BoblightServer(Hyperion *hyperion, uint16_t port) :
|
||||
BoblightServer::BoblightServer(Hyperion *hyperion, const int priority,uint16_t port) :
|
||||
QObject(),
|
||||
_hyperion(hyperion),
|
||||
_server(),
|
||||
_openConnections()
|
||||
_openConnections(),
|
||||
_priority(priority)
|
||||
{
|
||||
if (!_server.listen(QHostAddress::Any, port))
|
||||
{
|
||||
@@ -39,7 +40,7 @@ void BoblightServer::newConnection()
|
||||
if (socket != nullptr)
|
||||
{
|
||||
std::cout << "New boblight connection" << std::endl;
|
||||
BoblightClientConnection * connection = new BoblightClientConnection(socket, _hyperion);
|
||||
BoblightClientConnection * connection = new BoblightClientConnection(socket, _priority, _hyperion);
|
||||
_openConnections.insert(connection);
|
||||
|
||||
// register slot for cleaning up after the connection closed
|
||||
|
@@ -12,10 +12,10 @@
|
||||
#include <grabber/AmlogicGrabber.h>
|
||||
|
||||
|
||||
AmlogicWrapper::AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, Hyperion * hyperion) :
|
||||
AmlogicWrapper::AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, const int priority, Hyperion * hyperion) :
|
||||
_updateInterval_ms(1000/updateRate_Hz),
|
||||
_timeout_ms(2 * _updateInterval_ms),
|
||||
_priority(999),
|
||||
_priority(priority),
|
||||
_timer(),
|
||||
_image(grabWidth, grabHeight),
|
||||
_frameGrabber(new AmlogicGrabber(grabWidth, grabHeight)),
|
||||
|
@@ -12,10 +12,10 @@
|
||||
#include <grabber/DispmanxFrameGrabber.h>
|
||||
|
||||
|
||||
DispmanxWrapper::DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, Hyperion * hyperion) :
|
||||
DispmanxWrapper::DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, const int priority, Hyperion * hyperion) :
|
||||
_updateInterval_ms(1000/updateRate_Hz),
|
||||
_timeout_ms(2 * _updateInterval_ms),
|
||||
_priority(1000),
|
||||
_priority(priority),
|
||||
_timer(),
|
||||
_image(grabWidth, grabHeight),
|
||||
_frameGrabber(new DispmanxFrameGrabber(grabWidth, grabHeight)),
|
||||
|
@@ -7,10 +7,10 @@
|
||||
#include <grabber/FramebufferWrapper.h>
|
||||
#include "FramebufferFrameGrabber.h"
|
||||
|
||||
FramebufferWrapper::FramebufferWrapper(const std::string & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, Hyperion * hyperion) :
|
||||
FramebufferWrapper::FramebufferWrapper(const std::string & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, const int priority, Hyperion * hyperion) :
|
||||
_updateInterval_ms(1000/updateRate_Hz),
|
||||
_timeout_ms(2 * _updateInterval_ms),
|
||||
_priority(1000),
|
||||
_priority(priority),
|
||||
_timer(),
|
||||
_image(grabWidth, grabHeight),
|
||||
_frameGrabber(new FramebufferFrameGrabber(device, grabWidth, grabHeight)),
|
||||
|
@@ -7,10 +7,10 @@
|
||||
#include <grabber/OsxWrapper.h>
|
||||
#include "OsxFrameGrabber.h"
|
||||
|
||||
OsxWrapper::OsxWrapper(const unsigned display, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, Hyperion * hyperion) :
|
||||
OsxWrapper::OsxWrapper(const unsigned display, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, const int priority, Hyperion * hyperion) :
|
||||
_updateInterval_ms(1000/updateRate_Hz),
|
||||
_timeout_ms(2 * _updateInterval_ms),
|
||||
_priority(1000),
|
||||
_priority(priority),
|
||||
_timer(),
|
||||
_image(grabWidth, grabHeight),
|
||||
_frameGrabber(new OsxFrameGrabber(display, grabWidth, grabHeight)),
|
||||
|
Reference in New Issue
Block a user