MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QMediaObject Class Reference

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

 #include <QMediaObject>

Inherits: QObject.

Inherited by: QAudioCaptureSource, QCamera, QMediaImageViewer, QMediaPlayer, and QRadioTuner.

This class was introduced in Qt Mobility 1.0.

Properties

  • 1 property inherited from QObject

Public Functions

~QMediaObject ()
virtual QtMultimediaKit::AvailabilityError availabilityError () const
QStringList availableExtendedMetaData () const
QList<QtMultimediaKit::MetaData> availableMetaData () const
virtual bool bind ( QObject * object )
QVariant extendedMetaData ( const QString & key ) const
virtual bool isAvailable () const
bool isMetaDataAvailable () const
QVariant metaData ( QtMultimediaKit::MetaData key ) const
int notifyInterval () const
virtual QMediaService * service () const
void setNotifyInterval ( int milliSeconds )
virtual void unbind ( QObject * object )
  • 29 public functions inherited from QObject

Signals

void availabilityChanged ( bool available )
void metaDataAvailableChanged ( bool available )
void metaDataChanged ()
void notifyIntervalChanged ( int milliseconds )

Protected Functions

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

Additional Inherited Members

  • 1 public slot 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 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.

This property was introduced in Qt Mobility 1.0.

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.

This function was introduced in Qt Mobility 1.0.

QMediaObject::~QMediaObject ()

Destroys a 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.

This function was introduced in Qt Mobility 1.0.

See also notifyInterval.

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

Signal emitted when the availability state has changed to available

This function was introduced in Qt Mobility 1.0.

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

Returns the service availability error state.

This function was introduced in Qt Mobility 1.0.

QStringList QMediaObject::availableExtendedMetaData () const

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

This function was introduced in Qt Mobility 1.0.

QList<QtMultimediaKit::MetaData> QMediaObject::availableMetaData () const

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

This function was introduced in Qt Mobility 1.0.

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

Bind object to the QMediaObject instance.

This method establishes a relationship between the 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.

The object passed must implement the QMediaBindableInterface interface.

This function was introduced in Qt Mobility 1.0.

See also QMediaBindableInterface.

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

Returns the value associated with a meta-data key.

The naming and type of extended meta-data is not standardized, so the values and meaning of keys may vary between backends.

This function was introduced in Qt Mobility 1.0.

bool QMediaObject::isAvailable () const [virtual]

Returns true if the service is available for use.

This function was introduced in Qt Mobility 1.0.

bool QMediaObject::isMetaDataAvailable () const

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

This function was introduced in Qt Mobility 1.0.

QVariant QMediaObject::metaData ( QtMultimediaKit::MetaData key ) const

Returns the value associated with a meta-data key.

This function was introduced in Qt Mobility 1.0.

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

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

This function was introduced in Qt Mobility 1.0.

void QMediaObject::metaDataChanged () [signal]

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

This function was introduced in Qt Mobility 1.0.

void QMediaObject::notifyIntervalChanged ( int milliseconds ) [signal]

Signal a change in the notify interval period to milliseconds.

This function was introduced in Qt Mobility 1.0.

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

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

This function was introduced in Qt Mobility 1.0.

See also notifyInterval.

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

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

This function was introduced in Qt Mobility 1.0.

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

Detach object from the QMediaObject instance.

Disconnect the help object from the media object.

This function was introduced in Qt Mobility 1.0.

See also QMediaBindableInterface.