add image rotation and flipping

This commit is contained in:
Maik Jurischka
2025-12-19 09:31:37 +01:00
parent bef80372b6
commit 705519ec39
4 changed files with 110 additions and 6 deletions

View File

@@ -9,6 +9,7 @@
#include <QImage>
#include <QSlider>
#include <QScrollArea>
#include <QCheckBox>
#include <gst/gst.h>
#include <gst/app/gstappsink.h>
@@ -28,6 +29,9 @@ private slots:
void onStopViewer();
void onSourceTypeChanged(int index);
void onZoomChanged(int value);
void onRotationChanged(int index);
void onFlipHorizontalChanged(Qt::CheckState state);
void onFlipVerticalChanged(Qt::CheckState state);
void displayFrame(const QImage& frame);
private:
@@ -52,6 +56,9 @@ private:
QLabel* m_statusLabel;
QSlider* m_zoomSlider;
QLabel* m_zoomLabel;
QComboBox* m_rotationCombo;
QCheckBox* m_flipHorizontal;
QCheckBox* m_flipVertical;
// GStreamer elements (8-byte pointers)
GstElement* m_pipeline;
@@ -63,6 +70,11 @@ private:
// Bus watch ID (4-byte unsigned int)
guint m_busWatchId;
// Transformation settings (4 bytes + 2 bytes)
int m_rotationAngle;
bool m_flipHorizontalEnabled;
bool m_flipVerticalEnabled;
// Video state (large object at end)
QImage m_currentFrame;
};