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_cameracontextmanager_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 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 QPIPEWIRE_CAMERACONTEXTMANAGER_P_H
5#define QPIPEWIRE_CAMERACONTEXTMANAGER_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 <QtMultimedia/private/qpipewire_cameradevicemonitor_p.h>
19#include <QtMultimedia/private/qpipewire_instance_p.h>
20#include <QtMultimedia/private/qpipewire_registry_support_p.h>
21#include <QtMultimedia/private/qpipewire_support_p.h>
22#include <QtMultimedia/private/qtmultimediaglobal_p.h>
23#include <QtCore/qglobal.h>
24
25#include <pipewire/pipewire.h>
26
27#include <memory>
28
29QT_BEGIN_NAMESPACE
30
31namespace QtPipeWire {
32
33class Q_MULTIMEDIA_EXPORT QCameraContextManager
34{
35public:
38
40
41 static bool isSupported();
42
43 bool isConnected() const { return bool(m_coreConnection); }
44
46
49
50 static bool isInPwThreadLoop();
51
53
54 void syncRegistry();
55
56private:
57 static void objectAddedCb(void *data, uint32_t id, uint32_t permissions, const char *type,
58 uint32_t version, const struct spa_dict *props);
59 static void objectRemovedCb(void *data, uint32_t id);
61 const spa_dict &props);
63
64 void startDeviceMonitor();
65 void stopDeviceMonitor();
66
67 bool connectToDaemon();
68
69#if QT_CONFIG(dbus)
70 bool connectViaPortal();
71#endif
72
74
78
80};
81
82} // namespace QtPipeWire
83
84QT_END_NAMESPACE
85
86#endif // QPIPEWIRE_CAMERACONTEXTMANAGER_P_H