Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
15QT_BEGIN_NAMESPACE
16
17class QPlaybackOptionsPrivate;
18QT_DECLARE_QESDP_SPECIALIZATION_DTOR(QPlaybackOptionsPrivate)
19
21{
22 Q_GADGET_EXPORT(Q_MULTIMEDIA_EXPORT)
28 Q_CLASSINFO("RegisterEnumClassesUnscoped", "false")
29public:
34 Q_ENUM(PlaybackIntent)
35
39 QPlaybackOptions(QPlaybackOptions &&) noexcept = default;
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
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
57private:
58 friend Q_MULTIMEDIA_EXPORT bool comparesEqual(const QPlaybackOptions &lhs,
59 const QPlaybackOptions &rhs) noexcept;
61 const QPlaybackOptions &rhs) noexcept;
63
65 QExplicitlySharedDataPointer<QPlaybackOptionsPrivate> d;
66};
67
68Q_DECLARE_SHARED(QPlaybackOptions)
69
70QT_END_NAMESPACE
71
72#endif
QPlatformMediaPlayer * control
void setState(QMediaPlayer::PlaybackState state)
\qmltype MediaPlayer \nativetype QMediaPlayer
QList< QMediaMetaData > trackMetaData(QPlatformMediaPlayer::TrackType s) const
QPlaybackOptions playbackOptions
void setMedia(const QUrl &media, QIODevice *stream=nullptr)
QPointer< QObject > videoOutput
QErrorInfo< QMediaPlayer::Error > error
void setVideoSink(QVideoSink *sink)
std::unique_ptr< QFile > qrcFile
QPointer< QVideoSink > videoSink
QPointer< QAudioOutput > audioOutput
void setStatus(QMediaPlayer::MediaStatus status)
void setError(QMediaPlayer::Error error, const QString &errorString)
QPointer< QAudioBufferOutput > audioBufferOutput
The QPlaybackOptions class enables low-level control of media playback options.
Q_MULTIMEDIA_EXPORT void resetPlaybackIntent()
Q_MULTIMEDIA_EXPORT void setProbeSize(qsizetype probeSizeBytes)
Q_MULTIMEDIA_EXPORT void resetNetworkTimeout()
Q_MULTIMEDIA_EXPORT void setNetworkTimeout(std::chrono::milliseconds timeout)
void swap(QPlaybackOptions &other) noexcept
Q_MULTIMEDIA_EXPORT void resetProbeSize()
QPlaybackOptions(QPlaybackOptions &&) noexcept=default
Q_MULTIMEDIA_EXPORT void setPlaybackIntent(PlaybackIntent intent)
bool comparesEqual(const QPlaybackOptions &lhs, const QPlaybackOptions &rhs) noexcept