The QMediaResource class provides a description of a media resource. More...
#include <QMediaResource>
This class was introduced in Qt Mobility 1.0.
QMediaResource () | |
QMediaResource ( const QUrl & url, const QString & mimeType = QString() ) | |
QMediaResource ( const QNetworkRequest & request, const QString & mimeType = QString() ) | |
QMediaResource ( const QMediaResource & other ) | |
~QMediaResource () | |
int | audioBitRate () const |
QString | audioCodec () const |
int | channelCount () const |
qint64 | dataSize () const |
bool | isNull () const |
QString | language () const |
QString | mimeType () const |
QNetworkRequest | request () const |
QSize | resolution () const |
int | sampleRate () const |
void | setAudioBitRate ( int rate ) |
void | setAudioCodec ( const QString & codec ) |
void | setChannelCount ( int channels ) |
void | setDataSize ( const qint64 size ) |
void | setLanguage ( const QString & language ) |
void | setResolution ( const QSize & resolution ) |
void | setResolution ( int width, int height ) |
void | setSampleRate ( int sampleRate ) |
void | setVideoBitRate ( int rate ) |
void | setVideoCodec ( const QString & codec ) |
QUrl | url () const |
int | videoBitRate () const |
QString | videoCodec () const |
bool | operator!= ( const QMediaResource & other ) const |
QMediaResource & | operator= ( const QMediaResource & other ) |
bool | operator== ( const QMediaResource & other ) const |
typedef | QMediaResourceList |
The QMediaResource class provides a description of a media resource.
A media resource is composed of a URL containing the location of the resource and a set of properties that describe the format of the resource. The properties provide a means to assess a resource without first attempting to load it, and in situations where media be represented by multiple alternative representations provide a means to select the appropriate resource.
Media made available by a remote services can often be available in multiple encodings or quality levels, this allows a client to select an appropriate resource based on considerations such as codecs supported, network bandwidth, and display constraints. QMediaResource includes information such as the MIME type, audio and video codecs, audio and video bit rates, and resolution so these constraints and others can be evaluated.
The only mandatory property of a QMediaResource is the url().
See also QMediaContent.
Constructs a null media resource.
Constructs a media resource with the given mimeType from a url.
This function was introduced in Qt Mobility 1.0.
Constructs a media resource with the given mimeType from a network request.
This function was introduced in Qt Mobility 1.0.
Constructs a copy of a media resource other.
This function was introduced in Qt Mobility 1.0.
Destroys a media resource.
Returns the bit rate in bits per second of a media resource's audio stream.
This may be zero if the bit rate is unknown, or the resource contains no audio stream.
This function was introduced in Qt Mobility 1.0.
See also setAudioBitRate().
Returns the audio codec of a media resource.
This may be null if the media resource does not contain an audio stream, or the codec is unknown.
This function was introduced in Qt Mobility 1.0.
See also setAudioCodec().
Returns the number of audio channels in a media resource.
This may be zero if the sample size is unknown, or the resource contains no audio stream.
This function was introduced in Qt Mobility 1.0.
See also setChannelCount().
Returns the size in bytes of a media resource.
This may be zero if the size is unknown.
This function was introduced in Qt Mobility 1.0.
See also setDataSize().
Identifies if a media resource is null.
Returns true if the resource is null, and false otherwise.
This function was introduced in Qt Mobility 1.0.
Returns the language of a media resource as an ISO 639-2 code.
This may be null if the language is unknown.
This function was introduced in Qt Mobility 1.0.
See also setLanguage().
Returns the MIME type of a media resource.
This may be null if the MIME type is unknown.
This function was introduced in Qt Mobility 1.0.
Returns the network request associated with this media resource.
This function was introduced in Qt Mobility 1.0.
Returns the resolution in pixels of a media resource.
This may be null is the resolution is unknown, or the resource contains no pixel data (i.e. the resource is an audio stream.
This function was introduced in Qt Mobility 1.0.
See also setResolution().
Returns the audio sample rate of a media resource.
This may be zero if the sample size is unknown, or the resource contains no audio stream.
This function was introduced in Qt Mobility 1.0.
See also setSampleRate().
Sets the bit rate in bits per second of a media resource's video stream.
This function was introduced in Qt Mobility 1.0.
See also audioBitRate().
Sets the audio codec of a media resource.
This function was introduced in Qt Mobility 1.0.
See also audioCodec().
Sets the number of audio channels in a media resource.
This function was introduced in Qt Mobility 1.0.
See also channelCount().
Sets the size in bytes of a media resource.
This function was introduced in Qt Mobility 1.0.
See also dataSize().
Sets the language of a media resource.
This function was introduced in Qt Mobility 1.0.
See also language().
Sets the resolution in pixels of a media resource.
This function was introduced in Qt Mobility 1.0.
See also resolution().
Sets the width and height in pixels of a media resource.
This function was introduced in Qt Mobility 1.0.
Sets the audio sampleRate of a media resource.
This function was introduced in Qt Mobility 1.0.
See also sampleRate().
Sets the bit rate in bits per second of a media resource's video stream.
This function was introduced in Qt Mobility 1.0.
See also videoBitRate().
Sets the video codec of media resource.
This function was introduced in Qt Mobility 1.0.
See also videoCodec().
Returns the URL of a media resource.
This function was introduced in Qt Mobility 1.0.
Returns the bit rate in bits per second of a media resource's video stream.
This may be zero if the bit rate is unknown, or the resource contains no video stream.
This function was introduced in Qt Mobility 1.0.
See also setVideoBitRate().
Returns the video codec of a media resource.
This may be null if the media resource does not contain a video stream, or the codec is unknonwn.
This function was introduced in Qt Mobility 1.0.
See also setVideoCodec().
Compares a media resource to other.
Returns true if they are different, and false otherwise.
This function was introduced in Qt Mobility 1.0.
Assigns the value of other to a media resource.
This function was introduced in Qt Mobility 1.0.
Compares a media resource to other.
Returns true if the resources are identical, and false otherwise.
This function was introduced in Qt Mobility 1.0.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.