remove pipewire/private.h includes when possible

In many places this is not needed.
Expose pw_impl_node_set_param() for adapter.
This commit is contained in:
Wim Taymans 2023-01-20 16:08:38 +01:00
parent ee55df9f9e
commit 164e343dbf
40 changed files with 40 additions and 57 deletions

View file

@ -44,7 +44,6 @@
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <pipewire/impl.h> #include <pipewire/impl.h>
#include <pipewire/private.h>
#include "flatpak-utils.h" #include "flatpak-utils.h"

View file

@ -45,7 +45,6 @@
#include <spa/utils/json-pod.h> #include <spa/utils/json-pod.h>
#include "pipewire/pipewire.h" #include "pipewire/pipewire.h"
#include "pipewire/private.h"
#include "modules/spa/spa-node.h" #include "modules/spa/spa-node.h"

View file

@ -37,7 +37,6 @@
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <pipewire/impl.h> #include <pipewire/impl.h>
#include <pipewire/private.h>
#include <pipewire/i18n.h> #include <pipewire/i18n.h>
#include "module-avb/avb.h" #include "module-avb/avb.h"

View file

@ -75,8 +75,6 @@ struct pw_avb *pw_avb_new(struct pw_context *context,
goto error_free; goto error_free;
} }
impl->work_queue = pw_context_get_work_queue(context);
spa_list_init(&impl->servers); spa_list_init(&impl->servers);
avdecc_server_new(impl, &props->dict); avdecc_server_new(impl, &props->dict);

View file

@ -45,7 +45,6 @@ struct impl {
unsigned do_disconnect:1; unsigned do_disconnect:1;
struct pw_properties *props; struct pw_properties *props;
struct pw_work_queue *work_queue;
struct spa_list servers; struct spa_list servers;
}; };

View file

