DESTDIR = $$QT.multimedia.imports/$$TARGETPATH
target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+LIBS += -lQtMultimediaQuick_p
+
HEADERS += \
qdeclarativeaudio_p.h \
qdeclarativemediabase_p.h \
qdeclarativemediametadata_p.h \
qdeclarativevideooutput_p.h \
- qsgvideonode_p.h \
qsgvideonode_i420.h \
qsgvideonode_rgb.h \
qdeclarativeradio_p.h \
qdeclarativeaudio.cpp \
qdeclarativemediabase.cpp \
qdeclarativevideooutput.cpp \
- qsgvideonode.cpp \
qsgvideonode_i420.cpp \
qsgvideonode_rgb.cpp \
qdeclarativeradio.cpp \
****************************************************************************/
#include "qdeclarativevideooutput_p.h"
-#include "qsgvideonode_p.h"
+#include <private/qsgvideonode_p.h>
#include "qsgvideonode_i420.h"
#include "qsgvideonode_rgb.h"
#include <QtMultimedia/qmediaservice.h>
#include <QtMultimedia/qvideorenderercontrol.h>
#include <QtMultimedia/qvideosurfaceformat.h>
-
+#include <private/qmediapluginloader_p.h>
#include <QtCore/qmetaobject.h>
QT_BEGIN_NAMESPACE
+Q_GLOBAL_STATIC_WITH_ARGS(QMediaPluginLoader, videoNodeFactoryLoader,
+ (QSGVideoNodeFactory_iid, QLatin1String("video"), Qt::CaseInsensitive))
+
class QSGVideoItemSurface : public QAbstractVideoSurface
{
public:
connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
this, SLOT(_q_updateNativeSize(QVideoSurfaceFormat)), Qt::QueuedConnection);
+ foreach (QObject *instance, videoNodeFactoryLoader()->instances(QSGVideoNodeFactoryPluginKey)) {
+ QSGVideoNodeFactory* plugin = qobject_cast<QSGVideoNodeFactory*>(instance);
+ if (plugin) {
+ m_videoNodeFactories.append(plugin);
+ }
+ }
+
+ // Append existing node factories as fallback if we have no plugins
m_videoNodeFactories.append(new QSGVideoNodeFactory_I420);
m_videoNodeFactories.append(new QSGVideoNodeFactory_RGB);
}
#include <QtCore/qsharedpointer.h>
#include <QtCore/qmutex.h>
-#include "qsgvideonode_p.h"
+#include <private/qsgvideonode_p.h>
QT_BEGIN_NAMESPACE
return 0;
}
+QStringList QSGVideoNodeFactory_I420::keys() const
+{
+ return QStringList() << QSGVideoNodeFactoryPluginKey;
+}
+
class QSGVideoMaterialShader_YUV420 : public QSGMaterialShader
{
#ifndef QSGVIDEONODE_I420_H
#define QSGVIDEONODE_I420_H
-#include "qsgvideonode_p.h"
+#include <private/qsgvideonode_p.h>
#include <QtMultimedia/qvideosurfaceformat.h>
class QSGVideoMaterial_YUV420;
public:
QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const;
QSGVideoNode *createNode(const QVideoSurfaceFormat &format);
+ QStringList keys() const;
};
return 0;
}
+QStringList QSGVideoNodeFactory_RGB::keys() const
+{
+ return QStringList() << QSGVideoNodeFactoryPluginKey;
+}
+
class QSGVideoMaterialShader_RGB : public QSGMaterialShader
{
#ifndef QSGVIDEONODE_RGB_H
#define QSGVIDEONODE_RGB_H
-#include "qsgvideonode_p.h"
+#include <private/qsgvideonode_p.h>
#include <QtMultimedia/qvideosurfaceformat.h>
class QSGVideoMaterial_RGB;
public:
QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const;
QSGVideoNode *createNode(const QVideoSurfaceFormat &format);
+ QStringList keys() const;
};
#define QSGVIDEONODE_P_H
#include <QtQuick/qsgnode.h>
+#include <private/qtmultimediaquickdefs_p.h>
#include <QtMultimedia/qvideoframe.h>
#include <QtMultimedia/qvideosurfaceformat.h>
#include <QtGui/qopenglfunctions.h>
+#include <QtCore/qfactoryinterface.h>
-class QSGVideoNode : public QSGGeometryNode
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+const QLatin1String QSGVideoNodeFactoryPluginKey("sgvideonodes");
+
+class Q_MULTIMEDIAQUICK_EXPORT QSGVideoNode : public QSGGeometryNode
{
public:
QSGVideoNode();
int m_orientation;
};
-class QSGVideoNodeFactory {
+class QSGVideoNodeFactory : public QFactoryInterface {
public:
virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const = 0;
virtual QSGVideoNode *createNode(const QVideoSurfaceFormat &format) = 0;
};
+#define QSGVideoNodeFactory_iid "com.nokia.Qt.QSGVideoNodeFactory"
+Q_DECLARE_INTERFACE(QSGVideoNodeFactory, QSGVideoNodeFactory_iid)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
#endif // QSGVIDEONODE_H
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Qt Toolkit.
+**
+** $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$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#ifndef QMULTIMEDIAQUICKDEFS_P_H
+#define QMULTIMEDIAQUICKDEFS_P_H
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_HEADER
+
+#if defined(Q_OS_WIN)
+# if defined(QT_NODLL)
+# undef QT_MAKEDLL
+# undef QT_DLL
+# elif defined(QT_MAKEDLL)
+# if defined(QT_DLL)
+# undef QT_DLL
+# endif
+# if defined(QT_BUILD_QTMM_QUICK_LIB)
+# define Q_MULTIMEDIAQUICK_EXPORT Q_DECL_EXPORT
+# else
+# define Q_MULTIMEDIAQUICK_EXPORT Q_DECL_IMPORT
+# endif
+# elif defined(QT_DLL) /* use a Qt DLL library */
+# define Q_MULTIMEDIAQUICK_EXPORT Q_DECL_IMPORT
+# endif
+#endif
+
+#if !defined(Q_MULTIMEDIAQUICK_EXPORT)
+# if defined(QT_SHARED)
+# define Q_MULTIMEDIAQUICK_EXPORT Q_DECL_EXPORT
+# else
+# define Q_MULTIMEDIAQUICK_EXPORT
+# endif
+#endif
+
+QT_END_HEADER
+
+
+#endif // QMULTIMEDIAQUICKDEFS_P_H
+
#include "qsgvideonode_p.h"
+QT_BEGIN_NAMESPACE
+
QSGVideoNode::QSGVideoNode()
: m_orientation(-1)
{
markDirty(DirtyGeometry);
}
+
+QT_END_NAMESPACE
--- /dev/null
+load(qt_module)
+
+TEMPLATE = lib
+
+TARGET = QtMultimediaQuick_p
+QPRO_PWD = $$PWD
+QT = core quick multimedia-private
+
+!static:DEFINES += QT_MAKEDLL
+
+DEFINES += QT_BUILD_QTMM_QUICK_LIB
+
+# Header files must go inside source directory of a module
+# to be installed by syncqt.
+INCLUDEPATH += ../multimedia/qtmultimediaquicktools_headers/
+DEPENDPATH += ../multimedia/qtmultimediaquicktools_headers/
+
+PRIVATE_HEADERS += \
+ qsgvideonode_p.h \
+ qtmultimediaquickdefs_p.h
+
+SOURCES += \
+ qsgvideonode_p.cpp
+
+HEADERS += $$PRIVATE_HEADERS
+
+DESTDIR = $$QT.multimedia.libs
+target.path = $$[QT_INSTALL_LIBS]
+
+INSTALLS += target
src_qgsttools.subdir = gsttools
src_qgsttools.depends = multimedia
+src_qtmultimediaquicktools.subdir = qtmultimediaquicktools
+src_qtmultimediaquicktools.depends = multimedia
+
src_qtmmwidgets.subdir = multimediawidgets
src_qtmmwidgets.depends = multimedia
src_plugins.depends = multimedia
src_imports.subdir = imports
-src_imports.depends = multimedia
+src_imports.depends = multimedia src_qtmultimediaquicktools
-SUBDIRS += src_imports
+SUBDIRS += \
+ src_qtmultimediaquicktools \
+ src_imports
# Optional bits
contains(config_test_gstreamer, yes):SUBDIRS += src_qgsttools