PipeWire 1.1.0
Loading...
Searching...
No Matches
loop.h File Reference

spa/support/loop.h More...

Go to the source code of this file.

Data Structures

struct  spa_loop
 
struct  spa_loop_control
 
struct  spa_loop_utils
 
struct  spa_source
 
struct  spa_loop_methods
 Register sources and work items to an event loop. More...
 
struct  spa_loop_control_hooks
 Control hooks. More...
 
struct  spa_loop_control_methods
 Control an event loop. More...
 
struct  spa_loop_utils_methods
 Create sources for an event loop. More...
 

Macros

#define SPA_TYPE_INTERFACE_Loop   SPA_TYPE_INFO_INTERFACE_BASE "Loop"
 
#define SPA_TYPE_INTERFACE_DataLoop   SPA_TYPE_INFO_INTERFACE_BASE "DataLoop"
 
#define SPA_VERSION_LOOP   0
 
#define SPA_TYPE_INTERFACE_LoopControl   SPA_TYPE_INFO_INTERFACE_BASE "LoopControl"
 
#define SPA_VERSION_LOOP_CONTROL   1
 
#define SPA_TYPE_INTERFACE_LoopUtils   SPA_TYPE_INFO_INTERFACE_BASE "LoopUtils"
 
#define SPA_VERSION_LOOP_UTILS   0
 
#define SPA_VERSION_LOOP_METHODS   0
 
#define spa_loop_method(o, method, version, ...)
 
#define spa_loop_add_source(l, ...)   spa_loop_method(l,add_source,0,##__VA_ARGS__)
 Add a source to the loop.
 
#define spa_loop_update_source(l, ...)   spa_loop_method(l,update_source,0,##__VA_ARGS__)
 Update the source io mask.
 
#define spa_loop_remove_source(l, ...)   spa_loop_method(l,remove_source,0,##__VA_ARGS__)
 Remove a source from the loop.
 
#define spa_loop_invoke(l, ...)   spa_loop_method(l,invoke,0,##__VA_ARGS__)
 Invoke a function in the context of this loop.
 
#define SPA_VERSION_LOOP_CONTROL_HOOKS   0
 
#define spa_loop_control_hook_before(l)
 
#define spa_loop_control_hook_after(l)
 
#define SPA_VERSION_LOOP_CONTROL_METHODS   1
 
#define spa_loop_control_method_v(o, method, version, ...)
 
#define spa_loop_control_method_r(o, method, version, ...)
 
#define spa_loop_control_method_fast_r(o, method, version, ...)
 
#define spa_loop_control_get_fd(l)   spa_loop_control_method_r(l,get_fd,0)
 
#define spa_loop_control_add_hook(l, ...)   spa_loop_control_method_v(l,add_hook,0,__VA_ARGS__)
 Add a hook.
 
#define spa_loop_control_enter(l)   spa_loop_control_method_v(l,enter,0)
 Enter a loop.
 
#define spa_loop_control_leave(l)   spa_loop_control_method_v(l,leave,0)
 Leave a loop.
 
#define spa_loop_control_iterate(l, ...)   spa_loop_control_method_r(l,iterate,0,__VA_ARGS__)
 Perform one iteration of the loop.
 
#define spa_loop_control_check(l)   spa_loop_control_method_r(l,check,1)
 Check context of the loop.
 
#define spa_loop_control_iterate_fast(l, ...)   spa_loop_control_method_fast_r(l,iterate,0,__VA_ARGS__)
 
#define SPA_VERSION_LOOP_UTILS_METHODS   0
 
#define spa_loop_utils_method_v(o, method, version, ...)
 
#define spa_loop_utils_method_r(o, method, version, ...)
 
#define spa_loop_utils_method_s(o, method, version, ...)
 
#define spa_loop_utils_add_io(l, ...)   spa_loop_utils_method_s(l,add_io,0,__VA_ARGS__)
 
#define spa_loop_utils_update_io(l, ...)   spa_loop_utils_method_r(l,update_io,0,__VA_ARGS__)
 
#define spa_loop_utils_add_idle(l, ...)   spa_loop_utils_method_s(l,add_idle,0,__VA_ARGS__)
 
#define spa_loop_utils_enable_idle(l, ...)   spa_loop_utils_method_r(l,enable_idle,0,__VA_ARGS__)
 
#define spa_loop_utils_add_event(l, ...)   spa_loop_utils_method_s(l,add_event,0,__VA_ARGS__)
 
#define spa_loop_utils_signal_event(l, ...)   spa_loop_utils_method_r(l,signal_event,0,__VA_ARGS__)
 
#define spa_loop_utils_add_timer(l, ...)   spa_loop_utils_method_s(l,add_timer,0,__VA_ARGS__)
 
#define spa_loop_utils_update_timer(l, ...)   spa_loop_utils_method_r(l,update_timer,0,__VA_ARGS__)
 
#define spa_loop_utils_add_signal(l, ...)   spa_loop_utils_method_s(l,add_signal,0,__VA_ARGS__)
 
#define spa_loop_utils_destroy_source(l, ...)   spa_loop_utils_method_v(l,destroy_source,0,__VA_ARGS__)
 destroy a source allocated with this interface.
 

Typedefs

typedef void(* spa_source_func_t) (struct spa_source *source)
 
typedef int(* spa_invoke_func_t) (struct spa_loop *loop, bool async, uint32_t seq, const void *data, size_t size, void *user_data)
 
typedef void(* spa_source_io_func_t) (void *data, int fd, uint32_t mask)
 
typedef void(* spa_source_idle_func_t) (void *data)
 
typedef void(* spa_source_event_func_t) (void *data, uint64_t count)
 
typedef void(* spa_source_timer_func_t) (void *data, uint64_t expirations)
 
typedef void(* spa_source_signal_func_t) (void *data, int signal_number)
 

Detailed Description