main-loop.h
Go to the documentation of this file.
/* PipeWire
* Copyright (C) 2016 Wim Taymans <wim.taymans@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __PIPEWIRE_MAIN_LOOP_H__
#define __PIPEWIRE_MAIN_LOOP_H__
#ifdef __cplusplus
extern "C" {
#endif
struct pw_main_loop;
#include <pipewire/loop.h>
#include <pipewire/properties.h>
struct pw_main_loop_events {
#define PW_VERSION_MAIN_LOOP_EVENTS 0
uint32_t version;
void (*destroy) (void *data);
};
struct pw_main_loop *
pw_main_loop_new(struct pw_properties *properties);
void pw_main_loop_add_listener(struct pw_main_loop *loop,
struct spa_hook *listener,
const struct pw_main_loop_events *events,
void *data);
struct pw_loop * pw_main_loop_get_loop(struct pw_main_loop *loop);
void pw_main_loop_destroy(struct pw_main_loop *loop);
void pw_main_loop_run(struct pw_main_loop *loop);
void pw_main_loop_quit(struct pw_main_loop *loop);
#ifdef __cplusplus
}
#endif
#endif /* __PIPEWIRE_MAIN_LOOP_H__ */
pw_main_loop_quit
void pw_main_loop_quit(struct pw_main_loop *loop)
Quit a main loop.
pw_main_loop_events::destroy
void(* destroy)(void *data)
Emited when the main loop is destroyed.
Definition: main-loop.h:45
pw_properties
A collection of key/value pairs.
Definition: properties.h:38
pw_loop
PipeWire loop object provides an implementation of the spa loop interfaces.
Definition: loop.h:37
pw_loop::loop
struct spa_loop * loop
wrapped loop
Definition: loop.h:38
pw_main_loop_events
Events of the main loop.
Definition: main-loop.h:40
pw_main_loop_run
void pw_main_loop_run(struct pw_main_loop *loop)
Run a main loop.
loop.h
pw_main_loop_events::version
uint32_t version
Definition: main-loop.h:42
pw_main_loop_new
struct pw_main_loop * pw_main_loop_new(struct pw_properties *properties)
Create a new main loop.
properties.h
pw_main_loop
PipeWire main-loop interface.
pw_main_loop_get_loop
struct pw_loop * pw_main_loop_get_loop(struct pw_main_loop *loop)
Get the loop implementation.
Definition: main-loop.c:88
pw_main_loop_destroy
void pw_main_loop_destroy(struct pw_main_loop *loop)
Destroy a loop.
pw_main_loop_add_listener
void pw_main_loop_add_listener(struct pw_main_loop *loop, struct spa_hook *listener, const struct pw_main_loop_events *events, void *data)
Add an event listener.
Definition: main-loop.c:79