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>
This commit is contained in:
Yoann Lopes
2014-11-20 17:54:18 +01:00
committed by Andrew den Exter
parent 7e3d69668e
commit 108dda7a90
71 changed files with 3669 additions and 1382 deletions

View File

@@ -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;
};