summaryrefslogtreecommitdiffstats
path: root/src/gsttools/qgstvideorenderersink_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gsttools/qgstvideorenderersink_p.h')
-rw-r--r--src/gsttools/qgstvideorenderersink_p.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gsttools/qgstvideorenderersink_p.h b/src/gsttools/qgstvideorenderersink_p.h
index b1e333566..84162814c 100644
--- a/src/gsttools/qgstvideorenderersink_p.h
+++ b/src/gsttools/qgstvideorenderersink_p.h
@@ -51,6 +51,7 @@
// We mean it.
//
+#include <QtMultimedia/private/qtmultimediaglobal_p.h>
#include <gst/video/gstvideosink.h>
#include <gst/video/video.h>
@@ -67,6 +68,13 @@
#include "qgstvideorendererplugin_p.h"
+#if QT_CONFIG(gstreamer_gl)
+#ifndef GST_USE_UNSTABLE_API
+#define GST_USE_UNSTABLE_API
+#endif
+#include <gst/gl/gl.h>
+#endif
+
QT_BEGIN_NAMESPACE
class QAbstractVideoSurface;
@@ -89,6 +97,7 @@ private:
QVideoSurfaceFormat m_format;
GstVideoInfo m_videoInfo;
bool m_flushed = true;
+ QAbstractVideoBuffer::HandleType m_handleType = QAbstractVideoBuffer::NoHandle;
};
class QVideoSurfaceGstDelegate : public QObject
@@ -110,6 +119,7 @@ public:
GstFlowReturn render(GstBuffer *buffer);
bool event(QEvent *event) override;
+ bool query(GstQuery *query);
private slots:
bool handleEvent(QMutexLocker *locker);
@@ -132,6 +142,9 @@ private:
GstCaps *m_surfaceCaps = nullptr;
GstCaps *m_startCaps = nullptr;
GstBuffer *m_renderBuffer = nullptr;
+#if QT_CONFIG(gstreamer_gl)
+ GstGLContext *m_gstGLDisplayContext = nullptr;
+#endif
bool m_notified = false;
bool m_stop = false;
@@ -168,6 +181,7 @@ private:
static gboolean unlock(GstBaseSink *sink);
static GstFlowReturn show_frame(GstVideoSink *sink, GstBuffer *buffer);
+ static gboolean query(GstBaseSink *element, GstQuery *query);
private:
QVideoSurfaceGstDelegate *delegate = nullptr;