Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QMediaContent class is used to prepare a media resource for playing in Qtopia. More...
#include <QMediaContent>
Inherits QObject.
The QMediaContent class is used to prepare a media resource for playing in Qtopia.
A QMediaContent is constructed with a URL, that may refer to a local or remote resource, or a QContent that refers to a local media resource.
If the QMediaContent is constructed with a valid piece of media a signal will be emitted with for each of the controls available to manipulate that media.
During the life-time of a piece of media, the controls available may change, due to different formats being available in the content, each time a control is usable or unusable a controlAvailable or controlUnavailable signal will be emitted.
If there is an error preparing the media resource, the mediaError signal will be emitted, with a QString detailing the error information.
Example: { QContent beep = findBeepSound(); m_mediaContent = new QMediaContent(beep); connect(mediaContent, SIGNAL(controlAvailable(QString)), this, SLOT(mediaControlAvailable(QString))); } void mediaControlAvailable(QString const& id) { if (id == QMediaControl::name()) { // The basic media control is available, all media content // will have this control available. m_mediaControl = new QMediaControl(m_mediaContent); // Now do something play/get length m_mediaControl->start(); } }
Create a QMediaContent from a URL.
The URL may point to a local or remote media resource.
The url paramter is a URL representing the location of the media content. The domain is the audio domain in which this media content should exist. The parent is the Parent QObject.
Create a QMediaContent from a QContent.
This creates a QMediaContent from a local resource known by the Document System.
The content is the QContent representing the location of the media content. The domain is the audio domain in which this media content should exist. The parent is the Parent QObject.
Destroy the QMediaContent object.
Signals that a control with identity id is now available for use.
Signals that a control with identity id is no longer usable.
Return a list of Controls that this Media supports.
Signals that there was an error trying to access a piece of media content. Details of the error are contained in the mediaError parameter.
Play immediately, and to the end, the content specified by url in the media domain.
This is an overloaded member function, provided for convenience.
Play immediately, and to the end, the content specified by content in the media domain.
Returns a list of Mime Types handled by the Qt Extended Media system.
Returns a list of URI schemes that can be used in combination with the mimeType.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |