mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
* Update X11Grabber.h * Update ProtoConnection.h * Update ProtoConnectionWrapper.h * Update ProtoServer.h * Update X11Grabber.cpp * Update message.proto * Update ProtoClientConnection.cpp * Update ProtoClientConnection.h * Update ProtoConnection.cpp * Update ProtoConnectionWrapper.cpp * Update ProtoServer.cpp * Update hyperion-x11.cpp * Update X11Wrapper.cpp * Update X11Wrapper.h * Update hyperiond.cpp * Update ProtoClientConnection.cpp * Update X11Wrapper.cpp * Update hyperiond.cpp Former-commit-id: a572f275b270217cd8ce8cdd91b3eca3037d6472
59 lines
1.2 KiB
C++
59 lines
1.2 KiB
C++
|
|
// QT includes
|
|
#include <QTimer>
|
|
|
|
// Hyperion-X11 includes
|
|
#include <grabber/X11Grabber.h>
|
|
|
|
//Utils includes
|
|
#include <utils/GrabbingMode.h>
|
|
#include <utils/VideoMode.h>
|
|
|
|
class X11Wrapper : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
X11Wrapper(int grabInterval, bool useXGetImage, int cropLeft, int cropRight, int cropTop, int cropBottom, int horizontalPixelDecimation, int verticalPixelDecimation);
|
|
|
|
const Image<ColorRgb> & getScreenshot();
|
|
|
|
///
|
|
/// Starts the timed capturing of screenshots
|
|
///
|
|
void start();
|
|
|
|
void stop();
|
|
|
|
bool displayInit();
|
|
|
|
signals:
|
|
void sig_screenshot(const Image<ColorRgb> & screenshot);
|
|
|
|
public slots:
|
|
///
|
|
/// Set the grabbing mode
|
|
/// @param[in] mode The new grabbing mode
|
|
///
|
|
void setGrabbingMode(const GrabbingMode mode);
|
|
|
|
///
|
|
/// Set the video mode (2D/3D)
|
|
/// @param[in] mode The new video mode
|
|
///
|
|
void setVideoMode(const VideoMode videoMode);
|
|
|
|
private slots:
|
|
///
|
|
/// Performs a single screenshot capture and publishes the capture screenshot on the screenshot
|
|
/// signal.
|
|
///
|
|
void capture();
|
|
|
|
private:
|
|
/// The QT timer to generate capture-publish events
|
|
QTimer _timer;
|
|
|
|
/// The grabber for creating screenshots
|
|
X11Grabber _grabber;
|
|
};
|