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
29
QT_BEGIN_NAMESPACE
30
31
namespace
QtPipeWire
{
32
33
class
Q_MULTIMEDIA_EXPORT
QCameraContextManager
34
{
35
public
:
36
QCameraContextManager
();
37
~
QCameraContextManager
();
38
39
static
QCameraContextManager
*
instance
();
40
41
static
bool
isSupported
();
42
43
bool
isConnected
()
const
{
return
bool
(
m_coreConnection
); }
44
45
static
QCameraDeviceMonitor
&
deviceMonitor
();
46
47
QPipeWireInstance
&
pwInstance
()
const
{
return
*
m_pwInstance
; }
48
const
PwCoreConnectionHandle
&
coreConnection
()
const
{
return
m_coreConnection
; }
49
50
static
bool
isInPwThreadLoop
();
51
52
PwNodeHandle
bindNode
(
ObjectId
);
53
54
void
syncRegistry
();
55
56
private
:
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
);
60
void
objectAdded
(
ObjectId
,
uint32_t
permissions
,
PipewireRegistryType
,
uint32_t
version
,
61
const
spa_dict
&
props
);
62
void
objectRemoved
(
ObjectId
);
63
64
void
startDeviceMonitor
();
65
void
stopDeviceMonitor
();
66
67
bool
connectToDaemon
();
68
69
#
if
QT_CONFIG
(
dbus
)
70
bool
connectViaPortal
();
71
#
endif
72
73
const
std
::
shared_ptr
<
QPipeWireInstance
>
m_pwInstance
;
74
75
PwCoreConnectionHandle
m_coreConnection
;
76
PwRegistryHandle
m_registry
;
77
spa_hook
m_registryListener
{};
78
79
std
::
unique_ptr
<
QCameraDeviceMonitor
>
m_deviceMonitor
;
80
};
81
82
}
// namespace QtPipeWire
83
84
QT_END_NAMESPACE
85
86
#
endif
// QPIPEWIRE_CAMERACONTEXTMANAGER_P_H
QtPipeWire::QCameraContextManager
Definition
qpipewire_cameracontextmanager_p.h:34
QtPipeWire
Definition
qpipewire_async_support.cpp:10
qtmultimedia
src
multimedia
pipewire
qpipewire_cameracontextmanager_p.h
Generated on
for Qt by
1.16.1