PipeWire  0.2.7
pipewire.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_H__
21 #define __PIPEWIRE_H__
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #include <spa/support/plugin.h>
28 
29 #include <pipewire/client.h>
30 #include <pipewire/core.h>
31 #include <pipewire/interfaces.h>
32 #include <pipewire/introspect.h>
33 #include <pipewire/link.h>
34 #include <pipewire/log.h>
35 #include <pipewire/loop.h>
36 #include <pipewire/main-loop.h>
37 #include <pipewire/module.h>
38 #include <pipewire/factory.h>
39 #include <pipewire/node.h>
40 #include <pipewire/port.h>
41 #include <pipewire/properties.h>
42 #include <pipewire/proxy.h>
43 #include <pipewire/remote.h>
44 #include <pipewire/resource.h>
45 #include <pipewire/stream.h>
46 #include <pipewire/thread-loop.h>
47 #include <pipewire/type.h>
48 #include <pipewire/utils.h>
49 #include <pipewire/version.h>
50 
103 void
104 pw_init(int *argc, char **argv[]);
105 
106 bool
107 pw_debug_is_category_enabled(const char *name);
108 
109 const char *
111 
112 const char *
113 pw_get_prgname(void);
114 
115 const char *
116 pw_get_user_name(void);
117 
118 const char *
119 pw_get_host_name(void);
120 
121 char *
122 pw_get_client_name(void);
123 
124 void
125 pw_fill_remote_properties(struct pw_core *core, struct pw_properties *properties);
126 
127 void
128 pw_fill_stream_properties(struct pw_core *core, struct pw_properties *properties);
129 
130 enum pw_direction
131 pw_direction_reverse(enum pw_direction direction);
132 
133 void *
134 pw_get_support_interface(const char *type);
135 
136 void *pw_get_spa_dbus(struct pw_loop *loop);
137 int pw_release_spa_dbus(void *dbus);
138 
139 const struct spa_handle_factory *
140 pw_get_support_factory(const char *factory_name);
141 
142 const struct spa_support *
143 pw_get_support(uint32_t *n_support);
144 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 #endif /* __PIPEWIRE_H__ */
pw_pipewire::pw_init
SPA_EXPORT void pw_init(int *argc, char **argv[])
Initialize PipeWire.
Definition: pipewire.c:263
PW_CORE_PROP_VERSION
#define PW_CORE_PROP_VERSION
The version of the core.
Definition: core.h:110
PW_CORE_PROP_DAEMON
#define PW_CORE_PROP_DAEMON
If the core should listen for connections, boolean default false.
Definition: core.h:112
port.h
interface::iface
void * iface
Definition: pipewire.c:51
introspect.h
pw_pipewire::pw_get_host_name
const SPA_EXPORT char * pw_get_host_name(void)
Get the host name.
Definition: pipewire.c:353
remote.h
factory.h
PW_DIRECTION_OUTPUT
@ PW_DIRECTION_OUTPUT
an output port direction
Definition: introspect.h:49
pw_utils::pw_split_strv
SPA_EXPORT char ** pw_split_strv(const char *str, const char *delimiter, int max_tokens, int *n_tokens)
Split a string based on delimiters.
Definition: utils.c:66
pw_release_spa_dbus
SPA_EXPORT int pw_release_spa_dbus(void *dbus)
Definition: pipewire.c:236
PW_DIRECTION_INPUT
@ PW_DIRECTION_INPUT
an input port direction
Definition: introspect.h:48
interfaces.h
pw_pipewire::pw_fill_stream_properties
SPA_EXPORT void pw_fill_stream_properties(struct pw_core *core, struct pw_properties *properties)
Fill stream properties.
Definition: pipewire.c:436
pw_loop
Definition: loop.h:37
pw_pipewire::pw_fill_remote_properties
SPA_EXPORT void pw_fill_remote_properties(struct pw_core *core, struct pw_properties *properties)
Fill remote properties.
Definition: pipewire.c:395
registry::interfaces
struct spa_list interfaces
Definition: pipewire.c:55
module.h
pw_get_library_version
const SPA_EXPORT char * pw_get_library_version(void)
Get the currently running version.
Definition: pipewire.c:452
pw_loop::utils
struct spa_loop_utils * utils
loop utils
Definition: loop.h:40
pw_direction
pw_direction
Definition: introspect.h:47
pw_get_support_factory
const struct spa_handle_factory * pw_get_support_factory(const char *factory_name)
Definition: pipewire.c:189
pw_log::pw_log_info
void pw_log_info(const char *format,...)
type.h
pw_pipewire::pw_debug_is_category_enabled
SPA_EXPORT bool pw_debug_is_category_enabled(const char *name)
Check if a debug category is enabled.
Definition: pipewire.c:305
pw_properties::pw_properties_setf
SPA_EXPORT int pw_properties_setf(struct pw_properties *properties, const char *key, const char *format,...)
Set a property value by format.
Definition: properties.c:338
interface
Definition: pipewire.c:47
utils.h
pw_pipewire::pw_get_application_name
const SPA_EXPORT char * pw_get_application_name(void)
Get the application name.
Definition: pipewire.c:321
pw_get_support
SPA_EXPORT const struct spa_support * pw_get_support(uint32_t *n_support)
Definition: pipewire.c:195
pw_get_spa_dbus
SPA_EXPORT void * pw_get_spa_dbus(struct pw_loop *loop)
Definition: pipewire.c:202
node.h
pw_pipewire::pw_get_user_name
const SPA_EXPORT char * pw_get_user_name(void)
Get the user name.
Definition: pipewire.c:341
resource.h
stream.h
pw_get_support_interface
SPA_EXPORT void * pw_get_support_interface(const char *type)
Get a support interface.
Definition: pipewire.c:177
interface::type
uint32_t type
Definition: pipewire.c:50
pw_get_support_factory
SPA_EXPORT const struct spa_handle_factory * pw_get_support_factory(const char *factory_name)
Definition: pipewire.c:189
pw_log::pw_log_set_level
SPA_EXPORT void pw_log_set_level(enum spa_log_level level)
Set the global log level.
Definition: log.c:55
proxy.h
thread-loop.h
pw_properties::pw_properties_get
const SPA_EXPORT char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:361
interface::link
struct spa_list link
Definition: pipewire.c:48
pw_properties::pw_properties_set
SPA_EXPORT int pw_properties_set(struct pw_properties *properties, const char *key, const char *value)
Set a property value.
Definition: properties.c:308
pw_core
the core PipeWire object
log.h
main-loop.h
pw_pipewire::pw_direction_reverse
enum pw_direction pw_direction_reverse(enum pw_direction direction)
Reverse the direction.
Definition: pipewire.c:441
loop.h
interface::handle
struct spa_handle * handle
Definition: pipewire.c:49
registry
Definition: pipewire.c:54
core.h
pw_get_support
const struct spa_support * pw_get_support(uint32_t *n_support)
Definition: pipewire.c:195
pw_pipewire::pw_get_client_name
SPA_EXPORT char * pw_get_client_name(void)
Get the client name.
Definition: pipewire.c:371
pipewire.h
properties.h
pw_get_support_interface
void * pw_get_support_interface(const char *type)
Get a support interface.
Definition: pipewire.c:177
pw_release_spa_dbus
int pw_release_spa_dbus(void *dbus)
Definition: pipewire.c:236
pw_pipewire::pw_get_prgname
const SPA_EXPORT char * pw_get_prgname(void)
Get the program name.
Definition: pipewire.c:328
PW_CORE_PROP_NAME
#define PW_CORE_PROP_NAME
The name of the core.
Definition: core.h:108
pw_get_spa_dbus
void * pw_get_spa_dbus(struct pw_loop *loop)
Definition: pipewire.c:202
pw_log::pw_log_set
SPA_EXPORT void pw_log_set(struct spa_log *log)
Set the global log interface.
Definition: log.c:33
client.h
pw_properties
A collection of key/value pairs.
Definition: properties.h:38