summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2019-02-06 11:59:05 +0100
committerWim Taymans <wtaymans@redhat.com>2019-02-06 11:59:05 +0100
commitf6391be2144d8c7cb5b92c46842abfca6577b5a8 (patch)
treec1169f072af6b4694177d44f5273ed96a171cf79
parent3424c05298579c06c6bf5a0c7f74143c84c90fcb (diff)
add SPA_EXPORT where needed
-rw-r--r--spa/plugins/alsa/alsa.c1
-rw-r--r--spa/plugins/audiomixer/plugin.c2
-rw-r--r--spa/plugins/audiotestsrc/plugin.c1
-rw-r--r--spa/plugins/bluez5/plugin.c2
-rw-r--r--spa/plugins/ffmpeg/ffmpeg.c2
-rw-r--r--spa/plugins/support/dbus.c1
-rw-r--r--spa/plugins/test/plugin.c2
-rw-r--r--spa/plugins/v4l2/v4l2.c2
-rw-r--r--spa/plugins/videotestsrc/plugin.c2
-rw-r--r--spa/plugins/volume/plugin.c1
-rw-r--r--src/modules/module-audio-dsp.c1
-rw-r--r--src/modules/module-autolink.c1
-rw-r--r--src/modules/module-client-node.c1
-rw-r--r--src/modules/module-flatpak.c1
-rw-r--r--src/modules/module-link-factory.c1
-rw-r--r--src/modules/module-mixer.c1
-rw-r--r--src/modules/module-protocol-dbus.c1
-rw-r--r--src/modules/module-protocol-native.c1
-rw-r--r--src/modules/module-rtkit.c1
-rw-r--r--src/modules/module-suspend-on-idle.c1
-rw-r--r--src/modules/spa/module-monitor.c1
-rw-r--r--src/modules/spa/module-node-factory.c1
-rw-r--r--src/modules/spa/module-node.c1
-rw-r--r--src/pipewire/client.c15
-rw-r--r--src/pipewire/command.c3
-rw-r--r--src/pipewire/control.c4
-rw-r--r--src/pipewire/core.c13
-rw-r--r--src/pipewire/data-loop.c7
-rw-r--r--src/pipewire/factory.c8
-rw-r--r--src/pipewire/global.c14
-rw-r--r--src/pipewire/introspect.c17
-rw-r--r--src/pipewire/link.c11
-rw-r--r--src/pipewire/log.c7
-rw-r--r--src/pipewire/loop.c2
-rw-r--r--src/pipewire/main-loop.c6
-rw-r--r--src/pipewire/mem.c5
-rw-r--r--src/pipewire/module.c6
-rw-r--r--src/pipewire/node.c18
-rw-r--r--src/pipewire/pipewire.c17
-rw-r--r--src/pipewire/port.c6
-rw-r--r--src/pipewire/properties.c11
-rw-r--r--src/pipewire/protocol.c9
-rw-r--r--src/pipewire/proxy.c9
-rw-r--r--src/pipewire/remote.c16
-rw-r--r--src/pipewire/resource.c14
-rw-r--r--src/pipewire/stream.c19
-rw-r--r--src/pipewire/thread-loop.c13
-rw-r--r--src/pipewire/utils.c4
48 files changed, 275 insertions, 8 deletions
diff --git a/spa/plugins/alsa/alsa.c b/spa/plugins/alsa/alsa.c
index 41f7a201..1e95ce52 100644
--- a/spa/plugins/alsa/alsa.c
+++ b/spa/plugins/alsa/alsa.c
@@ -25,6 +25,7 @@ extern const struct spa_handle_factory spa_alsa_source_factory;
extern const struct spa_handle_factory spa_alsa_sink_factory;
extern const struct spa_handle_factory spa_alsa_monitor_factory;
+SPA_EXPORT
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
{
spa_return_val_if_fail(factory != NULL, -EINVAL);
diff --git a/spa/plugins/audiomixer/plugin.c b/spa/plugins/audiomixer/plugin.c
index 8735390e..d500c096 100644
--- a/spa/plugins/audiomixer/plugin.c
+++ b/spa/plugins/audiomixer/plugin.c
@@ -23,7 +23,7 @@
extern const struct spa_handle_factory spa_audiomixer_factory;
-int
+SPA_EXPORT int
spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
{
spa_return_val_if_fail(factory != NULL, -EINVAL);
diff --git a/spa/plugins/audiotestsrc/plugin.c b/spa/plugins/audiotestsrc/plugin.c
index b2029a19..21082941 100644
--- a/spa/plugins/audiotestsrc/plugin.c
+++ b/spa/plugins/audiotestsrc/plugin.c
@@ -23,6 +23,7 @@
extern const struct spa_handle_factory spa_audiotestsrc_factory;
+SPA_EXPORT
int
spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
{
diff --git a/spa/plugins/bluez5/plugin.c b/spa/plugins/bluez5/plugin.c
index fa77907b..d6ff8540 100644
--- a/spa/plugins/bluez5/plugin.c
+++ b/spa/plugins/bluez5/plugin.c
@@ -24,7 +24,7 @@
extern const struct spa_handle_factory spa_bluez5_monitor_factory;
-int
+SPA_EXPORT int
spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
{
spa_return_val_if_fail(factory != NULL, -EINVAL);
diff --git a/spa/plugins/ffmpeg/ffmpeg.c b/spa/plugins/ffmpeg/ffmpeg.c
index e9ff1219..8e3f5beb 100644
--- a/spa/plugins/ffmpeg/ffmpeg.c
+++ b/spa/plugins/ffmpeg/ffmpeg.c
@@ -76,7 +76,7 @@ ffmpeg_enum_interface_info(const struct spa_handle_factory *factory,
return 1;
}
-
+SPA_EXPORT
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
{
static const AVCodec *c = NULL;
diff --git a/spa/plugins/support/dbus.c b/spa/plugins/support/dbus.c
index ee4ed67b..b3f79729 100644
--- a/spa/plugins/support/dbus.c
+++ b/spa/plugins/support/dbus.c
@@ -431,6 +431,7 @@ static const struct spa_handle_factory dbus_factory = {
impl_enum_interface_info,
};
+SPA_EXPORT
int
spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
{
diff --git a/spa/plugins/test/plugin.c b/spa/plugins/test/plugin.c
index 1bddeeb0..94d1992d 100644
--- a/spa/plugins/test/plugin.c
+++ b/spa/plugins/test/plugin.c
@@ -24,7 +24,7 @@
extern const struct spa_handle_factory spa_fakesrc_factory;
extern const struct spa_handle_factory spa_fakesink_factory;
-int
+SPA_EXPORT int
spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
{
spa_return_val_if_fail(factory != NULL, -EINVAL);
diff --git a/spa/plugins/v4l2/v4l2.c b/spa/plugins/v4l2/v4l2.c
index 8079965b..8d6bb75f 100644
--- a/spa/plugins/v4l2/v4l2.c
+++ b/spa/plugins/v4l2/v4l2.c
@@ -24,7 +24,7 @@
extern const struct spa_handle_factory spa_v4l2_source_factory;
extern const struct spa_handle_factory spa_v4l2_monitor_factory;
-int
+SPA_EXPORT int
spa_handle_factory_enum(const struct spa_handle_factory **factory,
uint32_t *index)
{
diff --git a/spa/plugins/videotestsrc/plugin.c b/spa/plugins/videotestsrc/plugin.c
index c565bb72..77b99625 100644
--- a/spa/plugins/videotestsrc/plugin.c
+++ b/spa/plugins/videotestsrc/plugin.c
@@ -23,7 +23,7 @@
extern const struct spa_handle_factory spa_videotestsrc_factory;
-int
+SPA_EXPORT int
spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
{
spa_return_val_if_fail(factory != NULL, -EINVAL);
diff --git a/spa/plugins/volume/plugin.c b/spa/plugins/volume/plugin.c
index 488896a7..8abc7e74 100644
--- a/spa/plugins/volume/plugin.c
+++ b/spa/plugins/volume/plugin.c
@@ -23,6 +23,7 @@
extern const struct spa_handle_factory spa_volume_factory;
+SPA_EXPORT
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
{
spa_return_val_if_fail(factory != NULL, -EINVAL);
diff --git a/src/modules/module-audio-dsp.c b/src/modules/module-audio-dsp.c
index 1b28c2d3..8c1c174c 100644
--- a/src/modules/module-audio-dsp.c
+++ b/src/modules/module-audio-dsp.c
@@ -925,6 +925,7 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
return 0;
}
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
return module_init(module, NULL);
diff --git a/src/modules/module-autolink.c b/src/modules/module-autolink.c
index 241afbd2..4aeace5f 100644
--- a/src/modules/module-autolink.c
+++ b/src/modules/module-autolink.c
@@ -390,6 +390,7 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
return 0;
}
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
return module_init(module, NULL);
diff --git a/src/modules/module-client-node.c b/src/modules/module-client-node.c
index 616a6c95..ebd37ee1 100644
--- a/src/modules/module-client-node.c
+++ b/src/modules/module-client-node.c
@@ -140,6 +140,7 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
return 0;
}
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
return module_init(module, NULL);
diff --git a/src/modules/module-flatpak.c b/src/modules/module-flatpak.c
index ab32a227..59c6f67a 100644
--- a/src/modules/module-flatpak.c
+++ b/src/modules/module-flatpak.c
@@ -544,6 +544,7 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
return -ENOMEM;
}
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
return module_init(module, NULL);
diff --git a/src/modules/module-link-factory.c b/src/modules/module-link-factory.c
index 15069084..903d80c8 100644
--- a/src/modules/module-link-factory.c
+++ b/src/modules/module-link-factory.c
@@ -225,6 +225,7 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
return 0;
}
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
return module_init(module, NULL);
diff --git a/src/modules/module-mixer.c b/src/modules/module-mixer.c
index f3c1a2f3..ce5ce026 100644
--- a/src/modules/module-mixer.c
+++ b/src/modules/module-mixer.c
@@ -241,6 +241,7 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
return 0;
}
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
return module_init(module, NULL);
diff --git a/src/modules/module-protocol-dbus.c b/src/modules/module-protocol-dbus.c
index 3e030c00..1d54a4c3 100644
--- a/src/modules/module-protocol-dbus.c
+++ b/src/modules/module-protocol-dbus.c
@@ -626,6 +626,7 @@ static void pw_protocol_dbus_destroy(struct impl *impl)
}
#endif
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
pw_protocol_dbus_new(module->core, NULL);
diff --git a/src/modules/module-protocol-native.c b/src/modules/module-protocol-native.c
index 4816492a..c00fb163 100644
--- a/src/modules/module-protocol-native.c
+++ b/src/modules/module-protocol-native.c
@@ -936,6 +936,7 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
return 0;
}
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
return module_init(module, NULL);
diff --git a/src/modules/module-rtkit.c b/src/modules/module-rtkit.c
index 3670cdeb..0db32755 100644
--- a/src/modules/module-rtkit.c
+++ b/src/modules/module-rtkit.c
@@ -482,6 +482,7 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
return 0;
}
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
return module_init(module, NULL);
diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c
index 47e1a26e..56775376 100644
--- a/src/modules/module-suspend-on-idle.c
+++ b/src/modules/module-suspend-on-idle.c
@@ -212,6 +212,7 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
return 0;
}
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
return module_init(module, NULL);
diff --git a/src/modules/spa/module-monitor.c b/src/modules/spa/module-monitor.c
index 24f25c06..1c6ae44e 100644
--- a/src/modules/spa/module-monitor.c
+++ b/src/modules/spa/module-monitor.c
@@ -52,6 +52,7 @@ const struct pw_module_events module_events = {
.destroy = module_destroy,
};
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
const char *dir;
diff --git a/src/modules/spa/module-node-factory.c b/src/modules/spa/module-node-factory.c
index 9e2129d9..560089a7 100644
--- a/src/modules/spa/module-node-factory.c
+++ b/src/modules/spa/module-node-factory.c
@@ -196,6 +196,7 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
return 0;
}
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
return module_init(module, NULL);
diff --git a/src/modules/spa/module-node.c b/src/modules/spa/module-node.c
index 8265f01a..ec45bda0 100644
--- a/src/modules/spa/module-node.c
+++ b/src/modules/spa/module-node.c
@@ -53,6 +53,7 @@ static const struct pw_module_events module_events = {
.destroy = module_destroy,
};
+SPA_EXPORT
int pipewire__module_init(struct pw_module *module, const char *args)
{
struct pw_properties *props = NULL;
diff --git a/src/pipewire/client.c b/src/pipewire/client.c
index 876ac8e4..c5257c22 100644
--- a/src/pipewire/client.c
+++ b/src/pipewire/client.c
@@ -148,6 +148,7 @@ static const struct pw_core_events core_events = {
*
* \memberof pw_client
*/
+SPA_EXPORT
struct pw_client *pw_client_new(struct pw_core *core,
struct ucred *ucred,
struct pw_properties *properties,
@@ -215,6 +216,7 @@ static const struct pw_global_events global_events = {
.bind = global_bind,
};
+SPA_EXPORT
int pw_client_register(struct pw_client *client,
struct pw_client *owner,
struct pw_global *parent,
@@ -241,31 +243,37 @@ int pw_client_register(struct pw_client *client,
return 0;
}
+SPA_EXPORT
struct pw_core *pw_client_get_core(struct pw_client *client)
{
return client->core;
}
+SPA_EXPORT
struct pw_resource *pw_client_get_core_resource(struct pw_client *client)
{
return client->core_resource;
}
+SPA_EXPORT
struct pw_resource *pw_client_find_resource(struct pw_client *client, uint32_t id)
{
return pw_map_lookup(&client->objects, id);
}
+SPA_EXPORT
struct pw_global *pw_client_get_global(struct pw_client *client)
{
return client->global;
}
+SPA_EXPORT
const struct pw_properties *pw_client_get_properties(struct pw_client *client)
{
return client->properties;
}
+SPA_EXPORT
const struct ucred *pw_client_get_ucred(struct pw_client *client)
{
if (!client->ucred_valid)
@@ -274,6 +282,7 @@ const struct ucred *pw_client_get_ucred(struct pw_client *client)
return &client->ucred;
}
+SPA_EXPORT
void *pw_client_get_user_data(struct pw_client *client)
{
return client->user_data;
@@ -293,6 +302,7 @@ static int destroy_resource(void *object, void *data)
*
* \memberof pw_client
*/
+SPA_EXPORT
void pw_client_destroy(struct pw_client *client)
{
struct pw_resource *resource, *tmp;
@@ -328,6 +338,7 @@ void pw_client_destroy(struct pw_client *client)
free(impl);
}
+SPA_EXPORT
void pw_client_add_listener(struct pw_client *client,
struct spa_hook *listener,
const struct pw_client_events *events,
@@ -336,6 +347,7 @@ void pw_client_add_listener(struct pw_client *client,
spa_hook_list_append(&client->listener_list, listener, events, data);
}
+SPA_EXPORT
const struct pw_client_info *pw_client_get_info(struct pw_client *client)
{
return &client->info;
@@ -352,6 +364,7 @@ const struct pw_client_info *pw_client_get_info(struct pw_client *client)
*
* \memberof pw_client
*/
+SPA_EXPORT
int pw_client_update_properties(struct pw_client *client, const struct spa_dict *dict)
{
struct pw_resource *resource;
@@ -436,6 +449,7 @@ static uint32_t parse_mask(const char *str)
return mask;
}
+SPA_EXPORT
int pw_client_update_permissions(struct pw_client *client, const struct spa_dict *dict)
{
struct impl *impl = SPA_CONTAINER_OF(client, struct impl, this);
@@ -497,6 +511,7 @@ int pw_client_update_permissions(struct pw_client *client, const struct spa_dict
return 0;
}
+SPA_EXPORT
void pw_client_set_busy(struct pw_client *client, bool busy)
{
if (client->busy != busy) {
diff --git a/src/pipewire/command.c b/src/pipewire/command.c
index 1578829b..24fc4046 100644
--- a/src/pipewire/command.c
+++ b/src/pipewire/command.c
@@ -135,6 +135,7 @@ static struct pw_command *parse_command_module_load(const char *line, char **err
*
* \memberof pw_command
*/
+SPA_EXPORT
void pw_command_free(struct pw_command *command)
{
struct impl *impl = SPA_CONTAINER_OF(command, struct impl, this);
@@ -154,6 +155,7 @@ void pw_command_free(struct pw_command *command)
*
* \memberof pw_command
*/
+SPA_EXPORT
struct pw_command *pw_command_parse(const char *line, char **err)
{
struct pw_command *command = NULL;
@@ -187,6 +189,7 @@ struct pw_command *pw_command_parse(const char *line, char **err)
*
* \memberof pw_command
*/
+SPA_EXPORT
int pw_command_run(struct pw_command *command, struct pw_core *core, char **err)
{
return command->func(command, core, err);
diff --git a/src/pipewire/control.c b/src/pipewire/control.c
index e09cf233..1c8873db 100644
--- a/src/pipewire/control.c
+++ b/src/pipewire/control.c
@@ -120,11 +120,13 @@ void pw_control_destroy(struct pw_control *control)
free(control);
}
+SPA_EXPORT
struct pw_port *pw_control_get_port(struct pw_control *control)
{
return control->port;
}
+SPA_EXPORT
void pw_control_add_listener(struct pw_control *control,
struct spa_hook *listener,
const struct pw_control_events *events,
@@ -133,6 +135,7 @@ void pw_control_add_listener(struct pw_control *control,
spa_hook_list_append(&control->listener_list, listener, events, data);
}
+SPA_EXPORT
int pw_control_link(struct pw_control *control, struct pw_control *other)
{
int res = 0;
@@ -198,6 +201,7 @@ int pw_control_link(struct pw_control *control, struct pw_control *other)
return res;
}
+SPA_EXPORT
int pw_control_unlink(struct pw_control *control, struct pw_control *other)
{
int res = 0;
diff --git a/src/pipewire/core.c b/src/pipewire/core.c
index 07c6581a..fc49d445 100644
--- a/src/pipewire/core.c
+++ b/src/pipewire/core.c
@@ -360,6 +360,7 @@ static const struct pw_global_events global_events = {
*
* \memberof pw_core
*/
+SPA_EXPORT
struct pw_core *pw_core_new(struct pw_loop *main_loop, struct pw_properties *properties)
{
struct pw_core *this;
@@ -468,6 +469,7 @@ struct pw_core *pw_core_new(struct pw_loop *main_loop, struct pw_properties *pro
*
* \memberof pw_core
*/
+SPA_EXPORT
void pw_core_destroy(struct pw_core *core)
{
struct pw_global *global, *t;
@@ -506,16 +508,19 @@ void pw_core_destroy(struct pw_core *core)
free(core);
}
+SPA_EXPORT
const struct pw_core_info *pw_core_get_info(struct pw_core *core)
{
return &core->info;
}
+SPA_EXPORT
struct pw_global *pw_core_get_global(struct pw_core *core)
{
return core->global;
}
+SPA_EXPORT
void pw_core_add_listener(struct pw_core *core,
struct spa_hook *listener,
const struct pw_core_events *events,
@@ -524,22 +529,26 @@ void pw_core_add_listener(struct pw_core *core,
spa_hook_list_append(&core->listener_list, listener, events, data);
}
+SPA_EXPORT
struct pw_type *pw_core_get_type(struct pw_core *core)
{
return &core->type;
}
+SPA_EXPORT
const struct spa_support *pw_core_get_support(struct pw_core *core, uint32_t *n_support)
{
*n_support = core->n_support;
return core->support;
}
+SPA_EXPORT
struct pw_loop *pw_core_get_main_loop(struct pw_core *core)
{
return core->main_loop;
}
+SPA_EXPORT
const struct pw_properties *pw_core_get_properties(struct pw_core *core)
{
return core->properties;
@@ -554,6 +563,7 @@ const struct pw_properties *pw_core_get_properties(struct pw_core *core)
*
* \memberof pw_core
*/
+SPA_EXPORT
int pw_core_update_properties(struct pw_core *core, const struct spa_dict *dict)
{
struct pw_resource *resource;
@@ -580,6 +590,7 @@ int pw_core_update_properties(struct pw_core *core, const struct spa_dict *dict)
return changed;
}
+SPA_EXPORT
int pw_core_for_each_global(struct pw_core *core,
int (*callback) (void *data, struct pw_global *global),
void *data)
@@ -597,6 +608,7 @@ int pw_core_for_each_global(struct pw_core *core,
return 0;
}
+SPA_EXPORT
struct pw_global *pw_core_find_global(struct pw_core *core, uint32_t id)
{
struct pw_global *global;
@@ -830,6 +842,7 @@ int pw_core_find_format(struct pw_core *core,
*
* \memberof pw_core
*/
+SPA_EXPORT
struct pw_factory *pw_core_find_factory(struct pw_core *core,
const char *name)
{
diff --git a/src/pipewire/data-loop.c b/src/pipewire/data-loop.c
index 75f59d49..41f60d52 100644
--- a/src/pipewire/data-loop.c
+++ b/src/pipewire/data-loop.c
@@ -56,6 +56,7 @@ static void do_stop(void *data, uint64_t count)
*
* \memberof pw_data_loop
*/
+SPA_EXPORT
struct pw_data_loop *pw_data_loop_new(struct pw_properties *properties)
{
struct pw_data_loop *this;
@@ -85,6 +86,7 @@ struct pw_data_loop *pw_data_loop_new(struct pw_properties *properties)
* \param loop the data loop to destroy
* \memberof pw_data_loop
*/
+SPA_EXPORT
void pw_data_loop_destroy(struct pw_data_loop *loop)
{
pw_log_debug("data-loop %p: destroy", loop);
@@ -98,6 +100,7 @@ void pw_data_loop_destroy(struct pw_data_loop *loop)
free(loop);
}
+SPA_EXPORT
void pw_data_loop_add_listener(struct pw_data_loop *loop,
struct spa_hook *listener,
const struct pw_data_loop_events *events,
@@ -106,6 +109,7 @@ void pw_data_loop_add_listener(struct pw_data_loop *loop,
spa_hook_list_append(&loop->listener_list, listener, events, data);
}
+SPA_EXPORT
struct pw_loop *
pw_data_loop_get_loop(struct pw_data_loop *loop)
{
@@ -120,6 +124,7 @@ pw_data_loop_get_loop(struct pw_data_loop *loop)
*
* \memberof pw_data_loop
*/
+SPA_EXPORT
int pw_data_loop_start(struct pw_data_loop *loop)
{
if (!loop->running) {
@@ -143,6 +148,7 @@ int pw_data_loop_start(struct pw_data_loop *loop)
*
* \memberof pw_data_loop
*/
+SPA_EXPORT
int pw_data_loop_stop(struct pw_data_loop *loop)
{
if (loop->running) {
@@ -159,6 +165,7 @@ int pw_data_loop_stop(struct pw_data_loop *loop)
*
* \memberof pw_data_loop
*/
+SPA_EXPORT
bool pw_data_loop_in_thread(struct pw_data_loop * loop)
{
return pthread_equal(loop->thread, pthread_self());
diff --git a/src/pipewire/factory.c b/src/pipewire/factory.c
index 35b4cdcb..fb611eef 100644
--- a/src/pipewire/factory.c
+++ b/src/pipewire/factory.c
@@ -27,6 +27,7 @@ struct resource_data {
struct spa_hook resource_listener;
};
+SPA_EXPORT
struct pw_factory *pw_factory_new(struct pw_core *core,
const char *name,
uint32_t type,
@@ -55,6 +56,7 @@ struct pw_factory *pw_factory_new(struct pw_core *core,
return this;
}
+SPA_EXPORT
void pw_factory_destroy(struct pw_factory *factory)
{
pw_log_debug("factory %p: destroy", factory);
@@ -132,6 +134,7 @@ static const struct pw_global_events global_events = {
.bind = global_bind,
};
+SPA_EXPORT
int pw_factory_register(struct pw_factory *factory,
struct pw_client *owner,
struct pw_global *parent,
@@ -167,16 +170,19 @@ int pw_factory_register(struct pw_factory *factory,
return 0;
}
+SPA_EXPORT
void *pw_factory_get_user_data(struct pw_factory *factory)
{
return factory->user_data;
}
+SPA_EXPORT
struct pw_global *pw_factory_get_global(struct pw_factory *factory)
{
return factory->global;
}
+SPA_EXPORT
void pw_factory_add_listener(struct pw_factory *factory,
struct spa_hook *listener,
const struct pw_factory_events *events,
@@ -185,6 +191,7 @@ void pw_factory_add_listener(struct pw_factory *factory,
spa_hook_list_append(&factory->listener_list, listener, events, data);
}
+SPA_EXPORT
void pw_factory_set_implementation(struct pw_factory *factory,
const struct pw_factory_implementation *implementation,
void *data)
@@ -193,6 +200,7 @@ void pw_factory_set_implementation(struct pw_factory *factory,
factory->implementation_data = data;
}
+SPA_EXPORT
void *pw_factory_create_object(struct pw_factory *factory,
struct pw_resource *resource,
uint32_t type,
diff --git a/src/pipewire/global.c b/src/pipewire/global.c
index 32512bca..00258ff8 100644
--- a/src/pipewire/global.c
+++ b/src/pipewire/global.c
@@ -33,6 +33,7 @@ struct global_impl {
/** \endcond */
+SPA_EXPORT
uint32_t pw_global_get_permissions(struct pw_global *global, struct pw_client *client)
{
uint32_t perms = PW_PERM_RWX;
@@ -55,6 +56,7 @@ uint32_t pw_global_get_permissions(struct pw_global *global, struct pw_client *c
*
* \memberof pw_global
*/
+SPA_EXPORT
struct pw_global *
pw_global_new(struct pw_core *core,
uint32_t type,
@@ -95,6 +97,7 @@ pw_global_new(struct pw_core *core,
*
* \memberof pw_global
*/
+SPA_EXPORT
int
pw_global_register(struct pw_global *global,
struct pw_client *owner,
@@ -135,46 +138,55 @@ pw_global_register(struct pw_global *global,
return 0;
}
+SPA_EXPORT
struct pw_core *pw_global_get_core(struct pw_global *global)
{
return global->core;
}
+SPA_EXPORT
struct pw_client *pw_global_get_owner(struct pw_global *global)
{
return global->owner;
}
+SPA_EXPORT
struct pw_global *pw_global_get_parent(struct pw_global *global)
{
return global->parent;
}
+SPA_EXPORT
uint32_t pw_global_get_type(struct pw_global *global)
{
return global->type;
}
+SPA_EXPORT
uint32_t pw_global_get_version(struct pw_global *global)
{
return global->version;
}
+SPA_EXPORT
const struct pw_properties *pw_global_get_properties(struct pw_global *global)
{
return global->properties;
}
+SPA_EXPORT
void * pw_global_get_object(struct pw_global *global)
{
return global->object;
}
+SPA_EXPORT
uint32_t pw_global_get_id(struct pw_global *global)
{
return global->id;
}
+SPA_EXPORT
void pw_global_add_listener(struct pw_global *global,
struct spa_hook *listener,
const struct pw_global_events *events,
@@ -196,6 +208,7 @@ void pw_global_add_listener(struct pw_global *global,
*
* \memberof pw_global
*/
+SPA_EXPORT
int
pw_global_bind(struct pw_global *global, struct pw_client *client, uint32_t permissions,
uint32_t version, uint32_t id)
@@ -224,6 +237,7 @@ pw_global_bind(struct pw_global *global, struct pw_client *client, uint32_t perm
*
* \memberof pw_global
*/
+SPA_EXPORT
void pw_global_destroy(struct pw_global *global)
{
struct pw_core *core = global->core;
diff --git a/src/pipewire/introspect.c b/src/pipewire/introspect.c
index bf75f98b..1e728924 100644
--- a/src/pipewire/introspect.c
+++ b/src/pipewire/introspect.c
@@ -23,6 +23,7 @@
#include "pipewire/remote.h"
+SPA_EXPORT
const char *pw_node_state_as_string(enum pw_node_state state)
{
switch (state) {
@@ -40,6 +41,7 @@ const char *pw_node_state_as_string(enum pw_node_state state)
return "invalid-state";
}
+SPA_EXPORT
const char *pw_direction_as_string(enum pw_direction direction)
{
switch (direction) {
@@ -53,6 +55,7 @@ const char *pw_direction_as_string(enum pw_direction direction)
return "invalid-direction";
}
+SPA_EXPORT
const char *pw_link_state_as_string(enum pw_link_state state)
{
switch (state) {
@@ -115,6 +118,7 @@ static struct spa_dict *pw_spa_dict_copy(struct spa_dict *dict)
return NULL;
}
+SPA_EXPORT
struct pw_core_info *pw_core_info_update(struct pw_core_info *info,
const struct pw_core_info *update)
{
@@ -155,6 +159,7 @@ struct pw_core_info *pw_core_info_update(struct pw_core_info *info,
return info;
}
+SPA_EXPORT
void pw_core_info_free(struct pw_core_info *info)
{
free((void *) info->user_name);
@@ -166,6 +171,7 @@ void pw_core_info_free(struct pw_core_info *info)
free(info);
}
+SPA_EXPORT
struct pw_node_info *pw_node_info_update(struct pw_node_info *info,
const struct pw_node_info *update)
{
@@ -207,6 +213,7 @@ struct pw_node_info *pw_node_info_update(struct pw_node_info *info,
return info;
}
+SPA_EXPORT
void pw_node_info_free(struct pw_node_info *info)
{
@@ -217,6 +224,7 @@ void pw_node_info_free(struct pw_node_info *info)
free(info);
}
+SPA_EXPORT
struct pw_port_info *pw_port_info_update(struct pw_port_info *info,
const struct pw_port_info *update)
{
@@ -244,6 +252,7 @@ struct pw_port_info *pw_port_info_update(struct pw_port_info *info,
return info;
}
+SPA_EXPORT
void pw_port_info_free(struct pw_port_info *info)
{
@@ -253,6 +262,7 @@ void pw_port_info_free(struct pw_port_info *info)
free(info);
}
+SPA_EXPORT
struct pw_factory_info *pw_factory_info_update(struct pw_factory_info *info,
const struct pw_factory_info *update)
{
@@ -279,6 +289,7 @@ struct pw_factory_info *pw_factory_info_update(struct pw_factory_info *info,
return info;
}
+SPA_EXPORT
void pw_factory_info_free(struct pw_factory_info *info)
{
free((void *) info->name);
@@ -287,6 +298,7 @@ void pw_factory_info_free(struct pw_factory_info *info)
free(info);
}
+SPA_EXPORT
struct pw_module_info *pw_module_info_update(struct pw_module_info *info,
const struct pw_module_info *update)
{
@@ -321,6 +333,7 @@ struct pw_module_info *pw_module_info_update(struct pw_module_info *info,
return info;
}
+SPA_EXPORT
void pw_module_info_free(struct pw_module_info *info)
{
free((void *) info->name);
@@ -332,6 +345,7 @@ void pw_module_info_free(struct pw_module_info *info)
}
+SPA_EXPORT
struct pw_client_info *pw_client_info_update(struct pw_client_info *info,
const struct pw_client_info *update)
{
@@ -354,6 +368,7 @@ struct pw_client_info *pw_client_info_update(struct pw_client_info *info,
return info;
}
+SPA_EXPORT
void pw_client_info_free(struct pw_client_info *info)
{
if (info->props)
@@ -361,6 +376,7 @@ void pw_client_info_free(struct pw_client_info *info)
free(info);
}
+SPA_EXPORT
struct pw_link_info *pw_link_info_update(struct pw_link_info *info,
const struct pw_link_info *update)
{
@@ -390,6 +406,7 @@ struct pw_link_info *pw_link_info_update(struct pw_link_info *info,
return info;
}
+SPA_EXPORT
void pw_link_info_free(struct pw_link_info *info)
{
free(info->format);
diff --git a/src/pipewire/link.c b/src/pipewire/link.c
index b0b78bfd..fcea7535 100644
--- a/src/pipewire/link.c
+++ b/src/pipewire/link.c
@@ -1086,6 +1086,7 @@ static const struct pw_node_events output_node_events = {
.async_complete = output_node_async_complete,
};
+SPA_EXPORT
struct pw_link *pw_link_new(struct pw_core *core,
struct pw_port *output,
struct pw_port *input,
@@ -1220,6 +1221,7 @@ static const struct pw_global_events global_events = {
.bind = global_bind,
};
+SPA_EXPORT
int pw_link_register(struct pw_link *link,
struct pw_client *owner,
struct pw_global *parent,
@@ -1272,6 +1274,7 @@ int pw_link_register(struct pw_link *link,
return 0;
}
+SPA_EXPORT
void pw_link_destroy(struct pw_link *link)
{
struct impl *impl = SPA_CONTAINER_OF(link, struct impl, this);
@@ -1312,6 +1315,7 @@ void pw_link_destroy(struct pw_link *link)
free(impl);
}
+SPA_EXPORT
void pw_link_add_listener(struct pw_link *link,
struct spa_hook *listener,
const struct pw_link_events *events,
@@ -1321,6 +1325,7 @@ void pw_link_add_listener(struct pw_link *link,
spa_hook_list_append(&link->listener_list, listener, events, data);
}
+SPA_EXPORT
struct pw_link *pw_link_find(struct pw_port *output_port, struct pw_port *input_port)
{
struct pw_link *pl;
@@ -1332,31 +1337,37 @@ struct pw_link *pw_link_find(struct pw_port *output_port, struct pw_port *input_
return NULL;
}
+SPA_EXPORT
struct pw_core *pw_link_get_core(struct pw_link *link)
{
return link->core;
}
+SPA_EXPORT
void *pw_link_get_user_data(struct pw_link *link)
{
return link->user_data;
}
+SPA_EXPORT
const struct pw_link_info *pw_link_get_info(struct pw_link *link)
{
return &link->info;
}
+SPA_EXPORT
struct pw_global *pw_link_get_global(struct pw_link *link)
{
return link->global;
}
+SPA_EXPORT
struct pw_port *pw_link_get_output(struct pw_link *link)
{
return link->output;
}
+SPA_EXPORT
struct pw_port *pw_link_get_input(struct pw_link *link)
{
return link->input;
diff --git a/src/pipewire/log.c b/src/pipewire/log.c
index 80835281..ab6ebba9 100644
--- a/src/pipewire/log.c
+++ b/src/pipewire/log.c
@@ -21,7 +21,7 @@
#define DEFAULT_LOG_LEVEL SPA_LOG_LEVEL_ERROR
-enum spa_log_level pw_log_level = DEFAULT_LOG_LEVEL;
+SPA_EXPORT enum spa_log_level pw_log_level = DEFAULT_LOG_LEVEL;
static struct spa_log *global_log = NULL;
@@ -29,6 +29,7 @@ static struct spa_log *global_log = NULL;
* \param log the global log to set
* \memberof pw_log
*/
+SPA_EXPORT
void pw_log_set(struct spa_log *log)
{
global_log = log;
@@ -40,6 +41,7 @@ void pw_log_set(struct spa_log *log)
* \return the global log
* \memberof pw_log
*/
+SPA_EXPORT
struct spa_log *pw_log_get(void)
{
return global_log;
@@ -49,6 +51,7 @@ struct spa_log *pw_log_get(void)
* \param level the new log level
* \memberof pw_log
*/
+SPA_EXPORT
void pw_log_set_level(enum spa_log_level level)
{
pw_log_level = level;
@@ -66,6 +69,7 @@ void pw_log_set_level(enum spa_log_level level)
*
* \memberof pw_log
*/
+SPA_EXPORT
void
pw_log_log(enum spa_log_level level,
const char *file,
@@ -91,6 +95,7 @@ pw_log_log(enum spa_log_level level,
*
* \memberof pw_log
*/
+SPA_EXPORT
void
pw_log_logv(enum spa_log_level level,
const char *file,
diff --git a/src/pipewire/loop.c b/src/pipewire/loop.c
index 6944125f..a34dfdd1 100644
--- a/src/pipewire/loop.c
+++ b/src/pipewire/loop.c
@@ -41,6 +41,7 @@ struct impl {
* \returns a newly allocated loop
* \memberof pw_loop
*/
+SPA_EXPORT
struct pw_loop *pw_loop_new(struct pw_properties *properties)
{
int res;
@@ -116,6 +117,7 @@ struct pw_loop *pw_loop_new(struct pw_properties *properties)
* \param loop a loop to destroy
* \memberof pw_loop
*/
+SPA_EXPORT
void pw_loop_destroy(struct pw_loop *loop)
{
struct impl *impl = SPA_CONTAINER_OF(loop, struct impl, this);
diff --git a/src/pipewire/main-loop.c b/src/pipewire/main-loop.c
index a36b1ebb..6a0a5942 100644
--- a/src/pipewire/main-loop.c
+++ b/src/pipewire/main-loop.c
@@ -33,6 +33,7 @@ static void do_stop(void *data, uint64_t count)
*
* \memberof pw_main_loop
*/
+SPA_EXPORT
struct pw_main_loop *pw_main_loop_new(struct pw_properties *properties)
{
struct pw_main_loop *this;
@@ -63,6 +64,7 @@ struct pw_main_loop *pw_main_loop_new(struct pw_properties *properties)
*
* \memberof pw_main_loop
*/
+SPA_EXPORT
void pw_main_loop_destroy(struct pw_main_loop *loop)
{
pw_log_debug("main-loop %p: destroy", loop);
@@ -73,6 +75,7 @@ void pw_main_loop_destroy(struct pw_main_loop *loop)
free(loop);
}
+SPA_EXPORT
void pw_main_loop_add_listener(struct pw_main_loop *loop,
struct spa_hook *listener,
const struct pw_main_loop_events *events,
@@ -81,6 +84,7 @@ void pw_main_loop_add_listener(struct pw_main_loop *loop,
spa_hook_list_append(&loop->listener_list, listener, events, data);
}
+SPA_EXPORT
struct pw_loop * pw_main_loop_get_loop(struct pw_main_loop *loop)
{
return loop->loop;
@@ -93,6 +97,7 @@ struct pw_loop * pw_main_loop_get_loop(struct pw_main_loop *loop)
*
* \memberof pw_main_loop
*/
+SPA_EXPORT
void pw_main_loop_quit(struct pw_main_loop *loop)
{
pw_log_debug("main-loop %p: quit", loop);
@@ -107,6 +112,7 @@ void pw_main_loop_quit(struct pw_main_loop *loop)
*
* \memberof pw_main_loop
*/
+SPA_EXPORT
void pw_main_loop_run(struct pw_main_loop *loop)
{
pw_log_debug("main-loop %p: run", loop);
diff --git a/src/pipewire/mem.c b/src/pipewire/mem.c
index a5767e07..355ffa67 100644
--- a/src/pipewire/mem.c
+++ b/src/pipewire/mem.c
@@ -93,6 +93,7 @@ static struct spa_list _memblocks = SPA_LIST_INIT(&_memblocks);
* \return 0 on success, < 0 on error
* \memberof pw_memblock
*/
+SPA_EXPORT
int pw_memblock_map(struct pw_memblock *mem)
{
if (mem->ptr != NULL)
@@ -149,6 +150,7 @@ int pw_memblock_map(struct pw_memblock *mem)
* \return 0 on success, < 0 on error
* \memberof pw_memblock
*/
+SPA_EXPORT
int pw_memblock_alloc(enum pw_memblock_flags flags, size_t size, struct pw_memblock **mem)
{
struct memblock tmp, *p;
@@ -224,6 +226,7 @@ int pw_memblock_alloc(enum pw_memblock_flags flags, size_t size, struct pw_membl
return -ENOMEM;
}
+SPA_EXPORT
int
pw_memblock_import(enum pw_memblock_flags flags,
int fd, off_t offset, size_t size,
@@ -248,6 +251,7 @@ pw_memblock_import(enum pw_memblock_flags flags,
* \param mem a memblock
* \memberof pw_memblock
*/
+SPA_EXPORT
void pw_memblock_free(struct pw_memblock *mem)
{
struct memblock *m = (struct memblock *)mem;
@@ -268,6 +272,7 @@ void pw_memblock_free(struct pw_memblock *mem)
free(mem);
}
+SPA_EXPORT
struct pw_memblock * pw_memblock_find(const void *ptr)
{
struct memblock *m;
diff --git a/src/pipewire/module.c b/src/pipewire/module.c
index d8923524..de069a0c 100644
--- a/src/pipewire/module.c
+++ b/src/pipewire/module.c
@@ -162,6 +162,7 @@ static const struct pw_global_events global_events = {
*
* \memberof pw_module
*/
+SPA_EXPORT
struct pw_module *
pw_module_load(struct pw_core *core,
const char *name, const char *args,
@@ -282,6 +283,7 @@ pw_module_load(struct pw_core *core,
* \param module the module to destroy
* \memberof pw_module
*/
+SPA_EXPORT
void pw_module_destroy(struct pw_module *module)
{
struct impl *impl = SPA_CONTAINER_OF(module, struct impl, this);
@@ -307,23 +309,27 @@ void pw_module_destroy(struct pw_module *module)
free(impl);
}
+SPA_EXPORT
struct pw_core *
pw_module_get_core(struct pw_module *module)
{
return module->core;
}
+SPA_EXPORT
struct pw_global * pw_module_get_global(struct pw_module *module)
{
return module->global;
}
+SPA_EXPORT
const struct pw_module_info *
pw_module_get_info(struct pw_module *module)
{
return &module->info;
}
+SPA_EXPORT
void pw_module_add_listener(struct pw_module *module,
struct spa_hook *listener,
const struct pw_module_events *events,
diff --git a/src/pipewire/node.c b/src/pipewire/node.c
index e5a1fc11..24f5cbb7 100644
--- a/src/pipewire/node.c
+++ b/src/pipewire/node.c
@@ -325,6 +325,7 @@ static const struct pw_global_events global_events = {
.bind = global_bind,
};
+SPA_EXPORT
int pw_node_register(struct pw_node *this,
struct pw_client *owner,
struct pw_global *parent,
@@ -392,6 +393,7 @@ static void check_properties(struct pw_node *node)
impl->pause_on_idle = true;
}
+SPA_EXPORT
struct pw_node *pw_node_new(struct pw_core *core,
const char *name,
struct pw_properties *properties,
@@ -449,31 +451,37 @@ struct pw_node *pw_node_new(struct pw_core *core,
return NULL;
}
+SPA_EXPORT
const struct pw_node_info *pw_node_get_info(struct pw_node *node)
{
return &node->info;
}
+SPA_EXPORT
void * pw_node_get_user_data(struct pw_node *node)
{
return node->user_data;
}
+SPA_EXPORT
struct pw_core * pw_node_get_core(struct pw_node *node)
{
return node->core;
}
+SPA_EXPORT
struct pw_global *pw_node_get_global(struct pw_node *node)
{
return node->global;
}
+SPA_EXPORT
const struct pw_properties *pw_node_get_properties(struct pw_node *node)
{
return node->properties;
}
+SPA_EXPORT
int pw_node_update_properties(struct pw_node *node, const struct spa_dict *dict)
{
struct pw_resource *resource;
@@ -564,6 +572,7 @@ static const struct spa_node_callbacks node_callbacks = {
};
+SPA_EXPORT
void pw_node_set_implementation(struct pw_node *node,
struct spa_node *spa_node)
{
@@ -575,11 +584,13 @@ void pw_node_set_implementation(struct pw_node *node,
pw_node_update_properties(node, spa_node->info);
}
+SPA_EXPORT
struct spa_node *pw_node_get_implementation(struct pw_node *node)
{
return node->node;
}
+SPA_EXPORT
void pw_node_add_listener(struct pw_node *node,
struct spa_hook *listener,
const struct pw_node_events *events,
@@ -609,6 +620,7 @@ do_node_remove(struct spa_loop *loop,
*
* \memberof pw_node
*/
+SPA_EXPORT
void pw_node_destroy(struct pw_node *node)
{
struct impl *impl = SPA_CONTAINER_OF(node, struct impl, this);
@@ -681,6 +693,7 @@ int pw_node_for_each_port(struct pw_node *node,
return 0;
}
+SPA_EXPORT
int pw_node_for_each_param(struct pw_node *node,
uint32_t param_id,
uint32_t index, uint32_t max,
@@ -860,6 +873,7 @@ static void node_activate(struct pw_node *this)
*
* \memberof pw_node
*/
+SPA_EXPORT
int pw_node_set_state(struct pw_node *node, enum pw_node_state state)
{
int res = 0;
@@ -946,6 +960,7 @@ void pw_node_update_state(struct pw_node *node, enum pw_node_state state, char *
}
}
+SPA_EXPORT
int pw_node_set_active(struct pw_node *node, bool active)
{
bool old = node->active;
@@ -964,11 +979,13 @@ int pw_node_set_active(struct pw_node *node, bool active)
return 0;
}
+SPA_EXPORT
bool pw_node_is_active(struct pw_node *node)
{
return node->active;
}
+SPA_EXPORT
int pw_node_set_enabled(struct pw_node *node, bool enabled)
{
bool old = node->enabled;
@@ -989,6 +1006,7 @@ int pw_node_set_enabled(struct pw_node *node, bool enabled)
return 0;
}
+SPA_EXPORT
bool pw_node_is_enabled(struct pw_node *node)
{
return node->enabled;
diff --git a/src/pipewire/pipewire.c b/src/pipewire/pipewire.c
index d1c6746b..2160c29e 100644
--- a/src/pipewire/pipewire.c
+++ b/src/pipewire/pipewire.c
@@ -72,7 +72,7 @@ open_support(const char *path,
goto open_failed;
}
if ((info->enum_func = dlsym(info->hnd, SPA_HANDLE_FACTORY_ENUM_FUNC_NAME)) == NULL) {
- fprintf(stderr, "can't find enum function\n");
+ fprintf(stderr, "can't find enum function in %s\n", filename);
goto no_symbol;
}
free(filename);
@@ -173,6 +173,7 @@ static void configure_debug(const char *str)
* \param type the interface type
* \return the interface or NULL when not configured
*/
+SPA_EXPORT
void *pw_get_support_interface(const char *type)
{
int i;
@@ -184,17 +185,20 @@ void *pw_get_support_interface(const char *type)
return NULL;
}
+SPA_EXPORT
const struct spa_handle_factory *pw_get_support_factory(const char *factory_name)
{
return get_factory(&support_info, factory_name);
}
+SPA_EXPORT
const struct spa_support *pw_get_support(uint32_t *n_support)
{
*n_support = support_info.n_support;
return support_info.support;
}
+SPA_EXPORT
void *pw_get_spa_dbus(struct pw_loop *loop)
{
struct support_info dbus_support_info;
@@ -228,6 +232,7 @@ static struct interface *find_interface(void *iface)
return NULL;
}
+SPA_EXPORT
int pw_release_spa_dbus(void *dbus)
{
struct interface *iface;
@@ -254,6 +259,7 @@ int pw_release_spa_dbus(void *dbus)
*
* \memberof pw_pipewire
*/
+SPA_EXPORT
void pw_init(int *argc, char **argv[])
{
const char *str;
@@ -295,6 +301,7 @@ void pw_init(int *argc, char **argv[])
*
* \memberof pw_pipewire
*/
+SPA_EXPORT
bool pw_debug_is_category_enabled(const char *name)
{
int i;
@@ -310,12 +317,14 @@ bool pw_debug_is_category_enabled(const char *name)
}
/** Get the application name \memberof pw_pipewire */
+SPA_EXPORT
const char *pw_get_application_name(void)
{
return NULL;
}
/** Get the program name \memberof pw_pipewire */
+SPA_EXPORT
const char *pw_get_prgname(void)
{
static char tcomm[16 + 1];
@@ -328,6 +337,7 @@ const char *pw_get_prgname(void)
}
/** Get the user name \memberof pw_pipewire */
+SPA_EXPORT
const char *pw_get_user_name(void)
{
struct passwd *pw;
@@ -339,6 +349,7 @@ const char *pw_get_user_name(void)
}
/** Get the host name \memberof pw_pipewire */
+SPA_EXPORT
const char *pw_get_host_name(void)
{
static char hname[256];
@@ -356,6 +367,7 @@ const char *pw_get_host_name(void)
*
* \memberof pw_pipewire
*/
+SPA_EXPORT
char *pw_get_client_name(void)
{
char *c;
@@ -379,6 +391,7 @@ char *pw_get_client_name(void)
*
* \memberof pw_pipewire
*/
+SPA_EXPORT
void pw_fill_remote_properties(struct pw_core *core, struct pw_properties *properties)
{
const char *val;
@@ -419,6 +432,7 @@ void pw_fill_remote_properties(struct pw_core *core, struct pw_properties *prope
*
* \memberof pw_pipewire
*/
+SPA_EXPORT
void pw_fill_stream_properties(struct pw_core *core, struct pw_properties *properties)
{
}
@@ -434,6 +448,7 @@ enum pw_direction pw_direction_reverse(enum pw_direction direction)
}
/** Get the currently running version */
+SPA_EXPORT
const char* pw_get_library_version(void)
{
return pw_get_headers_version();
diff --git a/src/pipewire/port.c b/src/pipewire/port.c
index da5065b8..3a9b268d 100644
--- a/src/pipewire/port.c
+++ b/src/pipewire/port.c
@@ -230,21 +230,25 @@ struct pw_port *pw_port_new(enum pw_direction direction,
return NULL;
}
+SPA_EXPORT
enum pw_direction pw_port_get_direction(struct pw_port *port)
{
return port->direction;
}
+SPA_EXPORT
uint32_t pw_port_get_id(struct pw_port *port)
{
return port->port_id;
}
+SPA_EXPORT
const struct pw_properties *pw_port_get_properties(struct pw_port *port)
{
return port->properties;
}
+SPA_EXPORT
int pw_port_update_properties(struct pw_port *port, const struct spa_dict *dict)
{
struct pw_resource *resource;
@@ -270,11 +274,13 @@ int pw_port_update_properties(struct pw_port *port, const struct spa_dict *dict)
return changed;
}
+SPA_EXPORT
struct pw_node *pw_port_get_node(struct pw_port *port)
{
return port->node;
}
+SPA_EXPORT
void pw_port_add_listener(struct pw_port *port,
struct spa_hook *listener,
const struct pw_port_events *events,
diff --git a/src/pipewire/properties.c b/src/pipewire/properties.c
index 5c493b01..d3e462bf 100644
--- a/src/pipewire/properties.c
+++ b/src/pipewire/properties.c
@@ -85,6 +85,7 @@ static struct properties *properties_new(int prealloc)
*
* \memberof pw_properties
*/
+SPA_EXPORT
struct pw_properties *pw_properties_new(const char *key, ...)
{
struct properties *impl;
@@ -114,6 +115,7 @@ struct pw_properties *pw_properties_new(const char *key, ...)
*
* \memberof pw_properties
*/
+SPA_EXPORT
struct pw_properties *pw_properties_new_dict(const struct spa_dict *dict)
{
uint32_t i;
@@ -142,6 +144,7 @@ struct pw_properties *pw_properties_new_dict(const struct spa_dict *dict)
*
* \memberof pw_properties
*/
+SPA_EXPORT
struct pw_properties *
pw_properties_new_string(const char *str)
{
@@ -176,6 +179,7 @@ pw_properties_new_string(const char *str)
*
* \memberof pw_properties
*/
+SPA_EXPORT
struct pw_properties *pw_properties_copy(const struct pw_properties *properties)
{
struct properties *impl = SPA_CONTAINER_OF(properties, struct properties, this);
@@ -203,6 +207,7 @@ struct pw_properties *pw_properties_copy(const struct pw_properties *properties)
*
* \memberof pw_properties
*/
+SPA_EXPORT
struct pw_properties *pw_properties_merge(const struct pw_properties *oldprops,
struct pw_properties *newprops)
{
@@ -236,6 +241,7 @@ struct pw_properties *pw_properties_merge(const struct pw_properties *oldprops,
*
* \memberof pw_properties
*/
+SPA_EXPORT
void pw_properties_free(struct pw_properties *properties)
{
struct properties *impl = SPA_CONTAINER_OF(properties, struct properties, this);
@@ -298,11 +304,13 @@ static int do_replace(struct pw_properties *properties, const char *key, char *v
*
* \memberof pw_properties
*/
+SPA_EXPORT
int pw_properties_set(struct pw_properties *properties, const char *key, const char *value)
{
return do_replace(properties, key, (char*)value, true);
}
+SPA_EXPORT
int
pw_properties_setva(struct pw_properties *properties,
const char *key, const char *format, va_list args)
@@ -326,6 +334,7 @@ pw_properties_setva(struct pw_properties *properties,
*
* \memberof pw_properties
*/
+SPA_EXPORT
int pw_properties_setf(struct pw_properties *properties, const char *key, const char *format, ...)
{
int res;
@@ -348,6 +357,7 @@ int pw_properties_setf(struct pw_properties *properties, const char *key, const
*
* \memberof pw_properties
*/
+SPA_EXPORT
const char *pw_properties_get(const struct pw_properties *properties, const char *key)
{
struct properties *impl = SPA_CONTAINER_OF(properties, struct properties, this);
@@ -372,6 +382,7 @@ const char *pw_properties_get(const struct pw_properties *properties, const char
*
* \memberof pw_properties
*/
+SPA_EXPORT
const char *pw_properties_iterate(const struct pw_properties *properties, void **state)
{
struct properties *impl = SPA_CONTAINER_OF(properties, struct properties, this);
diff --git a/src/pipewire/protocol.c b/src/pipewire/protocol.c
index 39f59409..da1004c7 100644
--- a/src/pipewire/protocol.c
+++ b/src/pipewire/protocol.c
@@ -34,6 +34,7 @@ struct marshal {
};
/** \endcond */
+SPA_EXPORT
struct pw_protocol *pw_protocol_new(struct pw_core *core,
const char *name,
size_t user_data_size)
@@ -62,23 +63,27 @@ struct pw_protocol *pw_protocol_new(struct pw_core *core,
return protocol;
}
+SPA_EXPORT
void *pw_protocol_get_user_data(struct pw_protocol *protocol)
{
return protocol->user_data;
}
+SPA_EXPORT
const struct pw_protocol_implementaton *
pw_protocol_get_implementation(struct pw_protocol *protocol)
{
return protocol->implementation;
}
+SPA_EXPORT
const void *
pw_protocol_get_extension(struct pw_protocol *protocol)
{
return protocol->extension;
}
+SPA_EXPORT
void pw_protocol_destroy(struct pw_protocol *protocol)
{
struct impl *impl = SPA_CONTAINER_OF(protocol, struct impl, this);
@@ -105,6 +110,7 @@ void pw_protocol_destroy(struct pw_protocol *protocol)
free(impl);
}
+SPA_EXPORT
void pw_protocol_add_listener(struct pw_protocol *protocol,
struct spa_hook *listener,
const struct pw_protocol_events *events,
@@ -113,6 +119,7 @@ void pw_protocol_add_listener(struct pw_protocol *protocol,
spa_hook_list_append(&protocol->listener_list, listener, events, data);
}
+SPA_EXPORT
int
pw_protocol_add_marshal(struct pw_protocol *protocol,
const struct pw_protocol_marshal *marshal)
@@ -134,6 +141,7 @@ pw_protocol_add_marshal(struct pw_protocol *protocol,
return 0;
}
+SPA_EXPORT
const struct pw_protocol_marshal *
pw_protocol_get_marshal(struct pw_protocol *protocol, uint32_t type)
{
@@ -149,6 +157,7 @@ pw_protocol_get_marshal(struct pw_protocol *protocol, uint32_t type)
return NULL;
}
+SPA_EXPORT
struct pw_protocol *pw_core_find_protocol(struct pw_core *core, const char *name)
{
struct pw_protocol *protocol;
diff --git a/src/pipewire/proxy.c b/src/pipewire/proxy.c
index 64152242..df4cd435 100644
--- a/src/pipewire/proxy.c
+++ b/src/pipewire/proxy.c
@@ -43,6 +43,7 @@ struct proxy {
*
* \memberof pw_proxy
*/
+SPA_EXPORT
struct pw_proxy *pw_proxy_new(struct pw_proxy *factory,
uint32_t type,
size_t user_data_size)
@@ -75,21 +76,25 @@ struct pw_proxy *pw_proxy_new(struct pw_proxy *factory,
return this;
}
+SPA_EXPORT
void *pw_proxy_get_user_data(struct pw_proxy *proxy)
{
return proxy->user_data;
}
+SPA_EXPORT
uint32_t pw_proxy_get_id(struct pw_proxy *proxy)
{
return proxy->id;
}
+SPA_EXPORT
struct pw_protocol *pw_proxy_get_protocol(struct pw_proxy *proxy)
{
return proxy->remote->conn->protocol;
}
+SPA_EXPORT
void pw_proxy_add_listener(struct pw_proxy *proxy,
struct spa_hook *listener,
const struct pw_proxy_events *events,
@@ -98,6 +103,7 @@ void pw_proxy_add_listener(struct pw_proxy *proxy,
spa_hook_list_append(&proxy->listener_list, listener, events, data);
}
+SPA_EXPORT
void pw_proxy_add_proxy_listener(struct pw_proxy *proxy,
struct spa_hook *listener,
const void *events,
@@ -114,6 +120,7 @@ void pw_proxy_add_proxy_listener(struct pw_proxy *proxy,
* decides to destroy the server side object
* \memberof pw_proxy
*/
+SPA_EXPORT
void pw_proxy_destroy(struct pw_proxy *proxy)
{
struct proxy *impl = SPA_CONTAINER_OF(proxy, struct proxy, this);
@@ -127,11 +134,13 @@ void pw_proxy_destroy(struct pw_proxy *proxy)
free(impl);
}
+SPA_EXPORT
struct spa_hook_list *pw_proxy_get_proxy_listeners(struct pw_proxy *proxy)
{
return &proxy->proxy_listener_list;
}
+SPA_EXPORT
const struct pw_protocol_marshal *pw_proxy_get_marshal(struct pw_proxy *proxy)
{
return proxy->marshal;
diff --git a/src/pipewire/remote.c b/src/pipewire/remote.c
index 6b93d841..9887fcba 100644
--- a/src/pipewire/remote.c
+++ b/src/pipewire/remote.c
@@ -103,6 +103,7 @@ struct node_data {
/** \endcond */
+SPA_EXPORT
const char *pw_remote_state_as_string(enum pw_remote_state state)
{
switch (state) {
@@ -208,6 +209,7 @@ static const struct pw_core_proxy_events core_proxy_events = {
.info = core_event_info,
};
+SPA_EXPORT
struct pw_remote *pw_remote_new(struct pw_core *core,
struct pw_properties *properties,
size_t user_data_size)
@@ -286,6 +288,7 @@ struct pw_remote *pw_remote_new(struct pw_core *core,
return NULL;
}
+SPA_EXPORT
void pw_remote_destroy(struct pw_remote *remote)
{
struct remote *impl = SPA_CONTAINER_OF(remote, struct remote, this);
@@ -311,21 +314,25 @@ void pw_remote_destroy(struct pw_remote *remote)
free(impl);
}
+SPA_EXPORT
struct pw_core *pw_remote_get_core(struct pw_remote *remote)
{
return remote->core;
}
+SPA_EXPORT
const struct pw_properties *pw_remote_get_properties(struct pw_remote *remote)
{
return remote->properties;
}
+SPA_EXPORT
void *pw_remote_get_user_data(struct pw_remote *remote)
{
return remote->user_data;
}
+SPA_EXPORT
enum pw_remote_state pw_remote_get_state(struct pw_remote *remote, const char **error)
{
if (error)
@@ -333,6 +340,7 @@ enum pw_remote_state pw_remote_get_state(struct pw_remote *remote, const char **
return remote->state;
}
+SPA_EXPORT
void pw_remote_add_listener(struct pw_remote *remote,
struct spa_hook *listener,
const struct pw_remote_events *events,
@@ -366,16 +374,19 @@ static int do_connect(struct pw_remote *remote)
return -ENOMEM;
}
+SPA_EXPORT
struct pw_core_proxy * pw_remote_get_core_proxy(struct pw_remote *remote)
{
return remote->core_proxy;
}
+SPA_EXPORT
const struct pw_core_info *pw_remote_get_core_info(struct pw_remote *remote)
{
return remote->info;
}
+SPA_EXPORT
struct pw_proxy *pw_remote_find_proxy(struct pw_remote *remote, uint32_t id)
{
return pw_map_lookup(&remote->objects, id);
@@ -393,6 +404,7 @@ static void done_connect(void *data, int result)
do_connect(remote);
}
+SPA_EXPORT
int pw_remote_connect(struct pw_remote *remote)
{
int res;
@@ -407,6 +419,7 @@ int pw_remote_connect(struct pw_remote *remote)
return remote->state == PW_REMOTE_STATE_ERROR ? -EIO : 0;
}
+SPA_EXPORT
int pw_remote_connect_fd(struct pw_remote *remote, int fd)
{
int res;
@@ -422,6 +435,7 @@ int pw_remote_connect_fd(struct pw_remote *remote, int fd)
return do_connect(remote);
}
+SPA_EXPORT
int pw_remote_steal_fd(struct pw_remote *remote)
{
int fd;
@@ -432,6 +446,7 @@ int pw_remote_steal_fd(struct pw_remote *remote)
return fd;
}
+SPA_EXPORT
int pw_remote_disconnect(struct pw_remote *remote)
{
struct pw_proxy *proxy, *t2;
@@ -1318,6 +1333,7 @@ static const struct spa_node node_impl = {
.port_reuse_buffer = impl_port_reuse_buffer,
};
+SPA_EXPORT
struct pw_proxy *pw_remote_export(struct pw_remote *remote,
struct pw_node *node)
{
diff --git a/src/pipewire/resource.c b/src/pipewire/resource.c
index 2299b6e5..21959ca3 100644
--- a/src/pipewire/resource.c
+++ b/src/pipewire/resource.c
@@ -30,6 +30,7 @@ struct impl {
};
/** \endcond */
+SPA_EXPORT
struct pw_resource *pw_resource_new(struct pw_client *client,
uint32_t id,
uint32_t permissions,
@@ -78,36 +79,43 @@ struct pw_resource *pw_resource_new(struct pw_client *client,
return NULL;
}
+SPA_EXPORT
struct pw_client *pw_resource_get_client(struct pw_resource *resource)
{
return resource->client;
}
+SPA_EXPORT
uint32_t pw_resource_get_id(struct pw_resource *resource)
{
return resource->id;
}
+SPA_EXPORT
uint32_t pw_resource_get_permissions(struct pw_resource *resource)
{
return resource->permissions;
}
+SPA_EXPORT
uint32_t pw_resource_get_type(struct pw_resource *resource)
{
return resource->type;
}
+SPA_EXPORT
struct pw_protocol *pw_resource_get_protocol(struct pw_resource *resource)
{
return resource->client->protocol;
}
+SPA_EXPORT
void *pw_resource_get_user_data(struct pw_resource *resource)
{
return resource->user_data;
}
+SPA_EXPORT
void pw_resource_add_listener(struct pw_resource *resource,
struct spa_hook *listener,
const struct pw_resource_events *events,
@@ -116,6 +124,7 @@ void pw_resource_add_listener(struct pw_resource *resource,
spa_hook_list_append(&resource->listener_list, listener, events, data);
}
+SPA_EXPORT
void pw_resource_set_implementation(struct pw_resource *resource,
const void *implementation,
void *data)
@@ -128,6 +137,7 @@ void pw_resource_set_implementation(struct pw_resource *resource,
pw_client_events_resource_impl(client, resource);
}
+SPA_EXPORT
void pw_resource_add_override(struct pw_resource *resource,
struct spa_hook *listener,
const void *implementation,
@@ -136,22 +146,26 @@ void pw_resource_add_override(struct pw_resource *resource,
spa_hook_list_prepend(&resource->implementation_list, listener, implementation, data);
}
+SPA_EXPORT
struct spa_hook_list *pw_resource_get_implementation(struct pw_resource *resource)
{
return &resource->implementation_list;
}
+SPA_EXPORT
const struct pw_protocol_marshal *pw_resource_get_marshal(struct pw_resource *resource)
{
return resource->marshal;
}
+SPA_EXPORT
void pw_resource_error(struct pw_resource *resource, int result, const char *error)
{
if (resource->client->core_resource)
pw_core_resource_error(resource->client->core_resource, resource->id, result, error);
}
+SPA_EXPORT
void pw_resource_destroy(struct pw_resource *resource)
{
struct pw_client *client = resource->client;
diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c
index 0f3a5bde..be02aa8b 100644
--- a/src/pipewire/stream.c
+++ b/src/pipewire/stream.c
@@ -348,6 +348,7 @@ static void call_process(struct stream *impl)
}
}
+SPA_EXPORT
const char *pw_stream_state_as_string(enum pw_stream_state state)
{
switch (state) {
@@ -369,6 +370,7 @@ const char *pw_stream_state_as_string(enum pw_stream_state state)
return "invalid-state";
}
+SPA_EXPORT
struct pw_stream *pw_stream_new(struct pw_remote *remote,
const char *name, struct pw_properties *props)
{
@@ -422,6 +424,7 @@ struct pw_stream *pw_stream_new(struct pw_remote *remote,
return NULL;
}
+SPA_EXPORT
struct pw_stream *
pw_stream_new_simple(struct pw_loop *loop, const char *name, struct pw_properties *props,
const struct pw_stream_events *events, void *data)
@@ -429,6 +432,7 @@ pw_stream_new_simple(struct pw_loop *loop, const char *name, struct pw_propertie
return NULL;
}
+SPA_EXPORT
enum pw_stream_state pw_stream_get_state(struct pw_stream *stream, const char **error)
{
if (error)
@@ -436,16 +440,19 @@ enum pw_stream_state pw_stream_get_state(struct pw_stream *stream, const char **
return stream->state;
}
+SPA_EXPORT
const char *pw_stream_get_name(struct pw_stream *stream)
{
return stream->name;
}
+SPA_EXPORT
const struct pw_properties *pw_stream_get_properties(struct pw_stream *stream)
{
return stream->properties;
}
+SPA_EXPORT
void pw_stream_add_listener(struct pw_stream *stream,
struct spa_hook *listener,
const struct pw_stream_events *events,
@@ -525,6 +532,7 @@ static void set_params(struct pw_stream *stream, int n_params, const struct spa_
}
}
+SPA_EXPORT
void pw_stream_destroy(struct pw_stream *stream)
{
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
@@ -1246,6 +1254,7 @@ static const struct pw_proxy_events proxy_events = {
.destroy = on_node_proxy_destroy,
};
+SPA_EXPORT
int
pw_stream_connect(struct pw_stream *stream,
enum pw_direction direction,
@@ -1286,18 +1295,21 @@ pw_stream_connect(struct pw_stream *stream,
return 0;
}
+SPA_EXPORT
struct pw_remote *
pw_stream_get_remote(struct pw_stream *stream)
{
return stream->remote;
}
+SPA_EXPORT
uint32_t
pw_stream_get_node_id(struct pw_stream *stream)
{
return stream->node_id;
}
+SPA_EXPORT
void
pw_stream_finish_format(struct pw_stream *stream,
int res,
@@ -1323,6 +1335,7 @@ pw_stream_finish_format(struct pw_stream *stream,
impl->pending_seq = SPA_ID_INVALID;
}
+SPA_EXPORT
int pw_stream_disconnect(struct pw_stream *stream)
{
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
@@ -1340,6 +1353,7 @@ int pw_stream_disconnect(struct pw_stream *stream)
return 0;
}
+SPA_EXPORT
int pw_stream_set_active(struct pw_stream *stream, bool active)
{
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
@@ -1352,6 +1366,7 @@ static inline int64_t get_queue_size(struct queue *queue)
return (int64_t)(queue->incount - queue->outcount);
}
+SPA_EXPORT
int pw_stream_get_time(struct pw_stream *stream, struct pw_time *time)
{
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
@@ -1371,16 +1386,19 @@ int pw_stream_get_time(struct pw_stream *stream, struct pw_time *time)
return 0;
}
+SPA_EXPORT
int pw_stream_set_control(struct pw_stream *stream, const char *name, float value)
{
return -ENOTSUP;
}
+SPA_EXPORT
int pw_stream_get_control(struct pw_stream *stream, const char *name, float *value)
{
return -ENOTSUP;
}
+SPA_EXPORT
struct pw_buffer *pw_stream_dequeue_buffer(struct pw_stream *stream)
{
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
@@ -1395,6 +1413,7 @@ struct pw_buffer *pw_stream_dequeue_buffer(struct pw_stream *stream)
return &b->buffer;
}
+SPA_EXPORT
int pw_stream_queue_buffer(struct pw_stream *stream, struct pw_buffer *buffer)
{
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
diff --git a/src/pipewire/thread-loop.c b/src/pipewire/thread-loop.c
index 77b86035..c7c7fc07 100644
--- a/src/pipewire/thread-loop.c
+++ b/src/pipewire/thread-loop.c
@@ -96,6 +96,7 @@ do { \
*
* \memberof pw_thread_loop
*/
+SPA_EXPORT
struct pw_thread_loop *pw_thread_loop_new(struct pw_loop *loop,
const char *name)
{
@@ -145,6 +146,7 @@ struct pw_thread_loop *pw_thread_loop_new(struct pw_loop *loop,
}
/** Destroy a threaded loop \memberof pw_thread_loop */
+SPA_EXPORT
void pw_thread_loop_destroy(struct pw_thread_loop *loop)
{
pw_thread_loop_events_destroy(loop);
@@ -163,6 +165,7 @@ void pw_thread_loop_destroy(struct pw_thread_loop *loop)
free(loop);
}
+SPA_EXPORT
void pw_thread_loop_add_listener(struct pw_thread_loop *loop,
struct spa_hook *listener,
const struct pw_thread_loop_events *events,
@@ -171,6 +174,7 @@ void pw_thread_loop_add_listener(struct pw_thread_loop *loop,
spa_hook_list_append(&loop->listener_list, listener, events, data);
}
+SPA_EXPORT
struct pw_loop *
pw_thread_loop_get_loop(struct pw_thread_loop *loop)
{
@@ -204,6 +208,7 @@ static void *do_loop(void *user_data)
*
* \memberof pw_thread_loop
*/
+SPA_EXPORT
int pw_thread_loop_start(struct pw_thread_loop *loop)
{
if (!loop->running) {
@@ -226,6 +231,7 @@ int pw_thread_loop_start(struct pw_thread_loop *loop)
*
* \memberof pw_thread_loop
*/
+SPA_EXPORT
void pw_thread_loop_stop(struct pw_thread_loop *loop)
{
pw_log_debug("thread-loop: %p stopping", loop);
@@ -246,6 +252,7 @@ void pw_thread_loop_stop(struct pw_thread_loop *loop)
*
* \memberof pw_thread_loop
*/
+SPA_EXPORT
void pw_thread_loop_lock(struct pw_thread_loop *loop)
{
pthread_mutex_lock(&loop->lock);
@@ -257,6 +264,7 @@ void pw_thread_loop_lock(struct pw_thread_loop *loop)
*
* \memberof pw_thread_loop
*/
+SPA_EXPORT
void pw_thread_loop_unlock(struct pw_thread_loop *loop)
{
pthread_mutex_unlock(&loop->lock);
@@ -272,6 +280,7 @@ void pw_thread_loop_unlock(struct pw_thread_loop *loop)
*
* \memberof pw_thread_loop
*/
+SPA_EXPORT
void pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept)
{
if (loop->n_waiting > 0)
@@ -291,6 +300,7 @@ void pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept)
*
* \memberof pw_thread_loop
*/
+SPA_EXPORT
void pw_thread_loop_wait(struct pw_thread_loop *loop)
{
loop->n_waiting++;
@@ -307,6 +317,7 @@ void pw_thread_loop_wait(struct pw_thread_loop *loop)
*
* \memberof pw_thread_loop
*/
+SPA_EXPORT
int pw_thread_loop_timed_wait(struct pw_thread_loop *loop, int wait_max_sec)
{
struct timespec timeout;
@@ -328,6 +339,7 @@ int pw_thread_loop_timed_wait(struct pw_thread_loop *loop, int wait_max_sec)
*
* \memberof pw_thread_loop
*/
+SPA_EXPORT
void pw_thread_loop_accept(struct pw_thread_loop *loop)
{
loop->n_waiting_for_accept--;
@@ -341,6 +353,7 @@ void pw_thread_loop_accept(struct pw_thread_loop *loop)
*
* \memberof pw_thread_loop
*/
+SPA_EXPORT
bool pw_thread_loop_in_thread(struct pw_thread_loop *loop)
{
return pthread_self() == loop->thread;
diff --git a/src/pipewire/utils.c b/src/pipewire/utils.c
index 744997d2..dfcf248f 100644
--- a/src/pipewire/utils.c
+++ b/src/pipewire/utils.c
@@ -36,6 +36,7 @@
*
* \memberof pw_utils
*/
+SPA_EXPORT
const char *pw_split_walk(const char *str, const char *delimiter, size_t * len, const char **state)
{
const char *s = *state ? *state : str;
@@ -61,6 +62,7 @@ const char *pw_split_walk(const char *str, const char *delimiter, size_t * len,
*
* \memberof pw_utils
*/
+SPA_EXPORT
char **pw_split_strv(const char *str, const char *delimiter, int max_tokens, int *n_tokens)
{
const char *state = NULL, *s = NULL;
@@ -94,6 +96,7 @@ char **pw_split_strv(const char *str, const char *delimiter, int max_tokens, int
*
* \memberof pw_utils
*/
+SPA_EXPORT
void pw_free_strv(char **str)
{
int i;
@@ -112,6 +115,7 @@ void pw_free_strv(char **str)
*
* \memberof pw_utils
*/
+SPA_EXPORT
char *pw_strip(char *str, const char *whitespace)
{
char *e, *l = NULL;