QMediaContent¶
The
QMediaContentclass provides access to the resource relating to a media content. More…

Synopsis¶
Functions¶
def
__eq__(other)def
__ne__(other)def
canonicalRequest()def
canonicalResource()def
canonicalUrl()def
isNull()def
playlist()def
request()def
resources()
Detailed Description¶
QMediaContentis used within the multimedia framework as the logical handle to media content. AQMediaContentobject contains aQNetworkRequestwhich provides the URL of the content.A non-null
QMediaContentwill always have a reference to the content available through therequest()method.Alternatively
QMediaContentcan represent a playlist and contain a pointer to a validQMediaPlaylistobject. In this case URL is optional and can either be empty or point to the playlist URL.
- class PySide2.QtMultimedia.QMediaContent¶
PySide2.QtMultimedia.QMediaContent(playlist[, contentUrl=QUrl()[, takeOwnership=false]])
PySide2.QtMultimedia.QMediaContent(resources)
Note
This constructor is deprecated.
PySide2.QtMultimedia.QMediaContent(other)
PySide2.QtMultimedia.QMediaContent(contentResource)
Note
This constructor is deprecated.
PySide2.QtMultimedia.QMediaContent(contentRequest)
PySide2.QtMultimedia.QMediaContent(contentUrl)
- param resources:
- param contentResource:
- param takeOwnership:
bool
- param other:
- param contentRequest:
- param contentUrl:
- param playlist:
Constructs a null
QMediaContent.Constructs a media content with
playlist.contentUrlof a playlist is an optional parameter and can be empty.Set
takeOwnershipto true if you wantQMediaContentto take ownership of the playlist.takeOwnershipis set to false by default.
- PySide2.QtMultimedia.QMediaContent.canonicalRequest()¶
- Return type:
Note
This function is deprecated.
Returns a
QNetworkRequestthat represents that canonical resource for this media content.
- PySide2.QtMultimedia.QMediaContent.canonicalResource()¶
- Return type:
Note
This function is deprecated.
Returns a
QMediaResourcethat represents that canonical resource for this media content.
- PySide2.QtMultimedia.QMediaContent.canonicalUrl()¶
- Return type:
Note
This function is deprecated.
Returns a
QUrlthat represents that canonical resource for this media content.
- PySide2.QtMultimedia.QMediaContent.isNull()¶
- Return type:
bool
Returns true if this media content is null (uninitialized); false otherwise.
- PySide2.QtMultimedia.QMediaContent.__ne__(other)¶
- Parameters:
- Return type:
bool
Returns true if
otheris not equivalent to this media content; false otherwise.
- PySide2.QtMultimedia.QMediaContent.__eq__(other)¶
- Parameters:
- Return type:
bool
Returns true if
otheris equivalent to this media content; false otherwise.
- PySide2.QtMultimedia.QMediaContent.playlist()¶
- Return type:
Returns a playlist for this media content or 0 if this
QMediaContentis not a playlist.
- PySide2.QtMultimedia.QMediaContent.request()¶
- Return type:
Returns a
QNetworkRequestthat represents the resource for this media content.
- PySide2.QtMultimedia.QMediaContent.resources()¶
- Return type:
Note
This function is deprecated.
Returns a list of alternative resources for this media content. The first item in this list is always the canonical resource.
© 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.