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  · 

QMediaObject Class

The QMediaObject class provides a common base for multimedia objects. More...

 #include <QMediaObject>

Inherits: QObject.

Inherited by: QAudioDecoder, QCamera, QMediaPlayer, and QRadioTuner.

Properties

  • 1 property inherited from QObject

Public Functions

~QMediaObject()
virtual QtMultimedia::AvailabilityError availabilityError() const
QStringList availableMetaData() const
virtual bool bind(QObject * object)
virtual bool isAvailable() const
bool isMetaDataAvailable() const
QVariant metaData(const QString & key) const
int notifyInterval() const
virtual QMediaService * service() const
void setNotifyInterval(int milliSeconds)
virtual void unbind(QObject * object)
  • 31 public functions inherited from QObject

Signals

void availabilityChanged(bool available)
void availabilityErrorChanged(QtMultimedia::AvailabilityError error)
void metaDataAvailableChanged(bool available)
void metaDataChanged()
void metaDataChanged(const QString & key, const QVariant & value)
void notifyIntervalChanged(int milliseconds)

Protected Functions

QMediaObject(QObject * parent, QMediaService * service)
void addPropertyWatch(QByteArray const & name)
void removePropertyWatch(QByteArray const & name)
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject

Detailed Description

The QMediaObject class provides a common base for multimedia objects.

QMediaObject derived classes provide access to the functionality of a QMediaService. Each media object hosts a QMediaService and uses the QMediaControl interfaces implemented by the service to implement its API. Most media objects when constructed will request a new QMediaService instance from a QMediaServiceProvider, but some like QMediaRecorder will share a service with another object.

QMediaObject itself provides an API for accessing a media service's meta-data and a means of connecting other media objects, and peripheral classes like QVideoWidget and QMediaPlaylist.

See also QMediaService and QMediaControl.

Property Documentation

notifyInterval : int

The interval at which notifiable properties will update.

The interval is expressed in milliseconds, the default value is 1000.

Access functions:

int notifyInterval() const
void setNotifyInterval(int milliSeconds)

Notifier signal:

void notifyIntervalChanged(int milliseconds)

See also addPropertyWatch() and removePropertyWatch().

Member Function Documentation

QMediaObject::QMediaObject(QObject * parent, QMediaService * service) [protected]

Constructs a media object which uses the functionality provided by a media service.

The parent is passed to QObject.

This class is meant as a base class for multimedia objects so this constructor is protected.

QMediaObject::~QMediaObject()

Destroys this media object.

void QMediaObject::addPropertyWatch(QByteArray const & name) [protected]

Watch the property name. The property's notify signal will be emitted once every notifyInterval milliseconds.

See also notifyInterval.

void QMediaObject::availabilityChanged(bool available) [signal]

Signal emitted when the availability state has changed to available

QtMultimedia::AvailabilityError QMediaObject::availabilityError() const [virtual]

Returns the service availability error state.

void QMediaObject::availabilityErrorChanged(QtMultimedia::AvailabilityError error) [signal]

Signal emitted when the availability error has changed to error

QStringList QMediaObject::availableMetaData() const

Returns a list of keys there is meta-data available for.

bool QMediaObject::bind(QObject * object) [virtual]

Bind object to this QMediaObject instance.

This method establishes a relationship between this media object and a helper object. The nature of the relationship depends on both parties. This methods returns true if the helper was successfully bound, false otherwise.

Most subclasses of QMediaObject provide more convenient functions that wrap this functionality, so this function rarely needs to be called directly.

The object passed must implement the QMediaBindableInterface interface.

See also QMediaBindableInterface.

bool QMediaObject::isAvailable() const [virtual]

Returns true if the service is available for use.

bool QMediaObject::isMetaDataAvailable() const

Returns true if there is meta-data associated with this media object, else false.

QVariant QMediaObject::metaData(const QString & key) const

Returns the value associated with a meta-data key.

void QMediaObject::metaDataAvailableChanged(bool available) [signal]

Signals that the available state of a media object's meta-data has changed.

void QMediaObject::metaDataChanged() [signal]

Signals that this media object's meta-data has changed.

If multiple meta-data elements are changed, metaDataChanged(const QString &key, const QVariant &value) signal is emitted for each of them with metaDataChanged() changed emitted once.

void QMediaObject::metaDataChanged(const QString & key, const QVariant & value) [signal]

Signal the changes of one meta-data element value with the given key.

void QMediaObject::removePropertyWatch(QByteArray const & name) [protected]

Remove property name from the list of properties whose changes are regularly signaled.

See also notifyInterval.

QMediaService * QMediaObject::service() const [virtual]

Returns the media service that provides the functionality of this multimedia object.

void QMediaObject::unbind(QObject * object) [virtual]

Detach object from the QMediaObject instance.

Unbind the helper object from this media object. A warning will be generated if the object was not previously bound to this object.

See also QMediaBindableInterface.

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