Updated plugins to use new plugin architecture
Changed QMediaPluginLoader to use QFactoryLoader instead of QPluginLoader and used metadata to get keys. Removed QAudioPluginLoader and changed audio classes to use instead use QMediaPluginLoader. The plugins must include the Q_PLUGIN_METADATA macro, and no longer use the Q_PLUGIN_EXPORT/Q_PLUGIN_EXPORT2 macros. A json file has been added for each plugin which can contain metadata which is available to the plugin loader before the plugin is actually loaded, and is used to read the keys for the plugin, e.g. supported services. QFactoryInterface will be deprecated and has been removed from all plugins. Change-Id: I035b82f9c9c65717bebf704d560ea8f891df21da Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
This commit is contained in:
@@ -55,7 +55,6 @@
|
||||
|
||||
#include <QtCore/qobject.h>
|
||||
#include <QtCore/qplugin.h>
|
||||
#include <QtCore/qfactoryinterface.h>
|
||||
|
||||
#include <qtmultimediadefs.h>
|
||||
|
||||
@@ -92,7 +91,7 @@ public:
|
||||
virtual void close() = 0;
|
||||
};
|
||||
|
||||
struct Q_MULTIMEDIA_EXPORT QMediaPlaylistIOInterface : public QFactoryInterface
|
||||
struct Q_MULTIMEDIA_EXPORT QMediaPlaylistIOInterface
|
||||
{
|
||||
virtual bool canRead(QIODevice *device, const QByteArray &format = QByteArray() ) const = 0;
|
||||
virtual bool canRead(const QUrl& location, const QByteArray &format = QByteArray()) const = 0;
|
||||
@@ -111,7 +110,7 @@ Q_DECLARE_INTERFACE(QMediaPlaylistIOInterface, QMediaPlaylistIOInterface_iid);
|
||||
class Q_MULTIMEDIA_EXPORT QMediaPlaylistIOPlugin : public QObject, public QMediaPlaylistIOInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QMediaPlaylistIOInterface:QFactoryInterface)
|
||||
Q_INTERFACES(QMediaPlaylistIOInterface)
|
||||
public:
|
||||
explicit QMediaPlaylistIOPlugin(QObject *parent = 0);
|
||||
virtual ~QMediaPlaylistIOPlugin();
|
||||
@@ -121,8 +120,6 @@ public:
|
||||
|
||||
virtual bool canWrite(QIODevice *device, const QByteArray &format) const = 0;
|
||||
|
||||
virtual QStringList keys() const = 0;
|
||||
|
||||
virtual QMediaPlaylistReader *createReader(QIODevice *device, const QByteArray &format = QByteArray()) = 0;
|
||||
virtual QMediaPlaylistReader *createReader(const QUrl& location, const QByteArray &format = QByteArray()) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user