Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QMediaService Class Reference

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

 #include <QMediaService>

Inherits QObject.

Public Functions

~QMediaService ()
virtual void releaseControl ( QMediaControl * control ) = 0
virtual QMediaControl * requestControl ( const char * interface ) = 0
T requestControl ()
  • 29 public functions inherited from QObject

Protected Functions

QMediaService ( QObject * parent )
  • 7 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 signal inherited from QObject
  • 1 public variable inherited from QObject
  • 4 static public members inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

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.

Member Function Documentation

QMediaService::QMediaService ( QObject * parent ) [protected]

Construct a media service with the given parent. This class is meant as a base class for Multimedia services so this constructor is protected.

QMediaService::~QMediaService ()

Destroys a media service.

void QMediaService::releaseControl ( QMediaControl * control ) [pure virtual]

Releases a control back to the service.

QMediaControl * QMediaService::requestControl ( const char * interface ) [pure virtual]

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.

T QMediaService::requestControl ()

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.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtmobility-1.1
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web