PipeWire: loop.h Source File

PipeWire 0.3.80

Loading...
Searching...
No Matches
src/pipewire/loop.h
Go to the documentation of this file.
1/* PipeWire */
2/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef PIPEWIRE_LOOP_H
6#define PIPEWIRE_LOOP_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#include <spa/support/loop.h>
13#include <spa/utils/dict.h>
14
27struct pw_loop {
28 struct spa_system *system;
29 struct spa_loop *loop;
30 struct spa_loop_control *control;
31 struct spa_loop_utils *utils;
32};
33
34 struct pw_loop *
35 pw_loop_new(const struct spa_dict *props);
36
37void
38 pw_loop_destroy(struct pw_loop *loop);
39
40#define pw_loop_add_source(l,...) spa_loop_add_source((l)->loop,__VA_ARGS__)
41#define pw_loop_update_source(l,...) spa_loop_update_source((l)->loop,__VA_ARGS__)
42#define pw_loop_remove_source(l,...) spa_loop_remove_source((l)->loop,__VA_ARGS__)
43#define pw_loop_invoke(l,...) spa_loop_invoke((l)->loop,__VA_ARGS__)
44
45#define pw_loop_get_fd(l) spa_loop_control_get_fd((l)->control)
46#define pw_loop_add_hook(l,...) spa_loop_control_add_hook((l)->control,__VA_ARGS__)
47#define pw_loop_enter(l) spa_loop_control_enter((l)->control)
48#define pw_loop_leave(l) spa_loop_control_leave((l)->control)
49#define pw_loop_iterate(l,...) spa_loop_control_iterate_fast((l)->control,__VA_ARGS__)
50
51#define pw_loop_add_io(l,...) spa_loop_utils_add_io((l)->utils,__VA_ARGS__)
52#define pw_loop_update_io(l,...) spa_loop_utils_update_io((l)->utils,__VA_ARGS__)
53#define pw_loop_add_idle(l,...) spa_loop_utils_add_idle((l)->utils,__VA_ARGS__)
54#define pw_loop_enable_idle(l,...) spa_loop_utils_enable_idle((l)->utils,__VA_ARGS__)
55#define pw_loop_add_event(l,...) spa_loop_utils_add_event((l)->utils,__VA_ARGS__)
56#define pw_loop_signal_event(l,...) spa_loop_utils_signal_event((l)->utils,__VA_ARGS__)
57#define pw_loop_add_timer(l,...) spa_loop_utils_add_timer((l)->utils,__VA_ARGS__)
58#define pw_loop_update_timer(l,...) spa_loop_utils_update_timer((l)->utils,__VA_ARGS__)
59#define pw_loop_add_signal(l,...) spa_loop_utils_add_signal((l)->utils,__VA_ARGS__)
60#define pw_loop_destroy_source(l,...) spa_loop_utils_destroy_source((l)->utils,__VA_ARGS__)
61
66#ifdef __cplusplus
67}
68#endif
69
70#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:37
pw_loop_destroy
void pw_loop_destroy(struct pw_loop *loop)
Destroy a loop.
Definition loop.c:145
loop.h
spa/support/loop.h
pw_loop
Definition src/pipewire/loop.h:31
pw_loop::loop
struct spa_loop * loop
wrapped loop
Definition src/pipewire/loop.h:33
pw_loop::control
struct spa_loop_control * control
loop control
Definition src/pipewire/loop.h:34
pw_loop::system
struct spa_system * system
system utils
Definition src/pipewire/loop.h:32
spa_dict
Definition utils/dict.h:39
spa_loop_control
Definition spa/include/spa/support/loop.h:42
spa_loop_utils
Definition spa/include/spa/support/loop.h:48
spa_loop
Definition spa/include/spa/support/loop.h:36
spa_system
Definition system.h:45
dict.h
spa/utils/dict.h