Go to the documentation of this file.
20 #ifndef __PIPEWIRE_THREAD_LOOP_H__
21 #define __PIPEWIRE_THREAD_LOOP_H__
94 #define PW_VERSION_THREAD_LOOP_EVENTS 0
110 struct spa_hook *listener,
struct pw_loop * pw_thread_loop_get_loop(struct pw_thread_loop *loop)
Get the loop implementation of the thread loop.
Definition: thread-loop.c:179
SPA_EXPORT struct pw_loop * pw_thread_loop_get_loop(struct pw_thread_loop *loop)
Get the loop implementation of the thread loop.
Definition: thread-loop.c:179
#define pw_loop_add_event(l,...)
Definition: loop.h:64
#define pw_loop_signal_event(l,...)
Definition: loop.h:65
SPA_EXPORT void pw_thread_loop_accept(struct pw_thread_loop *loop)
Signal the loop thread waiting for accept with pw_thread_loop_signal()
Definition: thread-loop.c:343
#define pw_loop_leave(l)
Definition: loop.h:58
void(* destroy)(void *data)
the loop is destroyed
Definition: thread-loop.h:98
SPA_EXPORT void pw_thread_loop_lock(struct pw_thread_loop *loop)
Lock the mutex associated with loop.
Definition: thread-loop.c:256
SPA_EXPORT bool pw_thread_loop_in_thread(struct pw_thread_loop *loop)
Check if we are inside the thread of the loop.
Definition: thread-loop.c:357
#define CHECK(expression, label)
Definition: thread-loop.c:77
SPA_EXPORT struct pw_thread_loop * pw_thread_loop_new(struct pw_loop *loop, const char *name)
Create a new pw_thread_loop.
Definition: thread-loop.c:100
#define pw_loop_destroy_source(l,...)
Definition: loop.h:69
SPA_EXPORT void pw_thread_loop_wait(struct pw_thread_loop *loop)
Wait for the loop thread to call pw_thread_loop_signal()
Definition: thread-loop.c:304
SPA_EXPORT void pw_thread_loop_unlock(struct pw_thread_loop *loop)
Unlock the mutex associated with loop.
Definition: thread-loop.c:268
SPA_EXPORT void pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept)
Signal the thread.
Definition: thread-loop.c:284
Thread loop events.
Definition: thread-loop.h:93
void pw_thread_loop_add_listener(struct pw_thread_loop *loop, struct spa_hook *listener, const struct pw_thread_loop_events *events, void *data)
Add an event listener.
Definition: thread-loop.c:169
PipeWire threaded loop object.
uint32_t version
Definition: thread-loop.h:95
SPA_EXPORT int pw_thread_loop_timed_wait(struct pw_thread_loop *loop, int wait_max_sec)
Wait for the loop thread to call pw_thread_loop_signal() or time out.
Definition: thread-loop.c:321
#define pw_loop_enter(l)
Definition: loop.h:56
#define pw_loop_add_hook(l,...)
Definition: loop.h:55
#define pw_thread_loop_events_destroy(o)
Definition: thread-loop.c:28
SPA_EXPORT void pw_thread_loop_add_listener(struct pw_thread_loop *loop, struct spa_hook *listener, const struct pw_thread_loop_events *events, void *data)
Add an event listener.
Definition: thread-loop.c:169
SPA_EXPORT void pw_thread_loop_destroy(struct pw_thread_loop *loop)
Destroy a threaded loop.
Definition: thread-loop.c:150
struct spa_loop * loop
wrapped loop
Definition: loop.h:38
SPA_EXPORT int pw_thread_loop_start(struct pw_thread_loop *loop)
Start the thread to handle loop.
Definition: thread-loop.c:212
SPA_EXPORT void pw_thread_loop_stop(struct pw_thread_loop *loop)
Quit the loop and stop its thread.
Definition: thread-loop.c:235
void pw_log_warn(const char *format,...)
void pw_log_debug(const char *format,...)
#define pw_loop_iterate(l,...)
Definition: loop.h:57