The QMediaContent class provides access to the resources relating to a media content. 更多...
| 頭: | #include <QMediaContent> |
| qmake: | QT += multimedia |
| QMediaContent () | |
| QMediaContent (const QUrl & url ) | |
| QMediaContent (const QNetworkRequest & request ) | |
| QMediaContent (const QMediaResource & resource ) | |
| QMediaContent (const QMediaResourceList & resources ) | |
| QMediaContent (const QMediaContent & other ) | |
| QMediaContent (QMediaPlaylist * playlist , const QUrl & contentUrl = QUrl(), bool takeOwnership = false) | |
| ~QMediaContent () | |
| QNetworkRequest | canonicalRequest () const |
| QMediaResource | canonicalResource () const |
| QUrl | canonicalUrl () const |
| bool | isNull () const |
| QMediaPlaylist * | playlist () const |
| QMediaResourceList | resources () const |
| bool | operator!= (const QMediaContent & other ) const |
| QMediaContent & | operator= (const QMediaContent & other ) |
| bool | operator== (const QMediaContent & other ) const |
The QMediaContent class provides access to the resources relating to a media content.
QMediaContent is used within the multimedia framework as the logical handle to media content. A QMediaContent object is composed of one or more QMediaResource 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 the canonicalUrl () 或 canonicalResource () methods, any additional resources are optional.
Alternatively QMediaContent can represent a playlist and contain a pointer to a valid QMediaPlaylist 對象。在此情況下,URL (統一資源定位符) 是可選的且可以為空,或指嚮播放列錶 URL。
Constructs a null QMediaContent .
構造媒體內容采用 url 提供內容引用。
構造媒體內容采用 request 提供內容引用。
This constructor can be used to reference media content via network protocols such as HTTP. This may include additional information required to obtain the resource, such as Cookies or HTTP headers.
構造媒體內容采用 resource 提供內容引用。
構造媒體內容采用 resources 提供內容引用。
構造副本為媒體內容 other .
構造媒體內容采用 playlist .
contentUrl 對於播放列錶是可選參數且可以為空。
Set takeOwnership to true if you want QMediaContent to take ownership of the playlist. takeOwnership 被設為 false,在默認情況下。
銷毀媒體內容對象。
Returns a QNetworkRequest that represents that canonical resource for this media content.
返迴 QMediaResource that represents that canonical resource for this media content.
返迴 QUrl that represents that canonical resource for this media content.
返迴 true 若此媒體內容為 null (未被初始化);否則 false。
返迴用於此媒體內容的播放列錶,或 0 若此 QMediaContent 不是播放列錶。
Returns a list of alternative resources for this media content. The first item in this list is always the canonical resource.
返迴 true 若 other 不等價於此媒體內容;否則 false。
賦值值 other 到此媒體內容。
返迴 true 若 other 等價於此媒體內容;否則 false。