QMediaContent¶
The
QMediaContent
class provides access to the resources 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
resources
()
Detailed Description¶
QMediaContent
is used within the multimedia framework as the logical handle to media content. AQMediaContent
object is composed of one or moreQMediaResource
s where each resource provides the URL and format information of a different encoding of the content.A non-null
QMediaContent
will always have a primary or canonical reference to the content available through thecanonicalUrl()
orcanonicalResource()
methods, any additional resources are optional.Alternatively
QMediaContent
can represent a playlist and contain a pointer to a validQMediaPlaylist
object. In this case URL is optional and can either be empty or point to the playlist URL.
-
class
QMediaContent
¶ QMediaContent(playlist[, contentUrl=QUrl()[, takeOwnership=false]])
QMediaContent(resources)
QMediaContent(other)
QMediaContent(contentResource)
QMediaContent(contentRequest)
QMediaContent(contentUrl)
- param resources
- param contentResource
- param takeOwnership
bool
- param other
- param contentRequest
QNetworkRequest
- param contentUrl
QUrl
- param playlist
Constructs a null
QMediaContent
.Constructs a media content with
playlist
.contentUrl
of a playlist is an optional parameter and can be empty.Set
takeOwnership
to true if you wantQMediaContent
to take ownership of the playlist.takeOwnership
is set to false by default.
-
PySide2.QtMultimedia.QMediaContent.
canonicalRequest
()¶ - Return type
QNetworkRequest
Returns a
QNetworkRequest
that represents that canonical resource for this media content.
-
PySide2.QtMultimedia.QMediaContent.
canonicalResource
()¶ - Return type
Returns a
QMediaResource
that represents that canonical resource for this media content.
-
PySide2.QtMultimedia.QMediaContent.
canonicalUrl
()¶ - Return type
QUrl
Returns a
QUrl
that 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
other –
QMediaContent
- Return type
bool
Returns true if
other
is not equivalent to this media content; false otherwise.
-
PySide2.QtMultimedia.QMediaContent.
__eq__
(other)¶ - Parameters
other –
QMediaContent
- Return type
bool
Returns true if
other
is equivalent to this media content; false otherwise.
-
PySide2.QtMultimedia.QMediaContent.
playlist
()¶ - Return type
Returns a playlist for this media content or 0 if this
QMediaContent
is not a playlist.
-
PySide2.QtMultimedia.QMediaContent.
resources
()¶ - Return type
Returns a list of alternative resources for this media content. The first item in this list is always the canonical resource.
© 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.