KDEAmbi/WaylandGrabber.h
Tobias J. Endres 3dda269c4b Fix: Correct image orientation in Wayland grabber
Resolved the issue where captured images were appearing upside down or flipped.
Implemented a final vertical flip on the QImage after reading from the OpenGL
Framebuffer Object (FBO) to ensure correct orientation before sending to Hyperion.
This completes the basic hardware-accelerated scaling pipeline.
2025-08-14 22:19:15 +02:00

31 lines
592 B
C++

#ifndef WAYLANDGRABBER_H
#define WAYLANDGRABBER_H
#include <QObject>
#include <QScreen>
#include <QMediaCaptureSession>
#include <QScreenCapture>
#include <QVideoSink>
#include <QImage>
class WaylandGrabber : public QObject
{
Q_OBJECT
public:
explicit WaylandGrabber(QObject *parent = nullptr);
void start();
signals:
void frameReady(const QVideoFrame &frame);
private slots:
void handleFrame(const QVideoFrame &frame);
private:
QMediaCaptureSession m_captureSession;
QScreenCapture m_screenCapture;
QVideoSink m_videoSink;
};
#endif // WAYLANDGRABBER_H