19 Q_PROPERTY(
bool active READ isActive WRITE setActive NOTIFY activeChanged)
20 Q_PROPERTY(QCapturableWindow window READ window WRITE setWindow NOTIFY windowChanged)
21 Q_PROPERTY(Error error READ error NOTIFY errorChanged)
22 Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged)
27 CapturingNotSupported = 2,
33 explicit QWindowCapture(QObject *parent =
nullptr);
34 ~QWindowCapture() override;
36 Q_INVOKABLE
static QList<QCapturableWindow> capturableWindows();
38 QMediaCaptureSession *captureSession()
const;
40 void setWindow(QCapturableWindow window);
42 QCapturableWindow window()
const;
44 bool isActive()
const;
47 QString errorString()
const;
50 void setActive(
bool active);
51 void start() { setActive(
true); }
52 void stop() { setActive(
false); }
55 void activeChanged(
bool);
56 void windowChanged(QCapturableWindow window);
58 void errorOccurred(QWindowCapture::Error error,
const QString &errorString);
61 void setCaptureSession(QMediaCaptureSession *captureSession);
62 QPlatformSurfaceCapture *platformWindowCapture()
const;
64 friend class QMediaCaptureSession;
65 Q_DISABLE_COPY(QWindowCapture)
66 Q_DECLARE_PRIVATE(QWindowCapture)