PySide6.QtMultimedia.QPlaybackOptions

class QPlaybackOptions

The QPlaybackOptions class enables low-level control of media playback options.

Details

QPlaybackOptions gives low-level control of media playback options. Although we strongly recommend to rely on the default settings of QMediaPlayer , QPlaybackOptions can be used to optimize media playback to specific use cases where the default options are not ideal.

Note that options are hints to the media backend, and may be ignored if they are not supported by the current media format or codec.

Playback options rely on support in the media backend. Availability is documented per option.

See also

QMediaPlayer

Added in version 6.10.

Synopsis

Properties

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

class PlaybackIntent

Configures the intent of media playback, to focus on either high quality playback or low latency media streaming.

Constant

Description

QPlaybackOptions.PlaybackIntent.PlaybackIntent.Playback

The intent is robust and high quality media playback, enabling sufficient buffering to prevent glitches during playback.

QPlaybackOptions.PlaybackIntent.PlaybackIntent.LowLatencyStreaming

Buffering is reduced to optimize for low latency streaming, but with a higher likelihood of lost frames or other glitches during playback.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property networkTimeoutᅟ: std::chrono::milliseconds

Determines the network timeout used for socket I/O operations with some network formats.

This option is only supported with the FFmpeg media backend.

Access functions:
property playbackIntentᅟ: QPlaybackOptions.PlaybackIntent

Determines if QMediaPlayer should optimize for robust high quality video playback (default), or low latency streaming.

This option is only supported with the FFmpeg media backend.

Access functions:
property probeSizeᅟ: int

Probesize defines the amount of data (in bytes) to analyze in order to gather stream information before media playback starts.

A larger probesize value can give more robust playback but may increase latency. Conversely, a smaller probesize can reduce latency but might miss some stream details. The default probesize is -1, and the actual probesize is determined by the media backend.

This option is only supported with the FFmpeg media backend.

Access functions:
__init__()
__init__(arg__1)
Parameters:

arg__1QPlaybackOptions

networkTimeout()
Return type:

std::chrono::milliseconds

Getter of property networkTimeoutᅟ .

__ne__(rhs)
Parameters:

rhsQPlaybackOptions

Return type:

bool

__lt__(rhs)
Parameters:

rhsQPlaybackOptions

Return type:

bool

__le__(rhs)
Parameters:

rhsQPlaybackOptions

Return type:

bool

__eq__(rhs)
Parameters:

rhsQPlaybackOptions

Return type:

bool

__gt__(rhs)
Parameters:

rhsQPlaybackOptions

Return type:

bool

__ge__(rhs)
Parameters:

rhsQPlaybackOptions

Return type:

bool

playbackIntent()
Return type:

PlaybackIntent

Getter of property playbackIntentᅟ .

probeSize()
Return type:

int

See also

setProbeSize()

Getter of property probeSizeᅟ .

resetNetworkTimeout()

Reset function of property networkTimeoutᅟ .

resetPlaybackIntent()

Reset function of property playbackIntentᅟ .

resetProbeSize()

Reset function of property probeSizeᅟ .

setNetworkTimeout(timeout)
Parameters:

timeoutstd::chrono::milliseconds

See also

networkTimeout()

Setter of property networkTimeoutᅟ .

setPlaybackIntent(intent)
Parameters:

intentPlaybackIntent

See also

playbackIntent()

Setter of property playbackIntentᅟ .

setProbeSize(probeSizeBytes)
Parameters:

probeSizeBytes – int

See also

probeSize()

Setter of property probeSizeᅟ .

swap(other)
Parameters:

otherQPlaybackOptions