every input sources trackes now its priority and ID to hyperion core

ATM all input sources except inputs via proto are tracked
This commit is contained in:
redpanther
2016-07-15 23:08:55 +02:00
parent 5432aa7d27
commit 505b83f028
12 changed files with 94 additions and 38 deletions

View File

@@ -31,6 +31,8 @@ AmlogicWrapper::AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeig
// Connect the QTimer to this
QObject::connect(&_timer, SIGNAL(timeout()), this, SLOT(action()));
_hyperion->registerPriority("Amlogic Grabber", _priority);
}
AmlogicWrapper::~AmlogicWrapper()

View File

@@ -31,6 +31,8 @@ DispmanxWrapper::DispmanxWrapper(const unsigned grabWidth, const unsigned grabHe
// Connect the QTimer to this
QObject::connect(&_timer, SIGNAL(timeout()), this, SLOT(action()));
_hyperion->registerPriority("Dispmanx Grabber", _priority);
}
DispmanxWrapper::~DispmanxWrapper()

View File

@@ -26,6 +26,8 @@ FramebufferWrapper::FramebufferWrapper(const std::string & device, const unsigne
// Connect the QTimer to this
QObject::connect(&_timer, SIGNAL(timeout()), this, SLOT(action()));
_hyperion->registerPriority("FrameBuffer Grabber", _priority);
}
FramebufferWrapper::~FramebufferWrapper()

View File

@@ -26,6 +26,8 @@ OsxWrapper::OsxWrapper(const unsigned display, const unsigned grabWidth, const u
// Connect the QTimer to this
QObject::connect(&_timer, SIGNAL(timeout()), this, SLOT(action()));
_hyperion->registerPriority("OsxFrameGrabber", _priority);
}
OsxWrapper::~OsxWrapper()

View File

@@ -15,10 +15,10 @@ V4L2Wrapper::V4L2Wrapper(const std::string &device,
double redSignalThreshold,
double greenSignalThreshold,
double blueSignalThreshold,
int hyperionPriority) :
_timeout_ms(1000),
_priority(hyperionPriority),
_grabber(device,
int hyperionPriority)
: _timeout_ms(1000)
, _priority(hyperionPriority)
, _grabber(device,
input,
videoStandard,
pixelFormat,
@@ -26,18 +26,16 @@ V4L2Wrapper::V4L2Wrapper(const std::string &device,
height,
frameDecimation,
pixelDecimation,
pixelDecimation),
_processor(ImageProcessorFactory::getInstance().newImageProcessor()),
_hyperion(Hyperion::getInstance()),
_ledColors(Hyperion::getInstance()->getLedCount(), ColorRgb{0,0,0}),
_timer()
pixelDecimation)
, _processor(ImageProcessorFactory::getInstance().newImageProcessor())
, _hyperion(Hyperion::getInstance())
, _ledColors(Hyperion::getInstance()->getLedCount(), ColorRgb{0,0,0})
, _timer()
{
// set the signal detection threshold of the grabber
_grabber.setSignalThreshold(
redSignalThreshold,
greenSignalThreshold,
blueSignalThreshold,
50);
_grabber.setSignalThreshold( redSignalThreshold, greenSignalThreshold, blueSignalThreshold, 50);
_hyperion->registerPriority("V4L2", _priority);
// register the image type
qRegisterMetaType<Image<ColorRgb>>("Image<ColorRgb>");
@@ -55,6 +53,7 @@ V4L2Wrapper::V4L2Wrapper(const std::string &device,
_hyperion, SLOT(setColors(int,std::vector<ColorRgb>,int)),
Qt::QueuedConnection);
// setup the higher prio source checker
// this will disable the v4l2 grabber when a source with hisher priority is active
_timer.setInterval(500);