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
qwindowcapture.h
Go to the documentation of this file.
1
// Copyright (C) 2023 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
QWINDOWCAPTURE_H
5
#
define
QWINDOWCAPTURE_H
6
7
#
include
<
QtMultimedia
/
qtmultimediaexports
.
h
>
8
#
include
<
QtMultimedia
/
qcapturablewindow
.
h
>
9
#
include
<
QtCore
/
qobject
.
h
>
10
#
include
<
QtCore
/
qlist
.
h
>
11
12
#
include
<
optional
>
13
14
QT_BEGIN_NAMESPACE
15
16
class
QPlatformSurfaceCapture;
17
18
class
Q_MULTIMEDIA_EXPORT
QWindowCapture
:
public
QObject
19
{
20
Q_OBJECT
21
Q_PROPERTY(
bool
active READ isActive WRITE setActive NOTIFY activeChanged)
22
Q_PROPERTY(QCapturableWindow window READ window WRITE setWindow NOTIFY windowChanged)
23
Q_PROPERTY(Error error READ error NOTIFY errorChanged)
24
Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged)
25
Q_PROPERTY(std::optional<qreal> maximumFrameRate READ maximumFrameRate WRITE setMaximumFrameRate
26
NOTIFY maximumFrameRateChanged REVISION(6, 12))
27
28
public
:
29
enum
Error {
30
NoError = 0,
31
InternalError = 1,
32
CapturingNotSupported = 2,
33
CaptureFailed = 4,
34
NotFound = 5,
35
};
36
Q_ENUM(Error)
37
38
explicit
QWindowCapture(QObject *parent =
nullptr
);
39
~QWindowCapture() override;
40
41
Q_INVOKABLE
static
QList<QCapturableWindow> capturableWindows();
42
43
QMediaCaptureSession *captureSession()
const
;
44
45
void
setWindow(QCapturableWindow window);
46
47
QCapturableWindow window()
const
;
48
49
bool
isActive()
const
;
50
51
Error error()
const
;
52
QString errorString()
const
;
53
54
void
setMaximumFrameRate(std::optional<qreal> frameRate);
55
std::optional<qreal> maximumFrameRate()
const
;
56
57
public
Q_SLOTS:
58
void
setActive(
bool
active);
59
void
start() { setActive(
true
); }
60
void
stop() { setActive(
false
); }
61
62
Q_SIGNALS:
63
void
activeChanged(
bool
);
64
void
windowChanged(QCapturableWindow window);
65
void
errorChanged();
66
void
errorOccurred(QWindowCapture::Error error,
const
QString &errorString);
67
Q_REVISION(6, 12)
void
maximumFrameRateChanged();
68
69
private
:
70
void
setCaptureSession(QMediaCaptureSession *captureSession);
71
QPlatformSurfaceCapture *platformWindowCapture()
const
;
72
73
friend
class
QMediaCaptureSession;
74
Q_DISABLE_COPY(QWindowCapture)
75
Q_DECLARE_PRIVATE(QWindowCapture)
76
};
77
78
QT_END_NAMESPACE
79
80
#
endif
// QWINDOWCAPTURE_H
QMediaRecorderPrivate
Definition
qmediarecorder_p.h:30
QMediaRecorderPrivate::initErrorMessage
QString initErrorMessage
Definition
qmediarecorder_p.h:40
QMediaRecorderPrivate::control
QPlatformMediaRecorder * control
Definition
qmediarecorder_p.h:39
QMediaRecorderPrivate::settingsChanged
bool settingsChanged
Definition
qmediarecorder_p.h:43
QMediaRecorderPrivate::captureSession
QMediaCaptureSession * captureSession
Definition
qmediarecorder_p.h:38
QMediaRecorderPrivate::encoderSettings
QMediaEncoderSettings encoderSettings
Definition
qmediarecorder_p.h:45
QMediaRecorderPrivate::autoStop
bool autoStop
Definition
qmediarecorder_p.h:41
QMediaRecorderPrivate::msgFailedStartRecording
static QString msgFailedStartRecording()
Definition
qmediarecorder.cpp:132
QObjectData::q_ptr
QObject * q_ptr
Definition
qobject.h:73
QScreenCapture
\inmodule QtMultimedia
Definition
qscreencapture.h:23
QWindowCapture
\inmodule QtMultimedia
Definition
qwindowcapture.h:19
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QMediaCaptureSession::ObjectTraits< QCamera >
\qmltype CaptureSession
Definition
qmediacapturesession.cpp:133
qtmultimedia
src
multimedia
recording
qwindowcapture.h
Generated on
for Qt by
1.18.0