![]() |
Home · All Classes · All Functions · | ![]() |
The QMediaResource class provides a description of a media resource. More...
#include <QMediaResource>
This class is under development and is subject to change.
QMediaResource () | |
QMediaResource ( const QUrl & uri, const QString & mimeType = QString() ) | |
QMediaResource ( const QMediaResource & other ) | |
~QMediaResource () | |
int | audioBitRate () const |
QString | audioCodec () const |
int | channels () const |
qint64 | duration () const |
int | frequency () const |
bool | isNull () const |
QString | language () const |
QString | mimeType () const |
QSize | resolution () const |
int | sampleSize () const |
void | setAudioBitRate ( int rate ) |
void | setAudioCodec ( const QString & codec ) |
void | setChannels ( int channels ) |
void | setDuration ( qint64 duration ) |
void | setFrequency ( int frequency ) |
void | setLanguage ( const QString & language ) |
void | setResolution ( const QSize & resolution ) |
void | setResolution ( int width, int height ) |
void | setSampleSize ( int size ) |
void | setSize ( const qint64 size ) |
void | setVideoBitRate ( int rate ) |
void | setVideoCodec ( const QString & codec ) |
qint64 | size () const |
QUrl | uri () const |
int | videoBitRate () const |
QString | videoCodec () const |
bool | operator!= ( const QMediaResource & other ) const |
QMediaResource & | operator= ( const QMediaResource & other ) |
bool | operator== ( const QMediaResource & other ) const |
The QMediaResource class provides a description of a media resource.
A media resource is composed of a URI 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 uri().
See also QMediaContent.
Constructs a null media resource.
Constructs a media resource with the given mimeType from a uri.
Constructs a copy of a media resource other.
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.
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.
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.
See also setChannels().
Returns the duration in milliseconds of a media resource.
This may be zero if the duration is unknown, or the resource has no explicit duration (i.e. the resource is an image, or a live stream).
See also setDuration().
Returns the audio sample frequency of a media resource.
This may be zero if the sample size is unknown, or the resource contains no audio stream.
See also setFrequency().
Identifies if a media resource is null.
Returns true if the resource is null, and false otherwise.
Returns the language of a media resource as an ISO 639-2 code.
This may be null if the language is unknown.
See also setLanguage().
Returns the MIME type of a media resource.
This may be null if the MIME type is unknown.
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.
See also setResolution().
Returns the audio sample size in bits per sample of a media resource.
This may return zero if the sample size is unknown, or the resource contains no audio stream.
See also setSampleSize().
Sets the bit rate in bits per second of a media resource's video stream.
See also audioBitRate().
Sets the audio codec of a media resource.
See also audioCodec().
Sets the number of audio channels in a media resource.
See also channels().
Sets the duration in milliseconds of a media resource.
See also duration().
Sets the audio sample frequency of a media resource.
See also frequency().
Sets the language of a media resource.
See also language().
Sets the resolution in pixels of a media resource.
See also resolution().
Sets the width and height in pixels of a media resource.
Sets the audio sample size of a media resource.
See also sampleSize().
Sets the size in bytes of a media resource.
See also size().
Sets the bit rate in bits per second of a media resource's video stream.
See also videoBitRate().
Sets the video codec of media resource.
See also videoCodec().
Returns the size in bytes of a media resource.
This may be zero if the size is unknown.
See also setSize().
Returns the URI of a media resource.
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.
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.
See also setVideoCodec().
Compares a media resource to other.
Returns true if they are different, and false otherwise.
Assigns the value of other to a media resource.
Compares a media resource to other.
Returns true if the resources are identical, and false otherwise.
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Mobility Project 1.0.0 (Technology Preview) |