QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstAppSinkAdapter.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QObject>
4
5#include <gst/gst.h>
6
7class QVideoSink;
8
14class GstAppSinkAdapter : public QObject
15{
16 Q_OBJECT
17
18public:
19 explicit GstAppSinkAdapter(QObject *parent = nullptr);
20 ~GstAppSinkAdapter() override;
21
24 bool setup(GstElement *sinkBin, QVideoSink *videoSink);
25
27 void teardown();
28
29private:
30 static GstFlowReturn onNewSample(GstElement *appsink, gpointer userData);
31
32 QVideoSink *_videoSink = nullptr;
33 GstElement *_appsink = nullptr;
34 gulong _signalId = 0;
35};
struct _GstElement GstElement
~GstAppSinkAdapter() override
void teardown()
Disconnect the callback (safe to call multiple times).
bool setup(GstElement *sinkBin, QVideoSink *videoSink)