QMediaResource¶
The
QMediaResource
class provides a description of a media resource. More…
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
audioBitRate
()def
audioCodec
()def
channelCount
()def
dataSize
()def
isNull
()def
language
()def
mimeType
()def
request
()def
resolution
()def
sampleRate
()def
setAudioBitRate
(rate)def
setAudioCodec
(codec)def
setChannelCount
(channels)def
setDataSize
(size)def
setLanguage
(language)def
setResolution
(resolution)def
setResolution
(width, height)def
setSampleRate
(frequency)def
setVideoBitRate
(rate)def
setVideoCodec
(codec)def
url
()def
videoBitRate
()def
videoCodec
()
Detailed Description¶
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 theMIME type
,audio
andvideo
codecs,audio
andvideo
bit rates, andresolution
so these constraints and others can be evaluated.The only mandatory property of a
QMediaResource
is theurl()
.See also
-
class
QMediaResource
¶ QMediaResource(other)
QMediaResource(request[, mimeType=”“])
QMediaResource(url[, mimeType=”“])
- param request
QNetworkRequest
- param url
QUrl
- param other
- param mimeType
unicode
Constructs a null media resource.
Constructs a copy of a media resource
other
.
-
PySide2.QtMultimedia.QMediaResource.
Property
¶
-
PySide2.QtMultimedia.QMediaResource.
audioBitRate
()¶ - Return type
int
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
-
PySide2.QtMultimedia.QMediaResource.
audioCodec
()¶ - Return type
unicode
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
-
PySide2.QtMultimedia.QMediaResource.
channelCount
()¶ - Return type
int
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
-
PySide2.QtMultimedia.QMediaResource.
dataSize
()¶ - Return type
qint64
Returns the size in bytes of a media resource.
This may be zero if the size is unknown.
See also
-
PySide2.QtMultimedia.QMediaResource.
isNull
()¶ - Return type
bool
Identifies if a media resource is null.
Returns true if the resource is null, and false otherwise.
-
PySide2.QtMultimedia.QMediaResource.
language
()¶ - Return type
unicode
Returns the language of a media resource as an ISO 639-2 code.
This may be null if the language is unknown.
See also
-
PySide2.QtMultimedia.QMediaResource.
mimeType
()¶ - Return type
unicode
Returns the MIME type of a media resource.
This may be null if the MIME type is unknown.
-
PySide2.QtMultimedia.QMediaResource.
__ne__
(other)¶ - Parameters
other –
QMediaResource
- Return type
bool
Compares a media resource to
other
.Returns true if they are different, and false otherwise.
-
PySide2.QtMultimedia.QMediaResource.
__eq__
(other)¶ - Parameters
other –
QMediaResource
- Return type
bool
Compares a media resource to
other
.Returns true if the resources are identical, and false otherwise.
-
PySide2.QtMultimedia.QMediaResource.
request
()¶ - Return type
QNetworkRequest
Returns the network request associated with this media resource.
-
PySide2.QtMultimedia.QMediaResource.
resolution
()¶ - Return type
QSize
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
-
PySide2.QtMultimedia.QMediaResource.
sampleRate
()¶ - Return type
int
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.
See also
-
PySide2.QtMultimedia.QMediaResource.
setAudioBitRate
(rate)¶ - Parameters
rate –
int
Sets the bit
rate
in bits per second of a media resource’s video stream.See also
-
PySide2.QtMultimedia.QMediaResource.
setAudioCodec
(codec)¶ - Parameters
codec – unicode
Sets the audio
codec
of a media resource.See also
-
PySide2.QtMultimedia.QMediaResource.
setChannelCount
(channels)¶ - Parameters
channels –
int
Sets the number of audio
channels
in a media resource.See also
-
PySide2.QtMultimedia.QMediaResource.
setDataSize
(size)¶ - Parameters
size –
qint64
Sets the
size
in bytes of a media resource.See also
-
PySide2.QtMultimedia.QMediaResource.
setLanguage
(language)¶ - Parameters
language – unicode
Sets the
language
of a media resource.See also
-
PySide2.QtMultimedia.QMediaResource.
setResolution
(resolution)¶ - Parameters
resolution –
QSize
Sets the
resolution
in pixels of a media resource.See also
-
PySide2.QtMultimedia.QMediaResource.
setResolution
(width, height) - Parameters
width –
int
height –
int
Sets the
width
andheight
in pixels of a media resource.
-
PySide2.QtMultimedia.QMediaResource.
setSampleRate
(frequency)¶ - Parameters
frequency –
int
Sets the audio
sampleRate
of a media resource.See also
-
PySide2.QtMultimedia.QMediaResource.
setVideoBitRate
(rate)¶ - Parameters
rate –
int
Sets the bit
rate
in bits per second of a media resource’s video stream.See also
-
PySide2.QtMultimedia.QMediaResource.
setVideoCodec
(codec)¶ - Parameters
codec – unicode
Sets the video
codec
of media resource.See also
-
PySide2.QtMultimedia.QMediaResource.
url
()¶ - Return type
QUrl
Returns the URL of a media resource.
-
PySide2.QtMultimedia.QMediaResource.
videoBitRate
()¶ - Return type
int
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
-
PySide2.QtMultimedia.QMediaResource.
videoCodec
()¶ - Return type
unicode
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
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.