qtmobility/src/multimedia/qmediaserviceprovider.cpp
changeset 1 2b40d63a9c3d
child 4 90517678cc4f
equal deleted inserted replaced
0:cfcbf08528c4 1:2b40d63a9c3d
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the Qt Mobility Components.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** No Commercial Usage
       
    11 ** This file contains pre-release code and may not be distributed.
       
    12 ** You may use this file in accordance with the terms and conditions
       
    13 ** contained in the Technology Preview License Agreement accompanying
       
    14 ** this package.
       
    15 **
       
    16 ** GNU Lesser General Public License Usage
       
    17 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    18 ** General Public License version 2.1 as published by the Free Software
       
    19 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    20 ** packaging of this file.  Please review the following information to
       
    21 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    23 **
       
    24 ** In addition, as a special exception, Nokia gives you certain additional
       
    25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 **
       
    37 **
       
    38 ** $QT_END_LICENSE$
       
    39 **
       
    40 ****************************************************************************/
       
    41 
       
    42 #include <QtCore/qdebug.h>
       
    43 #include <QtCore/qmap.h>
       
    44 
       
    45 #include <qmediaservice.h>
       
    46 #include <qmediaserviceprovider.h>
       
    47 #include <qmediaserviceproviderplugin.h>
       
    48 #include <qmediapluginloader_p.h>
       
    49 #include <qmediaplayer.h>
       
    50 
       
    51 QTM_BEGIN_NAMESPACE
       
    52 
       
    53 class QMediaServiceProviderHintPrivate : public QSharedData
       
    54 {
       
    55 public:
       
    56     QMediaServiceProviderHintPrivate(QMediaServiceProviderHint::Type type)
       
    57         :type(type), features(0)
       
    58     {
       
    59     }
       
    60 
       
    61     QMediaServiceProviderHintPrivate(const QMediaServiceProviderHintPrivate &other)
       
    62         :QSharedData(other),
       
    63         type(other.type),
       
    64         device(other.device),
       
    65         mimeType(other.mimeType),
       
    66         codecs(other.codecs),
       
    67         features(other.features)
       
    68     {
       
    69     }
       
    70 
       
    71     ~QMediaServiceProviderHintPrivate()
       
    72     {
       
    73     }
       
    74 
       
    75     QMediaServiceProviderHint::Type type;
       
    76     QByteArray device;
       
    77     QString mimeType;
       
    78     QStringList codecs;
       
    79     QMediaServiceProviderHint::Features features;
       
    80 };
       
    81 
       
    82 /*!
       
    83     \class QMediaServiceProviderHint
       
    84     \preliminary
       
    85     \brief The QMediaServiceProviderHint class describes what is required of a QMediaService.
       
    86     
       
    87     \ingroup multimedia-serv
       
    88 
       
    89     The QMediaServiceProvider class uses hints to select an appropriate media service.
       
    90 */
       
    91 
       
    92 /*!
       
    93     \enum QMediaServiceProviderHint::Feature
       
    94 
       
    95     Enumerates features a media service may provide.
       
    96 
       
    97     \value LowLatencyPlayback
       
    98             The service is expected to play simple audio formats,
       
    99             but playback should start without significant delay.
       
   100             Such playback service can be used for beeps, ringtones, etc.
       
   101 
       
   102     \value RecordingSupport
       
   103             The service provides audio or video recording functions.
       
   104 */
       
   105 
       
   106 /*!
       
   107     \enum QMediaServiceProviderHint::Type
       
   108 
       
   109     Enumerates the possible types of media service provider hint.
       
   110 
       
   111     \value Null               En empty hint, use the default service.
       
   112     \value ContentType        Select media service most suitable for certain content type.
       
   113     \value Device             Select media service which supports certain device.
       
   114     \value SupportedFeatures  Select media service supporting the set of optional features.
       
   115 */
       
   116 
       
   117 
       
   118 /*!
       
   119     Constructs an empty media service provider hint.
       
   120 */
       
   121 QMediaServiceProviderHint::QMediaServiceProviderHint()
       
   122     :d(new QMediaServiceProviderHintPrivate(Null))
       
   123 {
       
   124 }
       
   125 
       
   126 /*!
       
   127     Constructs a ContentType media service provider hint.
       
   128 
       
   129     This type of hint describes a service that is able to play content of a specific MIME \a type
       
   130     encoded with one or more of the listed \a codecs.
       
   131 */
       
   132 QMediaServiceProviderHint::QMediaServiceProviderHint(const QString &type, const QStringList& codecs)
       
   133     :d(new QMediaServiceProviderHintPrivate(ContentType))
       
   134 {
       
   135     d->mimeType = type;
       
   136     d->codecs = codecs;
       
   137 }
       
   138 
       
   139 /*!
       
   140   Constructs a Device media service provider hint.
       
   141 
       
   142   This type of hint describes a media service that utilizes a specific \a device.
       
   143 */
       
   144 QMediaServiceProviderHint::QMediaServiceProviderHint(const QByteArray &device)
       
   145     :d(new QMediaServiceProviderHintPrivate(Device))
       
   146 {
       
   147     d->device = device;
       
   148 }
       
   149 
       
   150 /*!
       
   151     Constructs a SupportedFeatures media service provider hint.
       
   152 
       
   153     This type of hint describes a service which supports a specific set of \a features.
       
   154 */
       
   155 QMediaServiceProviderHint::QMediaServiceProviderHint(QMediaServiceProviderHint::Features features)
       
   156     :d(new QMediaServiceProviderHintPrivate(SupportedFeatures))
       
   157 {
       
   158     d->features = features;
       
   159 }
       
   160 
       
   161 /*!
       
   162     Constructs a copy of the media service provider hint \a other.
       
   163 */
       
   164 QMediaServiceProviderHint::QMediaServiceProviderHint(const QMediaServiceProviderHint &other)
       
   165     :d(other.d)
       
   166 {
       
   167 }
       
   168 
       
   169 /*!
       
   170     Destroys a media service provider hint.
       
   171 */
       
   172 QMediaServiceProviderHint::~QMediaServiceProviderHint()
       
   173 {
       
   174 }
       
   175 
       
   176 /*!
       
   177     Assigns the value \a other to a media service provider hint.
       
   178 */
       
   179 QMediaServiceProviderHint& QMediaServiceProviderHint::operator=(const QMediaServiceProviderHint &other)
       
   180 {
       
   181     d = other.d;
       
   182     return *this;
       
   183 }
       
   184 
       
   185 /*!
       
   186     Identifies if \a other is of equal value to a media service provider hint.
       
   187 
       
   188     Returns true if the hints are equal, and false if they are not.
       
   189 */
       
   190 bool QMediaServiceProviderHint::operator == (const QMediaServiceProviderHint &other) const
       
   191 {
       
   192     return (d == other.d) ||
       
   193            (d->type == other.d->type &&
       
   194             d->device == other.d->device &&
       
   195             d->mimeType == other.d->mimeType &&
       
   196             d->codecs == other.d->codecs &&
       
   197             d->features == other.d->features);
       
   198 }
       
   199 
       
   200 /*!
       
   201     Identifies if \a other is not of equal value to a media service provider hint.
       
   202 
       
   203     Returns true if the hints are not equal, and false if they are.
       
   204 */
       
   205 bool QMediaServiceProviderHint::operator != (const QMediaServiceProviderHint &other) const
       
   206 {
       
   207     return !(*this == other);
       
   208 }
       
   209 
       
   210 /*!
       
   211     Returns true if a media service provider is null.
       
   212 */
       
   213 bool QMediaServiceProviderHint::isNull() const
       
   214 {
       
   215     return d->type == Null;
       
   216 }
       
   217 
       
   218 /*!
       
   219     Returns the type of a media service provider hint.
       
   220 */
       
   221 QMediaServiceProviderHint::Type QMediaServiceProviderHint::type() const
       
   222 {
       
   223     return d->type;
       
   224 }
       
   225 
       
   226 /*!
       
   227     Returns the mime type of the media a service is expected to be able play.
       
   228 */
       
   229 QString QMediaServiceProviderHint::mimeType() const
       
   230 {
       
   231     return d->mimeType;
       
   232 }
       
   233 
       
   234 /*!
       
   235     Returns a list of codes a media service is expected to be able to decode.
       
   236 */
       
   237 QStringList QMediaServiceProviderHint::codecs() const
       
   238 {
       
   239     return d->codecs;
       
   240 }
       
   241 
       
   242 /*!
       
   243     Returns the name of a device a media service is expected to utilize.
       
   244 */
       
   245 QByteArray QMediaServiceProviderHint::device() const
       
   246 {
       
   247     return d->device;
       
   248 }
       
   249 
       
   250 /*!
       
   251     Returns a set of features a media service is expected to provide.
       
   252 */
       
   253 QMediaServiceProviderHint::Features QMediaServiceProviderHint::features() const
       
   254 {
       
   255     return d->features;
       
   256 }
       
   257 
       
   258 
       
   259 Q_GLOBAL_STATIC_WITH_ARGS(QMediaPluginLoader, loader,
       
   260         (QMediaServiceProviderFactoryInterface_iid, QLatin1String("/mediaservice"), Qt::CaseInsensitive))
       
   261 
       
   262 
       
   263 class QPluginServiceProvider : public QMediaServiceProvider
       
   264 {
       
   265     QMap<QMediaService*, QMediaServiceProviderPlugin*> pluginMap;
       
   266 
       
   267 public:
       
   268     QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint)
       
   269     {
       
   270         QString key(type);
       
   271 
       
   272         QList<QMediaServiceProviderPlugin *>plugins;
       
   273         foreach (QObject *obj, loader()->instances(key)) {
       
   274             QMediaServiceProviderPlugin *plugin =
       
   275                 qobject_cast<QMediaServiceProviderPlugin*>(obj);
       
   276             if (plugin)
       
   277                 plugins << plugin;
       
   278         }
       
   279 
       
   280         if (!plugins.isEmpty()) {
       
   281             QMediaServiceProviderPlugin *plugin = 0;
       
   282 
       
   283             switch (hint.type()) {
       
   284             case QMediaServiceProviderHint::Null:
       
   285                 plugin = plugins[0];
       
   286                 //special case for media player, if low latency was not asked,
       
   287                 //prefer services not offering it, since they are likely to support
       
   288                 //more formats
       
   289                 if (type == QByteArray(Q_MEDIASERVICE_MEDIAPLAYER)) {
       
   290                     foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
       
   291                         QMediaServiceFeaturesInterface *iface =
       
   292                                 qobject_cast<QMediaServiceFeaturesInterface*>(currentPlugin);
       
   293 
       
   294                         if (!iface || !(iface->supportedFeatures(type) &
       
   295                                         QMediaServiceProviderHint::LowLatencyPlayback)) {
       
   296                             plugin = currentPlugin;
       
   297                             break;
       
   298                         }
       
   299 
       
   300                     }
       
   301                 }
       
   302                 break;
       
   303             case QMediaServiceProviderHint::SupportedFeatures:
       
   304                 plugin = plugins[0];
       
   305                 foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
       
   306                     QMediaServiceFeaturesInterface *iface =
       
   307                             qobject_cast<QMediaServiceFeaturesInterface*>(currentPlugin);
       
   308 
       
   309                     if (iface) {
       
   310                         if ((iface->supportedFeatures(type) & hint.features()) == hint.features()) {
       
   311                             plugin = currentPlugin;
       
   312                             break;
       
   313                         }
       
   314                     }
       
   315                 }
       
   316                 break;
       
   317             case QMediaServiceProviderHint::Device: {
       
   318                     foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
       
   319                         QMediaServiceSupportedDevicesInterface *iface =
       
   320                                 qobject_cast<QMediaServiceSupportedDevicesInterface*>(currentPlugin);
       
   321 
       
   322                         if (!iface) {
       
   323                             // the plugin may support the device,
       
   324                             // but this choice still can be overridden
       
   325                             plugin = currentPlugin;
       
   326                         } else {
       
   327                             if (iface->devices(type).contains(hint.device())) {
       
   328                                 plugin = currentPlugin;
       
   329                                 break;
       
   330                             }
       
   331                         }
       
   332                     }
       
   333                 }
       
   334                 break;
       
   335             case QMediaServiceProviderHint::ContentType: {
       
   336                     QtMedia::SupportEstimate estimate = QtMedia::NotSupported;
       
   337                     foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
       
   338                         QtMedia::SupportEstimate currentEstimate = QtMedia::MaybeSupported;
       
   339                         QMediaServiceSupportedFormatsInterface *iface =
       
   340                                 qobject_cast<QMediaServiceSupportedFormatsInterface*>(currentPlugin);
       
   341 
       
   342                         if (iface)
       
   343                             currentEstimate = iface->hasSupport(hint.mimeType(), hint.codecs());
       
   344 
       
   345                         if (currentEstimate > estimate) {
       
   346                             estimate = currentEstimate;
       
   347                             plugin = currentPlugin;
       
   348 
       
   349                             if (currentEstimate == QtMedia::PreferedService)
       
   350                                 break;
       
   351                         }
       
   352                     }
       
   353                 }
       
   354                 break;
       
   355             }
       
   356 
       
   357             if (plugin != 0) {
       
   358                 QMediaService *service = plugin->create(key);
       
   359                 if (service != 0)
       
   360                     pluginMap.insert(service, plugin);
       
   361 
       
   362                 return service;
       
   363             }
       
   364         }
       
   365 
       
   366         qWarning() << "defaultServiceProvider::requestService(): no service found for -" << key;
       
   367         return 0;
       
   368     }
       
   369 
       
   370     void releaseService(QMediaService *service)
       
   371     {
       
   372         if (service != 0) {
       
   373             QMediaServiceProviderPlugin *plugin = pluginMap.take(service);
       
   374 
       
   375             if (plugin != 0)
       
   376                 plugin->release(service);
       
   377         }
       
   378     }
       
   379 
       
   380     QtMedia::SupportEstimate hasSupport(const QByteArray &serviceType,
       
   381                                      const QString &mimeType,
       
   382                                      const QStringList& codecs,
       
   383                                      int flags) const
       
   384     {
       
   385         QList<QObject*> instances = loader()->instances(serviceType);
       
   386 
       
   387         if (instances.isEmpty())
       
   388             return QtMedia::NotSupported;
       
   389 
       
   390         bool allServicesProvideInterface = true;
       
   391         QtMedia::SupportEstimate supportEstimate = QtMedia::NotSupported;
       
   392 
       
   393         foreach(QObject *obj, instances) {
       
   394             QMediaServiceSupportedFormatsInterface *iface =
       
   395                     qobject_cast<QMediaServiceSupportedFormatsInterface*>(obj);
       
   396 
       
   397             //if low latency playback was asked, skip services known
       
   398             //not to provide low latency playback
       
   399             if (flags & QMediaPlayer::LowLatency) {
       
   400                 QMediaServiceFeaturesInterface *iface =
       
   401                         qobject_cast<QMediaServiceFeaturesInterface*>(obj);
       
   402 
       
   403                 if (iface && !(iface->supportedFeatures(serviceType) & QMediaServiceProviderHint::LowLatencyPlayback))
       
   404                     continue;
       
   405             }
       
   406 
       
   407             if (iface)
       
   408                 supportEstimate = qMax(supportEstimate, iface->hasSupport(mimeType, codecs));
       
   409             else
       
   410                 allServicesProvideInterface = false;
       
   411         }
       
   412 
       
   413         //don't return PreferedService
       
   414         supportEstimate = qMin(supportEstimate, QtMedia::ProbablySupported);
       
   415 
       
   416         //Return NotSupported only if no services are available of serviceType
       
   417         //or all the services returned NotSupported, otherwise return at least MaybeSupported
       
   418         if (!allServicesProvideInterface)
       
   419             supportEstimate = qMax(QtMedia::MaybeSupported, supportEstimate);
       
   420 
       
   421         return supportEstimate;
       
   422     }
       
   423 
       
   424     QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const
       
   425     {
       
   426         QList<QObject*> instances = loader()->instances(serviceType);
       
   427 
       
   428         QStringList supportedTypes;
       
   429 
       
   430         foreach(QObject *obj, instances) {
       
   431             QMediaServiceSupportedFormatsInterface *iface =
       
   432                     qobject_cast<QMediaServiceSupportedFormatsInterface*>(obj);
       
   433 
       
   434             // If low latency playback was asked for, skip MIME types from services known
       
   435             // not to provide low latency playback
       
   436             if (flags & QMediaPlayer::LowLatency) {
       
   437                 QMediaServiceFeaturesInterface *iface =
       
   438                         qobject_cast<QMediaServiceFeaturesInterface*>(obj);
       
   439 
       
   440                 if (iface && !(iface->supportedFeatures(serviceType) & QMediaServiceProviderHint::LowLatencyPlayback))
       
   441                     continue;
       
   442             }
       
   443 
       
   444             if (iface) {
       
   445                 supportedTypes << iface->supportedMimeTypes();
       
   446             }
       
   447         }
       
   448 
       
   449         // Multiple services may support the same MIME type
       
   450         supportedTypes.removeDuplicates();
       
   451 
       
   452         return supportedTypes;
       
   453     }
       
   454 
       
   455     QList<QByteArray> devices(const QByteArray &serviceType) const
       
   456     {
       
   457         QList<QByteArray> res;
       
   458 
       
   459         foreach(QObject *obj, loader()->instances(serviceType)) {
       
   460             QMediaServiceSupportedDevicesInterface *iface =
       
   461                     qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
       
   462 
       
   463             if (iface) {
       
   464                 res.append(iface->devices(serviceType));
       
   465             }
       
   466         }
       
   467 
       
   468         return res;
       
   469     }
       
   470 
       
   471     QString deviceDescription(const QByteArray &serviceType, const QByteArray &device)
       
   472     {
       
   473         foreach(QObject *obj, loader()->instances(serviceType)) {
       
   474             QMediaServiceSupportedDevicesInterface *iface =
       
   475                     qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
       
   476 
       
   477             if (iface) {
       
   478                 if (iface->devices(serviceType).contains(device))
       
   479                     return iface->deviceDescription(serviceType, device);
       
   480             }
       
   481         }
       
   482 
       
   483         return QString();
       
   484     }
       
   485 };
       
   486 
       
   487 Q_GLOBAL_STATIC(QPluginServiceProvider, pluginProvider);
       
   488 
       
   489 /*!
       
   490     \class QMediaServiceProvider
       
   491     \preliminary
       
   492     \brief The QMediaServiceProvider class provides an abstract allocator for media services.
       
   493 */
       
   494 
       
   495 /*!
       
   496     \fn QMediaServiceProvider::requestService(const QByteArray &type, const QMediaServiceProviderHint &hint)
       
   497 
       
   498     Requests an instance of a \a type service which best matches the given \a hint.
       
   499 
       
   500     Returns a pointer to the requested service, or a null pointer if there is no suitable service.
       
   501 
       
   502     The returned service must be released with releaseService when it is finished with.
       
   503 */
       
   504 
       
   505 /*!
       
   506     \fn QMediaServiceProvider::releaseService(QMediaService *service)
       
   507 
       
   508     Releases a media \a service requested with requestService().
       
   509 */
       
   510 
       
   511 /*!
       
   512     \fn QtMedia::SupportEstimate QMediaServiceProvider::hasSupport(const QByteArray &serviceType, const QString &mimeType, const QStringList& codecs, int flags) const
       
   513 
       
   514     Returns how confident a media service provider is that is can provide a \a serviceType
       
   515     service that is able to play media of a specific \a mimeType that is encoded using the listed
       
   516     \a codecs while adhearing to constraints identified in \a flags.
       
   517 */
       
   518 QtMedia::SupportEstimate QMediaServiceProvider::hasSupport(const QByteArray &serviceType,
       
   519                                                         const QString &mimeType,
       
   520                                                         const QStringList& codecs,
       
   521                                                         int flags) const
       
   522 {
       
   523     Q_UNUSED(serviceType);
       
   524     Q_UNUSED(mimeType);
       
   525     Q_UNUSED(codecs);
       
   526     Q_UNUSED(flags);
       
   527 
       
   528     return QtMedia::MaybeSupported;
       
   529 }
       
   530 
       
   531 /*!
       
   532     \fn QStringList QMediaServiceProvider::supportedMimeTypes(const QByteArray &serviceType, int flags) const
       
   533 
       
   534     Returns a list of MIME types supported by the service provider for the specified \a serviceType.
       
   535 
       
   536     The resultant list is restricted to MIME types which can be supported given the constraints in \a flags.
       
   537 */
       
   538 QStringList QMediaServiceProvider::supportedMimeTypes(const QByteArray &serviceType, int flags) const
       
   539 {
       
   540     Q_UNUSED(serviceType);
       
   541     Q_UNUSED(flags);
       
   542 
       
   543     return QStringList();
       
   544 }
       
   545 
       
   546 /*!
       
   547   Returns the list of devices related to \a service type.
       
   548 */
       
   549 QList<QByteArray> QMediaServiceProvider::devices(const QByteArray &service) const
       
   550 {
       
   551     Q_UNUSED(service);
       
   552     return QList<QByteArray>();
       
   553 }
       
   554 
       
   555 /*!
       
   556     Returns the description of \a device related to \a serviceType,
       
   557     suitable to be displayed to user.
       
   558 */
       
   559 QString QMediaServiceProvider::deviceDescription(const QByteArray &serviceType, const QByteArray &device)
       
   560 {
       
   561     Q_UNUSED(serviceType);
       
   562     Q_UNUSED(device);
       
   563     return QString();
       
   564 }
       
   565 
       
   566 /*!
       
   567     Returns a default provider of media services.
       
   568 */
       
   569 QMediaServiceProvider *QMediaServiceProvider::defaultServiceProvider()
       
   570 {
       
   571     return pluginProvider();
       
   572 }
       
   573 
       
   574 /*!
       
   575     \class QMediaServiceProviderPlugin
       
   576     \preliminary
       
   577     \brief The QMediaServiceProviderPlugin class interface provides an interface for QMediaService
       
   578     plug-ins.
       
   579 
       
   580     A media service provider plug-in may implement one or more of
       
   581     QMediaServiceSupportedFormatsInterface, QMediaServiceSupportedDevicesInterface,
       
   582     and QMediaServiceFeaturesInterface to identify the features it supports.
       
   583 */
       
   584 
       
   585 /*!
       
   586     \fn QMediaServiceProviderPlugin::keys() const
       
   587 
       
   588     Returns a list of keys for media services a plug-in can create.
       
   589 */
       
   590 
       
   591 /*!
       
   592     \fn QMediaServiceProviderPlugin::create(const QString &key)
       
   593 
       
   594     Constructs a new instance of the QMediaService identified by \a key.
       
   595 
       
   596     The QMediaService returned must be destroyed with release().
       
   597 */
       
   598 
       
   599 /*!
       
   600     \fn QMediaServiceProviderPlugin::release(QMediaService *service)
       
   601 
       
   602     Destroys a media \a service constructed with create().
       
   603 */
       
   604 
       
   605 
       
   606 /*!
       
   607     \class QMediaServiceSupportedFormatsInterface
       
   608     \brief The QMediaServiceSupportedFormatsInterface class interface
       
   609     identifies if a media service plug-in supports a media format.
       
   610 
       
   611     A QMediaServiceProviderPlugin may implement this interface.
       
   612 */
       
   613 
       
   614 /*!
       
   615     \fn QMediaServiceSupportedFormatsInterface::~QMediaServiceSupportedFormatsInterface()
       
   616 
       
   617     Destroys a media service supported formats interface.
       
   618 */
       
   619 
       
   620 /*!
       
   621     \fn QMediaServiceSupportedFormatsInterface::hasSupport(const QString &mimeType, const QStringList& codecs) const
       
   622 
       
   623     Returns the level of support a media service plug-in has for a \a mimeType and set of \a codecs.
       
   624 */
       
   625 
       
   626 /*!
       
   627     \fn QMediaServiceSupportedFormatsInterface::supportedMimeTypes() const
       
   628 
       
   629     Returns a list of MIME types supported by the media service plug-in.
       
   630 */
       
   631 
       
   632 /*!
       
   633     \class QMediaServiceSupportedDevicesInterface
       
   634     \brief The QMediaServiceSupportedDevicesInterface class interface
       
   635     identifies the devices supported by a media service plug-in.
       
   636 
       
   637     A QMediaServiceProviderPlugin may implement this interface.
       
   638 */
       
   639 
       
   640 /*!
       
   641     \fn QMediaServiceSupportedDevicesInterface::~QMediaServiceSupportedDevicesInterface()
       
   642 
       
   643     Destroys a media service supported devices interface.
       
   644 */
       
   645 
       
   646 /*!
       
   647     \fn QMediaServiceSupportedDevicesInterface::devices(const QByteArray &service) const
       
   648 
       
   649     Returns a list of devices supported by a plug-in \a service.
       
   650 */
       
   651 
       
   652 /*!
       
   653     \fn QMediaServiceSupportedDevicesInterface::deviceDescription(const QByteArray &service, const QByteArray &device)
       
   654 
       
   655     Returns a description of a \a device supported by a plug-in \a service.
       
   656 */
       
   657 
       
   658 /*!
       
   659     \class QMediaServiceFeaturesInterface
       
   660     \brief The QMediaServiceFeaturesInterface class interface identifies
       
   661     features supported by a media service plug-in.
       
   662 
       
   663     A QMediaServiceProviderPlugin may implement this interface.
       
   664 */
       
   665 
       
   666 /*!
       
   667     \fn QMediaServiceFeaturesInterface::~QMediaServiceFeaturesInterface()
       
   668 
       
   669     Destroys a media service features interface.
       
   670 */
       
   671 /*!
       
   672     \fn QMediaServiceFeaturesInterface::supportedFeatures(const QByteArray &service) const
       
   673 
       
   674     Returns a set of features supported by a plug-in \a service.
       
   675 */
       
   676 
       
   677 #include "moc_qmediaserviceprovider.cpp"
       
   678 #include "moc_qmediaserviceproviderplugin.cpp"
       
   679 QTM_END_NAMESPACE
       
   680