Loading...
Searching...
No Matches
loop.h
Go to the documentation of this file.
/* PipeWire */
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#ifndef PIPEWIRE_LOOP_H
#define PIPEWIRE_LOOP_H
#ifdef __cplusplus
extern "C" {
#endif
#include <spa/support/loop.h>
#include <spa/utils/dict.h>
struct pw_loop {
struct spa_system *system;
struct spa_loop *loop;
struct spa_loop_control *control;
struct spa_loop_utils *utils;
};
struct pw_loop *
pw_loop_new(const struct spa_dict *props);
void
pw_loop_destroy(struct pw_loop *loop);
#define pw_loop_add_source(l,...) spa_loop_add_source((l)->loop,__VA_ARGS__)
#define pw_loop_update_source(l,...) spa_loop_update_source((l)->loop,__VA_ARGS__)
#define pw_loop_remove_source(l,...) spa_loop_remove_source((l)->loop,__VA_ARGS__)
#define pw_loop_invoke(l,...) spa_loop_invoke((l)->loop,__VA_ARGS__)
#define pw_loop_get_fd(l) spa_loop_control_get_fd((l)->control)
#define pw_loop_add_hook(l,...) spa_loop_control_add_hook((l)->control,__VA_ARGS__)
#define pw_loop_enter(l) spa_loop_control_enter((l)->control)
#define pw_loop_leave(l) spa_loop_control_leave((l)->control)
#define pw_loop_iterate(l,...) spa_loop_control_iterate_fast((l)->control,__VA_ARGS__)
#define pw_loop_add_io(l,...) spa_loop_utils_add_io((l)->utils,__VA_ARGS__)
#define pw_loop_update_io(l,...) spa_loop_utils_update_io((l)->utils,__VA_ARGS__)
#define pw_loop_add_idle(l,...) spa_loop_utils_add_idle((l)->utils,__VA_ARGS__)
#define pw_loop_enable_idle(l,...) spa_loop_utils_enable_idle((l)->utils,__VA_ARGS__)
#define pw_loop_add_event(l,...) spa_loop_utils_add_event((l)->utils,__VA_ARGS__)
#define pw_loop_signal_event(l,...) spa_loop_utils_signal_event((l)->utils,__VA_ARGS__)
#define pw_loop_add_timer(l,...) spa_loop_utils_add_timer((l)->utils,__VA_ARGS__)
#define pw_loop_update_timer(l,...) spa_loop_utils_update_timer((l)->utils,__VA_ARGS__)
#define pw_loop_add_signal(l,...) spa_loop_utils_add_signal((l)->utils,__VA_ARGS__)
#define pw_loop_destroy_source(l,...) spa_loop_utils_destroy_source((l)->utils,__VA_ARGS__)
#ifdef __cplusplus
}
#endif
#endif /* PIPEWIRE_LOOP_H */
pw_loop_new
struct pw_loop * pw_loop_new(const struct spa_dict *props)
Create a new loop.
Definition loop.c:38
pw_loop_destroy
void pw_loop_destroy(struct pw_loop *loop)
Destroy a loop.
Definition loop.c:146
loop.h
spa/support/loop.h
pw_loop
Definition loop.h:31
pw_loop::loop
struct spa_loop * loop
wrapped loop
Definition loop.h:33
pw_loop::control
struct spa_loop_control * control
loop control
Definition loop.h:34
pw_loop::system
struct spa_system * system
system utils
Definition loop.h:32
spa_dict
Definition dict.h:39
spa_loop_control
Definition loop.h:42
spa_loop_utils
Definition loop.h:48
spa_loop
Definition loop.h:36
spa_system
Definition system.h:45
dict.h
spa/utils/dict.h