Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qplaybackoptions.h
Go to the documentation of this file.
1
// Copyright (C) 2025 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
ifndef
QPLAYBACKOPTIONS_H
5
#
define
QPLAYBACKOPTIONS_H
6
7
#
include
<
QtMultimedia
/
qtmultimediaexports
.
h
>
8
#
include
<
QtMultimedia
/
qtmultimediaglobal
.
h
>
9
#
include
<
QtCore
/
qcompare
.
h
>
10
#
include
<
QtCore
/
qobject
.
h
>
11
#
include
<
QtCore
/
qshareddata
.
h
>
12
13
#
include
<
chrono
>
14
15
QT_BEGIN_NAMESPACE
16
17
class
QPlaybackOptionsPrivate;
18
QT_DECLARE_QESDP_SPECIALIZATION_DTOR(QPlaybackOptionsPrivate)
19
20
class
QPlaybackOptions
21
{
22
Q_GADGET_EXPORT(Q_MULTIMEDIA_EXPORT)
23
Q_PROPERTY
(
std
::
chrono
::
milliseconds
networkTimeout
READ
networkTimeout
WRITE
setNetworkTimeout
RESET
24
resetNetworkTimeout
FINAL
)
25
Q_PROPERTY
(
PlaybackIntent
playbackIntent
READ
playbackIntent
WRITE
setPlaybackIntent
RESET
26
resetPlaybackIntent
)
27
Q_PROPERTY
(
qsizetype
probeSize
READ
probeSize
WRITE
setProbeSize
RESET
resetProbeSize
)
28
Q_CLASSINFO
(
"RegisterEnumClassesUnscoped"
,
"false"
)
29
public
:
30
enum
class
PlaybackIntent
{
31
Playback
,
32
LowLatencyStreaming
,
33
};
34
Q_ENUM(PlaybackIntent)
35
36
Q_MULTIMEDIA_EXPORT
QPlaybackOptions
();
37
Q_MULTIMEDIA_EXPORT
QPlaybackOptions
(
const
QPlaybackOptions
&);
38
Q_MULTIMEDIA_EXPORT
QPlaybackOptions
&
operator
=(
const
QPlaybackOptions
&);
39
QPlaybackOptions(
QPlaybackOptions
&&)
noexcept
=
default
;
40
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP
(
QPlaybackOptions
)
41
Q_MULTIMEDIA_EXPORT
~
QPlaybackOptions
();
42
43
void
swap(
QPlaybackOptions
&other)
noexcept
{ d.swap(other.d); }
44
45
Q_MULTIMEDIA_EXPORT std::chrono::milliseconds
networkTimeout
()
const
;
46
Q_MULTIMEDIA_EXPORT
void
setNetworkTimeout(
std
::chrono::milliseconds timeout);
47
Q_MULTIMEDIA_EXPORT
void
resetNetworkTimeout();
48
49
Q_MULTIMEDIA_EXPORT
PlaybackIntent
playbackIntent
()
const
;
50
Q_MULTIMEDIA_EXPORT
void
setPlaybackIntent(PlaybackIntent intent);
51
Q_MULTIMEDIA_EXPORT
void
resetPlaybackIntent();
52
53
Q_MULTIMEDIA_EXPORT qsizetype
probeSize
()
const
;
54
Q_MULTIMEDIA_EXPORT
void
setProbeSize(qsizetype probeSizeBytes);
55
Q_MULTIMEDIA_EXPORT
void
resetProbeSize();
56
57
private
:
58
friend
Q_MULTIMEDIA_EXPORT
bool
comparesEqual
(
const
QPlaybackOptions
&lhs,
59
const
QPlaybackOptions
&rhs)
noexcept
;
60
friend
Q_MULTIMEDIA_EXPORT
Qt
::
strong_ordering
compareThreeWay
(
const
QPlaybackOptions
&
lhs
,
61
const
QPlaybackOptions
&
rhs
)
noexcept
;
62
Q_DECLARE_STRONGLY_ORDERED
(
QPlaybackOptions
)
63
64
friend
class
QPlaybackOptionsPrivate
;
65
QExplicitlySharedDataPointer<QPlaybackOptionsPrivate> d;
66
};
67
68
Q_DECLARE_SHARED(QPlaybackOptions)
69
70
QT_END_NAMESPACE
71
72
#
endif
QPlaybackOptionsPrivate
Definition
qplaybackoptions.cpp:12
QPlaybackOptionsPrivate::QPlaybackOptionsPrivate
QPlaybackOptionsPrivate()=default
QPlaybackOptionsPrivate::m_networkTimeout
std::chrono::milliseconds m_networkTimeout
Definition
qplaybackoptions.cpp:34
QPlaybackOptionsPrivate::m_probeSizeBytes
int m_probeSizeBytes
Definition
qplaybackoptions.cpp:36
QPlaybackOptionsPrivate::compareThreeWay
friend Qt::strong_ordering compareThreeWay(const QPlaybackOptionsPrivate &lhs, const QPlaybackOptionsPrivate &rhs)
Definition
qplaybackoptions.cpp:24
QPlaybackOptionsPrivate::m_playbackIntent
QPlaybackOptions::PlaybackIntent m_playbackIntent
Definition
qplaybackoptions.cpp:35
QPlaybackOptionsPrivate::comparesEqual
friend bool comparesEqual(const QPlaybackOptionsPrivate &lhs, const QPlaybackOptionsPrivate &rhs)
Definition
qplaybackoptions.cpp:16
QPlaybackOptions
The QPlaybackOptions class enables low-level control of media playback options.
Definition
qplaybackoptions.h:21
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
comparesEqual
bool comparesEqual(const QPlaybackOptions &lhs, const QPlaybackOptions &rhs) noexcept
Definition
qplaybackoptions.cpp:90
compareThreeWay
Qt::strong_ordering compareThreeWay(const QPlaybackOptions &lhs, const QPlaybackOptions &rhs) noexcept
Definition
qplaybackoptions.cpp:98
qtmultimedia
src
multimedia
playback
qplaybackoptions.h
Generated on
for Qt by
1.18.0