summaryrefslogtreecommitdiffstats
path: root/src/multimedia/gsttools_headers/qgstvideobuffer_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/gsttools_headers/qgstvideobuffer_p.h')
-rw-r--r--src/multimedia/gsttools_headers/qgstvideobuffer_p.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/multimedia/gsttools_headers/qgstvideobuffer_p.h b/src/multimedia/gsttools_headers/qgstvideobuffer_p.h
index 1e0fda84d..00aca484a 100644
--- a/src/multimedia/gsttools_headers/qgstvideobuffer_p.h
+++ b/src/multimedia/gsttools_headers/qgstvideobuffer_p.h
@@ -49,26 +49,47 @@
#include <QtCore/qvariant.h>
#include <gst/gst.h>
+#include <gst/video/video.h>
QT_BEGIN_NAMESPACE
+#if GST_CHECK_VERSION(1,0,0)
+class QGstVideoBuffer : public QAbstractPlanarVideoBuffer
+{
+public:
+ QGstVideoBuffer(GstBuffer *buffer, const GstVideoInfo &info);
+ QGstVideoBuffer(GstBuffer *buffer, const GstVideoInfo &info,
+ HandleType handleType, const QVariant &handle);
+#else
class QGstVideoBuffer : public QAbstractVideoBuffer
{
public:
QGstVideoBuffer(GstBuffer *buffer, int bytesPerLine);
QGstVideoBuffer(GstBuffer *buffer, int bytesPerLine,
HandleType handleType, const QVariant &handle);
+#endif
+
~QGstVideoBuffer();
MapMode mapMode() const;
+#if GST_CHECK_VERSION(1,0,0)
+ int map(MapMode mode, int *numBytes, int bytesPerLine[4], uchar *data[4]);
+#else
uchar *map(MapMode mode, int *numBytes, int *bytesPerLine);
+#endif
+
void unmap();
QVariant handle() const { return m_handle; }
private:
- GstBuffer *m_buffer;
+#if GST_CHECK_VERSION(1,0,0)
+ GstVideoInfo m_videoInfo;
+ GstVideoFrame m_frame;
+#else
int m_bytesPerLine;
+#endif
+ GstBuffer *m_buffer;
MapMode m_mode;
QVariant m_handle;
};