add image rotation and flipping
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user