5#ifndef SPA_PARAM_LATENCY_UTILS_H
6#define SPA_PARAM_LATENCY_UTILS_H
40 .min_quantum = FLT_MAX,
42 .min_rate = UINT32_MAX,
50 if (info->min_quantum == FLT_MAX)
51 info->min_quantum = 0;
52 if (info->min_rate == UINT32_MAX)
54 if (info->min_ns == UINT64_MAX)
67 if (other->
min_rate < info->min_rate)
69 if (other->
max_rate > info->max_rate)
71 if (other->
min_ns < info->min_ns)
72 info->min_ns = other->
min_ns;
73 if (other->
max_ns > info->max_ns)
74 info->max_ns = other->
max_ns;
140 info->min_quantum += process->
quantum;
141 info->max_quantum += process->
quantum;
142 info->min_rate += process->
rate;
143 info->max_rate += process->
rate;
144 info->min_ns += process->
ns;
145 info->max_ns += process->
ns;
static int spa_latency_parse(const struct spa_pod *latency, struct spa_latency_info *info)
Definition latency-utils.h:84
static struct spa_pod * spa_process_latency_build(struct spa_pod_builder *builder, uint32_t id, const struct spa_process_latency_info *info)
Definition latency-utils.h:131
static int spa_latency_info_combine(struct spa_latency_info *info, const struct spa_latency_info *other)
Definition latency-utils.h:64
static struct spa_pod * spa_latency_build(struct spa_pod_builder *builder, uint32_t id, const struct spa_latency_info *info)
Definition latency-utils.h:103
#define SPA_LATENCY_INFO(dir,...)
Definition latency.h:65
static int spa_process_latency_info_add(const struct spa_process_latency_info *process, struct spa_latency_info *info)
Definition latency-utils.h:142
static int spa_process_latency_parse(const struct spa_pod *latency, struct spa_process_latency_info *info)
Definition latency-utils.h:117
static void spa_latency_info_combine_finish(struct spa_latency_info *info)
Definition latency-utils.h:53
static int spa_latency_info_compare(const struct spa_latency_info *a, const struct spa_latency_info *b)
Definition latency-utils.h:29
static void spa_latency_info_combine_start(struct spa_latency_info *info, enum spa_direction direction)
Definition latency-utils.h:42
@ SPA_PARAM_PROCESS_LATENCY_rate
latency (Int) relative to graph rate
Definition latency.h:76
@ SPA_PARAM_PROCESS_LATENCY_ns
latency (Long) in nanoseconds
Definition latency.h:77
@ SPA_PARAM_PROCESS_LATENCY_quantum
latency relative to quantum (Float)
Definition latency.h:75
@ SPA_PARAM_LATENCY_maxNs
max latency (Long) in nanoseconds
Definition latency.h:50
@ SPA_PARAM_LATENCY_minRate
min latency (Int) relative to graph rate
Definition latency.h:47
@ SPA_PARAM_LATENCY_minQuantum
min latency relative to quantum (Float)
Definition latency.h:45
@ SPA_PARAM_LATENCY_maxRate
max latency (Int) relative to graph rate
Definition latency.h:48
@ SPA_PARAM_LATENCY_maxQuantum
max latency relative to quantum (Float)
Definition latency.h:46
@ SPA_PARAM_LATENCY_direction
direction, input/output (Id enum spa_direction)
Definition latency.h:44
@ SPA_PARAM_LATENCY_minNs
min latency (Long) in nanoseconds
Definition latency.h:49
#define SPA_POD_OPT_Float(val)
Definition parser.h:526
#define SPA_POD_Long(val)
Definition vararg.h:65
#define SPA_POD_Id(val)
Definition vararg.h:49
#define SPA_POD_OPT_Int(val)
Definition parser.h:522
#define spa_pod_builder_add_object(b, type, id,...)
Definition builder.h:659
#define SPA_POD_Float(val)
Definition vararg.h:76
#define spa_pod_parse_object(pod, type, id,...)
Definition parser.h:576
#define SPA_POD_Int(val)
Definition vararg.h:54
#define SPA_POD_OPT_Long(val)
Definition parser.h:524
@ SPA_TYPE_OBJECT_ParamLatency
Definition type.h:84
@ SPA_TYPE_OBJECT_ParamProcessLatency
Definition type.h:85
#define spa_zero(x)
Definition defs.h:483
spa_direction
Definition defs.h:106
helper structure for managing latency objects
Definition latency.h:54
uint32_t min_rate
Definition latency.h:58
uint32_t max_rate
Definition latency.h:59
enum spa_direction direction
Definition latency.h:55
float max_quantum
Definition latency.h:57
float min_quantum
Definition latency.h:56
uint64_t min_ns
Definition latency.h:60
uint64_t max_ns
Definition latency.h:61
Helper structure for managing process latency objects.
Definition latency.h:81
float quantum
Definition latency.h:82
uint32_t rate
Definition latency.h:83
uint64_t ns
Definition latency.h:84