41 #define SPA_TYPE_INTERFACE_Loop SPA_TYPE_INFO_INTERFACE_BASE "Loop" 42 #define SPA_TYPE_INTERFACE_DataLoop SPA_TYPE_INFO_INTERFACE_BASE "DataLoop" 43 #define SPA_VERSION_LOOP 0 46 #define SPA_TYPE_INTERFACE_LoopControl SPA_TYPE_INFO_INTERFACE_BASE "LoopControl" 47 #define SPA_VERSION_LOOP_CONTROL 0 50 #define SPA_TYPE_INTERFACE_LoopUtils SPA_TYPE_INFO_INTERFACE_BASE "LoopUtils" 51 #define SPA_VERSION_LOOP_UTILS 0 80 #define SPA_VERSION_LOOP_METHODS 0 105 #define spa_loop_method(o,method,version,...) \ 107 int _res = -ENOTSUP; \ 108 struct spa_loop *_o = o; \ 109 spa_interface_call_res(&_o->iface, \ 110 struct spa_loop_methods, _res, \ 111 method, version, ##__VA_ARGS__); \ 115 #define spa_loop_add_source(l,...) spa_loop_method(l,add_source,0,##__VA_ARGS__) 116 #define spa_loop_update_source(l,...) spa_loop_method(l,update_source,0,##__VA_ARGS__) 117 #define spa_loop_remove_source(l,...) spa_loop_method(l,remove_source,0,##__VA_ARGS__) 118 #define spa_loop_invoke(l,...) spa_loop_method(l,invoke,0,##__VA_ARGS__) 125 #define SPA_VERSION_LOOP_CONTROL_HOOKS 0 135 #define spa_loop_control_hook_before(l) \ 137 struct spa_hook_list *_l = l; \ 138 struct spa_hook *_h; \ 139 spa_list_for_each_reverse(_h, &_l->list, link) \ 140 spa_callbacks_call(&_h->cb, struct spa_loop_control_hooks, before, 0); \ 143 #define spa_loop_control_hook_after(l) \ 145 struct spa_hook_list *_l = l; \ 146 struct spa_hook *_h; \ 147 spa_list_for_each(_h, &_l->list, link) \ 148 spa_callbacks_call(&_h->cb, struct spa_loop_control_hooks, after, 0); \ 157 #define SPA_VERSION_LOOP_CONTROL_METHODS 0 201 #define spa_loop_control_method_v(o,method,version,...) \ 203 struct spa_loop_control *_o = o; \ 204 spa_interface_call(&_o->iface, \ 205 struct spa_loop_control_methods, \ 206 method, version, ##__VA_ARGS__); \ 209 #define spa_loop_control_method_r(o,method,version,...) \ 211 int _res = -ENOTSUP; \ 212 struct spa_loop_control *_o = o; \ 213 spa_interface_call_res(&_o->iface, \ 214 struct spa_loop_control_methods, _res, \ 215 method, version, ##__VA_ARGS__); \ 219 #define spa_loop_control_get_fd(l) spa_loop_control_method_r(l,get_fd,0) 220 #define spa_loop_control_add_hook(l,...) spa_loop_control_method_v(l,add_hook,0,__VA_ARGS__) 221 #define spa_loop_control_enter(l) spa_loop_control_method_v(l,enter,0) 222 #define spa_loop_control_leave(l) spa_loop_control_method_v(l,leave,0) 223 #define spa_loop_control_iterate(l,...) spa_loop_control_method_r(l,iterate,0,__VA_ARGS__) 237 #define SPA_VERSION_LOOP_UTILS_METHODS 0 261 struct timespec *value,
262 struct timespec *interval,
274 #define spa_loop_utils_method_v(o,method,version,...) \ 276 struct spa_loop_utils *_o = o; \ 277 spa_interface_call(&_o->iface, \ 278 struct spa_loop_utils_methods, \ 279 method, version, ##__VA_ARGS__); \ 282 #define spa_loop_utils_method_r(o,method,version,...) \ 284 int _res = -ENOTSUP; \ 285 struct spa_loop_utils *_o = o; \ 286 spa_interface_call_res(&_o->iface, \ 287 struct spa_loop_utils_methods, _res, \ 288 method, version, ##__VA_ARGS__); \ 291 #define spa_loop_utils_method_s(o,method,version,...) \ 293 struct spa_source *_res = NULL; \ 294 struct spa_loop_utils *_o = o; \ 295 spa_interface_call_res(&_o->iface, \ 296 struct spa_loop_utils_methods, _res, \ 297 method, version, ##__VA_ARGS__); \ 302 #define spa_loop_utils_add_io(l,...) spa_loop_utils_method_s(l,add_io,0,__VA_ARGS__) 303 #define spa_loop_utils_update_io(l,...) spa_loop_utils_method_r(l,update_io,0,__VA_ARGS__) 304 #define spa_loop_utils_add_idle(l,...) spa_loop_utils_method_s(l,add_idle,0,__VA_ARGS__) 305 #define spa_loop_utils_enable_idle(l,...) spa_loop_utils_method_r(l,enable_idle,0,__VA_ARGS__) 306 #define spa_loop_utils_add_event(l,...) spa_loop_utils_method_s(l,add_event,0,__VA_ARGS__) 307 #define spa_loop_utils_signal_event(l,...) spa_loop_utils_method_r(l,signal_event,0,__VA_ARGS__) 308 #define spa_loop_utils_add_timer(l,...) spa_loop_utils_method_s(l,add_timer,0,__VA_ARGS__) 309 #define spa_loop_utils_update_timer(l,...) spa_loop_utils_method_r(l,update_timer,0,__VA_ARGS__) 310 #define spa_loop_utils_add_signal(l,...) spa_loop_utils_method_s(l,add_signal,0,__VA_ARGS__) 311 #define spa_loop_utils_destroy_source(l,...) spa_loop_utils_method_v(l,destroy_source,0,__VA_ARGS__) Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:58
struct spa_loop * loop
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:59
struct spa_interface iface
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:52
uint32_t version
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:81
void(* before)(void *data)
Executed right before waiting for events.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:129
spa_source_func_t func
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:60
uint32_t mask
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:63
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:76
int(* signal_event)(void *object, struct spa_source *source)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:255
int(* remove_source)(void *object, struct spa_source *source)
remove a source from the loop
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:92
int(* enable_idle)(void *object, struct spa_source *source, bool enabled)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:251
int(* invoke)(void *object, spa_invoke_func_t func, uint32_t seq, const void *data, size_t size, bool block, void *user_data)
invoke a function in the context of this loop
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:96
static uint32_t int seq
Definition: core.h:328
uint32_t rmask
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:64
uint32_t version
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:158
uint32_t version
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:238
void(* destroy_source)(void *object, struct spa_source *source)
destroy a source allocated with this interface.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:271
int(* get_fd)(void *object)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:160
Control hooks.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:124
struct spa_interface iface
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:44
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:48
int(* spa_invoke_func_t)(struct spa_loop *loop, bool async, uint32_t seq, const void *data, size_t size, void *user_data)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:67
int(* iterate)(void *object, int timeout)
Perform one iteration of the loop.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:198
void(* spa_source_event_func_t)(void *data, uint64_t count)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:227
uint32_t version
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:126
int fd
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:62
void(* spa_source_idle_func_t)(void *data)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:226
void(* add_hook)(void *object, struct spa_hook *hook, const struct spa_loop_control_hooks *hooks, void *data)
Add a hook.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:168
void(* spa_source_io_func_t)(void *data, int fd, uint32_t mask)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:225
struct spa_interface iface
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:48
int(* add_source)(void *object, struct spa_source *source)
add a source to the loop
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:84
void(* after)(void *data)
Executed right after waiting for events.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:132
int(* update_timer)(void *object, struct spa_source *source, struct timespec *value, struct timespec *interval, bool absolute)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:259
void(* enter)(void *object)
Enter a loop.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:180
Control an event loop.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:154
Register sources and work items to an event loop.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:77
int(* update_io)(void *object, struct spa_source *source, uint32_t mask)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:246
void(* leave)(void *object)
Leave a loop.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:187
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:44
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:52
void * data
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:61
Create sources for an event loop.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:234
void(* spa_source_timer_func_t)(void *data, uint64_t expirations)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:228
void(* spa_source_signal_func_t)(void *data, int signal_number)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:229
int(* update_source)(void *object, struct spa_source *source)
update the source io mask
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:88
void(* spa_source_func_t)(struct spa_source *source)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/loop.h:56
enum spa_log_level level const char int const char * func
Definition: log-impl.h:43