The QMediaService class provides a common base class for media service implementations. More...
#include <QMediaService>
Inherits: QObject.
This class was introduced in Qt Mobility 1.0.
~QMediaService () | |
virtual void | releaseControl ( QMediaControl * control ) = 0 |
virtual QMediaControl * | requestControl ( const char * interface ) = 0 |
T | requestControl () |
QMediaService ( QObject * parent ) |
The QMediaService class provides a common base class for media service implementations.
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("com.nokia.Qt.QMediaPlayerControl/1.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.
See also QMediaObject, QMediaControl, QMediaServiceProvider, and QMediaServiceProviderPlugin.
Construct a media service with the given parent. This class is meant as a base class for Multimedia services so this constructor is protected.
Destroys a media service.
Releases a control back to the service.
This function was introduced in Qt Mobility 1.0.
Returns a pointer to the media control implementing interface.
If the service does not implement the control, or if it is unavailable a null pointer is returned instead.
Controls must be returned to the service when no longer needed using the releaseControl() function.
This function was introduced in Qt Mobility 1.0.
Returns a pointer to the media control of type T implemented by a media service.
If the service does not implement the control, or if it is unavailable a null pointer is returned instead.
Controls must be returned to the service when no longer needed using the releaseControl() function.
This function was introduced in Qt Mobility 1.0.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.