mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
migrate std::string to qstring + add sysinfo via json (#412)
* std::string -> qstring part 1 * more string migration * more string migration ... * ... * more qstring mogrations add sysinfo via json * remove unneccessary includes * integrate sysinfo into webui
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
// Local includes
|
||||
#include <grabber/FramebufferFrameGrabber.h>
|
||||
|
||||
FramebufferFrameGrabber::FramebufferFrameGrabber(const std::string & device, const unsigned width, const unsigned height) :
|
||||
FramebufferFrameGrabber::FramebufferFrameGrabber(const QString & device, const unsigned width, const unsigned height) :
|
||||
_fbfd(0),
|
||||
_fbp(0),
|
||||
_fbDevice(device),
|
||||
@@ -25,10 +25,10 @@ FramebufferFrameGrabber::FramebufferFrameGrabber(const std::string & device, con
|
||||
struct fb_var_screeninfo vinfo;
|
||||
|
||||
// Check if the framebuffer device can be opened and display the current resolution
|
||||
_fbfd = open(_fbDevice.c_str(), O_RDONLY);
|
||||
_fbfd = open(QSTRING_CSTR(_fbDevice), O_RDONLY);
|
||||
if (_fbfd == 0)
|
||||
{
|
||||
Error(_log, "Error openning %s", _fbDevice.c_str());
|
||||
Error(_log, "Error openning %s", QSTRING_CSTR(_fbDevice));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -63,7 +63,7 @@ void FramebufferFrameGrabber::grabFrame(Image<ColorRgb> & image)
|
||||
PixelFormat pixelFormat;
|
||||
|
||||
/* Open the framebuffer device */
|
||||
_fbfd = open(_fbDevice.c_str(), O_RDONLY);
|
||||
_fbfd = open(QSTRING_CSTR(_fbDevice), O_RDONLY);
|
||||
|
||||
/* get variable screen information */
|
||||
ioctl (_fbfd, FBIOGET_VSCREENINFO, &vinfo);
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#include <grabber/FramebufferWrapper.h>
|
||||
#include <grabber/FramebufferFrameGrabber.h>
|
||||
|
||||
FramebufferWrapper::FramebufferWrapper(const std::string & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, const int priority)
|
||||
FramebufferWrapper::FramebufferWrapper(const QString & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, const int priority)
|
||||
: GrabberWrapper("FrameBuffer", priority)
|
||||
, _updateInterval_ms(1000/updateRate_Hz)
|
||||
, _timeout_ms(2 * _updateInterval_ms)
|
||||
|
Reference in New Issue
Block a user