PipeWire: spa/param/latency.h Source File

PipeWire 1.6.5

Loading...
Searching...
No Matches
latency.h
Go to the documentation of this file.
1/* Simple Plugin API */
2/* SPDX-FileCopyrightText: Copyright © 2023 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef SPA_PARAM_LATENY_H
6#define SPA_PARAM_LATENY_H
7
8#include <spa/param/param.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
18
37enum spa_param_latency {
38 SPA_PARAM_LATENCY_START,
39 SPA_PARAM_LATENCY_direction,
40 SPA_PARAM_LATENCY_minQuantum,
41 SPA_PARAM_LATENCY_maxQuantum,
42 SPA_PARAM_LATENCY_minRate,
43 SPA_PARAM_LATENCY_maxRate,
44 SPA_PARAM_LATENCY_minNs,
45 SPA_PARAM_LATENCY_maxNs,
46};
47
49 struct spa_latency_info {
50 enum spa_direction direction;
51 float min_quantum;
52 float max_quantum;
53 int32_t min_rate;
54 int32_t max_rate;
55 int64_t min_ns;
56 int64_t max_ns;
57};
58
59#define SPA_LATENCY_INFO(dir,...) ((struct spa_latency_info) { .direction = (dir), ## __VA_ARGS__ })
60#define SPA_LATENCY_INFO_UNSET(dir) SPA_LATENCY_INFO(dir, \
61 .min_quantum = FLT_MAX, .max_quantum = FLT_MIN, \
62 .min_rate = INT32_MAX, .max_rate = INT32_MIN, \
63 .min_ns = INT64_MAX, .max_ns = INT64_MIN)
64
66 * Properties for SPA_TYPE_OBJECT_ParamProcessLatency
67 *
68 * The processing latency indicates logical time delay between a sample in an input port,
69 * and a corresponding sample in an output port, relative to the graph time.
70 */
71enum spa_param_process_latency {
72 SPA_PARAM_PROCESS_LATENCY_START,
73 SPA_PARAM_PROCESS_LATENCY_quantum,
74 SPA_PARAM_PROCESS_LATENCY_rate,
75 SPA_PARAM_PROCESS_LATENCY_ns,
76};
77
79 struct spa_process_latency_info {
80 float quantum;
81 int32_t rate;
82 int64_t ns;
83};
84
85#define SPA_PROCESS_LATENCY_INFO_INIT(...) ((struct spa_process_latency_info) { __VA_ARGS__ })
86
90
91#ifdef __cplusplus
92} /* extern "C" */
93#endif
94
95#endif /* SPA_PARAM_LATENY_H */
spa_param_process_latency
spa_param_process_latency
Properties for SPA_TYPE_OBJECT_ParamProcessLatency.
Definition latency.h:77
spa_param_latency
spa_param_latency
Properties for SPA_TYPE_OBJECT_ParamLatency.
Definition latency.h:42
SPA_PARAM_PROCESS_LATENCY_rate
@ SPA_PARAM_PROCESS_LATENCY_rate
latency (Int) relative to graph rate
Definition latency.h:80
SPA_PARAM_PROCESS_LATENCY_START
@ SPA_PARAM_PROCESS_LATENCY_START
Definition latency.h:78
SPA_PARAM_PROCESS_LATENCY_ns
@ SPA_PARAM_PROCESS_LATENCY_ns
latency (Long) in nanoseconds
Definition latency.h:81
SPA_PARAM_PROCESS_LATENCY_quantum
@ SPA_PARAM_PROCESS_LATENCY_quantum
latency relative to quantum (Float)
Definition latency.h:79
SPA_PARAM_LATENCY_maxNs
@ SPA_PARAM_LATENCY_maxNs
max latency (Long) in nanoseconds
Definition latency.h:50
SPA_PARAM_LATENCY_minRate
@ SPA_PARAM_LATENCY_minRate
min latency (Int) relative to graph rate
Definition latency.h:47
SPA_PARAM_LATENCY_minQuantum
@ SPA_PARAM_LATENCY_minQuantum
min latency relative to quantum (Float)
Definition latency.h:45
SPA_PARAM_LATENCY_START
@ SPA_PARAM_LATENCY_START
Definition latency.h:43
SPA_PARAM_LATENCY_maxRate
@ SPA_PARAM_LATENCY_maxRate
max latency (Int) relative to graph rate
Definition latency.h:48
SPA_PARAM_LATENCY_maxQuantum
@ SPA_PARAM_LATENCY_maxQuantum
max latency relative to quantum (Float)
Definition latency.h:46
SPA_PARAM_LATENCY_direction
@ SPA_PARAM_LATENCY_direction
direction, input/output (Id enum spa_direction)
Definition latency.h:44
SPA_PARAM_LATENCY_minNs
@ SPA_PARAM_LATENCY_minNs
min latency (Long) in nanoseconds
Definition latency.h:49
spa_direction
spa_direction
Definition defs.h:106
param.h
spa/param/param.h
spa_latency_info
helper structure for managing latency objects
Definition latency.h:54
spa_latency_info::min_rate
int32_t min_rate
Definition latency.h:58
spa_latency_info::min_ns
int64_t min_ns
Definition latency.h:60
spa_latency_info::max_rate
int32_t max_rate
Definition latency.h:59
spa_latency_info::direction
enum spa_direction direction
Definition latency.h:55
spa_latency_info::max_quantum
float max_quantum
Definition latency.h:57
spa_latency_info::min_quantum
float min_quantum
Definition latency.h:56
spa_latency_info::max_ns
int64_t max_ns
Definition latency.h:61
spa_process_latency_info
Helper structure for managing process latency objects.
Definition latency.h:85
spa_process_latency_info::ns
int64_t ns
Definition latency.h:88
spa_process_latency_info::quantum
float quantum
Definition latency.h:86
spa_process_latency_info::rate
int32_t rate
Definition latency.h:87