Go to the documentation of this file.
25 #ifndef PIPEWIRE_DATA_LOOP_H
26 #define PIPEWIRE_DATA_LOOP_H
51 #define PW_VERSION_DATA_LOOP_EVENTS 0
96 bool block,
void *user_data);
struct pw_loop * pw_loop_new(const struct spa_dict *props)
Create a new loop.
Definition: loop.c:54
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:272
int pw_data_loop_start(struct pw_data_loop *loop)
Start a data loop.
Definition: data-loop.c:204
bool pw_data_loop_in_thread(struct pw_data_loop *loop)
Check if we are inside the data loop.
Definition: data-loop.c:254
int(* spa_invoke_func_t)(struct spa_loop *loop, bool async, uint32_t seq, const void *data, size_t size, void *user_data)
Definition: build-12683127/doc/spa/support/loop.h:67
#define pw_loop_leave(l)
Definition: src/pipewire/loop.h:69
Loop events, use pw_data_loop_add_listener to add a listener.
Definition: data-loop.h:50
user data to add to an object
Definition: filter.c:75
Definition: src/pipewire/loop.h:47
#define SPA_EXPORT
Definition: defs.h:208
struct spa_thread * pw_data_loop_get_thread(struct pw_data_loop *loop)
Get the thread object.
Definition: data-loop.c:266
void spa_hook_list_append(struct spa_hook_list *list, struct spa_hook *hook, const void *funcs, void *data)
Append a hook.
Definition: hook.h:316
struct pw_data_loop * pw_data_loop_new(const struct spa_dict *props)
Create a new PipeWire rt-loop object.
Definition: data-loop.c:153
uint32_t version
Definition: data-loop.h:52
#define pw_loop_destroy_source(l,...)
Definition: src/pipewire/loop.h:80
void(* destroy)(void *data)
The loop is destroyed.
Definition: data-loop.h:54
#define pw_loop_add_event(l,...)
Definition: src/pipewire/loop.h:75
#define NAME
Definition: data-loop.c:34
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:295
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:37
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:191
#define pw_thread_utils_join(...)
Definition: src/pipewire/thread.h:46
Definition: utils/dict.h:48
#define pw_loop_signal_event(l,...)
Definition: src/pipewire/loop.h:76
const char * spa_dict_lookup(const struct spa_dict *dict, const char *key)
Definition: utils/dict.h:99
void pw_data_loop_exit(struct pw_data_loop *this)
make sure the thread will exit.
Definition: data-loop.c:56
#define spa_strerror(err)
Definition: result.h:51
#define pw_thread_utils_create(...)
Definition: src/pipewire/thread.h:45
#define pw_log_debug(...)
Definition: src/pipewire/log.h:89
#define pw_loop_enter(l)
Definition: src/pipewire/loop.h:67
#define pw_loop_iterate(l,...)
Definition: src/pipewire/loop.h:68
void pw_data_loop_destroy(struct pw_data_loop *loop)
Destroy a data loop.
Definition: data-loop.c:163
int pw_data_loop_stop(struct pw_data_loop *loop)
Stop a data loop.
Definition: data-loop.c:229
void pw_loop_destroy(struct pw_loop *loop)
Destroy a loop.
Definition: loop.c:156
#define pw_loop_invoke(l,...)
Definition: src/pipewire/loop.h:63
void spa_hook_list_init(struct spa_hook_list *list)
Initialize a hook list to the empty list.
Definition: hook.h:305
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:182
struct spa_loop * loop
wrapped loop
Definition: src/pipewire/loop.h:49
void spa_hook_list_clean(struct spa_hook_list *list)
Remove all hooks from the list.
Definition: hook.h:344
#define pw_log_error(...)
Definition: src/pipewire/log.h:86