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  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QMediaControl Class

The QMediaControl class provides a base interface for media service controls. More...

 #include <QMediaControl>

Inherits: QObject.

Inherited by: QAudioDecoderControl, QAudioEncoderControl, QAudioEndpointSelector, QCameraCaptureBufferFormatControl, QCameraCaptureDestinationControl, QCameraControl, QCameraExposureControl, QCameraFeedbackControl, QCameraFlashControl, QCameraFocusControl, QCameraImageCaptureControl, QCameraImageProcessingControl, QCameraLocksControl, QCameraViewfinderSettingsControl, QCameraZoomControl, QImageEncoderControl, QMediaAudioProbeControl, QMediaAvailabilityControl, QMediaContainerControl, QMediaGaplessPlaybackControl, QMediaNetworkAccessControl, QMediaPlayerControl, QMediaRecorderControl, QMediaStreamsControl, QMediaVideoProbeControl, QMetaDataReaderControl, QMetaDataWriterControl, QRadioDataControl, QRadioTunerControl, QVideoDeviceControl, QVideoEncoderControl, QVideoRendererControl, QVideoWidgetControl, and QVideoWindowControl.

Public Functions

~QMediaControl()
  • 31 public functions inherited from QObject

Protected Functions

QMediaControl(QObject * parent = 0)
  • 9 protected functions inherited from QObject

Macros

Q_MEDIA_DECLARE_CONTROL( Class, IId)

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 2 signal inherited from QObject
  • 11 static public members inherited from QObject

Detailed Description

The QMediaControl class provides a base interface for media service controls.

Media controls provide an interface to individual features provided by a media service. Most services implement a principal control which exposes the core functionality of the service and a number of optional controls which expose any additional functionality.

A pointer to a control implemented by a media service can be obtained using the QMediaService::requestControl() member of QMediaService. If the service doesn't implement a control it will instead return a null pointer.

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

Alternatively if the IId of the control has been declared using Q_MEDIA_DECLARE_CONTROL the template version of QMediaService::requestControl() can be used to request the service without explicitly passing the IId or using qobject_cast().

 QMediaPlayerControl *control = mediaService->requestControl<QMediaPlayerControl *>();

Most application code will not interface directly with a media service's controls, instead the QMediaObject which owns the service acts as an intermediary between one or more controls and the application.

See also QMediaService and QMediaObject.

Member Function Documentation

QMediaControl::QMediaControl(QObject * parent = 0) [protected]

Constructs a media control with the given parent.

QMediaControl::~QMediaControl()

Destroys a media control.

Macro Documentation

Q_MEDIA_DECLARE_CONTROL( Class, IId)

The Q_MEDIA_DECLARE_CONTROL macro declares an IId for a Class that inherits from QMediaControl.

Declaring an IId for a QMediaControl allows an instance of that control to be requested from QMediaService::requestControl() without explicitly passing the IId.

 QMediaPlayerControl *control = mediaService->requestControl<QMediaPlayerControl *>();

See also QMediaService::requestControl().

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 5.0-snapshot
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