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_cameradevicemonitor_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_CAMERADEVICEMONITOR_P_H
5
#
define
QPIPEWIRE_CAMERADEVICEMONITOR_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_propertydict_p
.
h
>
19
#
include
<
QtMultimedia
/
private
/
qpipewire_spa_video_format_support_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
<
QtMultimedia
/
qcameradevice
.
h
>
24
#
include
<
QtCore
/
qmutex
.
h
>
25
#
include
<
QtCore
/
qobject
.
h
>
26
27
#
include
<
vector
>
28
#
include
<
map
>
29
#
include
<
optional
>
30
31
QT_BEGIN_NAMESPACE
32
33
namespace
QtPipeWire
{
34
35
class
Q_MULTIMEDIA_EXPORT
QCameraDeviceMonitor
:
public
QObject
36
{
37
Q_OBJECT
38
39
public
:
40
QCameraDeviceMonitor
();
41
42
struct
CameraNode
43
{
44
ObjectId
id
;
45
PwPropertyDict
properties
;
46
PwPropertyDict
deviceProperties
;
// of the parent device, empty if it has none
47
};
48
49
std
::
vector
<
CameraNode
>
cameraNodes
()
const
;
50
QList
<
QCameraDevice
>
cameraDevices
();
51
std
::
optional
<
ObjectId
>
findCameraNode
(
QByteArrayView
deviceId
)
const
;
52
53
// FIXME: improve type safety!
54
std
::
optional
<
QByteArray
>
findTargetObject
(
QByteArrayView
deviceId
)
const
;
55
56
// Called on the PipeWire event loop thread.
57
void
objectAdded
(
ObjectId
,
PipewireRegistryType
,
const
spa_dict
&
properties
);
58
void
objectRemoved
(
ObjectId
);
59
60
Q_SIGNALS
:
61
void
camerasChanged
();
62
63
private
:
64
struct
DeviceRecord
65
{
66
PwPropertyDict
properties
;
67
};
68
69
mutable
QMutex
m_mutex
;
70
std
::
map
<
ObjectId
,
CameraNode
>
m_nodes
;
71
std
::
map
<
ObjectId
,
DeviceRecord
>
m_devices
;
72
73
// Requires m_mutex.
74
const
PwPropertyDict
*
findDeviceProperties
(
const
PwPropertyDict
&
nodeProperties
)
const
;
75
};
76
77
}
// namespace QtPipeWire
78
79
QT_END_NAMESPACE
80
81
#
endif
// QPIPEWIRE_CAMERADEVICEMONITOR_P_H
QtPipeWire::QCameraDeviceMonitor
Definition
qpipewire_cameradevicemonitor_p.h:36
QtPipeWire
Definition
qpipewire_async_support.cpp:10
QtPipeWire::Q_STATIC_LOGGING_CATEGORY
Q_STATIC_LOGGING_CATEGORY(lcPipewireAudioSink, "qt.multimedia.pipewire.audiosink")
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtmultimedia
src
multimedia
pipewire
qpipewire_cameradevicemonitor_p.h
Generated on
for Qt by
1.16.1