Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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_cameranode_p
.
h
>
19
#
include
<
QtMultimedia
/
private
/
qpipewire_propertydict_p
.
h
>
20
#
include
<
QtMultimedia
/
private
/
qpipewire_spa_video_format_support_p
.
h
>
21
#
include
<
QtMultimedia
/
private
/
qpipewire_registry_support_p
.
h
>
22
#
include
<
QtMultimedia
/
private
/
qpipewire_support_p
.
h
>
23
#
include
<
QtMultimedia
/
private
/
qtmultimediaglobal_p
.
h
>
24
#
include
<
QtMultimedia
/
qcameradevice
.
h
>
25
#
include
<
QtCore
/
qmutex
.
h
>
26
#
include
<
QtCore
/
qobject
.
h
>
27
28
#
include
<
vector
>
29
#
include
<
map
>
30
#
include
<
optional
>
31
32
QT_BEGIN_NAMESPACE
33
34
namespace
QtPipeWire
{
35
36
class
Q_MULTIMEDIA_EXPORT
QCameraDeviceMonitor
:
public
QObject
37
{
38
Q_OBJECT
39
40
public
:
41
QCameraDeviceMonitor
();
42
43
struct
CameraNode
44
{
45
ObjectId
id
;
46
PwPropertyDict
properties
;
47
PwPropertyDict
deviceProperties
;
// of the parent device, empty if it has none
48
};
49
50
std
::
vector
<
CameraNode
>
cameraNodes
()
const
;
51
QList
<
QCameraDevice
>
cameraDevices
();
52
std
::
optional
<
ObjectId
>
findCameraNode
(
QByteArrayView
deviceId
)
const
;
53
54
QtPipeWire
::
DmaBufStrategy
dmaBufStrategy
(
QByteArrayView
deviceId
)
const
;
55
56
// FIXME: improve type safety!
57
std
::
optional
<
QByteArray
>
findTargetObject
(
QByteArrayView
deviceId
)
const
;
58
59
// Called on the PipeWire event loop thread.
60
void
objectAdded
(
ObjectId
,
PipewireRegistryType
,
const
spa_dict
&
properties
);
61
void
objectRemoved
(
ObjectId
);
62
63
Q_SIGNALS
:
64
void
camerasChanged
();
65
66
private
:
67
struct
DeviceRecord
68
{
69
PwPropertyDict
properties
;
70
};
71
72
mutable
QMutex
m_mutex
;
73
std
::
map
<
ObjectId
,
CameraNode
>
m_nodes
;
74
std
::
map
<
ObjectId
,
DeviceRecord
>
m_devices
;
75
76
// Requires m_mutex.
77
const
PwPropertyDict
*
findDeviceProperties
(
const
PwPropertyDict
&
nodeProperties
)
const
;
78
};
79
80
}
// namespace QtPipeWire
81
82
QT_END_NAMESPACE
83
84
#
endif
// QPIPEWIRE_CAMERADEVICEMONITOR_P_H
QtPipeWire::QCameraDeviceMonitor
Definition
qpipewire_cameradevicemonitor_p.h:37
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.18.0