5#ifndef SPA_NODE_UTILS_H 
    6#define SPA_NODE_UTILS_H 
   21#ifndef SPA_API_NODE_UTILS 
   23  #define SPA_API_NODE_UTILS SPA_API_IMPL 
   25  #define SPA_API_NODE_UTILS static inline 
   30        struct spa_pod_builder *
builder;
 
   31        struct spa_result_node_params 
data;
 
   49                        uint32_t 
id, uint32_t *
index,
 
 
   70        if (data.data.param == NULL) {
 
   74                *index = data.data.next;
 
   75                *param = data.data.param;
 
   83                        uint32_t 
id, uint32_t *index,
 
 
   89        struct spa_hook listener = {{0}, {0}, 0, 0};
 
  101                                id, *index, 1, filter);
 
  105        if (data.data.param == NULL) {
 
  109                *index = data.data.next;
 
  110                *param = data.data.param;
 
  116#define spa_node_emit(hooks,method,version,...)                                 \ 
  117                spa_hook_list_call_simple(hooks, struct spa_node_events,        \ 
  118                                method, version, ##__VA_ARGS__) 
  120#define spa_node_emit_info(hooks,...)           spa_node_emit(hooks,info, 0, __VA_ARGS__) 
  121#define spa_node_emit_port_info(hooks,...)      spa_node_emit(hooks,port_info, 0, __VA_ARGS__) 
 
  122#define spa_node_emit_result(hooks,...)         spa_node_emit(hooks,result, 0, __VA_ARGS__) 
  123#define spa_node_emit_event(hooks,...)          spa_node_emit(hooks,event, 0, __VA_ARGS__) 
 
  126#define spa_node_call(callbacks,method,version,...)                     \ 
  129        spa_callbacks_call_fast_res(callbacks, struct spa_node_callbacks,       \ 
  130                        _res, method, version, ##__VA_ARGS__);          \ 
  134#define spa_node_call_ready(hook,...)           spa_node_call(hook, ready, 0, __VA_ARGS__) 
  135#define spa_node_call_reuse_buffer(hook,...)    spa_node_call(hook, reuse_buffer, 0, __VA_ARGS__) 
  136#define spa_node_call_xrun(hook,...)            spa_node_call(hook, xrun, 0, __VA_ARGS__) 
 
uint32_t int seq
Definition core.h:432
uint32_t int int const char int r
Definition core.h:447
uint32_t int int res
Definition core.h:433
SPA_API_HOOK void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition hook.h:468
SPA_API_NODE int spa_node_enum_params(struct spa_node *object, int seq, uint32_t id, uint32_t start, uint32_t max, const struct spa_pod *filter)
Definition node.h:733
SPA_API_NODE_UTILS void spa_result_func_node_params(void *data, int seq, int res 1, uint32_t type 1, const void *result)
Definition utils.h:41
SPA_API_NODE int spa_node_add_listener(struct spa_node *object, struct spa_hook *listener, const struct spa_node_events *events, void *data)
Definition node.h:713
SPA_API_NODE_UTILS int spa_node_enum_params_sync(struct spa_node *node, uint32_t id, uint32_t *index, const struct spa_pod *filter, struct spa_pod **param, struct spa_pod_builder *builder)
Definition utils.h:55
SPA_API_NODE_UTILS int spa_node_port_enum_params_sync(struct spa_node *node, enum spa_direction direction, uint32_t port_id, uint32_t id, uint32_t *index, const struct spa_pod *filter, struct spa_pod **param, struct spa_pod_builder *builder)
Definition utils.h:88
SPA_API_NODE int spa_node_port_enum_params(struct spa_node *object, int seq, enum spa_direction direction, uint32_t port_id, uint32_t id, uint32_t start, uint32_t max, const struct spa_pod *filter)
Definition node.h:772
#define SPA_VERSION_NODE_EVENTS
Definition node.h:188
#define SPA_API_NODE_UTILS
Definition utils.h:32
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:179
#define SPA_POD_SIZE(pod)
Definition pod.h:30
#define SPA_UNUSED
Definition defs.h:307
spa_direction
Definition defs.h:106
A hook, contains the structure with functions and the data passed to the functions.
Definition hook.h:427
events from the spa_node.
Definition node.h:186
uint32_t offset
Definition builder.h:43
struct spa_pod_builder_state state
Definition builder.h:67
struct spa_result_node_params data
Definition utils.h:38
struct spa_pod_builder * builder
Definition utils.h:37
the result of enum_params or port_enum_params.
Definition node.h:162
struct spa_pod * param
the result param
Definition node.h:166
uint32_t next
next index of iteration
Definition node.h:165
uint32_t index
index of parameter
Definition node.h:164