From 2cda2a11e0d228f7d431dab5024a95cff680e6d1 Mon Sep 17 00:00:00 2001 From: Paulchen-Panther Date: Mon, 7 Jan 2019 18:13:49 +0100 Subject: [PATCH] Fix V4L2 --- include/hyperion/Grabber.h | 1 + libsrc/grabber/v4l2/V4L2Grabber.cpp | 4 ---- src/hyperiond/hyperiond.cpp | 6 ------ src/hyperiond/main.cpp | 3 ++- src/hyperiond/systray.cpp | 2 +- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/include/hyperion/Grabber.h b/include/hyperion/Grabber.h index 5e3b2359..b35af885 100644 --- a/include/hyperion/Grabber.h +++ b/include/hyperion/Grabber.h @@ -35,6 +35,7 @@ public: /// /// @brief Apply new width/height values, on errors (collide with cropping) reject the values + /// @return True on success else false /// virtual bool setWidthHeight(int width, int height); diff --git a/libsrc/grabber/v4l2/V4L2Grabber.cpp b/libsrc/grabber/v4l2/V4L2Grabber.cpp index b9b1c31e..d788e779 100644 --- a/libsrc/grabber/v4l2/V4L2Grabber.cpp +++ b/libsrc/grabber/v4l2/V4L2Grabber.cpp @@ -952,10 +952,6 @@ void V4L2Grabber::setPixelDecimation(int pixelDecimation) if(_pixelDecimation != pixelDecimation) { _pixelDecimation = pixelDecimation; - uninit(); - // start if init is a success - if(init()) - start(); _imageResampler.setHorizontalPixelDecimation(pixelDecimation); _imageResampler.setVerticalPixelDecimation(pixelDecimation); } diff --git a/src/hyperiond/hyperiond.cpp b/src/hyperiond/hyperiond.cpp index e0c06596..e01c9a40 100644 --- a/src/hyperiond/hyperiond.cpp +++ b/src/hyperiond/hyperiond.cpp @@ -419,8 +419,6 @@ void HyperionDaemon::createGrabberDispmanx() connect(this, &HyperionDaemon::videoMode, _dispmanx, &DispmanxWrapper::setVideoMode); connect(this, &HyperionDaemon::settingsChanged, _dispmanx, &DispmanxWrapper::handleSettingsUpdate); - _dispmanx->start(); - Info(_log, "DISPMANX frame grabber created"); #else Error( _log, "The dispmanx framegrabber can not be instantiated, because it has been left out from the build"); @@ -438,7 +436,6 @@ void HyperionDaemon::createGrabberAmlogic() connect(this, &HyperionDaemon::videoMode, _amlGrabber, &AmlogicWrapper::setVideoMode); connect(this, &HyperionDaemon::settingsChanged, _amlGrabber, &AmlogicWrapper::handleSettingsUpdate); - _amlGrabber->start(); Info(_log, "AMLOGIC grabber created"); #else Error( _log, "The AMLOGIC grabber can not be instantiated, because it has been left out from the build"); @@ -458,7 +455,6 @@ void HyperionDaemon::createGrabberX11(const QJsonObject & grabberConfig) connect(this, &HyperionDaemon::videoMode, _x11Grabber, &X11Wrapper::setVideoMode); connect(this, &HyperionDaemon::settingsChanged, _x11Grabber, &X11Wrapper::handleSettingsUpdate); - _x11Grabber->start(); Info(_log, "X11 grabber created"); #else Error(_log, "The X11 grabber can not be instantiated, because it has been left out from the build"); @@ -496,7 +492,6 @@ void HyperionDaemon::createGrabberFramebuffer(const QJsonObject & grabberConfig) connect(this, &HyperionDaemon::videoMode, _fbGrabber, &FramebufferWrapper::setVideoMode); connect(this, &HyperionDaemon::settingsChanged, _fbGrabber, &FramebufferWrapper::handleSettingsUpdate); - _fbGrabber->start(); Info(_log, "Framebuffer grabber created"); #else Error(_log, "The framebuffer grabber can not be instantiated, because it has been left out from the build"); @@ -516,7 +511,6 @@ void HyperionDaemon::createGrabberOsx(const QJsonObject & grabberConfig) connect(this, &HyperionDaemon::videoMode, _osxGrabber, &OsxWrapper::setVideoMode); connect(this, &HyperionDaemon::settingsChanged, _osxGrabber, &OsxWrapper::handleSettingsUpdate); - _osxGrabber->start(); Info(_log, "OSX grabber created"); #else Error(_log, "The osx grabber can not be instantiated, because it has been left out from the build"); diff --git a/src/hyperiond/main.cpp b/src/hyperiond/main.cpp index 93008300..726dcc97 100644 --- a/src/hyperiond/main.cpp +++ b/src/hyperiond/main.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #ifndef __APPLE__ /* prctl is Linux only */ @@ -177,7 +178,7 @@ int main(int argc, char** argv) if (logLevelCheck > 1) { - Error(log, "aborting, because options --silent --verbose --debug can't used together"); + Error(log, "aborting, because options --silent --verbose --debug can't be used together"); return 0; } diff --git a/src/hyperiond/systray.cpp b/src/hyperiond/systray.cpp index ff82d4c1..329e5026 100644 --- a/src/hyperiond/systray.cpp +++ b/src/hyperiond/systray.cpp @@ -25,7 +25,7 @@ SysTray::SysTray(HyperionDaemon *hyperiond) Q_INIT_RESOURCE(resources); // webserver port - WebServer* webserver = _hyperiond->getWebServerInstance(); + WebServer* webserver = hyperiond->getWebServerInstance(); connect(webserver, &WebServer::portChanged, this, &SysTray::webserverPortChanged); _hyperion = Hyperion::getInstance();