mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
9eff6384cc
* move setvideomode to common place * implement more croping and 3d support * more api unification * more refactoring * osx fix * next step * add a mock for osx grabber. Now it is possible to test compile on none osx platforms. * more unifications ... * remove obsolete includes and grabbers are not dyn allocated. dispmanx needs rework an probaly not work atm * first version of dispmanx mock. it compiles, but outputs a black image * now dispmanx mock works! * activate mocks in travis linux build prepare dispmanx to rgb image out * dispmanx now with image rgb output fix deadlock with w/h -1 in grabber v4l cleanups * fix json * fix some runtime stuff * Update FramebufferWrapper.cpp fix missing code * unify grabframe * 3d and croping for amlogic * fix setimage not working * make use of templates save some codelines * save more code lines
61 lines
1.2 KiB
C++
61 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;
|
|
|
|
Image<ColorRgb> _screenshot;
|
|
};
|