mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Amlogic box uses aml and fb buffer (#141)
* v4l: fix auto mode opens usable device twice * on amlogic system, start framegrabber and amlogic grabber * tune code formating * make aml grabber always one prio below fb * hyperiond refactoring * refactor hyperiond grabber donfig code add json clinet view of active and inactive input sources
This commit is contained in:
@@ -11,16 +11,16 @@
|
||||
#include <grabber/AmlogicGrabber.h>
|
||||
|
||||
|
||||
AmlogicWrapper::AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, const int priority) :
|
||||
_updateInterval_ms(1000/updateRate_Hz),
|
||||
_timeout_ms(2 * _updateInterval_ms),
|
||||
_priority(priority),
|
||||
_timer(),
|
||||
_image(grabWidth, grabHeight),
|
||||
_frameGrabber(new AmlogicGrabber(grabWidth, grabHeight)),
|
||||
_processor(ImageProcessorFactory::getInstance().newImageProcessor()),
|
||||
_ledColors(Hyperion::getInstance()->getLedCount(), ColorRgb{0,0,0}),
|
||||
_hyperion(Hyperion::getInstance())
|
||||
AmlogicWrapper::AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, const int priority)
|
||||
: _updateInterval_ms(1000/updateRate_Hz)
|
||||
, _timeout_ms(2 * _updateInterval_ms)
|
||||
, _priority(priority)
|
||||
, _timer()
|
||||
, _image(grabWidth, grabHeight)
|
||||
, _frameGrabber(new AmlogicGrabber(grabWidth, grabHeight))
|
||||
, _processor(ImageProcessorFactory::getInstance().newImageProcessor())
|
||||
, _ledColors(Hyperion::getInstance()->getLedCount(), ColorRgb{0,0,0})
|
||||
, _hyperion(Hyperion::getInstance())
|
||||
{
|
||||
// Configure the timer to generate events every n milliseconds
|
||||
_timer.setInterval(_updateInterval_ms);
|
||||
|
@@ -387,7 +387,8 @@ void JsonClientConnection::handleServerInfoCommand(const Json::Value &)
|
||||
Json::Value & priorities = info["priorities"] = Json::Value(Json::arrayValue);
|
||||
uint64_t now = QDateTime::currentMSecsSinceEpoch();
|
||||
QList<int> activePriorities = _hyperion->getActivePriorities();
|
||||
const Hyperion::PriorityRegister& priorityRegister = _hyperion->getPriorityRegister();
|
||||
Hyperion::PriorityRegister priorityRegister = _hyperion->getPriorityRegister();
|
||||
|
||||
foreach (int priority, activePriorities) {
|
||||
const Hyperion::InputInfo & priorityInfo = _hyperion->getPriorityInfo(priority);
|
||||
Json::Value & item = priorities[priorities.size()];
|
||||
@@ -398,15 +399,24 @@ void JsonClientConnection::handleServerInfoCommand(const Json::Value &)
|
||||
}
|
||||
|
||||
item["owner"] = "unknown";
|
||||
for(auto const &entry : priorityRegister)
|
||||
item["active"] = "true";
|
||||
foreach(auto const &entry, priorityRegister)
|
||||
{
|
||||
if (entry.second == priority)
|
||||
{
|
||||
item["owner"] = entry.first;
|
||||
priorityRegister.erase(entry.first);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach(auto const &entry, priorityRegister)
|
||||
{
|
||||
Json::Value & item = priorities[priorities.size()];
|
||||
item["priority"] = entry.second;
|
||||
item["active"] = "false";
|
||||
item["owner"] = entry.first;
|
||||
}
|
||||
|
||||
// collect temperature correction information
|
||||
Json::Value & temperatureArray = info["temperature"];
|
||||
|
Reference in New Issue
Block a user