add zoom control
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include <QLineEdit>
|
||||
#include <QLabel>
|
||||
#include <QImage>
|
||||
#include <QSlider>
|
||||
#include <QScrollArea>
|
||||
#include <gst/gst.h>
|
||||
#include <gst/app/gstappsink.h>
|
||||
|
||||
@@ -25,6 +27,7 @@ private slots:
|
||||
void onStartViewer();
|
||||
void onStopViewer();
|
||||
void onSourceTypeChanged(int index);
|
||||
void onZoomChanged(int value);
|
||||
void displayFrame(const QImage& frame);
|
||||
|
||||
private:
|
||||
@@ -39,6 +42,7 @@ private:
|
||||
static GstFlowReturn newSampleCallback(GstAppSink* appsink, gpointer user_data);
|
||||
|
||||
// UI elements
|
||||
QScrollArea* m_scrollArea;
|
||||
QLabel* m_videoDisplay;
|
||||
QPushButton* m_startBtn;
|
||||
QPushButton* m_stopBtn;
|
||||
@@ -46,11 +50,17 @@ private:
|
||||
QLineEdit* m_hostEdit;
|
||||
QLineEdit* m_portEdit;
|
||||
QLabel* m_statusLabel;
|
||||
QSlider* m_zoomSlider;
|
||||
QLabel* m_zoomLabel;
|
||||
|
||||
// GStreamer elements
|
||||
GstElement* m_pipeline;
|
||||
GstElement* m_appSink;
|
||||
guint m_busWatchId;
|
||||
|
||||
// Video state
|
||||
QImage m_currentFrame;
|
||||
double m_zoomFactor;
|
||||
};
|
||||
|
||||
#endif // VIDEOVIEWERWIDGET_H
|
||||
|
||||
Reference in New Issue
Block a user