QMediaService Class

The QMediaService class provides a common base class for media service implementations. More...

Header: #include <QMediaService>
qmake: QT += multimedia
Inherits: QObject

This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Detailed Description

Media services provide implementations of the functionality promised by media objects, and allow multiple providers to implement a QMediaObject.

To provide the functionality of a QMediaObject media services implement QMediaControl interfaces. Services typically implement one core media control which provides the core feature of a media object, and some number of additional controls which provide either optional features of the media object, or features of a secondary media object or peripheral object.

A pointer to media service's QMediaControl implementation can be obtained by passing the control's interface name to the requestControl() function.

 QMediaPlayerControl *control = qobject_cast<QMediaPlayerControl *>(
         mediaService->requestControl("org.qt-project.qt.mediaplayercontrol/5.0"));

Media objects can use services loaded dynamically from plug-ins or implemented statically within an applications. Plug-in based services should also implement the QMediaServiceProviderPlugin interface. Static services should implement the QMediaServiceProvider interface. In general, implementing a QMediaService is outside of the scope of this documentation and support on the relevant mailing lists or IRC channels should be sought.

See also QMediaObject and QMediaControl.