Go to the documentation of this file.
25 #ifndef SPA_UTILS_DEFS_H
26 #define SPA_UTILS_DEFS_H
63 #if defined(__clang__) && defined(__cplusplus) && __cplusplus >= 201103L
65 # define SPA_FALLTHROUGH [[clang::fallthrough]];
66 #elif __GNUC__ >= 7 || __clang_major__ >= 10
67 # define SPA_FALLTHROUGH __attribute__ ((fallthrough));
69 # define SPA_FALLTHROUGH
72 #define SPA_FLAG_MASK(field,mask,flag) (((field) & (mask)) == (flag))
73 #define SPA_FLAG_IS_SET(field,flag) SPA_FLAG_MASK(field,flag,flag)
74 #define SPA_FLAG_SET(field,flag) ((field) |= (flag))
75 #define SPA_FLAG_CLEAR(field,flag) ((field) &= ~(flag))
76 #define SPA_FLAG_UPDATE(field,flag,val) ((val) ? SPA_FLAG_SET(field,flag) : SPA_FLAG_CLEAR(field,flag))
83 #define SPA_DIRECTION_REVERSE(d) ((d) ^ 1)
85 #define SPA_RECTANGLE(width,height) (struct spa_rectangle){ width, height }
91 #define SPA_POINT(x,y) (struct spa_point){ x, y }
97 #define SPA_REGION(x,y,width,height) (struct spa_region){ SPA_POINT(x,y), SPA_RECTANGLE(width,height) }
103 #define SPA_FRACTION(num,denom) (struct spa_fraction){ num, denom }
109 #define SPA_N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0]))
120 #define SPA_FOR_EACH_ELEMENT(arr, ptr) \
121 for (ptr = arr; (void*)ptr < SPA_PTROFF(arr, sizeof(arr), void); ptr++)
125 __typeof__(a) _a = (a); \
126 SPA_LIKELY(_a >= 0) ? _a : -_a; \
128 #define SPA_MIN(a,b) \
130 __typeof__(a) _min_a = (a); \
131 __typeof__(b) _min_b = (b); \
132 SPA_LIKELY(_min_a < _min_b) ? _min_a : _min_b; \
134 #define SPA_MAX(a,b) \
136 __typeof__(a) _max_a = (a); \
137 __typeof__(b) _max_b = (b); \
138 SPA_LIKELY(_max_a > _max_b) ? _max_a : _max_b; \
140 #define SPA_CLAMP(v,low,high) \
142 __typeof__(v) _v = (v); \
143 __typeof__(low) _low = (low); \
144 __typeof__(high) _high = (high); \
145 SPA_MIN(SPA_MAX(_v, _low), _high); \
148 #define SPA_SWAP(a,b) \
150 __typeof__(a) _t = (a); \
154 #define SPA_TYPECHECK(type,x) \
157 (void)(&_dummy == &_dummy2); \
164 #define SPA_PTROFF(ptr_,offset_,type_) ((type_*)((uint8_t*)(ptr_) + (int)(offset_)))
165 #define SPA_PTROFF_ALIGN(ptr_,offset_,alignment_,type_) \
166 SPA_PTR_ALIGN(SPA_PTROFF(ptr_,offset_,type_),alignment_,type_)
172 #define SPA_MEMBER(b,o,t) SPA_PTROFF(b,o,t)
173 #define SPA_MEMBER_ALIGN(b,o,a,t) SPA_PTROFF_ALIGN(b,o,a,t)
175 #define SPA_CONTAINER_OF(p,t,m) (t*)((uint8_t*)p - offsetof (t,m))
177 #define SPA_PTRDIFF(p1,p2) ((uint8_t*)(p1) - (uint8_t*)(p2))
179 #define SPA_PTR_TO_INT(p) ((int) ((intptr_t) (p)))
180 #define SPA_INT_TO_PTR(u) ((void*) ((intptr_t) (u)))
182 #define SPA_PTR_TO_UINT32(p) ((uint32_t) ((uintptr_t) (p)))
183 #define SPA_UINT32_TO_PTR(u) ((void*) ((uintptr_t) (u)))
185 #define SPA_TIME_INVALID ((int64_t)INT64_MIN)
186 #define SPA_IDX_INVALID ((unsigned int)-1)
187 #define SPA_ID_INVALID ((uint32_t)0xffffffff)
189 #define SPA_NSEC_PER_SEC (1000000000ll)
190 #define SPA_NSEC_PER_MSEC (1000000ll)
191 #define SPA_NSEC_PER_USEC (1000ll)
192 #define SPA_USEC_PER_SEC (1000000ll)
193 #define SPA_USEC_PER_MSEC (1000ll)
194 #define SPA_MSEC_PER_SEC (1000ll)
196 #define SPA_TIMESPEC_TO_NSEC(ts) ((ts)->tv_sec * SPA_NSEC_PER_SEC + (ts)->tv_nsec)
197 #define SPA_TIMESPEC_TO_USEC(ts) ((ts)->tv_sec * SPA_USEC_PER_SEC + (ts)->tv_nsec / SPA_NSEC_PER_USEC)
198 #define SPA_TIMEVAL_TO_NSEC(tv) ((tv)->tv_sec * SPA_NSEC_PER_SEC + (tv)->tv_usec * SPA_NSEC_PER_USEC)
199 #define SPA_TIMEVAL_TO_USEC(tv) ((tv)->tv_sec * SPA_USEC_PER_SEC + (tv)->tv_usec)
202 #define SPA_PRINTF_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1)))
203 #define SPA_FORMAT_ARG_FUNC(arg1) __attribute__((format_arg(arg1)))
204 #define SPA_ALIGNED(align) __attribute__((aligned(align)))
205 #define SPA_DEPRECATED __attribute__ ((deprecated))
206 #define SPA_EXPORT __attribute__((visibility("default")))
207 #define SPA_SENTINEL __attribute__((__sentinel__))
208 #define SPA_UNUSED __attribute__ ((unused))
209 #define SPA_NORETURN __attribute__ ((noreturn))
211 #define SPA_PRINTF_FUNC(fmt, arg1)
212 #define SPA_FORMAT_ARG_FUNC(arg1)
213 #define SPA_ALIGNED(align)
214 #define SPA_DEPRECATED
221 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
222 #define SPA_RESTRICT restrict
223 #elif defined(__GNUC__) && __GNUC__ >= 4
224 #define SPA_RESTRICT __restrict__
229 #define SPA_ROUND_DOWN_N(num,align) ((num) & ~((align) - 1))
230 #define SPA_ROUND_UP_N(num,align) SPA_ROUND_DOWN_N((num) + ((align) - 1),align)
232 #define SPA_PTR_ALIGNMENT(p,align) ((intptr_t)(p) & ((align)-1))
233 #define SPA_IS_ALIGNED(p,align) (SPA_PTR_ALIGNMENT(p,align) == 0)
234 #define SPA_PTR_ALIGN(p,align,type) (type*)SPA_ROUND_UP_N((intptr_t)(p), (intptr_t)(align))
238 #define SPA_LIKELY(x) (__builtin_expect(!!(x),1))
239 #define SPA_UNLIKELY(x) (__builtin_expect(!!(x),0))
241 #define SPA_LIKELY(x) (x)
242 #define SPA_UNLIKELY(x) (x)
246 #define SPA_STRINGIFY_1(...) #__VA_ARGS__
247 #define SPA_STRINGIFY(...) SPA_STRINGIFY_1(__VA_ARGS__)
249 #define spa_return_if_fail(expr) \
251 if (SPA_UNLIKELY(!(expr))) { \
252 fprintf(stderr, "'%s' failed at %s:%u %s()\n", \
253 #expr , __FILE__, __LINE__, __func__); \
258 #define spa_return_val_if_fail(expr, val) \
260 if (SPA_UNLIKELY(!(expr))) { \
261 fprintf(stderr, "'%s' failed at %s:%u %s()\n", \
262 #expr , __FILE__, __LINE__, __func__); \
270 #define spa_assert_se(expr) \
272 if (SPA_UNLIKELY(!(expr))) { \
273 fprintf(stderr, "'%s' failed at %s:%u %s()\n", \
274 #expr , __FILE__, __LINE__, __func__); \
279 #define spa_assert_se(expr) \
281 int _unique_var = (expr); \
288 #define spa_nop() do {} while (false)
291 #define spa_assert(expr) spa_nop()
292 #elif defined (FASTPATH)
293 #define spa_assert(expr) spa_assert_se(expr)
295 #define spa_assert(expr) spa_assert_se(expr)
299 #define spa_assert_not_reached() abort()
301 #define spa_assert_not_reached() \
303 fprintf(stderr, "Code should not be reached at %s:%u %s()\n", \
304 __FILE__, __LINE__, __func__); \
309 #define spa_memzero(x,l) (memset((x), 0, (l)))
310 #define spa_zero(x) (spa_memzero(&(x), sizeof(x)))
312 #ifdef SPA_DEBUG_MEMCPY
313 #define spa_memcpy(d,s,n) \
315 fprintf(stderr, "%s:%u %s() memcpy(%p, %p, %zd)\n", \
316 __FILE__, __LINE__, __func__, (d), (s), (size_t)(n)); \
319 #define spa_memmove(d,s,n) \
321 fprintf(stderr, "%s:%u %s() memmove(%p, %p, %zd)\n", \
322 __FILE__, __LINE__, __func__, (d), (s), (size_t)(n)); \
326 #define spa_memcpy(d,s,n) memcpy(d,s,n)
327 #define spa_memmove(d,s,n) memmove(d,s,n)
330 #define spa_aprintf(_fmt, ...) \
333 if (asprintf(&(_strp), (_fmt), ## __VA_ARGS__ ) == -1) \
int spa_pod_get_long(const struct spa_pod *pod, int64_t *value)
Definition: iter.h:195
#define PW_KEY_DEVICE_NAME
device name
Definition: src/pipewire/keys.h:211
struct pw_loop * pw_context_get_main_loop(struct pw_context *context)
get the context main loop
Definition: context.c:619
#define PW_KEY_DEVICE_BUS
bus of the device if applicable.
Definition: src/pipewire/keys.h:234
int int const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:487
int spa_pod_parser_push_struct(struct spa_pod_parser *parser, struct spa_pod_frame *frame)
Definition: parser.h:253
Definition: module-filter-chain.c:183
Definition: pod/pod.h:175
uint32_t width
Definition: defs.h:87
@ SPA_PARAM_Profile
profile configuration as SPA_TYPE_OBJECT_ParamProfile
Definition: param.h:53
@ SPA_TYPE_Float
Definition: obj-x86_64-linux-gnu/doc/spa/utils/type.h:50
spa_direction
Definition: defs.h:78
struct spa_hook listener
Definition: alsa-monitor.c:172
uint32_t device_id
Definition: default-routes.c:177
#define SPA_POD_OPT_Id(val)
Definition: parser.h:520
enum spa_param_availability available
Definition: default-routes.c:165
#define NAME
Definition: default-nodes.c:47
#define pw_array_first(a)
Definition: array.h:68
#define SPA_POD_Pod(val)
Definition: vararg.h:100
#define PW_TYPE_INTERFACE_Device
Definition: src/pipewire/device.h:37
@ SPA_PROP_iec958Codecs
enabled IEC958 (S/PDIF) codecs, (Array (Id enum spa_audio_iec958_codec)
Definition: props.h:99
#define SPA_POD_Int(val)
Definition: vararg.h:59
@ SPA_PARAM_PROFILE_name
profile name (String)
Definition: param.h:114
#define spa_zero(x)
Definition: defs.h:310
#define pw_loop_update_timer(l,...)
Definition: src/pipewire/loop.h:78
uint32_t generation
Definition: default-routes.c:164
PW_LOG_TOPIC_STATIC(mod_topic, "ms.mod." NAME)
struct spa_pod * props
Definition: default-routes.c:182
#define SPA_POD_OBJECT_FOREACH(obj, iter)
Definition: iter.h:123
uint32_t index
Definition: default-routes.c:176
int spa_json_get_float(struct spa_json *iter, float *res)
Definition: json.h:247
@ SPA_PROP_mute
mute (Bool)
Definition: props.h:81
#define pw_array_check(a, p)
Definition: array.h:70
char * key
Definition: default-profile.c:111
unsigned int restore_bluetooth
Definition: default-profile.c:102
int spa_pod_builder_float(struct spa_pod_builder *builder, float val)
Definition: builder.h:265
bool save
Definition: default-routes.c:184
@ SPA_TYPE_Id
Definition: obj-x86_64-linux-gnu/doc/spa/utils/type.h:47
int spa_json_enter_object(struct spa_json *iter, struct spa_json *sub)
Definition: json.h:214
uint32_t type
Definition: obj-x86_64-linux-gnu/doc/spa/utils/type.h:138
const struct spa_type_info spa_type_audio_channel[]
Definition: param/audio/type-info.h:162
#define PW_LOG_TOPIC_INIT(var)
Definition: src/pipewire/log.h:136
int32_t x
Definition: defs.h:93
@ SPA_PARAM_ROUTE_devices
associated device indexes (Array of Int)
Definition: param.h:171
user data to add to an object
Definition: filter.c:75
uint8_t data[MAX_BUFFER]
Definition: module-profiler.c:90
#define SPA_CLAMP(v, low, high)
Definition: defs.h:140
bool spa_streq(const char *s1, const char *s2)
Definition: string.h:50
Definition: pod/pod.h:199
uint32_t priority
Definition: default-routes.c:180
#define spa_list_for_each(pos, head, member)
Definition: list.h:111
struct impl * impl
Definition: alsa-monitor.c:150
enum spa_direction direction
Definition: default-routes.c:178
int spa_pod_builder_add(struct spa_pod_builder *builder,...)
Definition: builder.h:638
#define spa_aprintf(_fmt,...)
Definition: defs.h:330
struct spa_rectangle size
Definition: defs.h:100
Definition: src/pipewire/loop.h:47
#define pw_device_set_param(c,...)
Definition: src/pipewire/device.h:159
@ SPA_DIRECTION_INPUT
Definition: defs.h:79
#define PREFIX
Definition: default-profile.c:82
int spa_pod_parser_pop(struct spa_pod_parser *parser, struct spa_pod_frame *frame)
Definition: parser.h:128
struct spa_hook listener
Definition: access-flatpak.c:65
uint32_t height
Definition: defs.h:88
int spa_pod_parser_get(struct spa_pod_parser *parser,...)
Definition: parser.h:507
Definition: alsa-monitor.c:149
unsigned int prev_active
Definition: default-routes.c:170
@ SPA_PROP_channelMap
a channelmap array (Array (Id enum spa_audio_channel))
Definition: props.h:89
int spa_pod_builder_push_object(struct spa_pod_builder *builder, struct spa_pod_frame *frame, uint32_t type, uint32_t id)
Definition: builder.h:426
struct sm_param * p
Definition: default-routes.c:175
@ SPA_PROP_latencyOffsetNsec
delay adjustment
Definition: props.h:94
#define pw_array_for_each(pos, array)
Definition: array.h:72
unsigned int save
Definition: default-routes.c:169
@ SPA_PARAM_ROUTE_index
index of the routing destination (Int)
Definition: param.h:157
uint32_t id
Definition: module-echo-cancel.c:143
char name[64]
Definition: default-routes.c:168
#define DEFAULT_CONFIG_AUDIO_SOURCE_KEY
Definition: default-nodes.c:53
#define SPA_POD_OPT_Int(val)
Definition: parser.h:521
#define pw_array_remove(a, p)
Definition: array.h:82
#define SPA_POD_BUILDER_INIT(buffer, size)
Definition: builder.h:71
uint32_t index
Definition: default-routes.c:163
#define pw_array_get_len(a, t)
Get the number of items of type t in array.
Definition: array.h:62
Definition: obj-x86_64-linux-gnu/doc/spa/support/loop.h:58
struct spa_dict dict
dictionary of key/values
Definition: properties.h:50
#define pw_loop_destroy_source(l,...)
Definition: src/pipewire/loop.h:80
Definition: utils/dict.h:41
@ SPA_PARAM_ROUTE_save
If route should be saved (Bool)
Definition: param.h:173
#define SAVE_INTERVAL
Definition: default-profile.c:84
uint32_t prio
Definition: default-profile.c:158
@ SPA_PARAM_ROUTE_priority
priority of the destination (Int)
Definition: param.h:162
Definition: impl-metadata.c:50
void * spa_pod_builder_pop(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:175
@ SPA_PROP_volume
a volume (Float), 0.0 silence, 1.0 normal
Definition: props.h:80
#define DEFAULT_CONFIG_VIDEO_SOURCE_KEY
Definition: default-nodes.c:54
@ SPA_PARAM_ROUTE_available
availability of the destination (Id enum spa_param_availability)
Definition: param.h:163
const char * name
Definition: obj-x86_64-linux-gnu/doc/spa/utils/type.h:140
@ SPA_TYPE_OBJECT_ParamProfile
Definition: obj-x86_64-linux-gnu/doc/spa/utils/type.h:94
int spa_pod_builder_bool(struct spa_pod_builder *builder, bool val)
Definition: builder.h:233
int spa_pod_get_bool(const struct spa_pod *pod, bool *value)
Definition: iter.h:156
struct sm_param * p
Definition: default-profile.c:155
struct timespec now
Definition: default-profile.c:90
#define SPA_AUDIO_MAX_CHANNELS
Definition: audio/raw.h:43
@ SPA_PARAM_ROUTE_props
properties SPA_TYPE_OBJECT_Props
Definition: param.h:170
Definition: default-routes.c:174
@ SPA_PARAM_PROFILE_save
If profile should be saved (Bool)
Definition: param.h:132
void pw_properties_clear(struct pw_properties *properties)
Clear a properties object.
Definition: properties.c:277
#define PREFIX
Definition: default-routes.c:52
int spa_pod_builder_array(struct spa_pod_builder *builder, uint32_t child_size, uint32_t child_type, uint32_t n_elems, const void *elems)
Definition: builder.h:377
#define spa_dict_for_each(item, dict)
Definition: utils/dict.h:58
@ SPA_AUDIO_IEC958_CODEC_UNKNOWN
Definition: iec958.h:39
#define NAME
Definition: default-profile.c:80
bool save
Definition: default-profile.c:160
void spa_json_init(struct spa_json *iter, const char *data, size_t size)
Definition: json.h:59
#define NAME
Definition: default-routes.c:50
#define SPA_POD_OPT_Bool(val)
Definition: parser.h:519
uint32_t key
key of property, list of valid keys depends on the object type
Definition: pod/pod.h:200
@ SPA_LOG_LEVEL_DEBUG
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:62
@ SPA_PARAM_AVAILABILITY_yes
available
Definition: param.h:107
void spa_pod_parser_pod(struct spa_pod_parser *parser, const struct spa_pod *pod)
Definition: parser.h:64
struct pw_properties * to_restore
Definition: default-routes.c:70
uint32_t best_profile
Definition: default-profile.c:116
@ SPA_PARAM_EnumRoute
routing enumeration as SPA_TYPE_OBJECT_ParamRoute
Definition: param.h:56
@ SPA_PARAM_ROUTE_direction
direction, input/output (Id enum spa_direction)
Definition: param.h:158
#define pw_log_level_enabled(lev)
Check if a loglevel is enabled.
Definition: src/pipewire/log.h:140
uint32_t active_profile
Definition: default-profile.c:117
enum spa_param_availability prev_available
Definition: default-routes.c:166
#define SAVE_INTERVAL
Definition: default-nodes.c:50
#define SPA_POD_Bool(val)
Definition: vararg.h:53
@ SPA_DIRECTION_OUTPUT
Definition: defs.h:80
const char * spa_dict_lookup(const struct spa_dict *dict, const char *key)
Definition: utils/dict.h:99
#define SAVE_INTERVAL
Definition: default-routes.c:54
char * key
Definition: impl-metadata.c:52
int spa_json_get_string(struct spa_json *iter, char *res, int maxlen)
Definition: json.h:360
struct spa_pod * classes
Definition: default-routes.c:493
@ SPA_PARAM_EnumProfile
profile enumeration as SPA_TYPE_OBJECT_ParamProfile
Definition: param.h:52
unsigned int restore_saved_profile
Definition: default-profile.c:115
#define spa_pod_parse_object(pod, type, id,...)
Definition: parser.h:560
#define DEFAULT_CONFIG_AUDIO_SINK_KEY
Definition: default-nodes.c:52
#define spa_strerror(err)
Definition: result.h:51
uint32_t id
Definition: alsa-monitor.c:152
uint32_t denom
Definition: defs.h:106
int spa_pod_builder_long(struct spa_pod_builder *builder, int64_t val)
Definition: builder.h:257
#define PW_ID_CORE
default ID for the core object after connect
Definition: core.h:66
int sm_default_profile_start(struct sm_media_session *session)
Definition: default-profile.c:483
void * spa_pod_get_array(const struct spa_pod *pod, uint32_t *n_values)
Definition: iter.h:337
const struct spa_type_info spa_type_audio_iec958_codec[]
Definition: param/audio/type-info.h:275
@ SPA_TYPE_OBJECT_Props
Definition: obj-x86_64-linux-gnu/doc/spa/utils/type.h:89
#define pw_loop_add_timer(l,...)
Definition: src/pipewire/loop.h:77
char * name
Definition: default-profile.c:110
#define pw_log_debug(...)
Definition: src/pipewire/log.h:155
int spa_json_next(struct spa_json *iter, const char **value)
Get the next token.
Definition: json.h:74
struct spa_hook meta_listener
Definition: bluez-autoswitch.c:67
int spa_pod_get_float(const struct spa_pod *pod, float *value)
Definition: iter.h:208
int spa_pod_builder_prop(struct spa_pod_builder *builder, uint32_t key, uint32_t flags)
Definition: builder.h:441
@ SPA_PARAM_AVAILABILITY_no
not available
Definition: param.h:106
@ SPA_PARAM_ROUTE_name
name of the routing destination (String)
Definition: param.h:160
@ SPA_AUDIO_CHANNEL_UNKNOWN
unspecified
Definition: audio/raw.h:172
#define SPA_ID_INVALID
Definition: defs.h:187
uint32_t generation
Definition: default-routes.c:84
@ SPA_PARAM_ROUTE_profiles
associated profile indexes (Array of Int)
Definition: param.h:169
struct pw_context * context
Definition: settings.c:43
int pw_properties_set(struct pw_properties *properties, const char *key, const char *value)
Set a property value.
Definition: properties.c:435
uint32_t index
Definition: default-profile.c:156
struct sm_media_session * session
Definition: access-flatpak.c:64
#define SESSION_KEY
Definition: default-routes.c:51
PW_LOG_TOPIC_STATIC(mod_topic, "ms.mod." NAME)
@ SPA_PARAM_PROFILE_priority
profile priority (Int)
Definition: param.h:116
uint32_t available
Definition: default-profile.c:159
uint32_t spa_pod_copy_array(const struct spa_pod *pod, uint32_t type, void *values, uint32_t max_values)
Definition: iter.h:344
@ SPA_PARAM_AVAILABILITY_unknown
unknown availability
Definition: param.h:105
@ SPA_TYPE_OBJECT_ParamRoute
Definition: obj-x86_64-linux-gnu/doc/spa/utils/type.h:96
#define ROUTE_INIT(__p)
Definition: default-routes.c:187
const char * spa_debug_type_short_name(const char *name)
Definition: types.h:60
unsigned int active
Definition: default-routes.c:171
#define pw_log_warn(...)
Definition: src/pipewire/log.h:153
const char * name
Definition: default-routes.c:179
#define SPA_POD_String(val)
Definition: vararg.h:81
char * value
Definition: impl-metadata.c:54
enum spa_param_availability available
Definition: default-routes.c:181
@ SPA_PROP_channelVolumes
a volume array, one volume per channel (Array of Float)
Definition: props.h:85
struct pw_properties * properties
Definition: module-access.c:144
const char unsigned long int n
Definition: src/pipewire/i18n.h:35
@ SPA_PARAM_PROFILE_index
profile index (Int)
Definition: param.h:113
#define spa_pod_builder_add_object(b, type, id,...)
Definition: builder.h:650
int spa_json_enter_array(struct spa_json *iter, struct spa_json *sub)
Definition: json.h:224
#define SESSION_KEY
Definition: default-nodes.c:48
void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition: hook.h:354
PW_LOG_TOPIC_STATIC(mod_topic, "ms.mod." NAME)
struct pw_array route_info
Definition: default-routes.c:85
struct spa_source * idle_timeout
Definition: default-nodes.c:64
#define pw_log_info(...)
Definition: src/pipewire/log.h:154
spa_param_availability
Definition: param.h:104
struct sm_device * obj
Definition: default-profile.c:106
int spa_debug_pod(int indent, const struct spa_type_info *info, const struct spa_pod *pod)
Definition: debug/pod.h:200
const char * name
Definition: default-profile.c:157
struct spa_pod value
Definition: pod/pod.h:212
@ SPA_PARAM_ROUTE_device
device id (Int)
Definition: param.h:159
Definition: default-routes.c:162
uint32_t num
Definition: defs.h:105
#define SPA_POD_STRUCT_FOREACH(obj, iter)
Definition: iter.h:115
enum spa_direction direction
Definition: default-routes.c:167
int sm_default_routes_start(struct sm_media_session *session)
Definition: default-routes.c:959
int spa_json_get_bool(struct spa_json *iter, bool *res)
Definition: json.h:301
int sm_default_nodes_start(struct sm_media_session *session)
Definition: default-nodes.c:172
#define SPA_POD_OPT_Pod(val)
Definition: parser.h:533
@ SPA_PARAM_Route
routing configuration as SPA_TYPE_OBJECT_ParamRoute
Definition: param.h:57
#define SPA_POD_Id(val)
Definition: vararg.h:56
struct pw_properties * pw_properties_new(const char *key,...) 1
Make a new properties object.
Definition: properties.c:98
struct spa_pod * profiles
Definition: default-routes.c:183
@ SPA_PARAM_PROFILE_available
availability of the profile (Id enum spa_param_availability)
Definition: param.h:117
int pw_properties_setf(struct pw_properties *properties, const char *key, const char *format,...) 1(3
int32_t y
Definition: defs.h:94
struct spa_point position
Definition: defs.h:99
Definition: default-profile.c:154
Definition: properties.h:49
@ SPA_PARAM_PROFILE_classes
node classes provided by this profile (Struct( Int : number of items following Struct( String : class...
Definition: param.h:123
#define SESSION_KEY
Definition: default-profile.c:81
void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:364
#define pw_log_error(...)
Definition: src/pipewire/log.h:152