QMediaServiceclass provides a common base class for media service implementations. More…
Media services provide implementations of the functionality promised by media objects, and allow multiple providers to implement a
To provide the functionality of a
QMediaObjectmedia services implement
QMediaControlinterfaces. 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
QMediaControlimplementation 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
QMediaServiceProviderPlugininterface. Static services should implement the QMediaServiceProvider interface. In general, implementing a
QMediaServiceis outside of the scope of this documentation and support on the relevant mailing lists or IRC channels should be sought.
- class PySide2.QtMultimedia.QMediaService(parent)¶
- param parent:
Construct a media service with the given
parent. This class is meant as a base class for Multimedia services so this constructor is protected.
controlback to the service.
name – str
- Return type:
Returns a pointer to the media control implementing
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
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.