KDEAmbi/hyperiongrabber.h

47 lines
1.1 KiB
C++

#include <QObject>
#include <QTimer>
#include <QImage>
#include "hyperionclient.h"
#include "WaylandGrabber.h"
#include <QOpenGLContext>
#include <QOpenGLFramebufferObject>
#include <QOpenGLFunctions>
#include <QOpenGLTexture>
#include <QOpenGLShader>
#include <QOpenGLShaderProgram>
#include <QVideoFrame>
#include <QOffscreenSurface>
class HyperionGrabber : public QObject
{
Q_OBJECT
public:
HyperionGrabber(QHash<QString, QString> opts);
~HyperionGrabber();
private:
HyperionClient *_hclient_p;
QTimer *_timer_p;
WaylandGrabber *_waylandGrabber_p;
int _inactiveTime_m = 0;
QString _hyperionPriority_m;
unsigned short _scale_m = 8;
unsigned short _frameskip_m = 0;
long long _frameCounter_m = 0;
QOpenGLContext *_context;
QOpenGLFramebufferObject *_fbo;
QOpenGLShaderProgram *_shaderProgram;
QOpenGLTexture *_texture;
QOpenGLFunctions *_functions;
QOffscreenSurface *_offscreenSurface;
QString _parseColorArr(QString, bool);
private slots:
void _inActivity();
void _processFrame(const QVideoFrame &frame);
void _setImgSize(int width, int height);
};