diff options
74 files changed, 167 insertions, 211 deletions
diff --git a/src/daemon/command.c b/src/daemon/command.c index 56f64559..c555a14d 100644 --- a/src/daemon/command.c +++ b/src/daemon/command.c @@ -29,8 +29,7 @@ #include <unistd.h> #include <limits.h> -#include <pipewire/utils.h> -#include <pipewire/module.h> +#include <pipewire/impl.h> #include <pipewire/private.h> #include "command.h" diff --git a/src/daemon/main.c b/src/daemon/main.c index 7729345e..40fec06c 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -27,9 +27,7 @@ #include <spa/utils/result.h> -#include <pipewire/pipewire.h> -#include <pipewire/context.h> -#include <pipewire/module.h> +#include <pipewire/impl.h> #include "config.h" #include "daemon-config.h" diff --git a/src/examples/bluez-session.c b/src/examples/bluez-session.c index 9be35760..65a6377a 100644 --- a/src/examples/bluez-session.c +++ b/src/examples/bluez-session.c @@ -30,6 +30,7 @@ #include "config.h" +#include <spa/monitor/device.h> #include <spa/node/node.h> #include <spa/utils/hook.h> #include <spa/utils/names.h> diff --git a/src/examples/export-spa-device.c b/src/examples/export-spa-device.c index 76cf2daa..982ffec6 100644 --- a/src/examples/export-spa-device.c +++ b/src/examples/export-spa-device.c @@ -30,7 +30,7 @@ #include <spa/param/video/format-utils.h> #include <spa/param/props.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> struct data { struct pw_main_loop *loop; diff --git a/src/examples/export-spa.c b/src/examples/export-spa.c index 8a6bfd35..a1101282 100644 --- a/src/examples/export-spa.c +++ b/src/examples/export-spa.c @@ -30,7 +30,7 @@ #include <spa/param/video/format-utils.h> #include <spa/param/props.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> struct data { struct pw_main_loop *loop; diff --git a/src/examples/local-v4l2.c b/src/examples/local-v4l2.c index 0aa60e02..9f5638a8 100644 --- a/src/examples/local-v4l2.c +++ b/src/examples/local-v4l2.c @@ -39,7 +39,7 @@ #include <spa/debug/format.h> #include <spa/utils/names.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> struct data { SDL_Renderer *renderer; diff --git a/src/examples/media-session/alsa-monitor.c b/src/examples/media-session/alsa-monitor.c index 263630e6..8087cb30 100644 --- a/src/examples/media-session/alsa-monitor.c +++ b/src/examples/media-session/alsa-monitor.c @@ -32,6 +32,7 @@ #include <alsa/asoundlib.h> +#include <spa/monitor/device.h> #include <spa/node/node.h> #include <spa/node/keys.h> #include <spa/utils/hook.h> diff --git a/src/examples/media-session/bluez-monitor.c b/src/examples/media-session/bluez-monitor.c index e1f3d814..03dc3bfa 100644 --- a/src/examples/media-session/bluez-monitor.c +++ b/src/examples/media-session/bluez-monitor.c @@ -30,6 +30,7 @@ #include "config.h" +#include <spa/monitor/device.h> #include <spa/node/node.h> #include <spa/utils/hook.h> #include <spa/utils/names.h> @@ -37,7 +38,7 @@ #include <spa/param/props.h> #include <spa/debug/dict.h> -#include "pipewire/pipewire.h" +#include "pipewire/impl.h" #include "media-session.h" struct bluez5_object; diff --git a/src/examples/media-session/media-session.c b/src/examples/media-session/media-session.c index 1adcf15e..94341954 100644 --- a/src/examples/media-session/media-session.c +++ b/src/examples/media-session/media-session.c @@ -36,6 +36,7 @@ #include <spa/param/props.h> #include <spa/debug/pod.h> #include <spa/support/dbus.h> +#include <spa/monitor/device.h> #include "pipewire/pipewire.h" #include "pipewire/private.h" diff --git a/src/examples/media-session/media-session.h b/src/examples/media-session/media-session.h index 4108e74d..b4df1740 100644 --- a/src/examples/media-session/media-session.h +++ b/src/examples/media-session/media-session.h @@ -26,6 +26,8 @@ #ifndef SM_MEDIA_SESSION_H #define SM_MEDIA_SESSION_H +#include <spa/monitor/device.h> + #ifdef __cplusplus extern "C" { #endif diff --git a/src/examples/media-session/v4l2-monitor.c b/src/examples/media-session/v4l2-monitor.c index a12b3caa..9d24f7cb 100644 --- a/src/examples/media-session/v4l2-monitor.c +++ b/src/examples/media-session/v4l2-monitor.c @@ -30,6 +30,7 @@ #include "config.h" +#include <spa/monitor/device.h> #include <spa/node/node.h> #include <spa/utils/hook.h> #include <spa/utils/names.h> diff --git a/src/extensions/protocol-native.h b/src/extensions/protocol-native.h index 4152bed1..2dd2c3b4 100644 --- a/src/extensions/protocol-native.h +++ b/src/extensions/protocol-native.h @@ -30,8 +30,9 @@ extern "C" { #endif #include <spa/utils/defs.h> -#include <spa/param/param.h> -#include <spa/node/node.h> + +#include <pipewire/proxy.h> +#include <pipewire/resource.h> #define PW_TYPE_INFO_PROTOCOL_Native PW_TYPE_INFO_PROTOCOL_BASE "Native" diff --git a/src/modules/module-access.c b/src/modules/module-access.c index 8cbd28e5..2dd6ae7c 100644 --- a/src/modules/module-access.c +++ b/src/modules/module-access.c @@ -34,7 +34,7 @@ #include <spa/utils/result.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> static const struct spa_dict_item module_props[] = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, diff --git a/src/modules/module-adapter.c b/src/modules/module-adapter.c index 2cce2901..2c9ba558 100644 --- a/src/modules/module-adapter.c +++ b/src/modules/module-adapter.c @@ -32,7 +32,7 @@ #include <spa/node/node.h> #include <spa/utils/hook.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include "pipewire/private.h" #include "modules/spa/spa-node.h" diff --git a/src/modules/module-adapter/adapter.h b/src/modules/module-adapter/adapter.h index 663eaf19..7ee78734 100644 --- a/src/modules/module-adapter/adapter.h +++ b/src/modules/module-adapter/adapter.h @@ -25,7 +25,7 @@ #ifndef PIPEWIRE_ADAPTER_H #define PIPEWIRE_ADAPTER_H -#include <pipewire/node.h> +#include <pipewire/impl.h> #ifdef __cplusplus extern "C" { diff --git a/src/modules/module-client-device.c b/src/modules/module-client-device.c index 82eccff9..792f908e 100644 --- a/src/modules/module-client-device.c +++ b/src/modules/module-client-device.c @@ -31,7 +31,7 @@ #include <spa/utils/result.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include "module-client-device/client-device.h" diff --git a/src/modules/module-client-device/client-device.h b/src/modules/module-client-device/client-device.h index 9fd8bac6..ada2b7da 100644 --- a/src/modules/module-client-device/client-device.h +++ b/src/modules/module-client-device/client-device.h @@ -25,7 +25,7 @@ #ifndef PIPEWIRE_CLIENT_DEVICE_H #define PIPEWIRE_CLIENT_DEVICE_H -#include <pipewire/device.h> +#include <pipewire/impl.h> #ifdef __cplusplus extern "C" { diff --git a/src/modules/module-client-device/protocol-native.c b/src/modules/module-client-device/protocol-native.c index 677a54de..914e0344 100644 --- a/src/modules/module-client-device/protocol-native.c +++ b/src/modules/module-client-device/protocol-native.c @@ -28,7 +28,7 @@ #include <spa/pod/parser.h> #include <spa/utils/result.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include <extensions/protocol-native.h> diff --git a/src/modules/module-client-device/resource-device.c b/src/modules/module-client-device/resource-device.c index 9e5146b6..e1aca478 100644 --- a/src/modules/module-client-device/resource-device.c +++ b/src/modules/module-client-device/resource-device.c @@ -35,7 +35,7 @@ #include <spa/pod/parser.h> #include <spa/debug/types.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include "pipewire/private.h" struct impl { diff --git a/src/modules/module-client-node.c b/src/modules/module-client-node.c index 077ca2a5..d7735824 100644 --- a/src/modules/module-client-node.c +++ b/src/modules/module-client-node.c @@ -31,7 +31,7 @@ #include <spa/utils/result.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include "module-client-node/v0/client-node.h" #include "module-client-node/client-node.h" diff --git a/src/modules/module-client-node/client-node.h b/src/modules/module-client-node/client-node.h index 1492c32f..d7a577d8 100644 --- a/src/modules/module-client-node/client-node.h +++ b/src/modules/module-client-node/client-node.h @@ -25,7 +25,7 @@ #ifndef PIPEWIRE_CLIENT_NODE_H #define PIPEWIRE_CLIENT_NODE_H -#include <pipewire/node.h> +#include <pipewire/impl.h> #include <extensions/client-node.h> #ifdef __cplusplus diff --git a/src/modules/module-client-node/protocol-native.c b/src/modules/module-client-node/protocol-native.c index 139e89ac..7bbdf104 100644 --- a/src/modules/module-client-node/protocol-native.c +++ b/src/modules/module-client-node/protocol-native.c @@ -28,7 +28,7 @@ #include <spa/pod/parser.h> #include <spa/utils/result.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include <extensions/protocol-native.h> #include <extensions/client-node.h> diff --git a/src/modules/module-client-node/v0/client-node.h b/src/modules/module-client-node/v0/client-node.h index 42a3b289..92e564e2 100644 --- a/src/modules/module-client-node/v0/client-node.h +++ b/src/modules/module-client-node/v0/client-node.h @@ -20,7 +20,7 @@ #ifndef PIPEWIRE_CLIENT_NODE0_H #define PIPEWIRE_CLIENT_NODE0_H -#include <pipewire/node.h> +#include <pipewire/impl.h> #include "ext-client-node.h" diff --git a/src/modules/module-client-node/v0/protocol-native.c b/src/modules/module-client-node/v0/protocol-native.c index e34deb96..ea2a50ed 100644 --- a/src/modules/module-client-node/v0/protocol-native.c +++ b/src/modules/module-client-node/v0/protocol-native.c @@ -24,7 +24,7 @@ #include "pipewire/pipewire.h" #include "pipewire/interfaces.h" #include "pipewire/protocol.h" -#include "pipewire/client.h" +#include "pipewire/impl-client.h" #include "pipewire/private.h" #include "extensions/protocol-native.h" diff --git a/src/modules/module-client-node/v0/transport.c b/src/modules/module-client-node/v0/transport.c index 934eecc5..42945ec5 100644 --- a/src/modules/module-client-node/v0/transport.c +++ b/src/modules/module-client-node/v0/transport.c @@ -24,7 +24,7 @@ #include <spa/utils/ringbuffer.h> #include <spa/node/io.h> -#include <pipewire/log.h> +#include <pipewire/impl.h> #include <pipewire/private.h> #include "ext-client-node.h" diff --git a/src/modules/module-link-factory.c b/src/modules/module-link-factory.c index b96f57fb..3e3fc2a2 100644 --- a/src/modules/module-link-factory.c +++ b/src/modules/module-link-factory.c @@ -29,7 +29,7 @@ #include "config.h" -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include "pipewire/private.h" #define NAME "link-factory" diff --git a/src/modules/module-metadata.c b/src/modules/module-metadata.c index c41a2949..8c48430b 100644 --- a/src/modules/module-metadata.c +++ b/src/modules/module-metadata.c @@ -31,7 +31,7 @@ #include <spa/utils/result.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include <extensions/metadata.h> #define NAME "metadata" diff --git a/src/modules/module-metadata/resource-metadata.c b/src/modules/module-metadata/resource-metadata.c index aed9301c..f3aab692 100644 --- a/src/modules/module-metadata/resource-metadata.c +++ b/src/modules/module-metadata/resource-metadata.c @@ -35,7 +35,7 @@ #include <spa/pod/parser.h> #include <spa/debug/types.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include "pipewire/private.h" struct impl { diff --git a/src/modules/module-protocol-native.c b/src/modules/module-protocol-native.c index f87176e9..3adc1fce 100644 --- a/src/modules/module-protocol-native.c +++ b/src/modules/module-protocol-native.c @@ -42,10 +42,9 @@ #include <systemd/sd-daemon.h> #endif -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include <extensions/protocol-native.h> -#include "pipewire/map.h" #include "pipewire/private.h" #include "modules/module-protocol-native/connection.h" diff --git a/src/modules/module-protocol-native/protocol-native.c b/src/modules/module-protocol-native/protocol-native.c index 718cf0e9..432366fe 100644 --- a/src/modules/module-protocol-native/protocol-native.c +++ b/src/modules/module-protocol-native/protocol-native.c @@ -29,7 +29,7 @@ #include <spa/pod/parser.h> #include <spa/utils/result.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include <extensions/protocol-native.h> #include "connection.h" diff --git a/src/modules/module-rtkit.c b/src/modules/module-rtkit.c index 2f8f442c..4c390482 100644 --- a/src/modules/module-rtkit.c +++ b/src/modules/module-rtkit.c @@ -42,7 +42,7 @@ #include <spa/support/dbus.h> #include <spa/utils/result.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> static const struct spa_dict_item module_props[] = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, diff --git a/src/modules/module-session-manager.c b/src/modules/module-session-manager.c index 26a3424d..fbc1e2f9 100644 --- a/src/modules/module-session-manager.c +++ b/src/modules/module-session-manager.c @@ -25,7 +25,7 @@ #include "config.h" -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> /* client-endpoint.c */ int client_endpoint_factory_init(struct pw_module *module); diff --git a/src/modules/module-session-manager/client-endpoint.c b/src/modules/module-session-manager/client-endpoint.c index 23247ae7..13c0e60f 100644 --- a/src/modules/module-session-manager/client-endpoint.c +++ b/src/modules/module-session-manager/client-endpoint.c @@ -26,7 +26,7 @@ #include <stdbool.h> #include <string.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include <extensions/session-manager.h> #include "client-endpoint.h" diff --git a/src/modules/module-session-manager/client-session.c b/src/modules/module-session-manager/client-session.c index dbc5c245..c7f74cde 100644 --- a/src/modules/module-session-manager/client-session.c +++ b/src/modules/module-session-manager/client-session.c @@ -26,7 +26,7 @@ #include <stdbool.h> #include <string.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include <extensions/session-manager.h> #include "client-session.h" diff --git a/src/modules/module-session-manager/endpoint-stream.c b/src/modules/module-session-manager/endpoint-stream.c index b65dcd7e..c6964ba0 100644 --- a/src/modules/module-session-manager/endpoint-stream.c +++ b/src/modules/module-session-manager/endpoint-stream.c @@ -26,7 +26,7 @@ #include <stdbool.h> #include <string.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include <extensions/session-manager.h> #include <spa/pod/filter.h> diff --git a/src/modules/module-session-manager/endpoint.c b/src/modules/module-session-manager/endpoint.c index 9188c28d..2b53a36d 100644 --- a/src/modules/module-session-manager/endpoint.c +++ b/src/modules/module-session-manager/endpoint.c @@ -26,7 +26,7 @@ #include <stdbool.h> #include <string.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include <extensions/session-manager.h> #include <spa/pod/filter.h> diff --git a/src/modules/spa/module-device-factory.c b/src/modules/spa/module-device-factory.c index 6f855fe6..08ead68e 100644 --- a/src/modules/spa/module-device-factory.c +++ b/src/modules/spa/module-device-factory.c @@ -31,7 +31,7 @@ #include <spa/utils/result.h> -#include "pipewire/pipewire.h" +#include "pipewire/impl.h" #include "spa-device.h" diff --git a/src/modules/spa/module-device.c b/src/modules/spa/module-device.c index afa88a74..d27ab216 100644 --- a/src/modules/spa/module-device.c +++ b/src/modules/spa/module-device.c @@ -29,11 +29,7 @@ #include <getopt.h> #include <limits.h> -#include <pipewire/context.h> -#include <pipewire/log.h> -#include <pipewire/module.h> -#include <pipewire/utils.h> -#include <pipewire/keys.h> +#include <pipewire/impl.h> #include "spa-device.h" diff --git a/src/modules/spa/module-node-factory.c b/src/modules/spa/module-node-factory.c index 880d60ea..eb2d6c9a 100644 --- a/src/modules/spa/module-node-factory.c +++ b/src/modules/spa/module-node-factory.c @@ -31,7 +31,7 @@ #include "config.h" -#include "pipewire/pipewire.h" +#include "pipewire/impl.h" #include "spa-node.h" diff --git a/src/modules/spa/module-node.c b/src/modules/spa/module-node.c index 005e0130..e3659af9 100644 --- a/src/modules/spa/module-node.c +++ b/src/modules/spa/module-node.c @@ -31,11 +31,7 @@ #include <getopt.h> #include <limits.h> -#include <pipewire/context.h> -#include <pipewire/keys.h> -#include <pipewire/log.h> -#include <pipewire/module.h> -#include <pipewire/utils.h> +#include <pipewire/impl.h> #include "spa-node.h" diff --git a/src/modules/spa/spa-device.c b/src/modules/spa/spa-device.c index 7d8dabfc..70c97b2c 100644 --- a/src/modules/spa/spa-device.c +++ b/src/modules/spa/spa-device.c @@ -35,11 +35,7 @@ #include <spa/debug/types.h> #include "spa-device.h" -#include "pipewire/device.h" -#include "pipewire/port.h" -#include "pipewire/log.h" #include "pipewire/private.h" -#include "pipewire/pipewire.h" struct impl { struct pw_device *this; diff --git a/src/modules/spa/spa-device.h b/src/modules/spa/spa-device.h index 334e8331..177721fb 100644 --- a/src/modules/spa/spa-device.h +++ b/src/modules/spa/spa-device.h @@ -27,8 +27,7 @@ #include <spa/monitor/device.h> -#include <pipewire/context.h> -#include <pipewire/device.h> +#include <pipewire/impl.h> #ifdef __cplusplus extern "C" { diff --git a/src/modules/spa/spa-node.c b/src/modules/spa/spa-node.c index 34edf452..e903c4e6 100644 --- a/src/modules/spa/spa-node.c +++ b/src/modules/spa/spa-node.c @@ -37,11 +37,7 @@ #include <spa/debug/types.h> #include "spa-node.h" -#include "pipewire/node.h" -#include "pipewire/port.h" -#include "pipewire/log.h" #include "pipewire/private.h" -#include "pipewire/pipewire.h" struct impl { struct pw_node *this; diff --git a/src/modules/spa/spa-node.h b/src/modules/spa/spa-node.h index 9e9a10ff..ddd5f7f1 100644 --- a/src/modules/spa/spa-node.h +++ b/src/modules/spa/spa-node.h @@ -27,8 +27,7 @@ #include <spa/node/node.h> -#include <pipewire/context.h> -#include <pipewire/node.h> +#include <pipewire/impl.h> #ifdef __cplusplus extern "C" { diff --git a/src/pipewire/context.c b/src/pipewire/context.c index d4adec6d..8cf0f88b 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -36,17 +36,8 @@ #include <spa/debug/format.h> #include <spa/debug/types.h> -#include <pipewire/pipewire.h> +#include <pipewire/impl.h> #include <pipewire/private.h> -#include <pipewire/interfaces.h> -#include <pipewire/protocol.h> -#include <pipewire/context.h> -#include <pipewire/data-loop.h> -#include <pipewire/device.h> -#include <pipewire/map.h> -#include <pipewire/type.h> -#include <pipewire/module.h> -#include <pipewire/version.h> #define NAME "context" diff --git a/src/pipewire/context.h b/src/pipewire/context.h index 0c82b2af..ed356e8b 100644 --- a/src/pipewire/context.h +++ b/src/pipewire/context.h @@ -42,13 +42,13 @@ extern "C" { */ struct pw_context; -#include <pipewire/client.h> +struct pw_global; +struct pw_client; + #include <pipewire/introspect.h> #include <pipewire/interfaces.h> #include <pipewire/core.h> -#include <pipewire/global.h> #include <pipewire/loop.h> -#include <pipewire/factory.h> #include <pipewire/properties.h> /** \page page_context_api Core API diff --git a/src/pipewire/control.h b/src/pipewire/control.h index a10b3319..4f10742f 100644 --- a/src/pipewire/control.h +++ b/src/pipewire/control.h @@ -43,9 +43,7 @@ extern "C" { */ struct pw_control; -#include <pipewire/context.h> -#include <pipewire/introspect.h> -#include <pipewire/node.h> +#include <pipewire/impl.h> /** Port events, use \ref pw_control_add_listener */ struct pw_control_events { diff --git a/src/pipewire/core.h b/src/pipewire/core.h index 3bb9b9bf..9b856cdc 100644 --- a/src/pipewire/core.h +++ b/src/pipewire/core.h @@ -29,6 +29,8 @@ extern "C" { #endif +#include <stdarg.h> + #include <spa/utils/hook.h> #define PW_VERSION_CORE 3 @@ -52,7 +54,6 @@ struct pw_core_info { #include <pipewire/context.h> #include <pipewire/properties.h> -#include <pipewire/node.h> #include <pipewire/proxy.h> /** Update and existing \ref pw_core_info with \a update \memberof pw_introspect */ diff --git a/src/pipewire/filter.h b/src/pipewire/filter.h index 31834140..8e2fb00f 100644 --- a/src/pipewire/filter.h +++ b/src/pipewire/filter.h @@ -45,6 +45,7 @@ struct pw_filter; #include <spa/param/param.h> #include <pipewire/core.h> +#include <pipewire/stream.h> /** \enum pw_filter_state The state of a filter \memberof pw_filter */ enum pw_filter_state { diff --git a/src/pipewire/global.h b/src/pipewire/global.h index d5bf2731..617bf9e8 100644 --- a/src/pipewire/global.h +++ b/src/pipewire/global.h @@ -53,9 +53,7 @@ extern "C" { */ struct pw_global; -#include <pipewire/context.h> -#include <pipewire/client.h> -#include <pipewire/properties.h> +#include <pipewire/impl.h> typedef int (*pw_global_bind_func_t) (void *object, struct pw_client *client, /**< client that binds */ diff --git a/src/pipewire/client.c b/src/pipewire/impl-client.c index 6fbfb4cd..425c35d9 100644 --- a/src/pipewire/client.c +++ b/src/pipewire/impl-client.c @@ -26,7 +26,7 @@ #include <string.h> #include "pipewire/interfaces.h" -#include "pipewire/client.h" +#include "pipewire/impl-client.h" #include "pipewire/private.h" #include "pipewire/resource.h" #include "pipewire/type.h" diff --git a/src/pipewire/client.h b/src/pipewire/impl-client.h index ff3a57cc..ff3a57cc 100644 --- a/src/pipewire/client.h +++ b/src/pipewire/impl-client.h diff --git a/src/pipewire/device.c b/src/pipewire/impl-device.c index 065b9c62..e3dcf9fb 100644 --- a/src/pipewire/device.c +++ b/src/pipewire/impl-device.c @@ -27,12 +27,8 @@ #include <spa/debug/types.h> #include <spa/monitor/utils.h> -#include "pipewire/pipewire.h" -#include "pipewire/device.h" +#include "pipewire/impl.h" #include "pipewire/private.h" -#include "pipewire/interfaces.h" -#include "pipewire/type.h" -#include "pipewire/keys.h" #define NAME "device" diff --git a/src/pipewire/device.h b/src/pipewire/impl-device.h index f80d37cd..f80d37cd 100644 --- a/src/pipewire/device.h +++ b/src/pipewire/impl-device.h diff --git a/src/pipewire/factory.c b/src/pipewire/impl-factory.c index 628d4fa0..e64eca57 100644 --- a/src/pipewire/factory.c +++ b/src/pipewire/impl-factory.c @@ -26,11 +26,8 @@ #include <spa/debug/types.h> -#include "pipewire/factory.h" +#include "pipewire/impl.h" #include "pipewire/private.h" -#include "pipewire/type.h" -#include "pipewire/interfaces.h" -#include "pipewire/keys.h" #define NAME "factory" diff --git a/src/pipewire/factory.h b/src/pipewire/impl-factory.h index 94f725bf..fe1035f3 100644 --- a/src/pipewire/factory.h +++ b/src/pipewire/impl-factory.h @@ -38,7 +38,7 @@ extern "C" { struct pw_factory; #include <pipewire/context.h> -#include <pipewire/client.h> +#include <pipewire/impl-client.h> #include <pipewire/global.h> #include <pipewire/properties.h> #include <pipewire/resource.h> diff --git a/src/pipewire/link.c b/src/pipewire/impl-link.c index 3f80a812..31ad2ce5 100644 --- a/src/pipewire/link.c +++ b/src/pipewire/impl-link.c @@ -32,13 +32,8 @@ #include <spa/pod/compare.h> #include <spa/param/param.h> -#include "pipewire/keys.h" +#include "pipewire/impl-link.h" #include "pipewire/private.h" -#include "pipewire/interfaces.h" -#include "pipewire/control.h" -#include "pipewire/link.h" -#include "pipewire/type.h" -#include "pipewire/work-queue.h" #include <spa/debug/node.h> #include <spa/debug/pod.h> diff --git a/src/pipewire/link.h b/src/pipewire/impl-link.h index e5da97b4..aeb07e8e 100644 --- a/src/pipewire/link.h +++ b/src/pipewire/impl-link.h @@ -35,9 +35,7 @@ extern "C" { */ struct pw_link; -#include <pipewire/context.h> -#include <pipewire/introspect.h> -#include <pipewire/port.h> +#include <pipewire/impl.h> /** \page page_link Link * diff --git a/src/pipewire/module.c b/src/pipewire/impl-module.c index 7a29b647..9cf3fa8b 100644 --- a/src/pipewire/module.c +++ b/src/pipewire/impl-module.c @@ -33,12 +33,8 @@ #include <sys/stat.h> #include <errno.h> -#include "pipewire/keys.h" +#include "pipewire/impl.h" #include "pipewire/private.h" -#include "pipewire/interfaces.h" -#include "pipewire/utils.h" -#include "pipewire/module.h" -#include "pipewire/type.h" #define NAME "module" diff --git a/src/pipewire/module.h b/src/pipewire/impl-module.h index 6fde7151..6fde7151 100644 --- a/src/pipewire/module.h +++ b/src/pipewire/impl-module.h diff --git a/src/pipewire/node.c b/src/pipewire/impl-node.c index a7e42579..37cad471 100644 --- a/src/pipewire/node.c +++ b/src/pipewire/impl-node.c @@ -34,16 +34,9 @@ #include <spa/node/utils.h> #include <spa/debug/types.h> -#include "pipewire/interfaces.h" +#include "pipewire/impl-node.h" #include "pipewire/private.h" -#include "pipewire/keys.h" -#include "pipewire/node.h" -#include "pipewire/data-loop.h" -#include "pipewire/main-loop.h" -#include "pipewire/type.h" -#include "pipewire/work-queue.h" - #define NAME "node" /** \cond */ diff --git a/src/pipewire/node.h b/src/pipewire/impl-node.h index afc7ccb0..433a59bd 100644 --- a/src/pipewire/node.h +++ b/src/pipewire/impl-node.h @@ -46,11 +46,7 @@ struct pw_node; #include <spa/node/node.h> #include <spa/node/event.h> -#include <pipewire/context.h> -#include <pipewire/global.h> -#include <pipewire/introspect.h> -#include <pipewire/port.h> -#include <pipewire/resource.h> +#include <pipewire/impl.h> /** Node events, listen to them with \ref pw_node_add_listener */ struct pw_node_events { diff --git a/src/pipewire/port.c b/src/pipewire/impl-port.c index 56b1aecd..73c12b2a 100644 --- a/src/pipewire/port.c +++ b/src/pipewire/impl-port.c @@ -32,11 +32,8 @@ #include <spa/utils/names.h> #include <spa/debug/types.h> -#include "pipewire/pipewire.h" -#include "pipewire/interfaces.h" +#include "pipewire/impl.h" #include "pipewire/private.h" -#include "pipewire/port.h" -#include "pipewire/link.h" #define NAME "port" diff --git a/src/pipewire/port.h b/src/pipewire/impl-port.h index 86d6c9cb..c675a21b 100644 --- a/src/pipewire/port.h +++ b/src/pipewire/impl-port.h @@ -45,9 +45,7 @@ struct pw_port; struct pw_link; struct pw_control; -#include <pipewire/context.h> -#include <pipewire/introspect.h> -#include <pipewire/node.h> +#include <pipewire/impl.h> enum pw_port_state { PW_PORT_STATE_ERROR = -1, /**< the port is in error */ diff --git a/src/pipewire/impl.h b/src/pipewire/impl.h new file mode 100644 index 00000000..957cd1db --- /dev/null +++ b/src/pipewire/impl.h @@ -0,0 +1,56 @@ +/* PipeWire + * + * Copyright © 2019 Wim Taymans + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifndef PIPEWIRE_IMPL_H +#define PIPEWIRE_IMPL_H + +#ifdef __cplusplus +extern "C" { +#endif + +struct pw_client; +struct pw_module; +struct pw_global; +struct pw_node; +struct pw_port; +struct pw_resource; + +#include <pipewire/pipewire.h> +#include <pipewire/control.h> +#include <pipewire/impl-client.h> +#include <pipewire/impl-device.h> +#include <pipewire/impl-factory.h> +#include <pipewire/global.h> +#include <pipewire/impl-link.h> +#include <pipewire/impl-module.h> +#include <pipewire/impl-node.h> +#include <pipewire/impl-port.h> +#include <pipewire/resource.h> +#include <pipewire/work-queue.h> + +#ifdef __cplusplus +} +#endif + +#endif /* PIPEWIRE_IMPL_H */ diff --git a/src/pipewire/meson.build b/src/pipewire/meson.build index 3311f95a..db28f377 100644 --- a/src/pipewire/meson.build +++ b/src/pipewire/meson.build @@ -1,28 +1,28 @@ pipewire_headers = [ 'array.h', 'buffers.h', - 'client.h', + 'impl-client.h', 'control.h', 'context.h', 'data-loop.h', - 'device.h', + 'impl-device.h', 'filter.h', 'global.h', 'interfaces.h', 'introspect.h', 'keys.h', - 'link.h', + 'impl-link.h', 'log.h', 'loop.h', 'main-loop.h', 'map.h', 'mem.h', - 'module.h', - 'node.h', - 'factory.h', + 'impl-module.h', + 'impl-node.h', + 'impl-factory.h', 'permission.h', 'pipewire.h', - 'port.h', + 'impl-port.h', 'properties.h', 'protocol.h', 'proxy.h', @@ -37,24 +37,24 @@ pipewire_headers = [ pipewire_sources = [ 'buffers.c', - 'client.c', + 'impl-client.c', 'control.c', 'context.c', 'data-loop.c', - 'device.c', + 'impl-device.c', 'filter.c', 'global.c', 'introspect.c', - 'link.c', + 'impl-link.c', 'log.c', 'loop.c', 'main-loop.c', 'mem.c', - 'module.c', - 'node.c', - 'factory.c', + 'impl-module.c', + 'impl-node.c', + 'impl-factory.c', 'pipewire.c', - 'port.c', + 'impl-port.c', 'properties.c', 'protocol.c', 'proxy.c', diff --git a/src/pipewire/pipewire.h b/src/pipewire/pipewire.h index ca6be24f..bbf387fa 100644 --- a/src/pipewire/pipewire.h +++ b/src/pipewire/pipewire.h @@ -31,26 +31,26 @@ extern "C" { #include <spa/support/plugin.h> -#include <pipewire/client.h> +#include <pipewire/array.h> #include <pipewire/context.h> -#include <pipewire/device.h> +#include <pipewire/buffers.h> +#include <pipewire/core.h> #include <pipewire/interfaces.h> #include <pipewire/introspect.h> #include <pipewire/keys.h> -#include <pipewire/link.h> #include <pipewire/log.h> #include <pipewire/loop.h> #include <pipewire/main-loop.h> -#include <pipewire/module.h> -#include <pipewire/factory.h> -#include <pipewire/node.h> -#include <pipewire/port.h> +#include <pipewire/map.h> +#include <pipewire/mem.h> #include <pipewire/properties.h> #include <pipewire/proxy.h> -#include <pipewire/core.h> -#include <pipewire/resource.h> +#include <pipewire/permission.h> +#include <pipewire/protocol.h> #include <pipewire/stream.h> +#include <pipewire/filter.h> #include <pipewire/thread-loop.h> +#include <pipewire/data-loop.h> #include <pipewire/type.h> #include <pipewire/utils.h> #include <pipewire/version.h> diff --git a/src/pipewire/private.h b/src/pipewire/private.h index f5eb2e59..0b18c268 100644 --- a/src/pipewire/private.h +++ b/src/pipewire/private.h @@ -32,14 +32,7 @@ extern "C" { #include <sys/socket.h> #include <sys/types.h> /* for pthread_t */ -#include "pipewire/buffers.h" -#include "pipewire/map.h" -#include "pipewire/mem.h" -#include "pipewire/introspect.h" -#include "pipewire/interfaces.h" -#include "pipewire/stream.h" -#include "pipewire/filter.h" -#include "pipewire/log.h" +#include "pipewire/impl.h" #include <spa/support/plugin.h> #include <spa/pod/builder.h> diff --git a/src/pipewire/resource.h b/src/pipewire/resource.h index 778db7fb..b8aa6aa2 100644 --- a/src/pipewire/resource.h +++ b/src/pipewire/resource.h @@ -58,7 +58,7 @@ extern "C" { */ struct pw_resource; -#include <pipewire/client.h> +#include <pipewire/impl-client.h> /** Resource events */ struct pw_resource_events { diff --git a/src/pipewire/stream.h b/src/pipewire/stream.h index ac4deee6..ec4e6d1f 100644 --- a/src/pipewire/stream.h +++ b/src/pipewire/stream.h @@ -152,8 +152,6 @@ struct pw_stream; #include <spa/buffer/buffer.h> #include <spa/param/param.h> -#include <pipewire/core.h> - /** \enum pw_stream_state The state of a stream \memberof pw_stream */ enum pw_stream_state { PW_STREAM_STATE_ERROR = -1, /**< the strean is in error */ @@ -184,6 +182,22 @@ struct pw_stream_control { uint32_t max_values; /**< max values that can be set on this control */ }; +/** A time structure \memberof pw_stream */ +struct pw_time { + int64_t now; /**< the monotonic time */ + struct spa_fraction rate; /**< the rate of \a ticks and delay */ + uint64_t ticks; /**< the ticks at \a now. This is the current time that + * the remote end is reading/writing. */ + int64_t delay; /**< delay to device, add to ticks to get the time of the + * device. Positive for INPUT streams and + * negative for OUTPUT streams. */ + uint64_t queued; /**< data queued in the stream, this is the sum + * of the size fields in the pw_buffer that are + * currently queued */ +}; + +#include <pipewire/core.h> + /** Events for a stream. These events are always called from the mainloop * unless explicitly documented otherwise. */ struct pw_stream_events { @@ -322,19 +336,6 @@ pw_stream_update_params(struct pw_stream *stream, /**< a \ref pw_stream */ /** Set control values */ int pw_stream_set_control(struct pw_stream *stream, uint32_t id, uint32_t n_values, float *values, ...); -/** A time structure \memberof pw_stream */ -struct pw_time { - int64_t now; /**< the monotonic time */ - struct spa_fraction rate; /**< the rate of \a ticks and delay */ - uint64_t ticks; /**< the ticks at \a now. This is the current time that - * the remote end is reading/writing. */ - int64_t delay; /**< delay to device, add to ticks to get the time of the - * device. Positive for INPUT streams and - * negative for OUTPUT streams. */ - uint64_t queued; /**< data queued in the stream, this is the sum - * of the size fields in the pw_buffer that are - * currently queued */ -}; /** Query the time on the stream \memberof pw_stream */ int pw_stream_get_time(struct pw_stream *stream, struct pw_time *time); diff --git a/src/tests/test-client.c b/src/tests/test-client.c index 62f74a2f..aba37f3c 100644 --- a/src/tests/test-client.c +++ b/src/tests/test-client.c @@ -23,7 +23,7 @@ */ #include <pipewire/pipewire.h> -#include <pipewire/client.h> +#include <pipewire/impl-client.h> #define TEST_FUNC(a,b,func) \ do { \ diff --git a/src/tests/test-context.c b/src/tests/test-context.c index 4669212d..ef1732ff 100644 --- a/src/tests/test-context.c +++ b/src/tests/test-context.c @@ -23,8 +23,7 @@ */ #include <pipewire/pipewire.h> -#include <pipewire/main-loop.h> -#include <pipewire/context.h> +#include <pipewire/global.h> #define TEST_FUNC(a,b,func) \ do { \ diff --git a/src/tests/test-cpp.cpp b/src/tests/test-cpp.cpp index 59c94a4d..b6e95938 100644 --- a/src/tests/test-cpp.cpp +++ b/src/tests/test-cpp.cpp @@ -17,38 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <pipewire/array.h> -#include <pipewire/client.h> -#include <pipewire/control.h> -#include <pipewire/core.h> -#include <pipewire/data-loop.h> -#include <pipewire/device.h> -#include <pipewire/factory.h> -#include <pipewire/global.h> -#include <pipewire/interfaces.h> -#include <pipewire/introspect.h> -#include <pipewire/link.h> -#include <pipewire/log.h> -#include <pipewire/loop.h> -#include <pipewire/main-loop.h> -#include <pipewire/map.h> -#include <pipewire/mem.h> -#include <pipewire/module.h> -#include <pipewire/node.h> -#include <pipewire/permission.h> #include <pipewire/pipewire.h> -#include <pipewire/port.h> -#include <pipewire/private.h> -#include <pipewire/properties.h> -#include <pipewire/protocol.h> -#include <pipewire/proxy.h> -#include <pipewire/core.h> -#include <pipewire/resource.h> -#include <pipewire/stream.h> -#include <pipewire/thread-loop.h> -#include <pipewire/type.h> -#include <pipewire/utils.h> -#include <pipewire/work-queue.h> +#include <pipewire/impl.h> #include <extensions/client-node.h> #include <extensions/protocol-native.h> diff --git a/src/tools/pipewire-cli.c b/src/tools/pipewire-cli.c index 9d26e459..303bf1d4 100644 --- a/src/tools/pipewire-cli.c +++ b/src/tools/pipewire-cli.c @@ -32,11 +32,7 @@ #include <spa/debug/pod.h> #include <spa/debug/format.h> -#include <pipewire/map.h> -#include <pipewire/pipewire.h> -#include <pipewire/interfaces.h> -#include <pipewire/type.h> -#include <pipewire/permission.h> +#include <pipewire/impl.h> #include <extensions/session-manager.h> |