The QMediaResource class provides a description of a media resource. 更多...
头: | #include <QMediaResource> |
qmake: | QT += multimedia |
该类已过时。 提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
QMediaResource (const QMediaResource & other ) | |
QMediaResource (const QNetworkRequest & request , const QString & mimeType = QString()) | |
QMediaResource (const QUrl & url , const QString & mimeType = QString()) | |
QMediaResource () | |
QMediaResource & | operator= (const QMediaResource & other ) |
~QMediaResource () | |
int | audioBitRate () const |
QString | audioCodec () const |
int | channelCount () const |
qint64 | dataSize () const |
bool | isNull () const |
QString | 语言 () 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 & 语言 ) |
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 |
bool | operator== (const QMediaResource & other ) const |
typedef | QMediaResourceList |
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 类型 , 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 ().
另请参阅 QMediaContent .
Constructs a copy of a media resource other .
Constructs a media resource with the given mimeType from a network request .
Constructs a media resource with the given mimeType 从 url .
Constructs a null media resource.
Assigns the value of other to a media resource.
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.
另请参阅 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.
另请参阅 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.
另请参阅 setChannelCount ().
Returns the size in bytes of a media resource.
This may be zero if the size is unknown.
另请参阅 setDataSize ().
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.
另请参阅 setLanguage ().
Returns the MIME type of a media resource.
This may be null if the MIME type is unknown.
Returns the network request associated with this media resource.
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.
另请参阅 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.
另请参阅 setSampleRate ().
Sets the bit rate in bits per second of a media resource's video stream.
另请参阅 audioBitRate ().
设置音频 codec of a media resource.
另请参阅 audioCodec ().
Sets the number of audio channels in a media resource.
另请参阅 channelCount ().
设置 size in bytes of a media resource.
另请参阅 dataSize ().
设置 语言 of a media resource.
另请参阅 语言 ().
设置 resolution in pixels of a media resource.
另请参阅 resolution ().
设置 width and height in pixels of a media resource.
设置音频 sampleRate of a media resource.
另请参阅 sampleRate ().
Sets the bit rate in bits per second of a media resource's video stream.
另请参阅 videoBitRate ().
设置视频 codec of media resource.
另请参阅 videoCodec ().
Returns the URL 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.
另请参阅 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.
另请参阅 setVideoCodec ().
Compares a media resource to other .
Returns true if they are different, and false otherwise.
Compares a media resource to other .
Returns true if the resources are identical, and false otherwise.
同义词
QList<QMediaResource>