@ -41,7 +41,7 @@
#include <spa/debug/types.h> #include <spa/debug/types.h>
#include <spa/param/audio/format-utils.h> #include <spa/param/audio/format-utils.h>
#include <spa/param/audio/raw.h> #include <spa/param/audio/raw.h>
#include <spa/param/profiler.h> #include <spa/param/latency-utils.h>
#include <spa/pod/builder.h> #include <spa/pod/builder.h>
#include <spa/pod/dynamic.h> #include <spa/pod/dynamic.h>
#include <spa/support/plugin.h> #include <spa/support/plugin.h>
@ -53,7 +53,6 @@
#include <spa/support/plugin-loader.h> #include <spa/support/plugin-loader.h>
#include <spa/interfaces/audio/aec.h> #include <spa/interfaces/audio/aec.h>
#include <pipewire/private.h>
#include <pipewire/impl.h> #include <pipewire/impl.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
@ -1186,17 +1185,21 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
if ((path = pw_properties_get(props, "library.name")) == NULL) if ((path = pw_properties_get(props, "library.name")) == NULL)
path = "aec/libspa-aec-webrtc"; path = "aec/libspa-aec-webrtc";
struct spa_dict_item info_items[] = { const struct spa_support *support;
{ SPA_KEY_LIBRARY_NAME, path }, uint32_t n_support;
};
struct spa_dict info = SPA_DICT_INIT_ARRAY(info_items);
impl->loader = spa_support_find(context->support, context->n_support, SPA_TYPE_INTERFACE_PluginLoader); support = pw_context_get_support(context, &n_support);
impl->loader = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_PluginLoader);
if (impl->loader == NULL) { if (impl->loader == NULL) {
pw_log_error("a plugin loader is needed"); pw_log_error("a plugin loader is needed");
return -EINVAL; return -EINVAL;
} }
struct spa_dict_item info_items[] = {
{ SPA_KEY_LIBRARY_NAME, path },
};
struct spa_dict info = SPA_DICT_INIT_ARRAY(info_items);
handle = spa_plugin_loader_load(impl->loader, SPA_NAME_AEC, &info); handle = spa_plugin_loader_load(impl->loader, SPA_NAME_AEC, &info);
if (handle == NULL) { if (handle == NULL) {
pw_log_error("aec plugin %s not available library.name %s", SPA_NAME_AEC, path); pw_log_error("aec plugin %s not available library.name %s", SPA_NAME_AEC, path);

View file

@ -39,12 +39,11 @@
#include <spa/utils/string.h> #include <spa/utils/string.h>
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <spa/support/cpu.h> #include <spa/support/cpu.h>
#include <spa/param/profiler.h> #include <spa/param/latency-utils.h>
#include <spa/pod/dynamic.h> #include <spa/pod/dynamic.h>
#include <spa/debug/types.h> #include <spa/debug/types.h>
#include <pipewire/utils.h> #include <pipewire/utils.h>
#include <pipewire/private.h>
#include <pipewire/impl.h> #include <pipewire/impl.h>
#include <pipewire/extensions/profiler.h> #include <pipewire/extensions/profiler.h>

View file

@ -23,7 +23,6 @@
*/ */
#include "config.h" #include "config.h"
#include "pipewire/private.h"
#include <float.h> #include <float.h>
#include <math.h> #include <math.h>
@ -45,6 +44,8 @@
#include "convolver.h" #include "convolver.h"
#include "dsp-ops.h" #include "dsp-ops.h"
#define MAX_RATES 32u
static struct dsp_ops *dsp_ops; static struct dsp_ops *dsp_ops;
struct builtin { struct builtin {

View file

@ -36,10 +36,9 @@
#include <spa/utils/string.h> #include <spa/utils/string.h>
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <spa/utils/ringbuffer.h> #include <spa/utils/ringbuffer.h>
#include <spa/param/profiler.h> #include <spa/param/latency-utils.h>
#include <spa/debug/types.h> #include <spa/debug/types.h>
#include <pipewire/private.h>
#include <pipewire/impl.h> #include <pipewire/impl.h>
#include <pipewire/extensions/profiler.h> #include <pipewire/extensions/profiler.h>

View file

@ -50,7 +50,6 @@
#include <pipewire/impl.h> #include <pipewire/impl.h>
#include <pipewire/i18n.h> #include <pipewire/i18n.h>
#include <pipewire/private.h>
/** \page page_module_pipe_tunnel PipeWire Module: Unix Pipe Tunnel /** \page page_module_pipe_tunnel PipeWire Module: Unix Pipe Tunnel
* *

View file

@ -36,6 +36,7 @@
#include <dbus/dbus.h> #include <dbus/dbus.h>
#include <spa/utils/string.h> #include <spa/utils/string.h>
#include <spa/utils/result.h>
#include <spa/support/dbus.h> #include <spa/support/dbus.h>
#include "pipewire/context.h" #include "pipewire/context.h"
@ -43,7 +44,6 @@
#include "pipewire/log.h" #include "pipewire/log.h"
#include "pipewire/module.h" #include "pipewire/module.h"
#include "pipewire/utils.h" #include "pipewire/utils.h"
#include "pipewire/private.h"
/** \page page_module_portal PipeWire Module: Portal /** \page page_module_portal PipeWire Module: Portal
* *

View file

@ -27,7 +27,6 @@
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -22,11 +22,11 @@
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
#include <spa/param/audio/format-utils.h>
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <spa/param/audio/format-utils.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -22,11 +22,11 @@
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
#include <spa/param/audio/format-utils.h>
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <spa/param/audio/format-utils.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -27,7 +27,6 @@
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -28,7 +28,6 @@
#include <unistd.h> #include <unistd.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include <spa/param/audio/format-utils.h> #include <spa/param/audio/format-utils.h>
#include <spa/utils/hook.h> #include <spa/utils/hook.h>

View file

@ -28,7 +28,6 @@
#include <unistd.h> #include <unistd.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include <spa/param/audio/format-utils.h> #include <spa/param/audio/format-utils.h>
#include <spa/utils/hook.h> #include <spa/utils/hook.h>

View file

@ -24,7 +24,6 @@
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -26,7 +26,6 @@
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -26,7 +26,6 @@
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -25,7 +25,6 @@
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -25,7 +25,6 @@
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -25,7 +25,6 @@
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -24,7 +24,6 @@
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -24,7 +24,6 @@
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -27,7 +27,6 @@
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include <pipewire/i18n.h> #include <pipewire/i18n.h>
#include "../defs.h" #include "../defs.h"

View file

@ -27,7 +27,6 @@
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include <pipewire/i18n.h> #include <pipewire/i18n.h>
#include "../defs.h" #include "../defs.h"

View file

@ -24,7 +24,6 @@
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "../defs.h" #include "../defs.h"
#include "../module.h" #include "../module.h"

View file

@ -49,7 +49,6 @@
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include <pipewire/extensions/metadata.h> #include <pipewire/extensions/metadata.h>
#include "pulse-server.h" #include "pulse-server.h"

View file

@ -31,7 +31,6 @@
#include <pipewire/log.h> #include <pipewire/log.h>
#include <pipewire/loop.h> #include <pipewire/loop.h>
#include <pipewire/map.h> #include <pipewire/map.h>
#include <pipewire/private.h>
#include <pipewire/properties.h> #include <pipewire/properties.h>
#include <pipewire/stream.h> #include <pipewire/stream.h>
#include <pipewire/work-queue.h> #include <pipewire/work-queue.h>

View file

@ -37,7 +37,6 @@
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <pipewire/impl.h> #include <pipewire/impl.h>
#include <pipewire/private.h>
#include <pipewire/i18n.h> #include <pipewire/i18n.h>
#include <avahi-client/lookup.h> #include <avahi-client/lookup.h>

View file

@ -58,7 +58,6 @@
#include <pipewire/impl.h> #include <pipewire/impl.h>
#include <pipewire/i18n.h> #include <pipewire/i18n.h>
#include <pipewire/private.h>
#include "module-raop/rtsp-client.h" #include "module-raop/rtsp-client.h"

View file

@ -29,10 +29,9 @@
#include "config.h" #include "config.h"
#include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include <spa/param/audio/format-utils.h>
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <spa/utils/result.h>
#include <spa/param/audio/format-utils.h>
#include <roc/config.h> #include <roc/config.h>
#include <roc/log.h> #include <roc/log.h>
@ -40,6 +39,9 @@
#include <roc/log.h> #include <roc/log.h>
#include <roc/sender.h> #include <roc/sender.h>
#include <pipewire/pipewire.h>
#include <pipewire/impl.h>
#include "module-roc/common.h" #include "module-roc/common.h"
/** \page page_module_roc_sink PipeWire Module: ROC sink /** \page page_module_roc_sink PipeWire Module: ROC sink

View file

@ -29,10 +29,9 @@
#include "config.h" #include "config.h"
#include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include <spa/param/audio/format-utils.h>
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <spa/utils/result.h>
#include <spa/param/audio/format-utils.h>
#include <roc/config.h> #include <roc/config.h>
#include <roc/log.h> #include <roc/log.h>
@ -40,6 +39,9 @@
#include <roc/log.h> #include <roc/log.h>
#include <roc/receiver.h> #include <roc/receiver.h>
#include <pipewire/pipewire.h>
#include <pipewire/impl.h>
#include "module-roc/common.h" #include "module-roc/common.h"
/** \page page_module_roc_source PipeWire Module: ROC source /** \page page_module_roc_source PipeWire Module: ROC source

View file

@ -35,14 +35,15 @@
#include <net/if.h> #include <net/if.h>
#include <ctype.h> #include <ctype.h>
#include <spa/param/audio/format-utils.h>
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <spa/utils/result.h>
#include <spa/utils/ringbuffer.h> #include <spa/utils/ringbuffer.h>
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <spa/param/audio/format-utils.h>
#include <spa/debug/types.h> #include <spa/debug/types.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h> #include <pipewire/impl.h>
#include <module-rtp/sap.h> #include <module-rtp/sap.h>
#include <module-rtp/rtp.h> #include <module-rtp/rtp.h>

View file

@ -34,14 +34,15 @@
#include <net/if.h> #include <net/if.h>
#include <ctype.h> #include <ctype.h>
#include <spa/param/audio/format-utils.h>
#include <spa/utils/hook.h> #include <spa/utils/hook.h>
#include <spa/utils/result.h>
#include <spa/utils/ringbuffer.h> #include <spa/utils/ringbuffer.h>
#include <spa/utils/dll.h> #include <spa/utils/dll.h>
#include <spa/param/audio/format-utils.h>
#include <spa/debug/mem.h> #include <spa/debug/mem.h>
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/private.h> #include <pipewire/impl.h>
#include <module-rtp/sap.h> #include <module-rtp/sap.h>
#include <module-rtp/rtp.h> #include <module-rtp/rtp.h>

View file

@ -46,7 +46,6 @@
#include <pipewire/pipewire.h> #include <pipewire/pipewire.h>
#include <pipewire/impl.h> #include <pipewire/impl.h>
#include <pipewire/private.h>
/** \page page_module_x11_bell PipeWire Module: X11 Bell /** \page page_module_x11_bell PipeWire Module: X11 Bell
* *

View file

@ -35,9 +35,9 @@
#include <spa/utils/result.h> #include <spa/utils/result.h>
#include <spa/utils/string.h> #include <spa/utils/string.h>
#include <spa/utils/json.h> #include <spa/utils/json.h>
#include <spa/param/audio/format-utils.h>
#include <pipewire/impl.h> #include <pipewire/impl.h>
#include <pipewire/private.h>
#include <pipewire/i18n.h> #include <pipewire/i18n.h>
#include <avahi-client/lookup.h> #include <avahi-client/lookup.h>

View file

@ -175,6 +175,10 @@ bool pw_impl_node_is_active(struct pw_impl_node *node);
/** Check if a node is active, Since 0.3.39 */ /** Check if a node is active, Since 0.3.39 */
int pw_impl_node_send_command(struct pw_impl_node *node, const struct spa_command *command); int pw_impl_node_send_command(struct pw_impl_node *node, const struct spa_command *command);
/** Set a param on the node, Since 0.3.65 */
int pw_impl_node_set_param(struct pw_impl_node *node,
uint32_t id, uint32_t flags, const struct spa_pod *param);
/** /**
* \} * \}
*/ */

View file

@ -1245,8 +1245,6 @@ int pw_impl_port_recalc_latency(struct pw_impl_port *port);
/** Change the state of the node */ /** Change the state of the node */
int pw_impl_node_set_state(struct pw_impl_node *node, enum pw_node_state state); int pw_impl_node_set_state(struct pw_impl_node *node, enum pw_node_state state);
int pw_impl_node_set_param(struct pw_impl_node *node,
uint32_t id, uint32_t flags, const struct spa_pod *param);
int pw_impl_node_update_ports(struct pw_impl_node *node); int pw_impl_node_update_ports(struct pw_impl_node *node);