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:
@@ -77,18 +77,6 @@ extern const CLSID CLSID_VideoInputDeviceCategory;
|
||||
|
||||
QT_USE_NAMESPACE
|
||||
|
||||
QStringList DSServicePlugin::keys() const
|
||||
{
|
||||
return QStringList()
|
||||
#ifdef QMEDIA_DIRECTSHOW_CAMERA
|
||||
<< QLatin1String(Q_MEDIASERVICE_CAMERA)
|
||||
#endif
|
||||
#ifdef QMEDIA_DIRECTSHOW_PLAYER
|
||||
<< QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER)
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
||||
QMediaService* DSServicePlugin::create(QString const& key)
|
||||
{
|
||||
#ifdef QMEDIA_DIRECTSHOW_CAMERA
|
||||
@@ -100,7 +88,6 @@ QMediaService* DSServicePlugin::create(QString const& key)
|
||||
return new DirectShowPlayerService;
|
||||
#endif
|
||||
|
||||
qDebug() << "unsupported key:" << key;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -208,5 +195,3 @@ void DSServicePlugin::updateDevices() const
|
||||
}
|
||||
#endif
|
||||
|
||||
Q_EXPORT_PLUGIN2(qtmedia_dsengine, DSServicePlugin);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user