内容表

上一话题

QMediaContainerControl

下一话题

QMediaControl

QMediaContent

QMediaContent class provides access to the resource relating to a media content. 更多

Inheritance diagram of PySide2.QtMultimedia.QMediaContent

概要

详细描述

QMediaContent is used within the multimedia framework as the logical handle to media content. A QMediaContent object contains a QNetworkRequest which provides the URL of the content.

A non-null QMediaContent will always have a reference to the content available through the request() 方法。

Alternatively QMediaContent can represent a playlist and contain a pointer to a valid QMediaPlaylist 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)

注意

This constructor is deprecated.

QMediaContent(other)

QMediaContent(contentResource)

注意

This constructor is deprecated.

QMediaContent(contentRequest)

QMediaContent(contentUrl)

param resources

param contentResource

QMediaResource

param takeOwnership

bool

param other

QMediaContent

param contentRequest

QNetworkRequest

param contentUrl

QUrl

param playlist

QMediaPlaylist

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

注意

此函数被弃用。

返回 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 ( )
返回类型

QMediaPlaylist

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.