mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Dynamic loading of the Dispmanx Grabber (#1440)
* BCM dynamic loading * cleanup * better handle start of dispmanx * set GrabberWrapper pointer to null on exit * Update DispmanxFrameGrabber.cpp
This commit is contained in:
@@ -264,7 +264,8 @@ void HyperionDaemon::freeObjects()
|
||||
#endif
|
||||
|
||||
delete _amlGrabber;
|
||||
delete _dispmanx;
|
||||
if (_dispmanx != nullptr)
|
||||
delete _dispmanx;
|
||||
delete _fbGrabber;
|
||||
delete _osxGrabber;
|
||||
delete _qtGrabber;
|
||||
@@ -522,9 +523,13 @@ void HyperionDaemon::handleSettingsUpdate(settings::type settingsType, const QJs
|
||||
{
|
||||
createGrabberDispmanx(grabberConfig);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_DISPMANX
|
||||
if (_dispmanx != nullptr)
|
||||
{
|
||||
_dispmanx->handleSettingsUpdate(settings::SYSTEMCAPTURE, getSetting(settings::SYSTEMCAPTURE));
|
||||
_dispmanx->tryStart();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (type == "amlogic")
|
||||
@@ -644,7 +649,16 @@ void HyperionDaemon::createGrabberDispmanx(const QJsonObject& /*grabberConfig*/)
|
||||
_dispmanx = new DispmanxWrapper(
|
||||
_grabber_frequency,
|
||||
_grabber_pixelDecimation
|
||||
);
|
||||
);
|
||||
|
||||
if (!_dispmanx->available)
|
||||
{
|
||||
delete _dispmanx;
|
||||
_dispmanx = nullptr;
|
||||
Debug(_log, "The dispmanx framegrabber is not supported on this platform");
|
||||
return;
|
||||
}
|
||||
|
||||
_dispmanx->setCropping(_grabber_cropLeft, _grabber_cropRight, _grabber_cropTop, _grabber_cropBottom);
|
||||
|
||||
// connect to HyperionDaemon signal
|
||||
|
Reference in New Issue
Block a user