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 PySide2.QtMultimedia.QMediaResource¶
PySide2.QtMultimedia.QMediaResource(other)
PySide2.QtMultimedia.QMediaResource(request[, mimeType=””])
PySide2.QtMultimedia.QMediaResource(url[, mimeType=””])
- param request:
- param url:
- param other:
- param mimeType:
str
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:
str
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:
int
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:
str
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:
str
Returns the MIME type of a media resource.
This may be null if the MIME type is unknown.
- PySide2.QtMultimedia.QMediaResource.__ne__(other)¶
- Parameters:
- Return type:
bool
Compares a media resource to
other
.Returns true if they are different, and false otherwise.
- PySide2.QtMultimedia.QMediaResource.__eq__(other)¶
- Parameters:
- 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:
Returns the network request associated with this media resource.
- PySide2.QtMultimedia.QMediaResource.resolution()¶
- Return type:
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 – str
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 – int
Sets the
size
in bytes of a media resource.See also
- PySide2.QtMultimedia.QMediaResource.setLanguage(language)¶
- Parameters:
language – str
Sets the
language
of a media resource.See also
- PySide2.QtMultimedia.QMediaResource.setResolution(resolution)¶
- Parameters:
resolution –
PySide2.QtCore.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 – str
Sets the video
codec
of media resource.See also
- PySide2.QtMultimedia.QMediaResource.url()¶
- Return type:
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:
str
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
© 2022 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.