mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Merge pull request #538 from Portisch/Amlogic_Grabber
Amlogic Grabber fix/upgrade
This commit is contained in:
@@ -250,6 +250,9 @@ void HyperionDaemon::handleSettingsUpdate(const settings::type& type, const QJso
|
||||
_grabber_cropTop = grabberConfig["cropTop"].toInt(0);
|
||||
_grabber_cropBottom = grabberConfig["cropBottom"].toInt(0);
|
||||
|
||||
_grabber_ge2d_mode = grabberConfig["ge2d_mode"].toInt(0);
|
||||
_grabber_device = grabberConfig["amlogic_grabber"].toString("amvideocap0");
|
||||
|
||||
#ifdef ENABLE_OSX
|
||||
QString type = "osx";
|
||||
#else
|
||||
@@ -265,9 +268,12 @@ void HyperionDaemon::handleSettingsUpdate(const settings::type& type, const QJso
|
||||
type = "dispmanx";
|
||||
}
|
||||
// amlogic -> /dev/amvideo exists
|
||||
else if ( QFile::exists("/dev/amvideo") && ( QFile::exists("/dev/amvideocap0") || QFile::exists("/dev/ge2d") ) )
|
||||
else if ( QFile::exists("/dev/amvideo") )
|
||||
{
|
||||
type = "amlogic";
|
||||
|
||||
if ( !QFile::exists("/dev/" + _grabber_device) )
|
||||
{ Error( _log, "grabber device '%s' for type amlogic not found!", QSTRING_CSTR(_grabber_device)); }
|
||||
}
|
||||
// x11 -> if DISPLAY is set
|
||||
else if (getenv("DISPLAY") != NULL )
|
||||
@@ -440,7 +446,7 @@ void HyperionDaemon::createGrabberDispmanx()
|
||||
void HyperionDaemon::createGrabberAmlogic()
|
||||
{
|
||||
#ifdef ENABLE_AMLOGIC
|
||||
_amlGrabber = new AmlogicWrapper(_grabber_width, _grabber_height, _grabber_frequency);
|
||||
_amlGrabber = new AmlogicWrapper(_grabber_width, _grabber_height, _grabber_frequency, _grabber_ge2d_mode, _grabber_device);
|
||||
_amlGrabber->setCropping(_grabber_cropLeft, _grabber_cropRight, _grabber_cropTop, _grabber_cropBottom);
|
||||
|
||||
// connect to HyperionDaemon signal
|
||||
|
@@ -155,6 +155,8 @@ private:
|
||||
unsigned _grabber_cropRight;
|
||||
unsigned _grabber_cropTop;
|
||||
unsigned _grabber_cropBottom;
|
||||
int _grabber_ge2d_mode;
|
||||
QString _grabber_device;
|
||||
|
||||
QString _prevType;
|
||||
|
||||
|
Reference in New Issue
Block a user