mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
grabber api and feature unification (#462)
* move setvideomode to common place * implement more croping and 3d support * more api unification * more refactoring * osx fix * next step * add a mock for osx grabber. Now it is possible to test compile on none osx platforms. * more unifications ... * remove obsolete includes and grabbers are not dyn allocated. dispmanx needs rework an probaly not work atm * first version of dispmanx mock. it compiles, but outputs a black image * now dispmanx mock works! * activate mocks in travis linux build prepare dispmanx to rgb image out * dispmanx now with image rgb output fix deadlock with w/h -1 in grabber v4l cleanups * fix json * fix some runtime stuff * Update FramebufferWrapper.cpp fix missing code * unify grabframe * 3d and croping for amlogic * fix setimage not working * make use of templates save some codelines * save more code lines
This commit is contained in:
@@ -86,6 +86,7 @@ HyperionDaemon::~HyperionDaemon()
|
||||
|
||||
void HyperionDaemon::freeObjects()
|
||||
{
|
||||
_hyperion->clearall(true);
|
||||
Debug(_log, "destroy grabbers and network stuff");
|
||||
delete _amlGrabber;
|
||||
delete _dispmanx;
|
||||
@@ -117,7 +118,6 @@ void HyperionDaemon::freeObjects()
|
||||
|
||||
void HyperionDaemon::run()
|
||||
{
|
||||
startInitialEffect();
|
||||
createKODIVideoChecker();
|
||||
|
||||
// ---- network services -----
|
||||
@@ -133,6 +133,8 @@ void HyperionDaemon::run()
|
||||
Info(_log, "Hyperion started");
|
||||
|
||||
connect(_hyperion,SIGNAL(closing()),this,SLOT(freeObjects()));
|
||||
|
||||
startInitialEffect();
|
||||
}
|
||||
|
||||
void HyperionDaemon::loadConfig(const QString & configFile)
|
||||
@@ -499,6 +501,7 @@ void HyperionDaemon::createGrabberX11(const QJsonObject & grabberConfig)
|
||||
grabberConfig["horizontalPixelDecimation"].toInt(8),
|
||||
grabberConfig["verticalPixelDecimation"].toInt(8),
|
||||
_grabber_frequency, _grabber_priority );
|
||||
_x11Grabber->setCropping(_grabber_cropLeft, _grabber_cropRight, _grabber_cropTop, _grabber_cropBottom);
|
||||
|
||||
QObject::connect(_x11Grabber, SIGNAL(emitImage(int, const Image<ColorRgb>&, const int)), _protoServer, SLOT(sendImageToProtoSlaves(int, const Image<ColorRgb>&, const int)) );
|
||||
|
||||
@@ -517,7 +520,7 @@ void HyperionDaemon::createGrabberFramebuffer(const QJsonObject & grabberConfig)
|
||||
_fbGrabber = new FramebufferWrapper(
|
||||
grabberConfig["device"].toString("/dev/fb0"),
|
||||
_grabber_width, _grabber_height, _grabber_frequency, _grabber_priority);
|
||||
|
||||
_fbGrabber->setCropping(_grabber_cropLeft, _grabber_cropRight, _grabber_cropTop, _grabber_cropBottom);
|
||||
QObject::connect(_fbGrabber, SIGNAL(emitImage(int, const Image<ColorRgb>&, const int)), _protoServer, SLOT(sendImageToProtoSlaves(int, const Image<ColorRgb>&, const int)) );
|
||||
|
||||
_fbGrabber->start();
|
||||
@@ -570,8 +573,8 @@ void HyperionDaemon::createGrabberV4L2()
|
||||
grabberConfig["input"].toInt(0),
|
||||
parseVideoStandard(grabberConfig["standard"].toString("no-change")),
|
||||
parsePixelFormat(grabberConfig["pixelFormat"].toString("no-change")),
|
||||
grabberConfig["width"].toInt(-1),
|
||||
grabberConfig["height"].toInt(-1),
|
||||
grabberConfig["width"].toInt(0),
|
||||
grabberConfig["height"].toInt(0),
|
||||
grabberConfig["frameDecimation"].toInt(2),
|
||||
grabberConfig["sizeDecimation"].toInt(8),
|
||||
grabberConfig["redSignalThreshold"].toDouble(0.0)/100.0,
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QJsonObject>
|
||||
|
||||
#ifdef ENABLE_DISPMANX
|
||||
#include <grabber/DispmanxWrapper.h>
|
||||
@@ -46,7 +47,7 @@
|
||||
#include <boblightserver/BoblightServer.h>
|
||||
#include <udplistener/UDPListener.h>
|
||||
#include <utils/Stats.h>
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
class SysTray;
|
||||
|
||||
|
Reference in New Issue
Block a user