Properly handle the case where QtWidgets is not available.

It does use a config test for now, just to make it clearer.  The Mac
backend currently requires widgets, but most of the others should work
without it (just not supporting QVideoWidget/WindowControl).

The QVideoDeviceControl interface was modified to remove the QIcon
usage - it was never implemented.

Unfortunately even the QML examples need widgets for the wrapper
application, and will need to be ported to QtGui based wrapper.

Change-Id: I8a55ad5cf09ab51749510bf16f49de0bd3f0bcdb
Reviewed-by: Ling Hu <ling.hu@nokia.com>
This commit is contained in:
Michael Goddard
2012-01-05 17:22:19 +10:00
committed by Qt by Nokia
parent bc7d964a05
commit c97f5f8c2e
45 changed files with 243 additions and 160 deletions

View File

@@ -0,0 +1,48 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QMainWindow>
int main(int, char**)
{
QMainWindow m;
return 0;
}

View File

@@ -0,0 +1,5 @@
TEMPLATE = app
QT += gui widgets
# Input
SOURCES += main.cpp

View File

@@ -1,22 +1,27 @@
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS += \ # These examples all need widgets for now (using creator templates that use widgets)
radio \ contains(config_test_widgets, yes) {
camera \ SUBDIRS += \
slideshow \ radio \
spectrum \ camera \
audiorecorder \ slideshow \
audiodevices \ spectrum \
audioinput \ audiorecorder \
audiooutput \ audiodevices \
videographicsitem \ audioinput \
videowidget \ audiooutput \
video \ videographicsitem \
player \ videowidget \
player
contains(QT_CONFIG, declarative) { contains(QT_CONFIG, declarative) {
disabled:SUBDIRS += declarative-camera disabled:SUBDIRS += declarative-camera
SUBDIRS += declarative-radio SUBDIRS += \
declarative-radio \
video
}
QT += widgets
} }
QT+=widgets

View File

@@ -1,15 +1,3 @@
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS += qmlvideo SUBDIRS += qmlvideo qmlvideofx
# qmlvideofx requires QtOpenGL and ShaderEffectItem (added in Qt 4.7.4)
contains(QT_CONFIG, opengl) {
lessThan(QT_MAJOR_VERSION, 5) {
!lessThan(QT_MAJOR_VERSION, 4) {
SUBDIRS += qmlvideofx
}
} else {
SUBDIRS += qmlvideofx
}
}

View File

@@ -11,7 +11,7 @@ QT.multimediawidgets.sources = $$QT_MODULE_BASE/src/multimediawidgets
QT.multimediawidgets.libs = $$QT_MODULE_LIB_BASE QT.multimediawidgets.libs = $$QT_MODULE_LIB_BASE
QT.multimediawidgets.plugins = $$QT_MODULE_PLUGIN_BASE QT.multimediawidgets.plugins = $$QT_MODULE_PLUGIN_BASE
QT.multimediawidgets.imports = $$QT_MODULE_IMPORT_BASE QT.multimediawidgets.imports = $$QT_MODULE_IMPORT_BASE
QT.multimediawidgets.depends = gui network QT.multimediawidgets.depends = gui network widgets
QT.multimediawidgets.DEFINES = QT_MULTIMEDIAWIDGETS_LIB QT.multimediawidgets.DEFINES = QT_MULTIMEDIAWIDGETS_LIB
QT_CONFIG += multimediawidgets QT_CONFIG += multimediawidgets

View File

@@ -44,7 +44,7 @@
#include <QtQuick/qsgmaterial.h> #include <QtQuick/qsgmaterial.h>
#include <QtGui/QOpenGLContext> #include <QtGui/QOpenGLContext>
#include <QtGui/QOpenGLFunctions> #include <QtGui/QOpenGLFunctions>
#include <QtOpenGL/qglshaderprogram.h> #include <QtGui/QOpenGLShaderProgram>
QList<QVideoFrame::PixelFormat> QSGVideoNodeFactory_I420::supportedPixelFormats( QList<QVideoFrame::PixelFormat> QSGVideoNodeFactory_I420::supportedPixelFormats(
QAbstractVideoBuffer::HandleType handleType) const QAbstractVideoBuffer::HandleType handleType) const

View File

