Details coming soon.

This commit is contained in:
Paulchen-Panther
2018-12-27 23:11:32 +01:00
parent e3be03ea73
commit d762aa2f3e
186 changed files with 6156 additions and 5444 deletions

View File

@@ -29,7 +29,7 @@ target_link_libraries(${PROJECT_NAME}
blackborder
commandline
hyperion-utils
protoserver
protoclient
x11-grabber
${X11_LIBRARIES}
${X11_Xrender_LIB}

View File

@@ -2,9 +2,9 @@
// Hyperion-X11 includes
#include "X11Wrapper.h"
X11Wrapper::X11Wrapper(int grabInterval, bool useXGetImage, int cropLeft, int cropRight, int cropTop, int cropBottom, int horizontalPixelDecimation, int verticalPixelDecimation) :
X11Wrapper::X11Wrapper(int grabInterval, int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation) :
_timer(this),
_grabber(useXGetImage, cropLeft, cropRight, cropTop, cropBottom, horizontalPixelDecimation, verticalPixelDecimation)
_grabber(cropLeft, cropRight, cropTop, cropBottom, pixelDecimation)
{
_timer.setSingleShot(false);
_timer.setInterval(grabInterval);
@@ -36,7 +36,7 @@ bool X11Wrapper::displayInit()
void X11Wrapper::capture()
{
_grabber.grabFrame(_screenshot, false);
_grabber.grabFrame(_screenshot, true);
emit sig_screenshot(_screenshot);
}

View File

@@ -12,7 +12,7 @@ class X11Wrapper : public QObject
{
Q_OBJECT
public:
X11Wrapper(int grabInterval, bool useXGetImage, int cropLeft, int cropRight, int cropTop, int cropBottom, int horizontalPixelDecimation, int verticalPixelDecimation);
X11Wrapper(int grabInterval, int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation);
const Image<ColorRgb> & getScreenshot();

View File

@@ -33,7 +33,6 @@ int main(int argc, char ** argv)
Parser parser("X11 capture application for Hyperion");
IntOption & argFps = parser.add<IntOption> ('f', "framerate", "Capture frame rate [default: %1]", "10");
BooleanOption & argXGetImage = parser.add<BooleanOption>('x', "xgetimage", "Use XGetImage instead of XRender");
IntOption & argCropWidth = parser.add<IntOption> (0x0, "crop-width", "Number of pixels to crop from the left and right sides of the picture before decimation [default: %1]", "0");
IntOption & argCropHeight = parser.add<IntOption> (0x0, "crop-height", "Number of pixels to crop from the top and the bottom of the picture before decimation [default: %1]", "0");
IntOption & argCropLeft = parser.add<IntOption> (0x0, "crop-left", "Number of pixels to crop from the left of the picture before decimation (overrides --crop-width)");
@@ -59,13 +58,11 @@ int main(int argc, char ** argv)
// Create the X11 grabbing stuff
X11Wrapper x11Wrapper(
1000 / argFps.getInt(parser),
parser.isSet(argXGetImage),
parser.isSet(argCropLeft) ? argCropLeft.getInt(parser) : argCropWidth.getInt(parser),
parser.isSet(argCropRight) ? argCropRight.getInt(parser) : argCropWidth.getInt(parser),
parser.isSet(argCropTop) ? argCropTop.getInt(parser) : argCropHeight.getInt(parser),
parser.isSet(argCropBottom) ? argCropBottom.getInt(parser) : argCropHeight.getInt(parser),
argSizeDecimation.getInt(parser), // horizontal decimation
argSizeDecimation.getInt(parser)); // vertical decimation
argSizeDecimation.getInt(parser)); // pixel decimation
if (!x11Wrapper.displayInit())
return -1;