mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Pass primitive types by value (#935)
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
#define VIDEO_DEVICE "/dev/amvideo"
|
||||
#define CAPTURE_DEVICE "/dev/amvideocap0"
|
||||
|
||||
AmlogicGrabber::AmlogicGrabber(const unsigned width, const unsigned height)
|
||||
AmlogicGrabber::AmlogicGrabber(unsigned width, unsigned height)
|
||||
: Grabber("AMLOGICGRABBER", qMax(160u, width), qMax(160u, height)) // Minimum required width or height is 160
|
||||
, _captureDev(-1)
|
||||
, _videoDev(-1)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include <grabber/AmlogicWrapper.h>
|
||||
|
||||
AmlogicWrapper::AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight)
|
||||
AmlogicWrapper::AmlogicWrapper(unsigned grabWidth, unsigned grabHeight)
|
||||
: GrabberWrapper("AmLogic", &_grabber, grabWidth, grabHeight)
|
||||
, _grabber(grabWidth, grabHeight)
|
||||
{}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Local includes
|
||||
#include "grabber/DispmanxFrameGrabber.h"
|
||||
|
||||
DispmanxFrameGrabber::DispmanxFrameGrabber(const unsigned width, const unsigned height)
|
||||
DispmanxFrameGrabber::DispmanxFrameGrabber(unsigned width, unsigned height)
|
||||
: Grabber("DISPMANXGRABBER", 0, 0)
|
||||
, _vc_display(0)
|
||||
, _vc_resource(0)
|
||||
@@ -84,7 +84,7 @@ bool DispmanxFrameGrabber::setWidthHeight(int width, int height)
|
||||
return false;
|
||||
}
|
||||
|
||||
void DispmanxFrameGrabber::setFlags(const int vc_flags)
|
||||
void DispmanxFrameGrabber::setFlags(int vc_flags)
|
||||
{
|
||||
_vc_flags = vc_flags;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include <grabber/DispmanxWrapper.h>
|
||||
|
||||
DispmanxWrapper::DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz)
|
||||
DispmanxWrapper::DispmanxWrapper(unsigned grabWidth, unsigned grabHeight, unsigned updateRate_Hz)
|
||||
: GrabberWrapper("Dispmanx", &_grabber, grabWidth, grabHeight, updateRate_Hz)
|
||||
, _grabber(grabWidth, grabHeight)
|
||||
{
|
||||
|
@@ -13,7 +13,7 @@
|
||||
// Local includes
|
||||
#include <grabber/FramebufferFrameGrabber.h>
|
||||
|
||||
FramebufferFrameGrabber::FramebufferFrameGrabber(const QString & device, const unsigned width, const unsigned height)
|
||||
FramebufferFrameGrabber::FramebufferFrameGrabber(const QString & device, unsigned width, unsigned height)
|
||||
: Grabber("FRAMEBUFFERGRABBER", width, height)
|
||||
, _fbDevice()
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include <grabber/FramebufferWrapper.h>
|
||||
|
||||
FramebufferWrapper::FramebufferWrapper(const QString & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz)
|
||||
FramebufferWrapper::FramebufferWrapper(const QString & device, unsigned grabWidth, unsigned grabHeight, unsigned updateRate_Hz)
|
||||
: GrabberWrapper("FrameBuffer", &_grabber, grabWidth, grabHeight, updateRate_Hz)
|
||||
, _grabber(device, grabWidth, grabHeight)
|
||||
{}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
// Local includes
|
||||
#include <grabber/OsxFrameGrabber.h>
|
||||
|
||||
OsxFrameGrabber::OsxFrameGrabber(const unsigned display, const unsigned width, const unsigned height)
|
||||
OsxFrameGrabber::OsxFrameGrabber(unsigned display, unsigned width, unsigned height)
|
||||
: Grabber("OSXGRABBER", width, height)
|
||||
, _screenIndex(100)
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include <grabber/OsxWrapper.h>
|
||||
|
||||
OsxWrapper::OsxWrapper(const unsigned display, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz)
|
||||
OsxWrapper::OsxWrapper(unsigned display, unsigned grabWidth, unsigned grabHeight, unsigned updateRate_Hz)
|
||||
: GrabberWrapper("OSX FrameGrabber", &_grabber, grabWidth, grabHeight, updateRate_Hz)
|
||||
, _grabber(display, grabWidth, grabHeight)
|
||||
{}
|
||||
|
@@ -116,7 +116,7 @@ int QtGrabber::grabFrame(Image<ColorRgb> & image)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int QtGrabber::updateScreenDimensions(const bool& force)
|
||||
int QtGrabber::updateScreenDimensions(bool force)
|
||||
{
|
||||
if(!_screen)
|
||||
return -1;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include <grabber/QtWrapper.h>
|
||||
|
||||
QtWrapper::QtWrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, int display, const unsigned updateRate_Hz)
|
||||
QtWrapper::QtWrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, int display, unsigned updateRate_Hz)
|
||||
: GrabberWrapper("Qt", &_grabber, 0, 0, updateRate_Hz)
|
||||
, _grabber(cropLeft, cropRight, cropTop, cropBottom, pixelDecimation, display)
|
||||
{}
|
||||
|
@@ -110,7 +110,7 @@ void V4L2Wrapper::handleCecEvent(CECEvent event)
|
||||
_grabber.handleCecEvent(event);
|
||||
}
|
||||
|
||||
void V4L2Wrapper::handleSettingsUpdate(const settings::type& type, const QJsonDocument& config)
|
||||
void V4L2Wrapper::handleSettingsUpdate(settings::type type, const QJsonDocument& config)
|
||||
{
|
||||
if(type == settings::V4L2 && _grabberName.startsWith("V4L"))
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include <grabber/X11Wrapper.h>
|
||||
|
||||
X11Wrapper::X11Wrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, const unsigned updateRate_Hz)
|
||||
X11Wrapper::X11Wrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, unsigned updateRate_Hz)
|
||||
: GrabberWrapper("X11", &_grabber, 0, 0, updateRate_Hz)
|
||||
, _grabber(cropLeft, cropRight, cropTop, cropBottom, pixelDecimation)
|
||||
, _init(false)
|
||||
|
Reference in New Issue
Block a user