@@ -46,7 +46,7 @@
#include <QtMultimedia/qvideoframe.h> #include <QtMultimedia/qvideoframe.h>
#include <QtMultimedia/qvideosurfaceformat.h> #include <QtMultimedia/qvideosurfaceformat.h>
#include <QtOpenGL/qglfunctions.h> #include <QtGui/qopenglfunctions.h>
class QSGVideoNode : public QSGGeometryNode class QSGVideoNode : public QSGGeometryNode
{ {

View File

@@ -44,7 +44,7 @@
#include <QtCore/qmutex.h> #include <QtCore/qmutex.h>
#include <QtGui/QOpenGLContext> #include <QtGui/QOpenGLContext>
#include <QtGui/QOpenGLFunctions> #include <QtGui/QOpenGLFunctions>
#include <QtOpenGL/qglshaderprogram.h> #include <QtGui/QOpenGLShaderProgram>
QList<QVideoFrame::PixelFormat> QSGVideoNodeFactory_RGB::supportedPixelFormats( QList<QVideoFrame::PixelFormat> QSGVideoNodeFactory_RGB::supportedPixelFormats(
QAbstractVideoBuffer::HandleType handleType) const QAbstractVideoBuffer::HandleType handleType) const

View File

@@ -105,13 +105,6 @@ QVideoDeviceControl::~QVideoDeviceControl()
\since 1.0 \since 1.0
*/ */
/*!
\fn QVideoDeviceControl::deviceIcon(int index) const
Returns an icon for the video device at \a index.
\since 1.0
*/
/*! /*!
\fn QVideoDeviceControl::defaultDevice() const \fn QVideoDeviceControl::defaultDevice() const

View File

@@ -61,7 +61,6 @@ public:
virtual QString deviceName(int index) const = 0; virtual QString deviceName(int index) const = 0;
virtual QString deviceDescription(int index) const = 0; virtual QString deviceDescription(int index) const = 0;
virtual QIcon deviceIcon(int index) const = 0;
virtual int defaultDevice() const = 0; virtual int defaultDevice() const = 0;
virtual int selectedDevice() const = 0; virtual int selectedDevice() const = 0;

View File

@@ -13,19 +13,21 @@ HEADERS += \
$$PWD/dsvideodevicecontrol.h \ $$PWD/dsvideodevicecontrol.h \
$$PWD/dsimagecapturecontrol.h \ $$PWD/dsimagecapturecontrol.h \
$$PWD/dscamerasession.h \ $$PWD/dscamerasession.h \
$$PWD/dsvideowidgetcontrol.h \
$$PWD/dscameraservice.h \ $$PWD/dscameraservice.h \
$$PWD/directshowglobal.h $$PWD/directshowglobal.h
SOURCES += \ SOURCES += \
$$PWD/dscameraservice.cpp \ $$PWD/dscameraservice.cpp \
$$PWD/dscameracontrol.cpp \ $$PWD/dscameracontrol.cpp \
$$PWD/dsvideorenderer.cpp \ $$PWD/dsvideorenderer.cpp \
$$PWD/dsvideodevicecontrol.cpp \ $$PWD/dsvideodevicecontrol.cpp \
$$PWD/dsimagecapturecontrol.cpp \ $$PWD/dsimagecapturecontrol.cpp \
$$PWD/dscamerasession.cpp \ $$PWD/dscamerasession.cpp
$$PWD/dsvideowidgetcontrol.cpp
contains(config_test_widgets, yes) {
HEADERS += $$PWD/dsvideowidgetcontrol.h
SOURCES += $$PWD/dsvideowidgetcontrol.cpp
}
INCLUDEPATH += $(DXSDK_DIR)/include INCLUDEPATH += $(DXSDK_DIR)/include
LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32 LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32

View File

@@ -41,9 +41,11 @@
#include <QtCore/qvariant.h> #include <QtCore/qvariant.h>
#include <QtCore/qdebug.h> #include <QtCore/qdebug.h>
#if defined(HAVE_WIDGETS)
#include <QtWidgets/qwidget.h> #include <QtWidgets/qwidget.h>
#include <QVideoWidgetControl.h> #include <QVideoWidgetControl.h>
#endif
#include "dscameraservice.h" #include "dscameraservice.h"
#include "dscameracontrol.h" #include "dscameracontrol.h"
@@ -51,7 +53,10 @@
#include "dsvideorenderer.h" #include "dsvideorenderer.h"
#include "dsvideodevicecontrol.h" #include "dsvideodevicecontrol.h"
#include "dsimagecapturecontrol.h" #include "dsimagecapturecontrol.h"
#if defined(HAVE_WIDGETS)
#include "dsvideowidgetcontrol.h" #include "dsvideowidgetcontrol.h"
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@@ -68,7 +73,9 @@ DSCameraService::DSCameraService(QObject *parent):
m_imageCapture = new DSImageCaptureControl(m_session); m_imageCapture = new DSImageCaptureControl(m_session);
#if defined(HAVE_WIDGETS)
m_viewFinderWidget = new DSVideoWidgetControl(m_session); m_viewFinderWidget = new DSVideoWidgetControl(m_session);
#endif
m_device = QByteArray("default"); m_device = QByteArray("default");
} }
@@ -79,7 +86,9 @@ DSCameraService::~DSCameraService()
delete m_videoDevice; delete m_videoDevice;
delete m_videoRenderer; delete m_videoRenderer;
delete m_imageCapture; delete m_imageCapture;
#if defined(HAVE_WIDGETS)
delete m_viewFinderWidget; delete m_viewFinderWidget;
#endif
delete m_session; delete m_session;
} }
@@ -91,11 +100,13 @@ QMediaControl* DSCameraService::requestControl(const char *name)
if (qstrcmp(name, QCameraImageCaptureControl_iid) == 0) if (qstrcmp(name, QCameraImageCaptureControl_iid) == 0)
return m_imageCapture; return m_imageCapture;
#if defined(HAVE_WIDGETS)
if (qstrcmp(name, QVideoWidgetControl_iid) == 0) { if (qstrcmp(name, QVideoWidgetControl_iid) == 0) {
if (m_viewFinderWidget) { if (m_viewFinderWidget) {
return m_viewFinderWidget; return m_viewFinderWidget;
} }
} }
#endif
if(qstrcmp(name,QVideoRendererControl_iid) == 0) if(qstrcmp(name,QVideoRendererControl_iid) == 0)
return m_videoRenderer; return m_videoRenderer;

View File

@@ -74,7 +74,9 @@ private:
DSCameraControl *m_control; DSCameraControl *m_control;
DSCameraSession *m_session; DSCameraSession *m_session;
DSVideoOutputControl *m_videoOutput; DSVideoOutputControl *m_videoOutput;
#if defined(HAVE_WIDGETS)
DSVideoWidgetControl *m_viewFinderWidget; DSVideoWidgetControl *m_viewFinderWidget;
#endif
DSVideoDeviceControl *m_videoDevice; DSVideoDeviceControl *m_videoDevice;
DSVideoRendererControl *m_videoRenderer; DSVideoRendererControl *m_videoRenderer;
DSImageCaptureControl *m_imageCapture; DSImageCaptureControl *m_imageCapture;

View File

@@ -41,7 +41,6 @@
#include <QDebug> #include <QDebug>
#include <QFile> #include <QFile>
#include <QtWidgets/QIcon>
#include "dsvideodevicecontrol.h" #include "dsvideodevicecontrol.h"
#include "dscamerasession.h" #include "dscamerasession.h"
@@ -135,13 +134,6 @@ QString DSVideoDeviceControl::deviceDescription(int index) const
return QString(); return QString();
} }
QIcon DSVideoDeviceControl::deviceIcon(int index) const
{
Q_UNUSED(index)
return QIcon();
}
int DSVideoDeviceControl::defaultDevice() const int DSVideoDeviceControl::defaultDevice() const
{ {
return 0; return 0;

View File

@@ -60,7 +60,6 @@ public:
int deviceCount() const; int deviceCount() const;
QString deviceName(int index) const; QString deviceName(int index) const;
QString deviceDescription(int index) const; QString deviceDescription(int index) const;
QIcon deviceIcon(int index) const;
int defaultDevice() const; int defaultDevice() const;
int selectedDevice() const; int selectedDevice() const;

View File

@@ -5,8 +5,6 @@ TARGET = $$qtLibraryTarget(dsengine)
PLUGIN_TYPE=mediaservice PLUGIN_TYPE=mediaservice
include (../../../common.pri)
QT += multimedia QT += multimedia
DEPENDPATH += . DEPENDPATH += .
@@ -16,8 +14,13 @@ SOURCES += dsserviceplugin.cpp
!contains(config_test_wmsdk, yes): DEFINES += QT_NO_WMSDK !contains(config_test_wmsdk, yes): DEFINES += QT_NO_WMSDK
contains(config_test_wmf, no): include (player/player.pri) contains(config_test_widgets, yes) {
include (camera/camera.pri) QT += multimediawidgets
DEFINES += HAVE_WIDGETS
}
contains(config_test_wmf, no): include(player/player.pri)
include(camera/camera.pri)
target.path += $$[QT_INSTALL_PLUGINS]/$${PLUGIN_TYPE} target.path += $$[QT_INSTALL_PLUGINS]/$${PLUGIN_TYPE}
INSTALLS += target INSTALLS += target

View File

@@ -46,7 +46,7 @@
#include "directshowmetadatacontrol.h" #include "directshowmetadatacontrol.h"
#include "directshowplayercontrol.h" #include "directshowplayercontrol.h"
#include "directshowvideorenderercontrol.h" #include "directshowvideorenderercontrol.h"
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
#include "vmr9videowindowcontrol.h" #include "vmr9videowindowcontrol.h"
#endif #endif
@@ -83,7 +83,7 @@ DirectShowPlayerService::DirectShowPlayerService(QObject *parent)
, m_playerControl(0) , m_playerControl(0)
, m_metaDataControl(0) , m_metaDataControl(0)
, m_videoRendererControl(0) , m_videoRendererControl(0)
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
, m_videoWindowControl(0) , m_videoWindowControl(0)
#endif #endif
, m_audioEndpointControl(0) , m_audioEndpointControl(0)
@@ -144,7 +144,7 @@ DirectShowPlayerService::~DirectShowPlayerService()
delete m_audioEndpointControl; delete m_audioEndpointControl;
delete m_metaDataControl; delete m_metaDataControl;
delete m_videoRendererControl; delete m_videoRendererControl;
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
delete m_videoWindowControl; delete m_videoWindowControl;
#endif #endif
@@ -161,7 +161,7 @@ QMediaControl *DirectShowPlayerService::requestControl(const char *name)
} else if (qstrcmp(name, QMetaDataReaderControl_iid) == 0) { } else if (qstrcmp(name, QMetaDataReaderControl_iid) == 0) {
return m_metaDataControl; return m_metaDataControl;
} else if (qstrcmp(name, QVideoRendererControl_iid) == 0) { } else if (qstrcmp(name, QVideoRendererControl_iid) == 0) {
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
if (!m_videoRendererControl && !m_videoWindowControl) { if (!m_videoRendererControl && !m_videoWindowControl) {
#else #else
if (!m_videoRendererControl) { if (!m_videoRendererControl) {
@@ -173,7 +173,7 @@ QMediaControl *DirectShowPlayerService::requestControl(const char *name)
return m_videoRendererControl; return m_videoRendererControl;
} }
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
} else if (qstrcmp(name, QVideoWindowControl_iid) == 0) { } else if (qstrcmp(name, QVideoWindowControl_iid) == 0) {
if (!m_videoRendererControl && !m_videoWindowControl) { if (!m_videoRendererControl && !m_videoWindowControl) {
m_videoWindowControl = new Vmr9VideoWindowControl; m_videoWindowControl = new Vmr9VideoWindowControl;
@@ -198,7 +198,7 @@ void DirectShowPlayerService::releaseControl(QMediaControl *control)
delete m_videoRendererControl; delete m_videoRendererControl;
m_videoRendererControl = 0; m_videoRendererControl = 0;
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
} else if (control == m_videoWindowControl) { } else if (control == m_videoWindowControl) {
setVideoOutput(0); setVideoOutput(0);

View File

@@ -59,7 +59,7 @@ class DirectShowAudioEndpointControl;
class DirectShowMetaDataControl; class DirectShowMetaDataControl;
class DirectShowPlayerControl; class DirectShowPlayerControl;
class DirectShowVideoRendererControl; class DirectShowVideoRendererControl;
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
class Vmr9VideoWindowControl; class Vmr9VideoWindowControl;
#endif #endif
@@ -180,7 +180,7 @@ private:
DirectShowPlayerControl *m_playerControl; DirectShowPlayerControl *m_playerControl;
DirectShowMetaDataControl *m_metaDataControl; DirectShowMetaDataControl *m_metaDataControl;
DirectShowVideoRendererControl *m_videoRendererControl; DirectShowVideoRendererControl *m_videoRendererControl;
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
Vmr9VideoWindowControl *m_videoWindowControl; Vmr9VideoWindowControl *m_videoWindowControl;
#endif #endif
DirectShowAudioEndpointControl *m_audioEndpointControl; DirectShowAudioEndpointControl *m_audioEndpointControl;

View File

@@ -35,11 +35,11 @@ SOURCES += \
$$PWD/mediasamplevideobuffer.cpp \ $$PWD/mediasamplevideobuffer.cpp \
$$PWD/videosurfacefilter.cpp $$PWD/videosurfacefilter.cpp
!simulator { contains(config_test_widgets, yes):!simulator {
HEADERS += \ HEADERS += \
$$PWD/vmr9videowindowcontrol.h $$PWD/vmr9videowindowcontrol.h
SOURCES += \ SOURCES += \
$$PWD/vmr9videowindowcontrol.cpp $$PWD/vmr9videowindowcontrol.cpp
} }

View File

@@ -61,16 +61,18 @@
#include "qgstreameraudioinputendpointselector.h" #include "qgstreameraudioinputendpointselector.h"
#include "qgstreamervideoinputdevicecontrol.h" #include "qgstreamervideoinputdevicecontrol.h"
#if defined(HAVE_WIDGETS)
#include "qgstreamervideooverlay.h" #include "qgstreamervideooverlay.h"
#include "qgstreamervideowindow.h" #include "qgstreamervideowindow.h"
#include "qgstreamervideowidget.h"
#endif
#include "qgstreamervideorenderer.h" #include "qgstreamervideorenderer.h"
#if defined(Q_WS_MAEMO_6) && defined(__arm__) #if defined(Q_WS_MAEMO_6) && defined(__arm__)
#include "qgstreamergltexturerenderer.h" #include "qgstreamergltexturerenderer.h"
#endif #endif
#include "qgstreamervideowidget.h"
#include <qmediaserviceprovider.h> #include <qmediaserviceprovider.h>
#include <QtCore/qdebug.h> #include <QtCore/qdebug.h>
@@ -92,8 +94,10 @@ CameraBinService::CameraBinService(const QString &service, QObject *parent):
m_videoOutput = 0; m_videoOutput = 0;
m_videoRenderer = 0; m_videoRenderer = 0;
#if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
m_videoWindow = 0; m_videoWindow = 0;
m_videoWidgetControl = 0; m_videoWidgetControl = 0;
#endif
m_imageCaptureControl = 0; m_imageCaptureControl = 0;
if (service == Q_MEDIASERVICE_CAMERA) { if (service == Q_MEDIASERVICE_CAMERA) {
@@ -108,27 +112,22 @@ CameraBinService::CameraBinService(const QString &service, QObject *parent):
if (m_videoInputDevice->deviceCount()) if (m_videoInputDevice->deviceCount())
m_captureSession->setDevice(m_videoInputDevice->deviceName(m_videoInputDevice->selectedDevice())); m_captureSession->setDevice(m_videoInputDevice->deviceName(m_videoInputDevice->selectedDevice()));
#if defined(Q_WS_MAEMO_6) && defined(__arm__) #if defined(Q_WS_MAEMO_6) && defined(__arm__) && defined(HAVE_WIDGETS)
m_videoRenderer = new QGstreamerGLTextureRenderer(this); m_videoRenderer = new QGstreamerGLTextureRenderer(this);
#else #else
m_videoRenderer = new QGstreamerVideoRenderer(this); m_videoRenderer = new QGstreamerVideoRenderer(this);
#endif #endif
#ifdef HAVE_XVIDEO #if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
#ifdef Q_WS_MAEMO_6 #ifdef Q_WS_MAEMO_6
m_videoWindow = new QGstreamerVideoWindow(this, "omapxvsink"); m_videoWindow = new QGstreamerVideoWindow(this, "omapxvsink");
//m_videoWindow = new QGstreamerVideoWindow(this);
#else #else
m_videoWindow = new QGstreamerVideoOverlay(this); m_videoWindow = new QGstreamerVideoOverlay(this);
#endif #endif
m_videoWidgetControl = new QGstreamerVideoWidgetControl(this); m_videoWidgetControl = new QGstreamerVideoWidgetControl(this);
#endif #endif
} }
if (!m_captureSession) { if (!m_captureSession) {
qWarning() << Q_FUNC_INFO << "Service type is not supported:" << service; qWarning() << Q_FUNC_INFO << "Service type is not supported:" << service;
return; return;
@@ -163,11 +162,14 @@ QMediaControl *CameraBinService::requestControl(const char *name)
if (!m_videoOutput) { if (!m_videoOutput) {
if (qstrcmp(name, QVideoRendererControl_iid) == 0) { if (qstrcmp(name, QVideoRendererControl_iid) == 0) {
m_videoOutput = m_videoRenderer; m_videoOutput = m_videoRenderer;
} else if (qstrcmp(name, QVideoWindowControl_iid) == 0) { }
#if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
else if (qstrcmp(name, QVideoWindowControl_iid) == 0) {
m_videoOutput = m_videoWindow; m_videoOutput = m_videoWindow;
} else if (qstrcmp(name, QVideoWidgetControl_iid) == 0) { } else if (qstrcmp(name, QVideoWidgetControl_iid) == 0) {
m_videoOutput = m_videoWidgetControl; m_videoOutput = m_videoWidgetControl;
} }
#endif
if (m_videoOutput) { if (m_videoOutput) {
m_captureSession->setViewfinder(m_videoOutput); m_captureSession->setViewfinder(m_videoOutput);

View File

@@ -88,8 +88,10 @@ private:
QMediaControl *m_videoOutput; QMediaControl *m_videoOutput;
QMediaControl *m_videoRenderer; QMediaControl *m_videoRenderer;
#if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
QMediaControl *m_videoWindow; QMediaControl *m_videoWindow;
QGstreamerVideoWidgetControl *m_videoWidgetControl; QGstreamerVideoWidgetControl *m_videoWidgetControl;
#endif
CameraBinImageCapture *m_imageCaptureControl; CameraBinImageCapture *m_imageCaptureControl;
}; };

View File

@@ -2,7 +2,14 @@
load(qt_module) load(qt_module)
TARGET = qgstengine TARGET = qgstengine
QT += multimedia-private network multimediawidgets-private QT += multimedia-private network
CONFIG += no_private_qt_headers_warning
contains(config_test_widgets, yes) {
QT += widgets multimediawidgets-private
DEFINES += HAVE_WIDGETS
}
PLUGIN_TYPE=mediaservice PLUGIN_TYPE=mediaservice
load(qt_plugin) load(qt_plugin)
@@ -11,9 +18,8 @@ DESTDIR = $$QT.multimedia.plugins/$${PLUGIN_TYPE}
LIBS += -lqgsttools_p LIBS += -lqgsttools_p
unix:!maemo*:contains(QT_CONFIG, alsa) { unix:!maemo*:contains(QT_CONFIG, alsa) {
DEFINES += HAVE_ALSA DEFINES += HAVE_ALSA
LIBS += \ LIBS += -lasound
-lasound
} }
CONFIG += link_pkgconfig CONFIG += link_pkgconfig
@@ -40,7 +46,7 @@ maemo6 {
PKGCONFIG += qmsystem2 PKGCONFIG += qmsystem2
isEqual(QT_ARCH,armv6) { isEqual(QT_ARCH,armv6):contains(config_test_widgets, yes) {
HEADERS += qgstreamergltexturerenderer.h HEADERS += qgstreamergltexturerenderer.h
SOURCES += qgstreamergltexturerenderer.cpp SOURCES += qgstreamergltexturerenderer.cpp
QT += opengl QT += opengl
@@ -68,7 +74,7 @@ SOURCES += \
gstvideoconnector.c \ gstvideoconnector.c \
contains(config_test_xvideo, yes) { contains(config_test_xvideo, yes):contains(config_test_widgets, yes): {
DEFINES += HAVE_XVIDEO DEFINES += HAVE_XVIDEO
LIBS += -lXv -lX11 -lXext LIBS += -lXv -lX11 -lXext

View File

@@ -55,10 +55,12 @@
#include "qgstreamervideoinputdevicecontrol.h" #include "qgstreamervideoinputdevicecontrol.h"
#include "qgstreamerimagecapturecontrol.h" #include "qgstreamerimagecapturecontrol.h"
#include "qgstreamervideooverlay.h"
#include "qgstreamervideorenderer.h" #include "qgstreamervideorenderer.h"
#if defined(HAVE_WIDGETS)
#include "qgstreamervideooverlay.h"
#include "qgstreamervideowidget.h" #include "qgstreamervideowidget.h"
#endif
#include <qmediaserviceprovider.h> #include <qmediaserviceprovider.h>
@@ -77,8 +79,10 @@ QGstreamerCaptureService::QGstreamerCaptureService(const QString &service, QObje
m_videoOutput = 0; m_videoOutput = 0;
m_videoRenderer = 0; m_videoRenderer = 0;
#if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
m_videoWindow = 0; m_videoWindow = 0;
m_videoWidgetControl = 0; m_videoWidgetControl = 0;
#endif
m_imageCaptureControl = 0; m_imageCaptureControl = 0;
if (service == Q_MEDIASERVICE_AUDIOSOURCE) { if (service == Q_MEDIASERVICE_AUDIOSOURCE) {
@@ -100,7 +104,7 @@ QGstreamerCaptureService::QGstreamerCaptureService(const QString &service, QObje
m_videoRenderer = new QGstreamerVideoRenderer(this); m_videoRenderer = new QGstreamerVideoRenderer(this);
#ifdef HAVE_XVIDEO #if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
m_videoWindow = new QGstreamerVideoOverlay(this); m_videoWindow = new QGstreamerVideoOverlay(this);
m_videoWidgetControl = new QGstreamerVideoWidgetControl(this); m_videoWidgetControl = new QGstreamerVideoWidgetControl(this);
#endif #endif
@@ -161,11 +165,14 @@ QMediaControl *QGstreamerCaptureService::requestControl(const char *name)
if (!m_videoOutput) { if (!m_videoOutput) {
if (qstrcmp(name, QVideoRendererControl_iid) == 0) { if (qstrcmp(name, QVideoRendererControl_iid) == 0) {
m_videoOutput = m_videoRenderer; m_videoOutput = m_videoRenderer;
} else if (qstrcmp(name, QVideoWindowControl_iid) == 0) { }
#if defined(HAVE_WIDGETS) && defined(HAVE_XVIDEO)
else if (qstrcmp(name, QVideoWindowControl_iid) == 0) {
m_videoOutput = m_videoWindow; m_videoOutput = m_videoWindow;
} else if (qstrcmp(name, QVideoWidgetControl_iid) == 0) { } else if (qstrcmp(name, QVideoWidgetControl_iid) == 0) {
m_videoOutput = m_videoWidgetControl; m_videoOutput = m_videoWidgetControl;
} }
#endif
if (m_videoOutput) { if (m_videoOutput) {
m_captureSession->setVideoPreview(m_videoOutput); m_captureSession->setVideoPreview(m_videoOutput);

View File

@@ -87,8 +87,10 @@ private:
QMediaControl *m_videoOutput; QMediaControl *m_videoOutput;
QGstreamerVideoRenderer *m_videoRenderer; QGstreamerVideoRenderer *m_videoRenderer;
#if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
QMediaControl *m_videoWindow; QMediaControl *m_videoWindow;
QMediaControl *m_videoWidgetControl; QMediaControl *m_videoWidgetControl;
#endif
QGstreamerImageCaptureControl *m_imageCaptureControl; QGstreamerImageCaptureControl *m_imageCaptureControl;
}; };

View File

@@ -41,22 +41,28 @@
#include <QtCore/qvariant.h> #include <QtCore/qvariant.h>
#include <QtCore/qdebug.h> #include <QtCore/qdebug.h>
#if defined(HAVE_WIDGETS)
#include <QtWidgets/qwidget.h> #include <QtWidgets/qwidget.h>
#endif
#include "qgstreamerplayerservice.h" #include "qgstreamerplayerservice.h"
#include "qgstreamerplayercontrol.h" #include "qgstreamerplayercontrol.h"
#include "qgstreamerplayersession.h" #include "qgstreamerplayersession.h"
#include "qgstreamermetadataprovider.h" #include "qgstreamermetadataprovider.h"
#if defined(HAVE_WIDGETS)
#include "qgstreamervideooverlay.h" #include "qgstreamervideooverlay.h"
#include "qgstreamervideowindow.h" #include "qgstreamervideowindow.h"
#include "qgstreamervideowidget.h"
#endif
#include "qgstreamervideorenderer.h" #include "qgstreamervideorenderer.h"
#if defined(Q_WS_MAEMO_6) && defined(__arm__) #if defined(Q_WS_MAEMO_6) && defined(__arm__)
#include "qgstreamergltexturerenderer.h" #include "qgstreamergltexturerenderer.h"
#endif #endif
#include "qgstreamervideowidget.h"
#include "qgstreamerstreamscontrol.h" #include "qgstreamerstreamscontrol.h"
#include <qmediaplaylistnavigator.h> #include <qmediaplaylistnavigator.h>
@@ -65,11 +71,13 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
QGstreamerPlayerService::QGstreamerPlayerService(QObject *parent): QGstreamerPlayerService::QGstreamerPlayerService(QObject *parent):
QMediaService(parent), QMediaService(parent)
m_videoOutput(0), , m_videoOutput(0)
m_videoRenderer(0), , m_videoRenderer(0)
m_videoWindow(0), #if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
m_videoWidget(0) , m_videoWindow(0)
, m_videoWidget(0)
#endif
{ {
m_session = new QGstreamerPlayerSession(this); m_session = new QGstreamerPlayerSession(this);
m_control = new QGstreamerPlayerControl(m_session, this); m_control = new QGstreamerPlayerControl(m_session, this);
@@ -82,14 +90,12 @@ QGstreamerPlayerService::QGstreamerPlayerService(QObject *parent):
m_videoRenderer = new QGstreamerVideoRenderer(this); m_videoRenderer = new QGstreamerVideoRenderer(this);
#endif #endif
#ifdef HAVE_XVIDEO #if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
#ifdef Q_WS_MAEMO_6 #ifdef Q_WS_MAEMO_6
m_videoWindow = new QGstreamerVideoWindow(this, "omapxvsink"); m_videoWindow = new QGstreamerVideoWindow(this, "omapxvsink");
#else #else
m_videoWindow = new QGstreamerVideoOverlay(this); m_videoWindow = new QGstreamerVideoOverlay(this);
#endif #endif
m_videoWidget = new QGstreamerVideoWidgetControl(this); m_videoWidget = new QGstreamerVideoWidgetControl(this);
#endif #endif
} }
@@ -110,12 +116,14 @@ QMediaControl *QGstreamerPlayerService::requestControl(const char *name)
return m_streamsControl; return m_streamsControl;
if (!m_videoOutput) { if (!m_videoOutput) {
if (qstrcmp(name, QVideoWidgetControl_iid) == 0) if (qstrcmp(name, QVideoRendererControl_iid) == 0)
m_videoOutput = m_videoWidget;
else if (qstrcmp(name, QVideoRendererControl_iid) == 0)
m_videoOutput = m_videoRenderer; m_videoOutput = m_videoRenderer;
#if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
else if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
m_videoOutput = m_videoWidget;
else if (qstrcmp(name, QVideoWindowControl_iid) == 0) else if (qstrcmp(name, QVideoWindowControl_iid) == 0)
m_videoOutput = m_videoWindow; m_videoOutput = m_videoWindow;
#endif
if (m_videoOutput) { if (m_videoOutput) {
m_control->setVideoOutput(m_videoOutput); m_control->setVideoOutput(m_videoOutput);

View File

@@ -80,8 +80,10 @@ private:
QMediaControl *m_videoOutput; QMediaControl *m_videoOutput;
QMediaControl *m_videoRenderer; QMediaControl *m_videoRenderer;
#if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
QMediaControl *m_videoWindow; QMediaControl *m_videoWindow;
QMediaControl *m_videoWidget; QMediaControl *m_videoWidget;
#endif
}; };
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@@ -41,7 +41,6 @@
#include "qgstreameraudioinputendpointselector.h" #include "qgstreameraudioinputendpointselector.h"
#include <QtWidgets/QIcon>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QDebug> #include <QtCore/QDebug>

View File

@@ -41,7 +41,6 @@
#include <QtCore/qstring.h> #include <QtCore/qstring.h>
#include <QtCore/qdebug.h> #include <QtCore/qdebug.h>
#include <QtWidgets/QIcon>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QDebug> #include <QtCore/QDebug>

View File

@@ -41,7 +41,6 @@
#include "qgstreamervideoinputdevicecontrol.h" #include "qgstreamervideoinputdevicecontrol.h"
#include <QtWidgets/QIcon>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QDebug> #include <QtCore/QDebug>
@@ -82,12 +81,6 @@ QString QGstreamerVideoInputDeviceControl::deviceDescription(int index) const
return m_descriptions[index]; return m_descriptions[index];
} }
QIcon QGstreamerVideoInputDeviceControl::deviceIcon(int index) const
{
Q_UNUSED(index);
return QIcon();
}
int QGstreamerVideoInputDeviceControl::defaultDevice() const int QGstreamerVideoInputDeviceControl::defaultDevice() const
{ {
return 0; return 0;

View File

@@ -58,7 +58,6 @@ public:
QString deviceName(int index) const; QString deviceName(int index) const;
QString deviceDescription(int index) const; QString deviceDescription(int index) const;
QIcon deviceIcon(int index) const;
int defaultDevice() const; int defaultDevice() const;
int selectedDevice() const; int selectedDevice() const;

View File

@@ -43,8 +43,6 @@
#include <private/qvideosurfacegstsink_p.h> #include <private/qvideosurfacegstsink_p.h>
#include <qabstractvideosurface.h> #include <qabstractvideosurface.h>
#include <QEvent>
#include <QtWidgets/QApplication>
#include <QDebug> #include <QDebug>
#include <gst/gst.h> #include <gst/gst.h>

View File

@@ -36,6 +36,9 @@ unix:!mac {
mac:!simulator { mac:!simulator {
SUBDIRS += audiocapture SUBDIRS += audiocapture
SUBDIRS += qt7
# Currently we need qmacdefines_mac.h from QtWidgets, so this depends on that :/
# despite the code not really using them.
contains(config_test_widgets, yes):SUBDIRS += qt7
} }

View File

@@ -1,7 +1,11 @@
load(qt_module) load(qt_module)
TARGET = qqt7engine TARGET = qqt7engine
QT += multimedia-private multimediawidgets-private network widgets QT += multimedia-private network
contains(config_test_widgets, yes) {
QT += multimediawidgets-private widgets
}
PLUGIN_TYPE = mediaservice PLUGIN_TYPE = mediaservice
load(qt_plugin) load(qt_plugin)
@@ -39,7 +43,6 @@ OBJECTIVE_SOURCES += \
!simulator { !simulator {
HEADERS += \ HEADERS += \
qt7movieviewoutput.h \ qt7movieviewoutput.h \
qt7movievideowidget.h \
qt7movieviewrenderer.h \ qt7movieviewrenderer.h \
qt7movierenderer.h \ qt7movierenderer.h \
qt7ciimagevideobuffer.h \ qt7ciimagevideobuffer.h \
@@ -47,12 +50,19 @@ OBJECTIVE_SOURCES += \
OBJECTIVE_SOURCES += \ OBJECTIVE_SOURCES += \
qt7movieviewoutput.mm \ qt7movieviewoutput.mm \
qt7movievideowidget.mm \
qt7movieviewrenderer.mm \ qt7movieviewrenderer.mm \
qt7movierenderer.mm \ qt7movierenderer.mm \
qt7videooutput.mm \ qt7videooutput.mm \
qt7ciimagevideobuffer.mm \ qt7ciimagevideobuffer.mm \
qcvdisplaylink.mm qcvdisplaylink.mm
contains(config_test_widgets, yes) {
HEADERS += \
qt7movieviewwidget.h
OBJECTIVE_SOURCES += \
qt7movievideowidget.mm
}
} }
include(mediaplayer/mediaplayer.pri) include(mediaplayer/mediaplayer.pri)

View File

@@ -41,7 +41,6 @@
#include "simulatorvideoinputdevicecontrol.h" #include "simulatorvideoinputdevicecontrol.h"
#include <QtWidgets/QIcon>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QDebug> #include <QtCore/QDebug>
#include <QtCore/QStringList> #include <QtCore/QStringList>
@@ -77,12 +76,6 @@ QString QSimulatorVideoInputDeviceControl::deviceDescription(int index) const
return mDescriptions[index]; return mDescriptions[index];
} }
QIcon QSimulatorVideoInputDeviceControl::deviceIcon(int index) const
{
Q_UNUSED(index);
return QIcon();
}
int QSimulatorVideoInputDeviceControl::defaultDevice() const int QSimulatorVideoInputDeviceControl::defaultDevice() const
{ {
if (mDevices.isEmpty()) if (mDevices.isEmpty())

View File

@@ -61,7 +61,6 @@ public:
QString deviceName(int index) const; QString deviceName(int index) const;
QString deviceDescription(int index) const; QString deviceDescription(int index) const;
QIcon deviceIcon(int index) const;
int defaultDevice() const; int defaultDevice() const;
int selectedDevice() const; int selectedDevice() const;

View File

@@ -41,7 +41,6 @@
#include <QtCore/qstring.h> #include <QtCore/qstring.h>
#include <QtCore/qdebug.h> #include <QtCore/qdebug.h>
#include <QtWidgets/QIcon>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QDebug> #include <QtCore/QDebug>

View File

@@ -95,7 +95,7 @@ QMediaControl* MFPlayerService::requestControl(const char *name)
} else if (qstrcmp(name, QMetaDataReaderControl_iid) == 0) { } else if (qstrcmp(name, QMetaDataReaderControl_iid) == 0) {
return m_metaDataControl; return m_metaDataControl;
} else if (qstrcmp(name, QVideoRendererControl_iid) == 0) { } else if (qstrcmp(name, QVideoRendererControl_iid) == 0) {
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
if (!m_videoRendererControl && !m_videoWindowControl) { if (!m_videoRendererControl && !m_videoWindowControl) {
#else #else
if (!m_videoRendererControl) { if (!m_videoRendererControl) {
@@ -103,7 +103,7 @@ QMediaControl* MFPlayerService::requestControl(const char *name)
m_videoRendererControl = new MFVideoRendererControl; m_videoRendererControl = new MFVideoRendererControl;
return m_videoRendererControl; return m_videoRendererControl;
} }
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
} else if (qstrcmp(name, QVideoWindowControl_iid) == 0) { } else if (qstrcmp(name, QVideoWindowControl_iid) == 0) {
if (!m_videoRendererControl && !m_videoWindowControl) { if (!m_videoRendererControl && !m_videoWindowControl) {
m_videoWindowControl = new Evr9VideoWindowControl; m_videoWindowControl = new Evr9VideoWindowControl;
@@ -124,7 +124,7 @@ void MFPlayerService::releaseControl(QMediaControl *control)
m_videoRendererControl->setSurface(0); m_videoRendererControl->setSurface(0);
delete m_videoRendererControl; delete m_videoRendererControl;
m_videoRendererControl = 0; m_videoRendererControl = 0;
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
} else if (control == m_videoWindowControl) { } else if (control == m_videoWindowControl) {
delete m_videoWindowControl; delete m_videoWindowControl;
m_videoWindowControl = 0; m_videoWindowControl = 0;
@@ -142,7 +142,7 @@ MFVideoRendererControl* MFPlayerService::videoRendererControl() const
return m_videoRendererControl; return m_videoRendererControl;
} }
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
Evr9VideoWindowControl* MFPlayerService::videoWindowControl() const Evr9VideoWindowControl* MFPlayerService::videoWindowControl() const
{ {
return m_videoWindowControl; return m_videoWindowControl;

View File

@@ -56,7 +56,7 @@ QT_END_NAMESPACE
QT_USE_NAMESPACE QT_USE_NAMESPACE
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
class Evr9VideoWindowControl; class Evr9VideoWindowControl;
#endif #endif
class MFAudioEndpointControl; class MFAudioEndpointControl;
@@ -77,7 +77,7 @@ public:
MFAudioEndpointControl* audioEndpointControl() const; MFAudioEndpointControl* audioEndpointControl() const;
MFVideoRendererControl* videoRendererControl() const; MFVideoRendererControl* videoRendererControl() const;
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
Evr9VideoWindowControl* videoWindowControl() const; Evr9VideoWindowControl* videoWindowControl() const;
#endif #endif
MFMetaDataControl* metaDataControl() const; MFMetaDataControl* metaDataControl() const;
@@ -86,7 +86,7 @@ private:
MFPlayerSession *m_session; MFPlayerSession *m_session;
MFVideoRendererControl *m_videoRendererControl; MFVideoRendererControl *m_videoRendererControl;
MFAudioEndpointControl *m_audioEndpointControl; MFAudioEndpointControl *m_audioEndpointControl;
#ifndef Q_WS_SIMULATOR #if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
Evr9VideoWindowControl *m_videoWindowControl; Evr9VideoWindowControl *m_videoWindowControl;
#endif #endif
MFPlayerControl *m_player; MFPlayerControl *m_player;

View File

@@ -24,7 +24,7 @@ SOURCES += \
$$PWD/mfaudioendpointcontrol.cpp \ $$PWD/mfaudioendpointcontrol.cpp \
$$PWD/mfmetadatacontrol.cpp $$PWD/mfmetadatacontrol.cpp
!simulator { contains(config_test_widgets, yes):!simulator {
HEADERS += $$PWD/evr9videowindowcontrol.h HEADERS += $$PWD/evr9videowindowcontrol.h
SOURCES += $$PWD/evr9videowindowcontrol.cpp SOURCES += $$PWD/evr9videowindowcontrol.cpp
} }

View File

@@ -1,7 +1,11 @@
load(qt_module) load(qt_module)
TARGET = wmfengine TARGET = wmfengine
QT += multimedia-private network multimediawidgets-private QT += multimedia-private network
contains(config_test_widgets, yes) {
QT += multimediawidgets-private
DEFINES += HAVE_WIDGETS
}
PLUGIN_TYPE=mediaservice PLUGIN_TYPE=mediaservice
load(qt_plugin) load(qt_plugin)

View File

@@ -1,19 +1,30 @@
TEMPLATE = subdirs TEMPLATE = subdirs
CONFIG += ordered
library_qgsttools.subdir = $$IN_PWD/gsttools
library_qgsttools.depends = multimedia
library_qtmmwidgets.subdir = $$IN_PWD/multimediawidgets
library_qtmmwidgets.depends = multimedia
SUBDIRS += multimedia SUBDIRS += multimedia
contains(config_test_gstreamer, yes) { # Everything else depends on multimedia
SUBDIRS += library_qgsttools src_qgsttools.subdir = $$IN_PWD/gsttools
src_qgsttools.depends = multimedia
src_qtmmwidgets.subdir = $$IN_PWD/multimediawidgets
src_qtmmwidgets.depends = multimedia
src_plugins.subdir = $$IN_PWD/plugins
src_plugins.depends = multimedia
src_imports.subdir = $$IN_PWD/imports
src_imports.depends = multimedia
SUBDIRS += src_imports
# Optional bits
contains(config_test_gstreamer, yes):SUBDIRS += src_qgsttools
contains(config_test_widgets, yes) {
SUBDIRS += src_qtmmwidgets
# If widgets is around, plugins depends on widgets too (imports does not)
src_plugins.depends += src_qtmmwidgets
} }
SUBDIRS += library_qtmmwidgets SUBDIRS += src_plugins
SUBDIRS += imports
SUBDIRS += plugins

View File

@@ -36,6 +36,9 @@
); );
# Compile tests # Compile tests
%configtests = ( %configtests = (
# Widgets (to make things easier)
"widgets" => {message => "Disabling widget related code. To enable, make sure that QtWidgets exists."},
# Windows tests # Windows tests
"directshow" => {}, "directshow" => {},
"wmsdk" => {}, "wmsdk" => {},

View File

@@ -1,7 +1,7 @@
CONFIG += testcase CONFIG += testcase
TARGET = tst_qcamerabackend TARGET = tst_qcamerabackend
QT += multimedia-private multimediawidgets-private testlib QT += multimedia-private testlib
CONFIG += no_private_qt_headers_warning CONFIG += no_private_qt_headers_warning
# This is more of a system test # This is more of a system test

View File

@@ -59,10 +59,7 @@
#include <qmediaservice.h> #include <qmediaservice.h>
#include <qcamera.h> #include <qcamera.h>
#include <qcameraimagecapture.h> #include <qcameraimagecapture.h>
#include <qgraphicsvideoitem.h>
#include <qvideorenderercontrol.h> #include <qvideorenderercontrol.h>
#include <qvideowidget.h>
#include <qvideowindowcontrol.h>
QT_USE_NAMESPACE QT_USE_NAMESPACE

View File

@@ -1,4 +1,4 @@
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS += multimedia.pro SUBDIRS += multimedia.pro
contains(QT_CONFIG,multimediawidgets): SUBDIRS += multimediawidgets.pro contains(config_test_widgets, yes): SUBDIRS += multimediawidgets.pro