PipeWire  0.3.15
thread-loop.c File Reference
Include dependency graph for thread-loop.c:

Macros

#define NAME   "thread-loop"
 
#define pw_thread_loop_events_emit(o, m, v, ...)   spa_hook_list_call(&o->listener_list, struct pw_thread_loop_events, m, v, ##__VA_ARGS__)
 
#define pw_thread_loop_events_destroy(o)   pw_thread_loop_events_emit(o, destroy, 0)
 
#define CHECK(expression, label)
 

Functions

SPA_EXPORT struct pw_thread_looppw_thread_loop_new_full (struct pw_loop *loop, const char *name, const struct spa_dict *props)
 Make a new thread loop with the given loop, name and optional properties. More...
 
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. More...
 
SPA_EXPORT struct pw_looppw_thread_loop_get_loop (struct pw_thread_loop *loop)
 Get the loop implementation of the thread loop. More...
 

Macro Definition Documentation

◆ CHECK

#define CHECK (   expression,
  label 
)
Value:
do { \
if ((errno = expression) != 0) { \
res = -errno; \
pw_log_error(#expression ": %s", strerror(errno)); \
goto label; \
} \
} while(false);

◆ NAME

#define NAME   "thread-loop"

◆ pw_thread_loop_events_destroy

#define pw_thread_loop_events_destroy (   o)    pw_thread_loop_events_emit(o, destroy, 0)

◆ pw_thread_loop_events_emit

#define pw_thread_loop_events_emit (   o,
  m,
  v,
  ... 
)    spa_hook_list_call(&o->listener_list, struct pw_thread_loop_events, m, v, ##__VA_ARGS__)

Function Documentation

◆ pw_thread_loop_add_listener()

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.

◆ pw_thread_loop_get_loop()

SPA_EXPORT struct pw_loop* pw_thread_loop_get_loop ( struct pw_thread_loop loop)

Get the loop implementation of the thread loop.

References pw_loop::loop.

◆ pw_thread_loop_new_full()

SPA_EXPORT struct pw_thread_loop* pw_thread_loop_new_full ( struct pw_loop loop,
const char *  name,
const struct spa_dict *  props 
)

Make a new thread loop with the given loop, name and optional properties.

When loop is NULL, a new loop will be created.