![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QPlaybackOptions class enables low-level control of media playback options. More...
#include <qplaybackoptions.h>
Public Types | |
enum class | PlaybackIntent { Playback , LowLatencyStreaming } |
Public Member Functions | |
Q_MULTIMEDIA_EXPORT | QPlaybackOptions () |
\qmltype playbackOptions \nativetype QPlaybackOptions | |
Q_MULTIMEDIA_EXPORT | QPlaybackOptions (const QPlaybackOptions &) |
Q_MULTIMEDIA_EXPORT QPlaybackOptions & | operator= (const QPlaybackOptions &) |
QPlaybackOptions (QPlaybackOptions &&) noexcept=default | |
Q_MULTIMEDIA_EXPORT | ~QPlaybackOptions () |
void | swap (QPlaybackOptions &other) noexcept |
Q_MULTIMEDIA_EXPORT std::chrono::milliseconds | networkTimeout () const |
\qmlproperty qint64 playbackOptions::networkTimeoutMs | |
Q_MULTIMEDIA_EXPORT void | setNetworkTimeout (std::chrono::milliseconds timeout) |
Q_MULTIMEDIA_EXPORT void | resetNetworkTimeout () |
Q_MULTIMEDIA_EXPORT PlaybackIntent | playbackIntent () const |
\qmlproperty PlaybackOptions::PlaybackIntent PlaybackOptions::playbackIntent | |
Q_MULTIMEDIA_EXPORT void | setPlaybackIntent (PlaybackIntent intent) |
Q_MULTIMEDIA_EXPORT void | resetPlaybackIntent () |
Q_MULTIMEDIA_EXPORT qsizetype | probeSize () const |
\qmlproperty qsizetype PlaybackOptions::probeSize | |
Q_MULTIMEDIA_EXPORT void | setProbeSize (qsizetype probeSizeBytes) |
Q_MULTIMEDIA_EXPORT void | resetProbeSize () |
Properties | |
std::chrono::milliseconds | networkTimeout |
PlaybackIntent | playbackIntent |
qsizetype | probeSize |
Friends | |
class | QPlaybackOptionsPrivate |
Q_MULTIMEDIA_EXPORT bool | comparesEqual (const QPlaybackOptions &lhs, const QPlaybackOptions &rhs) |
Q_MULTIMEDIA_EXPORT Qt::strong_ordering | compareThreeWay (const QPlaybackOptions &lhs, const QPlaybackOptions &rhs) |
The QPlaybackOptions class enables low-level control of media playback options.
\inmodule QtMultimedia
QPlaybackOptions gives low-level control of media playback options. Although we strongly recommend to rely on the default settings of \l 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.
Definition at line 20 of file qplaybackoptions.h.
|
strong |
Configures the intent of media playback, to focus on either high quality playback or low latency media streaming.
\value Playback The intent is robust and high quality media playback, enabling sufficient buffering to prevent glitches during playback. \value LowLatencyStreaming Buffering is reduced to optimize for low latency streaming, but with a higher likelihood of lost frames or other glitches during playback.
Enumerator | |
---|---|
Playback | |
LowLatencyStreaming |
Definition at line 30 of file qplaybackoptions.h.
QPlaybackOptions::QPlaybackOptions | ( | ) |
\qmltype playbackOptions \nativetype QPlaybackOptions
Low level media playback options.
\inqmlmodule QtMultimedia
Playback options gives low-level control of media playback options. Although we strongly recommend to rely on the default settings of \l MediaPlayer, playbackOptions 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.
Definition at line 85 of file qplaybackoptions.cpp.
|
default |
|
defaultnoexcept |
|
default |
std::chrono::milliseconds QPlaybackOptions::networkTimeout | ( | ) | const |
\qmlproperty qint64 playbackOptions::networkTimeoutMs
Determines the network timeout (in milliseconds) used for socket I/O operations with some network formats.
This option is only supported with the FFmpeg media backend.
Definition at line 123 of file qplaybackoptions.cpp.
|
default |
QPlaybackOptions::PlaybackIntent QPlaybackOptions::playbackIntent | ( | ) | const |
\qmlproperty PlaybackOptions::PlaybackIntent PlaybackOptions::playbackIntent
Determines if \l MediaPlayer should optimize for robust high quality video playback (default), or low latency streaming.
This option is only supported with the FFmpeg media backend.
\qmlenumeratorsfrom QPlaybackOptions::PlaybackIntent
Definition at line 175 of file qplaybackoptions.cpp.
qsizetype QPlaybackOptions::probeSize | ( | ) | const |
\qmlproperty qsizetype PlaybackOptions::probeSize
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 then determined by the media backend.
Note that a too small probeSize can result in failure to play the media, while a too high probeSize can increase latency.
This option is only supported with the FFmpeg media backend.
Definition at line 223 of file qplaybackoptions.cpp.
void QPlaybackOptions::resetNetworkTimeout | ( | ) |
Definition at line 134 of file qplaybackoptions.cpp.
void QPlaybackOptions::resetPlaybackIntent | ( | ) |
Definition at line 186 of file qplaybackoptions.cpp.
void QPlaybackOptions::resetProbeSize | ( | ) |
Definition at line 234 of file qplaybackoptions.cpp.
void QPlaybackOptions::setNetworkTimeout | ( | std::chrono::milliseconds | timeout | ) |
Definition at line 128 of file qplaybackoptions.cpp.
void QPlaybackOptions::setPlaybackIntent | ( | PlaybackIntent | intent | ) |
Definition at line 180 of file qplaybackoptions.cpp.
Definition at line 228 of file qplaybackoptions.cpp.
|
inlinenoexcept |
Definition at line 43 of file qplaybackoptions.h.
|
friend |
Definition at line 90 of file qplaybackoptions.cpp.
|
friend |
Definition at line 98 of file qplaybackoptions.cpp.
|
friend |
Definition at line 64 of file qplaybackoptions.h.
|
readwrite |
Determines the network timeout used for socket I/O operations with some network formats.
This option is only supported with the FFmpeg media backend.
Definition at line 23 of file qplaybackoptions.h.
|
readwrite |
Determines if \l QMediaPlayer should optimize for robust high quality video playback (default), or low latency streaming.
This option is only supported with the FFmpeg media backend.
Definition at line 25 of file qplaybackoptions.h.
|
readwrite |
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.
Definition at line 27 of file qplaybackoptions.h.