Fix X11 and QPA compilation problems

The X11 buffer pool was using outdated APIs, and as the 'qpa'
configuration value is being removed, it caused the X11 code
to be pulled in, and therefore cause compilation failures.

Change-Id: I5fdaed854c6525716fccca44b5fbd0b850880cb9
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
Jonas Rabbe
2011-12-09 11:45:11 +10:00
committed by Qt by Nokia
parent 9d526fca67
commit 4f3294930a
18 changed files with 150 additions and 78 deletions

View File

@@ -59,8 +59,6 @@
#include <QtCore/qwaitcondition.h>
#include <QtCore/qqueue.h>
#ifndef QT_NO_XVIDEO
#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
@@ -69,10 +67,11 @@
#include <X11/extensions/Xv.h>
#include <X11/extensions/Xvlib.h>
#include <gst/gst.h>
#include "qgstbufferpoolinterface_p.h"
QT_BEGIN_NAMESPACE
class QGstXvImageBufferPool;
struct QGstXvImageBuffer {
@@ -92,8 +91,9 @@ struct QGstXvImageBuffer {
Q_DECLARE_METATYPE(XvImage*)
class QGstXvImageBufferPool : public QObject, public QGstBufferPoolInterface {
Q_OBJECT
friend class QGstXvImageBuffer;
Q_OBJECT
Q_INTERFACES(QGstBufferPoolInterface)
friend class QGstXvImageBuffer;
public:
QGstXvImageBufferPool(QObject *parent = 0);
virtual ~QGstXvImageBufferPool();
@@ -107,6 +107,8 @@ public:
QAbstractVideoBuffer::HandleType handleType() const;
QAbstractVideoBuffer *prepareVideoBuffer(GstBuffer *buffer, int bytesPerLine);
virtual QStringList keys() const;
private slots:
void queuedAlloc();
void queuedDestroy();
@@ -119,6 +121,8 @@ private slots:
private:
void doAlloc();
Display *display() const;
struct XvShmImage {
XvImage *xvImage;
XShmSegmentInfo shmInfo;
@@ -136,6 +140,6 @@ private:
Qt::HANDLE m_threadId;
};
#endif //QT_NO_XVIDEO
QT_END_NAMESPACE
#endif

View File

@@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE
class QAbstractVideoSurface;
QT_END_NAMESPACE
#if defined(Q_WS_X11) && !defined(QT_NO_XVIDEO)
#ifdef HAVE_XVIDEO
class QGstXvImageBuffer;
class QGstXvImageBufferPool;
#endif