QMediaContentclass provides access to the resource relating to a media content. 更多 …
def
__eq__
(other)
def
__ne__
(other)
def
canonicalRequest
()
def
canonicalResource
()
def
canonicalUrl
()
def
isNull
()
def
playlist
()
def
request
()
def
resources
()
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()方法。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.
QMediaContent
¶
QMediaContent(playlist[, contentUrl=QUrl()[, takeOwnership=false]])
QMediaContent(resources)
注意
This constructor is deprecated.
QMediaContent(other)
QMediaContent(contentResource)
注意
This constructor is deprecated.
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
.
构造媒体内容采用
playlist
.
contentUrl
of a playlist is an optional parameter and can be empty.
Set
takeOwnership
to true if you want
QMediaContent
to take ownership of the playlist.
takeOwnership
is set to false by default.
PySide2.QtMultimedia.QMediaContent.
canonicalRequest
(
)
¶
QNetworkRequest
注意
此函数被弃用。
返回
QNetworkRequest
that represents that canonical resource for this media content.
PySide2.QtMultimedia.QMediaContent.
canonicalResource
(
)
¶
注意
此函数被弃用。
返回
QMediaResource
that represents that canonical resource for this media content.
PySide2.QtMultimedia.QMediaContent.
canonicalUrl
(
)
¶
QUrl
注意
此函数被弃用。
返回
QUrl
that represents that canonical resource for this media content.
PySide2.QtMultimedia.QMediaContent.
isNull
(
)
¶
bool
Returns true if this media content is null (uninitialized); false otherwise.
PySide2.QtMultimedia.QMediaContent.
__ne__
(
other
)
¶
other
–
QMediaContent
bool
返回 true 若
other
is not equivalent to this media content; false otherwise.
PySide2.QtMultimedia.QMediaContent.
__eq__
(
other
)
¶
other
–
QMediaContent
bool
返回 true 若
other
is equivalent to this media content; false otherwise.
PySide2.QtMultimedia.QMediaContent.
playlist
(
)
¶
Returns a playlist for this media content or 0 if this
QMediaContent
is not a playlist.
PySide2.QtMultimedia.QMediaContent.
request
(
)
¶
QNetworkRequest
返回
QNetworkRequest
that represents the resource for this media content.
PySide2.QtMultimedia.QMediaContent.
resources
(
)
¶
注意
此函数被弃用。
Returns a list of alternative resources for this media content. The first item in this list is always the canonical resource.