PipeWire  0.1.4
thread-loop.h
Go to the documentation of this file.
1 /* PipeWire
2  * Copyright (C) 2015 Wim Taymans <wim.taymans@gmail.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef __PIPEWIRE_THREAD_LOOP_H__
21 #define __PIPEWIRE_THREAD_LOOP_H__
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #include <pipewire/loop.h>
28 
90 struct pw_thread_loop;
91 
93 #define PW_VERSION_THREAD_LOOP_EVENTS 0
94  uint32_t version;
95 
96  void (*destroy) (void *data);
97 };
98 
99 struct pw_thread_loop *
100 pw_thread_loop_new(struct pw_loop *loop, const char *name);
101 
102 void
104 
106  struct spa_hook *listener,
107  const struct pw_thread_loop_events *events,
108  void *data);
109 struct pw_loop *
111 
112 int
114 
115 void
117 
118 void
120 
121 void
123 
124 void
126 
127 void
128 pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept);
129 
130 void
132 
133 bool
135 
136 #ifdef __cplusplus
137 }
138 #endif
139 
140 #endif /* __PIPEWIRE_THREAD_LOOP_H__ */
int pw_thread_loop_start(struct pw_thread_loop *loop)
PipeWire loop interface provides an implementation of the spa loop interfaces.
Definition: loop.h:37
Definition: thread-loop.h:92
struct pw_thread_loop * pw_thread_loop_new(struct pw_loop *loop, const char *name)
PipeWire threaded loop object.
struct spa_loop * loop
wrapped loop
Definition: loop.h:38
void(* destroy)(void *data)
Definition: thread-loop.h:96
bool pw_thread_loop_in_thread(struct pw_thread_loop *loop)
void pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept)
void pw_thread_loop_accept(struct pw_thread_loop *loop)
void pw_thread_loop_unlock(struct pw_thread_loop *loop)
void pw_thread_loop_stop(struct pw_thread_loop *loop)
void pw_thread_loop_wait(struct pw_thread_loop *loop)
struct pw_loop * pw_thread_loop_get_loop(struct pw_thread_loop *loop)
Definition: thread-loop.c:143
void pw_thread_loop_add_listener(struct pw_thread_loop *loop, struct spa_hook *listener, const struct pw_thread_loop_events *events, void *data)
Definition: thread-loop.c:134
uint32_t version
Definition: thread-loop.h:94
void pw_thread_loop_destroy(struct pw_thread_loop *loop)
void pw_thread_loop_lock(struct pw_thread_loop *loop)