summaryrefslogtreecommitdiffstats
path: root/src/multimedia/gsttools_headers/qgstvideobuffer_p.h
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2014-11-20 17:54:18 +0100
committerAndrew den Exter <andrew.den.exter@qinetic.com.au>2014-11-27 23:30:05 +0100
commit108dda7a90bd0f0337358b0db47ae55acd16dea6 (patch)
treee74c44c004b257fb99fdc96063641c76ac0426cf /src/multimedia/gsttools_headers/qgstvideobuffer_p.h
parent7e3d69668e3f04110a651dee1850a1d0c885947b (diff)
GStreamer: port to 1.0.
0.10 is still used by default. To enable GStreamer 1.0, pass GST_VERSION=1.0 to qmake for qtmultimedia.pro. Contributions from: Andrew den Exter <andrew.den.exter@qinetic.com.au> Ilya Smelykh <ilya@videoexpertsgroup.com> Jim Hodapp <jim.hodapp@canonical.com> Sergio Schvezov <sergio.schvezov@canonical.com> Change-Id: I72a46d1170a8794a149bdb5e20767afcc5b7587c Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
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;
};