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
qpipewire_screencapture.cpp
Go to the documentation of this file.
1// Copyright (C) 2024 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
5
6#include <QtMultimedia/private/qpipewire_screencapturehelper_p.h>
7#include <QtMultimedia/private/qpipewire_instance_p.h>
8
9#include <utility>
10
11QT_BEGIN_NAMESPACE
12
13using namespace Qt::StringLiterals;
14
15namespace QtPipeWire {
16
21
23
25{
27 return false;
28
30}
31
33{
34 if (m_helper)
35 return m_helper->frameFormat();
36
37 return QVideoFrameFormat();
38}
39
41{
42 // Initialize helper, keep alive between captures
43 if (!m_helper)
45
48 u"There is no ScreenCast service available in org.freedesktop.portal!"_s);
49 return false;
50 }
51
53
54 if (active)
55 m_helper->start();
56 else
57 m_helper->stop();
58
59 return true;
60}
61
62} // namespace QtPipeWire
63
64QT_END_NAMESPACE