Fix compilation without QtWidgets and QtOpenGL on Mac
Change-Id: I3cff7e41d27955e37bc8207e4820fdc21ce75f7b Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
@@ -41,7 +41,6 @@
|
||||
|
||||
#include <QtCore/qvariant.h>
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtWidgets/qwidget.h>
|
||||
|
||||
#include "qt7backend.h"
|
||||
#include "qt7playerservice.h"
|
||||
@@ -51,7 +50,9 @@
|
||||
#include "qt7movieviewoutput.h"
|
||||
#include "qt7movieviewrenderer.h"
|
||||
#include "qt7movierenderer.h"
|
||||
#ifndef QT_NO_WIDGETS
|
||||
#include "qt7movievideowidget.h"
|
||||
#endif
|
||||
#include "qt7playermetadata.h"
|
||||
|
||||
#include <private/qmediaplaylistnavigator_p.h>
|
||||
@@ -95,16 +96,20 @@ QMediaControl *QT7PlayerService::requestControl(const char *name)
|
||||
if (qstrcmp(name, QVideoRendererControl_iid) == 0) {
|
||||
#ifdef QUICKTIME_C_API_AVAILABLE
|
||||
m_videoOutput = new QT7MovieRenderer(this);
|
||||
#else
|
||||
#elif !defined(QT_NO_WIDGETS)
|
||||
m_videoOutput = new QT7MovieViewRenderer(this);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef QT_NO_WIDGETS
|
||||
if (qstrcmp(name, QVideoWidgetControl_iid) == 0) {
|
||||
#ifdef QUICKTIME_C_API_AVAILABLE
|
||||
m_videoOutput = new QT7MovieVideoWidget(this);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_videoOutput) {
|
||||
QT7VideoOutput *videoOutput = qobject_cast<QT7VideoOutput*>(m_videoOutput);
|
||||
|
||||
@@ -46,14 +46,12 @@ OBJECTIVE_SOURCES += \
|
||||
!simulator {
|
||||
HEADERS += \
|
||||
qt7movieviewoutput.h \
|
||||
qt7movieviewrenderer.h \
|
||||
qt7movierenderer.h \
|
||||
qt7ciimagevideobuffer.h \
|
||||
qcvdisplaylink.h
|
||||
|
||||
OBJECTIVE_SOURCES += \
|
||||
qt7movieviewoutput.mm \
|
||||
qt7movieviewrenderer.mm \
|
||||
qt7movierenderer.mm \
|
||||
qt7videooutput.mm \
|
||||
qt7ciimagevideobuffer.mm \
|
||||
@@ -61,9 +59,11 @@ OBJECTIVE_SOURCES += \
|
||||
|
||||
!isEmpty(QT.widgets.name) {
|
||||
HEADERS += \
|
||||
qt7movieviewrenderer.h \
|
||||
qt7movievideowidget.h
|
||||
|
||||
OBJECTIVE_SOURCES += \
|
||||
qt7movieviewrenderer.mm \
|
||||
qt7movievideowidget.mm
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,8 +51,6 @@
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtCore/qcoreapplication.h>
|
||||
|
||||
#include <QGLWidget>
|
||||
|
||||
#include <qabstractvideobuffer.h>
|
||||
#include <qabstractvideosurface.h>
|
||||
#include <qvideosurfaceformat.h>
|
||||
|
||||
@@ -46,7 +46,9 @@
|
||||
#include <QtCore/qsize.h>
|
||||
|
||||
#include <qvideowindowcontrol.h>
|
||||
#ifndef QT_NO_WIDGETS
|
||||
#include <qvideowidgetcontrol.h>
|
||||
#endif
|
||||
#include <qvideorenderercontrol.h>
|
||||
#include <qmediaplayer.h>
|
||||
|
||||
@@ -95,6 +97,7 @@ protected:
|
||||
{}
|
||||
};
|
||||
|
||||
#ifndef QT_NO_WIDGETS
|
||||
class QT7VideoWidgetControl : public QVideoWidgetControl, public QT7VideoOutput
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -107,6 +110,7 @@ protected:
|
||||
:QVideoWidgetControl(parent)
|
||||
{}
|
||||
};
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user