PipeWire: latency.h Source File

PipeWire 0.3.66

Loading...
Searching...
No Matches
latency.h
Go to the documentation of this file.
1/* Simple Plugin API
2 *
3 * Copyright © 2023 Wim Taymans
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
14 * Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef SPA_PARAM_LATENY_H
26#define SPA_PARAM_LATENY_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
37#include <spa/param/param.h>
38
40enum spa_param_latency {
41 SPA_PARAM_LATENCY_START,
42 SPA_PARAM_LATENCY_direction,
43 SPA_PARAM_LATENCY_minQuantum,
44 SPA_PARAM_LATENCY_maxQuantum,
45 SPA_PARAM_LATENCY_minRate,
46 SPA_PARAM_LATENCY_maxRate,
47 SPA_PARAM_LATENCY_minNs,
48 SPA_PARAM_LATENCY_maxNs,
49};
50
52 struct spa_latency_info {
53 enum spa_direction direction;
54 float min_quantum;
55 float max_quantum;
56 uint32_t min_rate;
57 uint32_t max_rate;
58 uint64_t min_ns;
59 uint64_t max_ns;
60};
61
62#define SPA_LATENCY_INFO(dir,...) ((struct spa_latency_info) { .direction = (dir), ## __VA_ARGS__ })
63
65enum spa_param_process_latency {
66 SPA_PARAM_PROCESS_LATENCY_START,
67 SPA_PARAM_PROCESS_LATENCY_quantum,
68 SPA_PARAM_PROCESS_LATENCY_rate,
69 SPA_PARAM_PROCESS_LATENCY_ns,
70};
71
73 struct spa_process_latency_info {
74 float quantum;
75 uint32_t rate;
76 uint64_t ns;
77};
78
79#define SPA_PROCESS_LATENCY_INFO_INIT(...) ((struct spa_process_latency_info) { __VA_ARGS__ })
80
85#ifdef __cplusplus
86} /* extern "C" */
87#endif
88
89#endif /* SPA_PARAM_LATENY_H */
spa_param_process_latency
spa_param_process_latency
properties for SPA_TYPE_OBJECT_ParamProcessLatency
Definition: latency.h:71
spa_param_latency
spa_param_latency
properties for SPA_TYPE_OBJECT_ParamLatency
Definition: latency.h:45
SPA_PARAM_PROCESS_LATENCY_rate
@ SPA_PARAM_PROCESS_LATENCY_rate
latency (Int) relative to rate
Definition: latency.h:74
SPA_PARAM_PROCESS_LATENCY_START
@ SPA_PARAM_PROCESS_LATENCY_START
Definition: latency.h:72
SPA_PARAM_PROCESS_LATENCY_ns
@ SPA_PARAM_PROCESS_LATENCY_ns
latency (Long) in nanoseconds
Definition: latency.h:75
SPA_PARAM_PROCESS_LATENCY_quantum
@ SPA_PARAM_PROCESS_LATENCY_quantum
latency relative to quantum (Float)
Definition: latency.h:73
SPA_PARAM_LATENCY_maxNs
@ SPA_PARAM_LATENCY_maxNs
max latency (Long) in nanoseconds
Definition: latency.h:53
SPA_PARAM_LATENCY_minRate
@ SPA_PARAM_LATENCY_minRate
min latency (Int) relative to rate
Definition: latency.h:50
SPA_PARAM_LATENCY_minQuantum
@ SPA_PARAM_LATENCY_minQuantum
min latency relative to quantum (Float)
Definition: latency.h:48
SPA_PARAM_LATENCY_START
@ SPA_PARAM_LATENCY_START
Definition: latency.h:46
SPA_PARAM_LATENCY_maxRate
@ SPA_PARAM_LATENCY_maxRate
max latency (Int) relative to rate
Definition: latency.h:51
SPA_PARAM_LATENCY_maxQuantum
@ SPA_PARAM_LATENCY_maxQuantum
max latency relative to quantum (Float)
Definition: latency.h:49
SPA_PARAM_LATENCY_direction
@ SPA_PARAM_LATENCY_direction
direction, input/output (Id enum spa_direction)
Definition: latency.h:47
SPA_PARAM_LATENCY_minNs
@ SPA_PARAM_LATENCY_minNs
min latency (Long) in nanoseconds
Definition: latency.h:52
spa_direction
spa_direction
Definition: defs.h:108
param.h
spa/param/param.h
spa_latency_info
helper structure for managing latency objects
Definition: latency.h:57
spa_latency_info::min_rate
uint32_t min_rate
Definition: latency.h:61
spa_latency_info::max_rate
uint32_t max_rate
Definition: latency.h:62
spa_latency_info::direction
enum spa_direction direction
Definition: latency.h:58
spa_latency_info::max_quantum
float max_quantum
Definition: latency.h:60
spa_latency_info::min_quantum
float min_quantum
Definition: latency.h:59
spa_latency_info::min_ns
uint64_t min_ns
Definition: latency.h:63
spa_latency_info::max_ns
uint64_t max_ns
Definition: latency.h:64
spa_process_latency_info
Helper structure for managing process latency objects.
Definition: latency.h:79
spa_process_latency_info::quantum
float quantum
Definition: latency.h:80
spa_process_latency_info::rate
uint32_t rate
Definition: latency.h:81
spa_process_latency_info::ns
uint64_t ns
Definition: latency.h:82