QMediaContent

The QMediaContent class provides access to the resource relating to a media content. More

Inheritance diagram of PySide2.QtMultimedia.QMediaContent

Synopsis

Functions

Detailed Description

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() method.

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 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:

PySide2.QtMultimedia.QMediaResource

param takeOwnership:

bool

param other:

PySide2.QtMultimedia.QMediaContent

param contentRequest:

PySide2.QtNetwork.QNetworkRequest

param contentUrl:

PySide2.QtCore.QUrl

param playlist:

PySide2.QtMultimedia.QMediaPlaylist

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 want QMediaContent to take ownership of the playlist. takeOwnership is set to false by default.

PySide2.QtMultimedia.QMediaContent.canonicalRequest()
Return type:

PySide2.QtNetwork.QNetworkRequest

Note

This function is deprecated.

Returns a QNetworkRequest that represents that canonical resource for this media content.

PySide2.QtMultimedia.QMediaContent.canonicalResource()
Return type:

PySide2.QtMultimedia.QMediaResource

Note

This function is deprecated.

Returns a QMediaResource that represents that canonical resource for this media content.

PySide2.QtMultimedia.QMediaContent.canonicalUrl()
Return type:

PySide2.QtCore.QUrl

Note

This function is deprecated.

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:

otherPySide2.QtMultimedia.QMediaContent

Return type:

bool

Returns true if other is not equivalent to this media content; false otherwise.

PySide2.QtMultimedia.QMediaContent.__eq__(other)
Parameters:

otherPySide2.QtMultimedia.QMediaContent

Return type:

bool

Returns true if other is equivalent to this media content; false otherwise.

PySide2.QtMultimedia.QMediaContent.playlist()
Return type:

PySide2.QtMultimedia.QMediaPlaylist

Returns a playlist for this media content or 0 if this QMediaContent is not a playlist.

PySide2.QtMultimedia.QMediaContent.request()
Return type:

PySide2.QtNetwork.QNetworkRequest

Returns a QNetworkRequest that 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.