Go to the documentation of this file.
25 #ifndef SPA_POD_VARARG_H
26 #define SPA_POD_VARARG_H
41 #define SPA_POD_Prop(key,...) \
44 #define SPA_POD_Control(offset,type,...) \
45 offset, type, ##__VA_ARGS__
47 #define SPA_CHOICE_RANGE(def,min,max) 3,(def),(min),(max)
48 #define SPA_CHOICE_STEP(def,min,max,step) 4,(def),(min),(max),(step)
49 #define SPA_CHOICE_ENUM(n_vals,...) (n_vals),##__VA_ARGS__
50 #define SPA_CHOICE_FLAGS(flags) 1, (flags)
51 #define SPA_CHOICE_BOOL(def) 3,(def),(def),!(def)
53 #define SPA_POD_Bool(val) "b", val
54 #define SPA_POD_CHOICE_Bool(def) "?eb", SPA_CHOICE_BOOL(def)
56 #define SPA_POD_Id(val) "I", val
57 #define SPA_POD_CHOICE_ENUM_Id(n_vals,...) "?eI", SPA_CHOICE_ENUM(n_vals, __VA_ARGS__)
59 #define SPA_POD_Int(val) "i", val
60 #define SPA_POD_CHOICE_ENUM_Int(n_vals,...) "?ei", SPA_CHOICE_ENUM(n_vals, __VA_ARGS__)
61 #define SPA_POD_CHOICE_RANGE_Int(def,min,max) "?ri", SPA_CHOICE_RANGE(def, min, max)
62 #define SPA_POD_CHOICE_STEP_Int(def,min,max,step) "?si", SPA_CHOICE_STEP(def, min, max, step)
63 #define SPA_POD_CHOICE_FLAGS_Int(flags) "?fi", SPA_CHOICE_FLAGS(flags)
65 #define SPA_POD_Long(val) "l", val
66 #define SPA_POD_CHOICE_ENUM_Long(n_vals,...) "?el", SPA_CHOICE_ENUM(n_vals, __VA_ARGS__)
67 #define SPA_POD_CHOICE_RANGE_Long(def,min,max) "?rl", SPA_CHOICE_RANGE(def, min, max)
68 #define SPA_POD_CHOICE_STEP_Long(def,min,max,step) "?sl", SPA_CHOICE_STEP(def, min, max, step)
69 #define SPA_POD_CHOICE_FLAGS_Long(flags) "?fl", SPA_CHOICE_FLAGS(flags)
71 #define SPA_POD_Float(val) "f", val
72 #define SPA_POD_CHOICE_ENUM_Float(n_vals,...) "?ef", SPA_CHOICE_ENUM(n_vals, __VA_ARGS__)
73 #define SPA_POD_CHOICE_RANGE_Float(def,min,max) "?rf", SPA_CHOICE_RANGE(def, min, max)
74 #define SPA_POD_CHOICE_STEP_Float(def,min,max,step) "?sf", SPA_CHOICE_STEP(def, min, max, step)
76 #define SPA_POD_Double(val) "d", val
77 #define SPA_POD_CHOICE_ENUM_Double(n_vals,...) "?ed", SPA_CHOICE_ENUM(n_vals, __VA_ARGS__)
78 #define SPA_POD_CHOICE_RANGE_Double(def,min,max) "?rd", SPA_CHOICE_RANGE(def, min, max)
79 #define SPA_POD_CHOICE_STEP_Double(def,min,max,step) "?sd", SPA_CHOICE_STEP(def, min, max, step)
81 #define SPA_POD_String(val) "s",val
82 #define SPA_POD_Stringn(val,len) "S",val,len
84 #define SPA_POD_Bytes(val,len) "y",val,len
86 #define SPA_POD_Rectangle(val) "R",val
87 #define SPA_POD_CHOICE_ENUM_Rectangle(n_vals,...) "?eR", SPA_CHOICE_ENUM(n_vals, __VA_ARGS__)
88 #define SPA_POD_CHOICE_RANGE_Rectangle(def,min,max) "?rR", SPA_CHOICE_RANGE((def),(min),(max))
89 #define SPA_POD_CHOICE_STEP_Rectangle(def,min,max,step) "?sR", SPA_CHOICE_STEP((def),(min),(max),(step))
91 #define SPA_POD_Fraction(val) "F",val
92 #define SPA_POD_CHOICE_ENUM_Fraction(n_vals,...) "?eF", SPA_CHOICE_ENUM(n_vals, __VA_ARGS__)
93 #define SPA_POD_CHOICE_RANGE_Fraction(def,min,max) "?rF", SPA_CHOICE_RANGE((def),(min),(max))
94 #define SPA_POD_CHOICE_STEP_Fraction(def,min,max,step) "?sF", SPA_CHOICE_STEP(def, min, max, step)
96 #define SPA_POD_Array(csize,ctype,n_vals,vals) "a", csize,ctype,n_vals,vals
97 #define SPA_POD_Pointer(type,val) "p", type,val
98 #define SPA_POD_Fd(val) "h", val
99 #define SPA_POD_None() "P", NULL
100 #define SPA_POD_Pod(val) "P", val
101 #define SPA_POD_PodObject(val) "O", val
102 #define SPA_POD_PodStruct(val) "T", val
103 #define SPA_POD_PodChoice(val) "V", val
#define SESSION_KEY
Definition: v4l2-endpoint.c:53
#define SPA_NAME_API_V4L2_ENUM_UDEV
keys for v4l2 factory names
Definition: names.h:120
#define PW_KEY_DEVICE_NAME
device name
Definition: src/pipewire/keys.h:211
#define PW_DIRECTION_INPUT
Definition: port.h:57
int int const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:487
Definition: module-filter-chain.c:170
Definition: pod/pod.h:175
@ SPA_PARAM_Profile
profile configuration as SPA_TYPE_OBJECT_ParamProfile
Definition: param.h:53
struct spa_hook listener
Definition: alsa-monitor.c:105
struct pw_properties * props
Definition: alsa-monitor.c:74
struct spa_list device_list
Definition: alsa-monitor.c:128
#define PW_VERSION_NODE
Definition: src/pipewire/node.h:52
struct impl * impl
Definition: alsa-endpoint.c:67
#define PW_TYPE_INTERFACE_Device
Definition: src/pipewire/device.h:37
int priority
Definition: alsa-monitor.c:93
#define SPA_POD_Int(val)
Definition: vararg.h:59
int pw_properties_update(struct pw_properties *props, const struct spa_dict *dict)
Update properties.
Definition: properties.c:298
#define SPA_TYPE_INTERFACE_Device
Definition: build-12683127/doc/spa/monitor/device.h:50
struct spa_list link
Definition: alsa-endpoint.c:92
struct spa_param_info params[5]
Definition: alsa-endpoint.c:79
#define SPA_KEY_DEVICE_NICK
the device short name
Definition: build-12683127/doc/spa/monitor/device.h:264
int sm_v4l2_monitor_start(struct sm_media_session *sess)
Definition: v4l2-monitor.c:535
Definition: build-12683127/doc/spa/monitor/device.h:53
struct spa_dict * props
extra node properties
Definition: build-12683127/doc/spa/node/node.h:82
struct spa_list link
link in impl node_list
Definition: module-filter-chain.c:151
user data to add to an object
Definition: filter.c:75
#define SPA_KEY_DEVICE_DESCRIPTION
a device description
Definition: build-12683127/doc/spa/monitor/device.h:265
uint8_t data[MAX_BUFFER]
Definition: module-profiler.c:87
bool spa_streq(const char *s1, const char *s2)
Definition: string.h:50
#define spa_list_for_each(pos, head, member)
Definition: list.h:111
const struct spa_dict * props
extra object properties
Definition: build-12683127/doc/spa/monitor/device.h:92
void * pw_proxy_get_user_data(struct pw_proxy *proxy)
Get the user_data.
Definition: proxy.c:146
const struct spa_dict * props
device properties
Definition: build-12683127/doc/spa/monitor/device.h:69
struct impl * impl
Definition: alsa-monitor.c:83
struct sm_node * obj
Definition: bluez-autoswitch.c:79
struct pw_endpoint_info info
Definition: alsa-endpoint.c:77
union spa_video_info::@6 info
struct spa_hook listener
Definition: access-flatpak.c:46
Definition: alsa-monitor.c:82
Definition: module-filter-chain.c:150
#define PW_KEY_DEVICE_PRODUCT_NAME
product name if applicable
Definition: src/pipewire/keys.h:227
void pw_proxy_destroy(struct pw_proxy *proxy)
destroy a proxy
Definition: proxy.c:229
#define pw_node_subscribe_params(c,...)
Definition: src/pipewire/node.h:199
#define SPA_PARAM_INFO_READ
Definition: param.h:68
int spa_pod_object_fixate(struct spa_pod_object *pod)
Definition: iter.h:431
Proxy events, use pw_proxy_add_listener.
Definition: proxy.h:111
int profile
Definition: alsa-monitor.c:95
int sm_media_session_match_rules(const char *rules, size_t size, struct pw_properties *props)
Definition: match-rules.c:91
struct spa_hook session_listener
Definition: alsa-monitor.c:118
#define NAME
Definition: v4l2-endpoint.c:52
Definition: pipewire.c:68
bool spa_strstartswith(const char *s, const char *prefix)
Definition: string.h:71
uint32_t id
Definition: module-echo-cancel.c:139
struct pw_properties * pw_properties_new_dict(const struct spa_dict *dict)
Make a new properties object from the given dictionary.
Definition: properties.c:126
#define SPA_POD_BUILDER_INIT(buffer, size)
Definition: builder.h:71
struct spa_audio_info_raw info
Definition: module-echo-cancel.c:145
@ SPA_PARAM_Props
properties as SPA_TYPE_OBJECT_Props
Definition: param.h:46
struct spa_dict dict
dictionary of key/values
Definition: properties.h:50
#define SPA_PARAM_INFO(id, flags)
Definition: param.h:77
#define spa_list_consume(pos, head, member)
Definition: list.h:96
#define SPA_TYPE_INTERFACE_Node
Definition: build-12683127/doc/spa/node/node.h:50
struct pw_properties * props
Definition: alsa-endpoint.c:69
struct impl * impl
Definition: alsa-monitor.c:68
#define PW_KEY_LINK_INPUT_NODE
input node id of a link
Definition: src/pipewire/keys.h:198
#define PW_VERSION_PROXY_EVENTS
Definition: proxy.h:112
struct sm_device * sdevice
Definition: alsa-monitor.c:104
struct pw_client_endpoint * client_endpoint
Definition: alsa-endpoint.c:74
@ SPA_TYPE_OBJECT_ParamProfile
Definition: build-12683127/doc/spa/utils/type.h:94
#define PW_DIRECTION_OUTPUT
Definition: port.h:58
void spa_list_remove(struct spa_list *elem)
Definition: list.h:69
struct spa_handle * handle
Definition: alsa-monitor.c:123
#define PW_KEY_LINK_INPUT_PORT
input port id of a link
Definition: src/pipewire/keys.h:199
#define PW_TYPE_INTERFACE_Node
Definition: src/pipewire/node.h:50
struct node * node
Definition: alsa-endpoint.c:71
#define PW_KEY_NODE_DESCRIPTION
localized human readable node one-line description.
Definition: src/pipewire/keys.h:140
const char * factory_name
a factory name that implements the object
Definition: build-12683127/doc/spa/monitor/device.h:86
#define PW_KEY_NODE_NAME
node name
Definition: src/pipewire/keys.h:138
Definition: build-12683127/doc/spa/node/node.h:53
#define PW_KEY_DEVICE_API
API this device is accessed with.
Definition: src/pipewire/keys.h:217
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:295
int spa_format_video_raw_parse(const struct spa_pod *format, struct spa_video_info_raw *info)
Definition: video/format-utils.h:42
#define SPA_KEY_DEVICE_NAME
the name of the device
Definition: build-12683127/doc/spa/monitor/device.h:262
@ SPA_MEDIA_TYPE_video
Definition: param/format.h:43
#define PW_KEY_DEVICE_DESCRIPTION
localized human readable device one-line description.
Definition: src/pipewire/keys.h:219
#define SPA_KEY_DEVICE_ALIAS
alternative name of the device
Definition: build-12683127/doc/spa/monitor/device.h:263
@ SPA_LOG_LEVEL_DEBUG
Definition: build-12683127/doc/spa/support/log.h:51
#define SPA_FLAG_IS_SET(field, flag)
Definition: defs.h:73
information about a parameter
Definition: param.h:64
void spa_list_init(struct spa_list *list)
Definition: list.h:44
struct spa_node * node
Definition: alsa-monitor.c:76
#define PW_KEY_LINK_OUTPUT_PORT
output port id of a link
Definition: src/pipewire/keys.h:201
struct spa_handle * handle
Definition: alsa-monitor.c:100
#define pw_log_level_enabled(lev)
Check if a loglevel is enabled.
Definition: src/pipewire/log.h:78
Definition: utils/dict.h:48
#define SPA_KEY_DEVICE_BUS_ID
the device bus-id
Definition: build-12683127/doc/spa/monitor/device.h:272
const char * type
the object type managed by this device
Definition: build-12683127/doc/spa/monitor/device.h:85
#define pw_node_set_param(c,...)
Definition: src/pipewire/node.h:201
int spa_debug_dict(int indent, const struct spa_dict *dict)
Definition: debug/dict.h:43
const char * spa_dict_lookup(const struct spa_dict *dict, const char *key)
Definition: utils/dict.h:99
struct spa_node_info info
Definition: stream.c:137
@ SPA_PARAM_EnumFormat
available formats as SPA_TYPE_OBJECT_Format
Definition: param.h:47
struct spa_handle * pw_context_load_spa_handle(struct pw_context *context, const char *factory_name, const struct spa_dict *info)
Definition: context.c:1340
#define spa_strerror(err)
Definition: result.h:51
struct spa_list link
link in impl endpoint_list
Definition: alsa-endpoint.c:65
uint32_t id
Definition: alsa-monitor.c:85
struct device * device
Definition: alsa-monitor.c:70
#define spa_device_set_param(d,...)
Definition: build-12683127/doc/spa/monitor/device.h:256
#define pw_log_debug(...)
Definition: src/pipewire/log.h:89
int spa_format_parse(const struct spa_pod *format, uint32_t *media_type, uint32_t *media_subtype)
Definition: format-utils.h:42
struct spa_hook device_listener
Definition: alsa-monitor.c:102
#define PW_KEY_LINK_OUTPUT_NODE
output node id of a link
Definition: src/pipewire/keys.h:200
struct spa_list endpoint_list
Definition: alsa-endpoint.c:118
#define spa_handle_get_interface(h,...)
Definition: plugin.h:73
uint32_t id
Definition: policy-ep.c:71
struct pw_properties * conf
Definition: alsa-monitor.c:120
#define SESSION_CONF
Definition: v4l2-monitor.c:49
Definition: alsa-endpoint.c:64
struct spa_device * monitor
Definition: alsa-monitor.c:125
struct spa_hook proxy_listener
Definition: alsa-endpoint.c:75
Information about the device and parameters it supports.
Definition: build-12683127/doc/spa/monitor/device.h:60
#define SPA_ID_INVALID
Definition: defs.h:182
int pw_unload_spa_handle(struct spa_handle *handle)
Definition: pipewire.c:321
uint8_t tmp[TMP_BUFFER]
Definition: module-profiler.c:86
struct pw_context * context
Definition: settings.c:43
#define PW_KEY_MEDIA_CLASS
class Ex: "Video/Source"
Definition: src/pipewire/keys.h:285
int pw_properties_set(struct pw_properties *properties, const char *key, const char *value)
Set a property value.
Definition: properties.c:435
struct sm_media_session * session
Definition: access-flatpak.c:45
struct pw_properties * props
Definition: alsa-endpoint.c:95
struct endpoint * endpoint
Definition: alsa-endpoint.c:93
#define PW_KEY_DEVICE_ID
device properties
Definition: src/pipewire/keys.h:210
#define PW_KEY_DEVICE_ICON_NAME
an XDG icon name for the device.
Definition: src/pipewire/keys.h:240
int sm_v4l2_endpoint_start(struct sm_media_session *session)
Definition: v4l2-endpoint.c:634
struct spa_hook client_endpoint_listener
Definition: alsa-endpoint.c:76
#define PW_KEY_FACTORY_NAME
the name of the factory
Definition: src/pipewire/keys.h:260
#define pw_log_warn(...)
Definition: src/pipewire/log.h:87
struct spa_device * device
Definition: alsa-monitor.c:101
struct spa_list node_list
Definition: alsa-monitor.c:113
unsigned int active
Definition: alsa-endpoint.c:100
@ SPA_PARAM_PROFILE_index
profile index (Int)
Definition: param.h:113
Definition: param/video/format.h:40
uint32_t device_id
Definition: alsa-monitor.c:86
#define spa_pod_builder_add_object(b, type, id,...)
Definition: builder.h:650
#define SPA_KEY_DEVICE_BUS_PATH
bus path to the device in the OS' format.
Definition: build-12683127/doc/spa/monitor/device.h:273
void pw_proxy_add_listener(struct pw_proxy *proxy, struct spa_hook *listener, const struct pw_proxy_events *events, void *data)
Add an event listener to proxy.
Definition: proxy.c:195
void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition: hook.h:336
#define pw_log_info(...)
Definition: src/pipewire/log.h:88
struct spa_hook listener
Definition: alsa-endpoint.c:72
struct sm_device * obj
Definition: default-profile.c:101
#define SPA_PARAM_INFO_READWRITE
Definition: param.h:70
int spa_debug_pod(int indent, const struct spa_type_info *info, const struct spa_pod *pod)
Definition: debug/pod.h:200
#define SPA_VERSION_DEVICE_EVENTS
version of the structure
Definition: build-12683127/doc/spa/monitor/device.h:119
@ SPA_PARAM_PropInfo
property information as SPA_TYPE_OBJECT_PropInfo
Definition: param.h:45
uint64_t change_mask
Definition: build-12683127/doc/spa/node/node.h:66
#define spa_device_add_listener(d,...)
Definition: build-12683127/doc/spa/monitor/device.h:253
struct pw_properties * props
Definition: alsa-monitor.c:98
#define PW_KEY_PRIORITY_SESSION
priority in session manager
Definition: src/pipewire/keys.h:97
struct spa_list link
Definition: alsa-monitor.c:84
struct pw_properties * pw_properties_new(const char *key,...) 1
Make a new properties object.
Definition: properties.c:98
unsigned int appeared
Definition: alsa-monitor.c:110
struct spa_list stream_list
Definition: alsa-endpoint.c:88
int pw_properties_setf(struct pw_properties *properties, const char *key, const char *format,...) 1(3
spa_device_events:
Definition: build-12683127/doc/spa/monitor/device.h:117
#define pw_direction
The direction of a port.
Definition: port.h:56
Information about a device object.
Definition: build-12683127/doc/spa/monitor/device.h:81
@ SPA_MEDIA_SUBTYPE_raw
Definition: param/format.h:53
struct endpoint * endpoint
Definition: alsa-endpoint.c:109
Definition: properties.h:49
void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:364
uint32_t id
Definition: alsa-monitor.c:72
#define pw_log_error(...)
Definition: src/pipewire/log.h:86
#define spa_list_append(list, item)
Definition: list.h:81
struct pw_proxy * proxy
Definition: v4l2-monitor.c:61