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_propertydict_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 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_PROPERTYDICT_H
5#define QPIPEWIRE_PROPERTYDICT_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_support_p.h>
19#include <QtCore/qglobal.h>
20#include <QtCore/qspan.h>
21
22#include <pipewire/pipewire.h>
23
24#include <functional>
25#include <map>
26#include <optional>
27#include <string>
28#include <string_view>
29
30QT_BEGIN_NAMESPACE
31
32namespace QtPipeWire {
33
34// pw_properties
36
37// PwPropertyDict
39
40// parser
41PwPropertyDict toPropertyDict(const spa_dict &);
42
43// property getters
44// PW_KEY_MEDIA_CLASS
45std::optional<std::string_view> getMediaClass(const PwPropertyDict &);
46// PW_KEY_NODE_NAME
47std::optional<std::string_view> getNodeName(const PwPropertyDict &);
48// PW_KEY_NODE_DESCRIPTION
49std::optional<std::string_view> getNodeDescription(const PwPropertyDict &);
50// PW_KEY_DEVICE_SYSFS_PATH
51std::optional<std::string_view> getDeviceSysfsPath(const PwPropertyDict &);
52// PW_KEY_DEVICE_NAME
53std::optional<std::string_view> getDeviceName(const PwPropertyDict &);
54// PW_KEY_DEVICE_DESCRIPTION
55std::optional<std::string_view> getDeviceDescription(const PwPropertyDict &);
56// PW_KEY_DEVICE_ID
57std::optional<ObjectId> getDeviceId(const PwPropertyDict &);
58// PW_KEY_OBJECT_SERIAL
59std::optional<ObjectSerial> getObjectSerial(const PwPropertyDict &);
60
61// PW_KEY_METADATA_NAME
62std::optional<std::string_view> getMetadataName(const PwPropertyDict &);
63
64} // namespace QtPipeWire
65
66QT_END_NAMESPACE
67
68#endif // QPIPEWIRE_PROPERTYDICT_H
PwPropertiesHandle makeProperties(QSpan< const spa_dict_item > keyValuePairs)
std::optional< std::string_view > getNodeDescription(const PwPropertyDict &dict)
std::optional< std::string_view > getDeviceSysfsPath(const PwPropertyDict &dict)
std::optional< ObjectId > getDeviceId(const PwPropertyDict &dict)
std::optional< std::string_view > getDeviceName(const PwPropertyDict &dict)
std::optional< std::string_view > getMetadataName(const PwPropertyDict &dict)
std::optional< std::string_view > getMediaClass(const PwPropertyDict &dict)
std::optional< std::string_view > getNodeName(const PwPropertyDict &dict)
PwPropertyDict toPropertyDict(const spa_dict &dict)
std::optional< std::string_view > getDeviceDescription(const PwPropertyDict &dict)
std::optional< ObjectSerial > getObjectSerial(const PwPropertyDict &dict)
#define PW_KEY_DEVICE_SYSFS_PATH
#define PW_KEY_OBJECT_SERIAL