Go to the documentation of this file.
25 #ifndef PIPEWIRE_DATA_LOOP_H
26 #define PIPEWIRE_DATA_LOOP_H
32 #include <spa/utils/hook.h>
46 #define PW_VERSION_DATA_LOOP_EVENTS 0
58 struct spa_hook *listener,
88 spa_invoke_func_t func, uint32_t
seq,
const void *
data,
size_t size,
89 bool block,
void *user_data);
static uint32_t int int res
Definition: core.h:326
#define pw_loop_add_event(l,...)
Definition: loop.h:69
#define pw_log_error(...)
SPA_EXPORT int pw_data_loop_start(struct pw_data_loop *loop)
Start a data loop.
Definition: data-loop.c:206
Loop events, use pw_data_loop_add_listener to add a listener.
Definition: data-loop.h:45
#define pw_loop_signal_event(l,...)
Definition: loop.h:70
void pw_data_loop_add_listener(struct pw_data_loop *loop, struct spa_hook *listener, const struct pw_data_loop_events *events, void *data)
Add an event listener to loop.
Definition: data-loop.c:183
#define pw_loop_leave(l)
Definition: loop.h:63
SPA_EXPORT int pw_data_loop_stop(struct pw_data_loop *loop)
Stop a data loop.
Definition: data-loop.c:230
SPA_EXPORT void pw_data_loop_exit(struct pw_data_loop *this)
make sure the thread will exit.
Definition: data-loop.c:55
uint32_t version
Definition: data-loop.h:47
SPA_EXPORT bool pw_data_loop_in_thread(struct pw_data_loop *loop)
Check if we are inside the data loop.
Definition: data-loop.c:256
SPA_EXPORT int pw_data_loop_invoke(struct pw_data_loop *loop, spa_invoke_func_t func, uint32_t seq, const void *data, size_t size, bool block, void *user_data)
invoke func in the context of the thread or in the caller thread when the loop is not running.
Definition: data-loop.c:262
void(* destroy)(void *data)
The loop is destroyed.
Definition: data-loop.h:49
struct pw_loop * pw_data_loop_get_loop(struct pw_data_loop *loop)
Get the loop implementation of this data loop.
Definition: data-loop.c:192
SPA_EXPORT int pw_data_loop_wait(struct pw_data_loop *this, int timeout)
wait for activity on the loop up to timeout milliseconds.
Definition: data-loop.c:36
SPA_EXPORT void pw_data_loop_add_listener(struct pw_data_loop *loop, struct spa_hook *listener, const struct pw_data_loop_events *events, void *data)
Add an event listener to loop.
Definition: data-loop.c:183
#define pw_loop_destroy_source(l,...)
Definition: loop.h:74
#define NAME
Definition: data-loop.c:33
#define pw_log_debug(...)
SPA_EXPORT void pw_data_loop_destroy(struct pw_data_loop *loop)
Destroy a data loop.
Definition: data-loop.c:164
SPA_EXPORT void pw_loop_destroy(struct pw_loop *loop)
Destroy a loop.
Definition: loop.c:158
struct pw_loop * pw_data_loop_get_loop(struct pw_data_loop *loop)
Get the loop implementation of this data loop.
Definition: data-loop.c:192
int pw_data_loop_invoke(struct pw_data_loop *loop, spa_invoke_func_t func, uint32_t seq, const void *data, size_t size, bool block, void *user_data)
invoke func in the context of the thread or in the caller thread when the loop is not running.
Definition: data-loop.c:262
#define pw_loop_enter(l)
Definition: loop.h:61
SPA_EXPORT struct pw_loop * pw_loop_new(const struct spa_dict *props)
Create a new loop.
Definition: loop.c:55
static uint32_t int seq
Definition: core.h:325
SPA_EXPORT struct pw_data_loop * pw_data_loop_new(const struct spa_dict *props)
Create a new pw_data_loop.
Definition: data-loop.c:153
int pw_data_loop_wait(struct pw_data_loop *loop, int timeout)
wait for activity on the loop up to timeout milliseconds.
Definition: data-loop.c:36
#define pw_loop_invoke(l,...)
Definition: loop.h:57
struct spa_loop * loop
wrapped loop
Definition: loop.h:43
void pw_data_loop_exit(struct pw_data_loop *loop)
make sure the thread will exit.
Definition: data-loop.c:55
#define pw_loop_iterate(l,...)
Definition: loop.h:62