Debian Codegraph @

modules/lsp-audio-pipewire-lib/include/lsp-plug.in/audio/pipewire/pod.h

raw
1 /*
2 * Copyright (C) 2026 Linux Studio Plugins Project <https://lsp-plug.in/>
3 * (C) 2026 Vladimir Sadovnikov <[email protected]>
4 *
5 * This file is part of lsp-audio-pipewire-lib
6 * Created on: 2 мая 2026 г.
7 *
8 * lsp-audio-pipewire-lib is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * any later version.
12 *
13 * lsp-audio-pipewire-lib is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with lsp-audio-pipewire-lib. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22 #ifndef LSP_PLUG_IN_AUDIO_PIPEWIRE_POD_H_
23 #define LSP_PLUG_IN_AUDIO_PIPEWIRE_POD_H_
24
25 #include <lsp-plug.in/audio/pipewire/version.h>
26
27 #include <lsp-plug.in/common/types.h>
28 #include <pw-headers/spa/param/latency.h>
29 #include <pw-headers/spa/pod/builder.h>
30
31 namespace lsp
32 {
33 namespace audio
34 {
35 namespace pipewire
36 {
37 struct pod_builder
38 {
39 private:
40 uint8_t buffer[1024];
41 spa_pod_builder builder;
42
43 public:
44 pod_builder();
45 pod_builder(const pod_builder &) = delete;
46 pod_builder(pod_builder &&) = delete;
47 ~pod_builder();
48
49 pod_builder & operator = (const pod_builder &) = delete;
50 pod_builder & operator = (pod_builder &&) = delete;
51
52 public:
53 spa_pod *make_audio_format_pod(uint32_t sample_rate);
54 spa_pod *make_midi_format_pod();
55 spa_pod *make_audio_buffers_pod(size_t max_buffer_size, size_t max_buffers);
56 spa_pod *make_midi_buffers_pod(size_t max_buffer_size, size_t max_buffers);
57 spa_pod *make_latency_pod(const spa_latency_info *info);
58 spa_pod *make_process_latency_pod(uint32_t latency, uint32_t sample_rate);
59 spa_pod *make_pod_io();
60 spa_pod *make_pod_async_io();
61 };
62 } /* namespace pipewire */
63 } /* namespace audio */
64 } /* namespace lsp */
65
66
67
68
69 #endif /* LSP_PLUG_IN_AUDIO_PIPEWIRE_POD_H_ */