5 #ifndef SPA_DEVICE_UTILS_H
6 #define SPA_DEVICE_UTILS_H
15 #ifndef SPA_API_DEVICE_UTILS
17 #define SPA_API_DEVICE_UTILS SPA_API_IMPL
19 #define SPA_API_DEVICE_UTILS static inline
48 uint32_t
id, uint32_t *
index,
77 #define spa_device_emit(hooks,method,version,...) \
78 spa_hook_list_call_simple(hooks, struct spa_device_events, \
79 method, version, ##__VA_ARGS__)
81 #define spa_device_emit_info(hooks,i) spa_device_emit(hooks,info, 0, i)
82 #define spa_device_emit_result(hooks,s,r,t,res) spa_device_emit(hooks,result, 0, s, r, t, res)
83 #define spa_device_emit_event(hooks,e) spa_device_emit(hooks,event, 0, e)
84 #define spa_device_emit_object_info(hooks,id,i) spa_device_emit(hooks,object_info, 0, id, i)
uint32_t int seq
Definition: core.h:432
uint32_t int int const char int r
Definition: core.h:445
uint32_t int int res
Definition: core.h:433
SPA_API_DEVICE int spa_device_enum_params(struct spa_device *object, int seq, uint32_t id, uint32_t index, uint32_t max, const struct spa_pod *filter)
Definition: device.h:276
#define SPA_VERSION_DEVICE_EVENTS
version of the structure
Definition: device.h:132
SPA_API_DEVICE int spa_device_add_listener(struct spa_device *object, struct spa_hook *listener, const struct spa_device_events *events, void *data)
Definition: device.h:262
SPA_API_DEVICE_UTILS void spa_result_func_device_params(void *data, int seq, int res 1, uint32_t type, const void *result)
Definition: utils.h:40
SPA_API_DEVICE_UTILS int spa_device_enum_params_sync(struct spa_device *device, uint32_t id, uint32_t *index, const struct spa_pod *filter, struct spa_pod **param, struct spa_pod_builder *builder)
Definition: utils.h:54
SPA_API_HOOK void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition: hook.h:468
SPA_API_POD_BUILDER struct spa_pod * spa_pod_builder_deref(struct spa_pod_builder *builder, uint32_t offset)
Definition: builder.h:103
SPA_API_POD_BUILDER int spa_pod_builder_raw_padded(struct spa_pod_builder *builder, const void *data, uint32_t size)
Definition: builder.h:170
#define SPA_POD_SIZE(pod)
Definition: pod.h:30
#define SPA_UNUSED
Definition: defs.h:307
#define SPA_API_DEVICE_UTILS
Definition: utils.h:26
spa_device_events:
Definition: device.h:129
uint32_t version
Definition: device.h:133
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:427
uint32_t offset
Definition: builder.h:43
struct spa_pod_builder_state state
Definition: builder.h:67
struct spa_result_device_params data
Definition: utils.h:37
struct spa_pod_builder * builder
Definition: utils.h:36
uint32_t index
Definition: device.h:108
uint32_t next
Definition: device.h:109
struct spa_pod * param
Definition: device.h:110