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
qmediaplayer_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
QMEDIAPLAYER_P_H
5
#
define
QMEDIAPLAYER_P_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
include
"qmediaplayer.h"
19
#
include
<
QtMultimedia
/
qmediametadata
.
h
>
20
#
include
<
QtMultimedia
/
qvideosink
.
h
>
21
#
include
<
QtMultimedia
/
qaudiooutput
.
h
>
22
#
include
<
QtMultimedia
/
qaudiobufferoutput
.
h
>
23
#
include
<
QtMultimedia
/
qplaybackoptions
.
h
>
24
#
include
<
QtMultimedia
/
private
/
qplatformmediaplayer_p
.
h
>
25
#
include
<
QtMultimedia
/
private
/
qerrorinfo_p
.
h
>
26
#
include
<
QtMultimedia
/
private
/
qmultimedia_source_resolver_p
.
h
>
27
28
#
include
<
QtCore
/
qobject
.
h
>
29
#
include
<
QtCore
/
qpointer
.
h
>
30
#
include
<
QtCore
/
qurl
.
h
>
31
#
include
<
QtCore
/
qfile
.
h
>
32
#
include
<
QtCore
/
qtimer
.
h
>
33
#
include
<
QtCore
/
private
/
qobject_p
.
h
>
34
35
#
include
<
memory
>
36
37
QT_BEGIN_NAMESPACE
38
39
class
QPlatformMediaPlayer;
40
41
class
QMediaPlayerPrivate
:
public
QObjectPrivate
42
{
43
Q_DECLARE_PUBLIC(QMediaPlayer)
44
45
public
:
46
static
QMediaPlayerPrivate
*
get
(
QMediaPlayer
*
session
)
47
{
48
return
reinterpret_cast
<
QMediaPlayerPrivate
*>(
QObjectPrivate
::
get
(
session
));
49
}
50
51
QMediaPlayerPrivate
() =
default
;
52
QPlatformMediaPlayer *
control
=
nullptr
;
53
54
QPointer
<
QAudioBufferOutput
>
audioBufferOutput
;
55
QPointer
<
QAudioOutput
>
audioOutput
;
56
QPointer
<
QVideoSink
>
videoSink
;
57
QPointer
<
QObject
>
videoOutput
;
58
QUrl
qrcMedia
;
59
std
::
unique_ptr
<
QFile
>
qrcFile
;
60
QUrl
source
;
// unresolved
61
QIODevice
*
stream
=
nullptr
;
62
QPlaybackOptions
playbackOptions
;
63
64
QMediaPlayer
::
PlaybackState
state
=
QMediaPlayer
::
StoppedState
;
65
QErrorInfo
<
QMediaPlayer
::
Error
>
error
;
66
67
void
setMedia
(QUrl media, QIODevice *stream =
nullptr
);
68
69
QList
<
QMediaMetaData
>
trackMetaData
(QPlatformMediaPlayer::TrackType s)
const
;
70
71
void
setState
(QMediaPlayer::PlaybackState state);
72
void
setStatus
(QMediaPlayer::MediaStatus status);
73
void
setError
(QMediaPlayer::Error error,
const
QString &errorString);
74
75
void
setVideoSink
(QVideoSink *sink)
76
{
77
Q_Q(QMediaPlayer);
78
if
(sink == videoSink)
79
return
;
80
if
(videoSink)
81
videoSink->setSource(
nullptr
);
82
videoSink = sink;
83
if
(sink)
84
sink->setSource(q);
85
if
(
control
)
86
control
->setVideoSink(sink);
87
Q_EMIT q->videoOutputChanged();
88
}
89
90
using
AbstractSourceResolver
=
QMultimediaPrivate
::
AbstractSourceResolver
;
91
using
TrivialSourceResolver
=
QMultimediaPrivate
::
TrivialSourceResolver
;
92
std
::
unique_ptr
<
const
AbstractSourceResolver
>
m_sourceResolver
=
93
std
::
make_unique
<
TrivialSourceResolver
>();
94
};
95
96
QT_END_NAMESPACE
97
98
#
endif
QMediaPlayerPrivate
Definition
qmediaplayer_p.h:42
QMediaPlayerPrivate::control
QPlatformMediaPlayer * control
Definition
qmediaplayer_p.h:52
QMediaPlayerPrivate::setState
void setState(QMediaPlayer::PlaybackState state)
\qmltype MediaPlayer \nativetype QMediaPlayer
Definition
qmediaplayer.cpp:93
QMediaPlayerPrivate::trackMetaData
QList< QMediaMetaData > trackMetaData(QPlatformMediaPlayer::TrackType s) const
Definition
qmediaplayer.cpp:173
QMediaPlayerPrivate::playbackOptions
QPlaybackOptions playbackOptions
Definition
qmediaplayer_p.h:62
QMediaPlayerPrivate::stream
QIODevice * stream
Definition
qmediaplayer_p.h:61
QMediaPlayerPrivate::videoOutput
QPointer< QObject > videoOutput
Definition
qmediaplayer_p.h:57
QMediaPlayerPrivate::error
QErrorInfo< QMediaPlayer::Error > error
Definition
qmediaplayer_p.h:65
QMediaPlayerPrivate::source
QUrl source
Definition
qmediaplayer_p.h:60
QMediaPlayerPrivate::setVideoSink
void setVideoSink(QVideoSink *sink)
Definition
qmediaplayer_p.h:75
QMediaPlayerPrivate::setMedia
void setMedia(QUrl media, QIODevice *stream=nullptr)
Definition
qmediaplayer.cpp:119
QMediaPlayerPrivate::qrcFile
std::unique_ptr< QFile > qrcFile
Definition
qmediaplayer_p.h:59
QMediaPlayerPrivate::videoSink
QPointer< QVideoSink > videoSink
Definition
qmediaplayer_p.h:56
QMediaPlayerPrivate::audioOutput
QPointer< QAudioOutput > audioOutput
Definition
qmediaplayer_p.h:55
QMediaPlayerPrivate::setStatus
void setStatus(QMediaPlayer::MediaStatus status)
Definition
qmediaplayer.cpp:105
QMediaPlayerPrivate::qrcMedia
QUrl qrcMedia
Definition
qmediaplayer_p.h:58
QMediaPlayerPrivate::setError
void setError(QMediaPlayer::Error error, const QString &errorString)
Definition
qmediaplayer.cpp:112
QMediaPlayerPrivate::m_sourceResolver
std::unique_ptr< const AbstractSourceResolver > m_sourceResolver
Definition
qmediaplayer_p.h:92
QMediaPlayerPrivate::audioBufferOutput
QPointer< QAudioBufferOutput > audioBufferOutput
Definition
qmediaplayer_p.h:54
QPlaybackOptions
The QPlaybackOptions class enables low-level control of media playback options.
Definition
qplaybackoptions.h:21
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtmultimedia
src
multimedia
playback
qmediaplayer_p.h
Generated on
for Qt by
1.18.0