From b943c31fd89f93ae79430a368e56954f9bf1c74f Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 27 May 2025 09:06:08 +0100 Subject: [PATCH] *: don't include standard C headers inside of extern "C" Including C headers inside of `extern "C"` breaks use from C++. Hoist the includes of standard C headers above the block so we don't try to mangle the stdlib. I initially tried to scope this with a targeted change but it's too hard to do correctly that way. This way, we avoid whack-a-mole. Firefox is working around this in their e21461b7b8b39cc31ba53c47d4f6f310c673ff2f commit. Bug: https://bugzilla.mozilla.org/1953080 --- spa/include/spa/buffer/alloc.h | 4 ++-- spa/include/spa/buffer/buffer.h | 6 +++--- spa/include/spa/buffer/meta.h | 6 +++--- spa/include/spa/buffer/type-info.h | 8 ++++---- spa/include/spa/control/control.h | 6 +++--- spa/include/spa/control/type-info.h | 8 ++++---- spa/include/spa/control/ump-utils.h | 6 +++--- spa/include/spa/debug/buffer.h | 10 +++++----- spa/include/spa/debug/context.h | 9 +++++---- spa/include/spa/debug/dict.h | 6 +++--- spa/include/spa/debug/file.h | 8 ++++---- spa/include/spa/debug/format.h | 14 ++++++------- spa/include/spa/debug/log.h | 8 ++++---- spa/include/spa/debug/mem.h | 8 ++++---- spa/include/spa/debug/node.h | 8 ++++---- spa/include/spa/debug/pod.h | 12 +++++------ spa/include/spa/debug/types.h | 8 ++++---- spa/include/spa/filter-graph/filter-graph.h | 8 ++++---- spa/include/spa/graph/graph.h | 14 ++++++------- spa/include/spa/monitor/device.h | 8 ++++---- spa/include/spa/monitor/event.h | 4 ++-- spa/include/spa/monitor/type-info.h | 8 ++++---- spa/include/spa/monitor/utils.h | 6 +++--- spa/include/spa/node/command.h | 4 ++-- spa/include/spa/node/event.h | 4 ++-- spa/include/spa/node/io.h | 6 +++--- spa/include/spa/node/node.h | 16 +++++++-------- spa/include/spa/node/type-info.h | 12 +++++------ spa/include/spa/node/utils.h | 8 ++++---- spa/include/spa/param/audio/aac-types.h | 6 +++--- spa/include/spa/param/audio/aac-utils.h | 10 +++++----- spa/include/spa/param/audio/aac.h | 4 ++-- spa/include/spa/param/audio/ac3-utils.h | 10 +++++----- spa/include/spa/param/audio/ac3.h | 4 ++-- spa/include/spa/param/audio/alac-utils.h | 10 +++++----- spa/include/spa/param/audio/alac.h | 4 ++-- spa/include/spa/param/audio/amr-types.h | 6 +++--- spa/include/spa/param/audio/amr-utils.h | 10 +++++----- spa/include/spa/param/audio/amr.h | 4 ++-- spa/include/spa/param/audio/ape-utils.h | 10 +++++----- spa/include/spa/param/audio/ape.h | 4 ++-- spa/include/spa/param/audio/dsd-utils.h | 10 +++++----- spa/include/spa/param/audio/dsd.h | 6 +++--- spa/include/spa/param/audio/dsp-utils.h | 10 +++++----- spa/include/spa/param/audio/dsp.h | 4 ++-- spa/include/spa/param/audio/dts-types.h | 6 +++--- spa/include/spa/param/audio/dts-utils.h | 10 +++++----- spa/include/spa/param/audio/dts.h | 4 ++-- spa/include/spa/param/audio/eac3-utils.h | 10 +++++----- spa/include/spa/param/audio/eac3.h | 4 ++-- spa/include/spa/param/audio/flac-utils.h | 10 +++++----- spa/include/spa/param/audio/flac.h | 4 ++-- spa/include/spa/param/audio/format-utils.h | 7 +++---- spa/include/spa/param/audio/format.h | 18 ++++++++--------- spa/include/spa/param/audio/iec958-types.h | 6 +++--- spa/include/spa/param/audio/iec958-utils.h | 10 +++++----- spa/include/spa/param/audio/layout.h | 7 ++++--- spa/include/spa/param/audio/mp3-types.h | 6 +++--- spa/include/spa/param/audio/mp3-utils.h | 10 +++++----- spa/include/spa/param/audio/mp3.h | 4 ++-- spa/include/spa/param/audio/mpegh-utils.h | 10 +++++----- spa/include/spa/param/audio/mpegh.h | 4 ++-- spa/include/spa/param/audio/opus.h | 4 ++-- spa/include/spa/param/audio/ra-utils.h | 10 +++++----- spa/include/spa/param/audio/ra.h | 4 ++-- spa/include/spa/param/audio/raw-json.h | 10 +++++----- spa/include/spa/param/audio/raw-types.h | 8 ++++---- spa/include/spa/param/audio/raw-utils.h | 10 +++++----- spa/include/spa/param/audio/raw.h | 8 ++++---- spa/include/spa/param/audio/truehd-utils.h | 10 +++++----- spa/include/spa/param/audio/truehd.h | 4 ++-- spa/include/spa/param/audio/vorbis-utils.h | 10 +++++----- spa/include/spa/param/audio/vorbis.h | 4 ++-- spa/include/spa/param/audio/wma-types.h | 6 +++--- spa/include/spa/param/audio/wma-utils.h | 10 +++++----- spa/include/spa/param/audio/wma.h | 4 ++-- spa/include/spa/param/bluetooth/type-info.h | 4 ++-- spa/include/spa/param/buffers-types.h | 10 +++++----- spa/include/spa/param/buffers.h | 4 ++-- spa/include/spa/param/format-types.h | 14 ++++++------- spa/include/spa/param/format-utils.h | 6 +++--- spa/include/spa/param/format.h | 4 ++-- spa/include/spa/param/latency-types.h | 8 ++++---- spa/include/spa/param/latency-utils.h | 12 +++++------ spa/include/spa/param/latency.h | 4 ++-- spa/include/spa/param/param-types.h | 8 ++++---- spa/include/spa/param/param.h | 4 ++-- spa/include/spa/param/port-config-types.h | 8 ++++---- spa/include/spa/param/port-config.h | 4 ++-- spa/include/spa/param/profile-types.h | 8 ++++---- spa/include/spa/param/profile.h | 4 ++-- spa/include/spa/param/profiler-types.h | 6 +++--- spa/include/spa/param/profiler.h | 4 ++-- spa/include/spa/param/props-types.h | 8 ++++---- spa/include/spa/param/props.h | 4 ++-- spa/include/spa/param/route-types.h | 10 +++++----- spa/include/spa/param/route.h | 4 ++-- spa/include/spa/param/tag-types.h | 8 ++++---- spa/include/spa/param/tag-utils.h | 14 ++++++------- spa/include/spa/param/tag.h | 4 ++-- spa/include/spa/param/video/dsp-utils.h | 8 ++++---- spa/include/spa/param/video/format-utils.h | 8 ++++---- spa/include/spa/param/video/format.h | 10 +++++----- spa/include/spa/param/video/h264-utils.h | 8 ++++---- spa/include/spa/param/video/h264.h | 4 ++-- spa/include/spa/param/video/mjpg-utils.h | 8 ++++---- spa/include/spa/param/video/mjpg.h | 4 ++-- spa/include/spa/param/video/raw-types.h | 5 +++-- spa/include/spa/param/video/raw-utils.h | 8 ++++---- spa/include/spa/param/video/raw.h | 10 +++++----- spa/include/spa/pod/builder.h | 12 +++++------ spa/include/spa/pod/command.h | 6 +++--- spa/include/spa/pod/compare.h | 8 ++++---- spa/include/spa/pod/dynamic.h | 6 +++--- spa/include/spa/pod/event.h | 4 ++-- spa/include/spa/pod/filter.h | 8 ++++---- spa/include/spa/pod/iter.h | 8 ++++---- spa/include/spa/pod/parser.h | 8 ++++---- spa/include/spa/pod/pod.h | 6 +++--- spa/include/spa/pod/vararg.h | 8 ++++---- spa/include/spa/support/cpu.h | 8 ++++---- spa/include/spa/support/dbus.h | 4 ++-- spa/include/spa/support/i18n.h | 6 +++--- spa/include/spa/support/log-impl.h | 8 ++++---- spa/include/spa/support/log.h | 8 ++++---- spa/include/spa/support/loop.h | 8 ++++---- spa/include/spa/support/plugin-loader.h | 6 +++--- spa/include/spa/support/plugin.h | 8 ++++---- spa/include/spa/support/system.h | 12 +++++------ spa/include/spa/support/thread.h | 8 ++++---- spa/include/spa/utils/defs.h | 14 ++++++------- spa/include/spa/utils/dict.h | 8 ++++---- spa/include/spa/utils/dll.h | 8 ++++---- spa/include/spa/utils/enum-types.h | 6 +++--- spa/include/spa/utils/hook.h | 6 +++--- spa/include/spa/utils/json-core.h | 11 +++++----- spa/include/spa/utils/json-pod.h | 8 ++++---- spa/include/spa/utils/json.h | 11 +++++----- spa/include/spa/utils/list.h | 4 ++-- spa/include/spa/utils/ratelimit.h | 8 ++++---- spa/include/spa/utils/result.h | 8 ++++---- spa/include/spa/utils/ringbuffer.h | 4 ++-- spa/include/spa/utils/string.h | 8 ++++---- spa/include/spa/utils/type-info.h | 20 +++++++++---------- spa/include/spa/utils/type.h | 6 +++--- spa/plugins/alsa/acp/acp.h | 12 +++++------ spa/plugins/alsa/acp/array.h | 6 +++--- spa/plugins/alsa/acp/card.h | 4 ++-- spa/plugins/alsa/acp/channelmap.h | 4 ++-- spa/plugins/alsa/acp/compat.h | 12 +++++------ spa/plugins/alsa/acp/device-port.h | 4 ++-- spa/plugins/alsa/acp/dynarray.h | 4 ++-- spa/plugins/alsa/acp/hashmap.h | 4 ++-- spa/plugins/alsa/acp/idxset.h | 4 ++-- spa/plugins/alsa/acp/proplist.h | 8 ++++---- spa/plugins/alsa/acp/volume.h | 4 ++-- spa/plugins/alsa/alsa-pcm.h | 7 +++---- spa/plugins/alsa/alsa-seq.h | 7 +++---- spa/plugins/audioconvert/hilbert.h | 7 +++---- spa/plugins/avb/avb-pcm.h | 8 ++++---- spa/plugins/bluez5/defs.h | 8 ++++---- spa/plugins/jack/jack-client.h | 8 ++++---- src/modules/module-avb/internal.h | 4 ++-- .../module-client-node/v0/ext-client-node.h | 8 ++++---- src/modules/module-client-node/v0/transport.h | 8 ++++---- src/modules/module-jack-tunnel/weakjack.h | 8 ++++---- .../module-protocol-native/connection.h | 8 ++++---- .../module-protocol-native/v0/interfaces.h | 8 ++++---- src/modules/module-protocol-pulse/manager.h | 8 ++++---- .../module-protocol-pulse/pulse-server.h | 6 +++--- src/modules/module-raop/rtsp-client.h | 8 ++++---- src/pipewire/array.h | 8 ++++---- src/pipewire/client.h | 8 ++++---- src/pipewire/context.h | 6 +++--- src/pipewire/control.h | 4 ++-- src/pipewire/core.h | 8 ++++---- src/pipewire/data-loop.h | 6 +++--- src/pipewire/device.h | 8 ++++---- src/pipewire/extensions/client-node.h | 6 +++--- src/pipewire/extensions/metadata.h | 8 ++++---- src/pipewire/extensions/profiler.h | 4 ++-- src/pipewire/extensions/protocol-native.h | 8 ++++---- src/pipewire/extensions/security-context.h | 4 ++-- src/pipewire/factory.h | 8 ++++---- src/pipewire/i18n.h | 3 ++- src/pipewire/impl-client.h | 4 ++-- src/pipewire/impl-module.h | 8 ++++---- src/pipewire/impl-port.h | 4 ++-- src/pipewire/keys.h | 3 ++- src/pipewire/link.h | 8 ++++---- src/pipewire/loop.h | 6 +++--- src/pipewire/map.h | 8 ++++---- src/pipewire/module.h | 8 ++++---- src/pipewire/node.h | 8 ++++---- src/pipewire/permission.h | 4 ++-- src/pipewire/pipewire.h | 8 ++++---- src/pipewire/port.h | 8 ++++---- src/pipewire/private.h | 8 ++++---- src/pipewire/properties.h | 8 ++++---- src/pipewire/protocol.h | 4 ++-- src/pipewire/proxy.h | 4 ++-- src/pipewire/resource.h | 4 ++-- src/pipewire/thread-loop.h | 4 ++-- src/pipewire/thread.h | 8 ++++---- src/pipewire/type.h | 4 ++-- src/pipewire/utils.h | 16 +++++++-------- test/pwtest.h | 8 ++++---- 207 files changed, 753 insertions(+), 752 deletions(-) diff --git a/spa/include/spa/buffer/alloc.h b/spa/include/spa/buffer/alloc.h index dc8f4cc64..ca2c317ab 100644 --- a/spa/include/spa/buffer/alloc.h +++ b/spa/include/spa/buffer/alloc.h @@ -5,12 +5,12 @@ #ifndef SPA_BUFFER_ALLOC_H #define SPA_BUFFER_ALLOC_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - #ifndef SPA_API_BUFFER_ALLOC #ifdef SPA_API_IMPL #define SPA_API_BUFFER_ALLOC SPA_API_IMPL diff --git a/spa/include/spa/buffer/buffer.h b/spa/include/spa/buffer/buffer.h index 03fd13b2a..39ca6fb81 100644 --- a/spa/include/spa/buffer/buffer.h +++ b/spa/include/spa/buffer/buffer.h @@ -5,13 +5,13 @@ #ifndef SPA_BUFFER_H #define SPA_BUFFER_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - #ifndef SPA_API_BUFFER #ifdef SPA_API_IMPL #define SPA_API_BUFFER SPA_API_IMPL diff --git a/spa/include/spa/buffer/meta.h b/spa/include/spa/buffer/meta.h index b484cfb01..85d9d655b 100644 --- a/spa/include/spa/buffer/meta.h +++ b/spa/include/spa/buffer/meta.h @@ -5,13 +5,13 @@ #ifndef SPA_META_H #define SPA_META_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - #ifndef SPA_API_META #ifdef SPA_API_IMPL #define SPA_API_META SPA_API_IMPL diff --git a/spa/include/spa/buffer/type-info.h b/spa/include/spa/buffer/type-info.h index cdfe52770..47577dccb 100644 --- a/spa/include/spa/buffer/type-info.h +++ b/spa/include/spa/buffer/type-info.h @@ -5,6 +5,10 @@ #ifndef SPA_BUFFER_TYPES_H #define SPA_BUFFER_TYPES_H +#include +#include +#include + /** * \addtogroup spa_buffer * \{ @@ -14,10 +18,6 @@ extern "C" { #endif -#include -#include -#include - #define SPA_TYPE_INFO_Buffer SPA_TYPE_INFO_POINTER_BASE "Buffer" #define SPA_TYPE_INFO_BUFFER_BASE SPA_TYPE_INFO_Buffer ":" diff --git a/spa/include/spa/control/control.h b/spa/include/spa/control/control.h index 1c1ec81fb..69b0d106e 100644 --- a/spa/include/spa/control/control.h +++ b/spa/include/spa/control/control.h @@ -5,13 +5,13 @@ #ifndef SPA_CONTROL_H #define SPA_CONTROL_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** \defgroup spa_control Control * Control type declarations */ diff --git a/spa/include/spa/control/type-info.h b/spa/include/spa/control/type-info.h index 6c7bd6a96..eae237b01 100644 --- a/spa/include/spa/control/type-info.h +++ b/spa/include/spa/control/type-info.h @@ -5,6 +5,10 @@ #ifndef SPA_CONTROL_TYPES_H #define SPA_CONTROL_TYPES_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include -#include -#include - /* base for parameter object enumerations */ #define SPA_TYPE_INFO_Control SPA_TYPE_INFO_ENUM_BASE "Control" #define SPA_TYPE_INFO_CONTROL_BASE SPA_TYPE_INFO_Control ":" diff --git a/spa/include/spa/control/ump-utils.h b/spa/include/spa/control/ump-utils.h index 463b12d14..0c0faa8ba 100644 --- a/spa/include/spa/control/ump-utils.h +++ b/spa/include/spa/control/ump-utils.h @@ -6,13 +6,13 @@ #ifndef SPA_CONTROL_UMP_UTILS_H #define SPA_CONTROL_UMP_UTILS_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - #ifndef SPA_API_CONTROL_UMP_UTILS #ifdef SPA_API_IMPL #define SPA_API_CONTROL_UMP_UTILS SPA_API_IMPL diff --git a/spa/include/spa/debug/buffer.h b/spa/include/spa/debug/buffer.h index eea48ae4c..c0b533564 100644 --- a/spa/include/spa/debug/buffer.h +++ b/spa/include/spa/debug/buffer.h @@ -5,6 +5,11 @@ #ifndef SPA_DEBUG_BUFFER_H #define SPA_DEBUG_BUFFER_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -18,11 +23,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_DEBUG_BUFFER #ifdef SPA_API_IMPL #define SPA_API_DEBUG_BUFFER SPA_API_IMPL diff --git a/spa/include/spa/debug/context.h b/spa/include/spa/debug/context.h index 13002f666..73ae96535 100644 --- a/spa/include/spa/debug/context.h +++ b/spa/include/spa/debug/context.h @@ -5,15 +5,16 @@ #ifndef SPA_DEBUG_CONTEXT_H #define SPA_DEBUG_CONTEXT_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include + +#ifdef __cplusplus +extern "C" { +#endif + /** * \addtogroup spa_debug * \{ diff --git a/spa/include/spa/debug/dict.h b/spa/include/spa/debug/dict.h index 5657b2d98..5d9e22e6f 100644 --- a/spa/include/spa/debug/dict.h +++ b/spa/include/spa/debug/dict.h @@ -5,6 +5,9 @@ #ifndef SPA_DEBUG_DICT_H #define SPA_DEBUG_DICT_H +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,9 +17,6 @@ extern "C" { * \{ */ -#include -#include - #ifndef SPA_API_DEBUG_DICT #ifdef SPA_API_IMPL #define SPA_API_DEBUG_DICT SPA_API_IMPL diff --git a/spa/include/spa/debug/file.h b/spa/include/spa/debug/file.h index 17ce46b7e..9d1a2e2be 100644 --- a/spa/include/spa/debug/file.h +++ b/spa/include/spa/debug/file.h @@ -5,10 +5,6 @@ #ifndef SPA_DEBUG_FILE_H #define SPA_DEBUG_FILE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -21,6 +17,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** * \addtogroup spa_debug * \{ diff --git a/spa/include/spa/debug/format.h b/spa/include/spa/debug/format.h index ad7f20480..74c8b62bb 100644 --- a/spa/include/spa/debug/format.h +++ b/spa/include/spa/debug/format.h @@ -5,6 +5,13 @@ #ifndef SPA_DEBUG_FORMAT_H #define SPA_DEBUG_FORMAT_H +#include +#include +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,13 +21,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include -#include -#include - #ifndef SPA_API_DEBUG_FORMAT #ifdef SPA_API_IMPL #define SPA_API_DEBUG_FORMAT SPA_API_IMPL diff --git a/spa/include/spa/debug/log.h b/spa/include/spa/debug/log.h index 05c3bd50f..4ede23905 100644 --- a/spa/include/spa/debug/log.h +++ b/spa/include/spa/debug/log.h @@ -5,10 +5,6 @@ #ifndef SPA_DEBUG_LOG_H #define SPA_DEBUG_LOG_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -20,6 +16,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_DEBUG_LOG #ifdef SPA_API_IMPL #define SPA_API_DEBUG_LOG SPA_API_IMPL diff --git a/spa/include/spa/debug/mem.h b/spa/include/spa/debug/mem.h index 966629482..98f1761a1 100644 --- a/spa/include/spa/debug/mem.h +++ b/spa/include/spa/debug/mem.h @@ -5,19 +5,19 @@ #ifndef SPA_DEBUG_MEM_H #define SPA_DEBUG_MEM_H +#include + +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_debug * \{ */ -#include - #ifndef SPA_API_DEBUG_MEM #ifdef SPA_API_IMPL #define SPA_API_DEBUG_MEM SPA_API_IMPL diff --git a/spa/include/spa/debug/node.h b/spa/include/spa/debug/node.h index baa273ffe..c25112f4d 100644 --- a/spa/include/spa/debug/node.h +++ b/spa/include/spa/debug/node.h @@ -5,6 +5,10 @@ #ifndef SPA_DEBUG_NODE_H #define SPA_DEBUG_NODE_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include -#include -#include - #ifndef SPA_API_DEBUG_NODE #ifdef SPA_API_IMPL #define SPA_API_DEBUG_NODE SPA_API_IMPL diff --git a/spa/include/spa/debug/pod.h b/spa/include/spa/debug/pod.h index 9db6f4b05..fe425676d 100644 --- a/spa/include/spa/debug/pod.h +++ b/spa/include/spa/debug/pod.h @@ -5,6 +5,12 @@ #ifndef SPA_DEBUG_POD_H #define SPA_DEBUG_POD_H +#include +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,12 +20,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include -#include - #ifndef SPA_API_DEBUG_POD #ifdef SPA_API_IMPL #define SPA_API_DEBUG_POD SPA_API_IMPL diff --git a/spa/include/spa/debug/types.h b/spa/include/spa/debug/types.h index d7ca83666..d52dbc89f 100644 --- a/spa/include/spa/debug/types.h +++ b/spa/include/spa/debug/types.h @@ -5,6 +5,10 @@ #ifndef SPA_DEBUG_TYPES_H #define SPA_DEBUG_TYPES_H +#include + +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include - -#include - #ifndef SPA_API_DEBUG_TYPES #ifdef SPA_API_IMPL #define SPA_API_DEBUG_TYPES SPA_API_IMPL diff --git a/spa/include/spa/filter-graph/filter-graph.h b/spa/include/spa/filter-graph/filter-graph.h index 05904c7f3..481085c5f 100644 --- a/spa/include/spa/filter-graph/filter-graph.h +++ b/spa/include/spa/filter-graph/filter-graph.h @@ -5,16 +5,16 @@ #ifndef SPA_FILTER_GRAPH_H #define SPA_FILTER_GRAPH_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_FILTER_GRAPH #ifdef SPA_API_IMPL #define SPA_API_FILTER_GRAPH SPA_API_IMPL diff --git a/spa/include/spa/graph/graph.h b/spa/include/spa/graph/graph.h index 537e6e75f..0db28ad3f 100644 --- a/spa/include/spa/graph/graph.h +++ b/spa/include/spa/graph/graph.h @@ -5,6 +5,13 @@ #ifndef SPA_GRAPH_H #define SPA_GRAPH_H +#include +#include +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -18,13 +25,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include -#include -#include - #ifndef SPA_API_GRAPH #ifdef SPA_API_IMPL #define SPA_API_GRAPH SPA_API_IMPL diff --git a/spa/include/spa/monitor/device.h b/spa/include/spa/monitor/device.h index 73b4a94ff..cc51f9ef1 100644 --- a/spa/include/spa/monitor/device.h +++ b/spa/include/spa/monitor/device.h @@ -5,15 +5,15 @@ #ifndef SPA_DEVICE_H #define SPA_DEVICE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_DEVICE #ifdef SPA_API_IMPL #define SPA_API_DEVICE SPA_API_IMPL diff --git a/spa/include/spa/monitor/event.h b/spa/include/spa/monitor/event.h index 8955f81a5..accf8382f 100644 --- a/spa/include/spa/monitor/event.h +++ b/spa/include/spa/monitor/event.h @@ -5,12 +5,12 @@ #ifndef SPA_EVENT_DEVICE_H #define SPA_EVENT_DEVICE_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_device * \{ diff --git a/spa/include/spa/monitor/type-info.h b/spa/include/spa/monitor/type-info.h index e43a17b89..1658594b4 100644 --- a/spa/include/spa/monitor/type-info.h +++ b/spa/include/spa/monitor/type-info.h @@ -5,14 +5,14 @@ #ifndef SPA_DEVICE_TYPE_INFO_H #define SPA_DEVICE_TYPE_INFO_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** * \addtogroup spa_device * \{ diff --git a/spa/include/spa/monitor/utils.h b/spa/include/spa/monitor/utils.h index 4337ecebc..c4b74935b 100644 --- a/spa/include/spa/monitor/utils.h +++ b/spa/include/spa/monitor/utils.h @@ -5,13 +5,13 @@ #ifndef SPA_DEVICE_UTILS_H #define SPA_DEVICE_UTILS_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - #ifndef SPA_API_DEVICE_UTILS #ifdef SPA_API_IMPL #define SPA_API_DEVICE_UTILS SPA_API_IMPL diff --git a/spa/include/spa/node/command.h b/spa/include/spa/node/command.h index e9e482d7a..49a1cc09d 100644 --- a/spa/include/spa/node/command.h +++ b/spa/include/spa/node/command.h @@ -5,6 +5,8 @@ #ifndef SPA_COMMAND_NODE_H #define SPA_COMMAND_NODE_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - /* object id of SPA_TYPE_COMMAND_Node */ enum spa_node_command { SPA_NODE_COMMAND_Suspend, /**< suspend a node, this removes all configured diff --git a/spa/include/spa/node/event.h b/spa/include/spa/node/event.h index e70aad75f..d01f5f2a8 100644 --- a/spa/include/spa/node/event.h +++ b/spa/include/spa/node/event.h @@ -5,6 +5,8 @@ #ifndef SPA_EVENT_NODE_H #define SPA_EVENT_NODE_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - /* object id of SPA_TYPE_EVENT_Node */ enum spa_node_event { SPA_NODE_EVENT_Error, diff --git a/spa/include/spa/node/io.h b/spa/include/spa/node/io.h index c1c725ebf..41f011720 100644 --- a/spa/include/spa/node/io.h +++ b/spa/include/spa/node/io.h @@ -5,6 +5,9 @@ #ifndef SPA_IO_H #define SPA_IO_H +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,9 +17,6 @@ extern "C" { * \{ */ -#include -#include - /** IO areas * * IO information for a port on a node. This is allocated diff --git a/spa/include/spa/node/node.h b/spa/include/spa/node/node.h index ae9f63549..85813a064 100644 --- a/spa/include/spa/node/node.h +++ b/spa/include/spa/node/node.h @@ -5,6 +5,14 @@ #ifndef SPA_NODE_H #define SPA_NODE_H +#include +#include +#include +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -19,14 +27,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include -#include -#include -#include - #ifndef SPA_API_NODE #ifdef SPA_API_IMPL #define SPA_API_NODE SPA_API_IMPL diff --git a/spa/include/spa/node/type-info.h b/spa/include/spa/node/type-info.h index 4b92a4f9f..41cc5a73d 100644 --- a/spa/include/spa/node/type-info.h +++ b/spa/include/spa/node/type-info.h @@ -5,6 +5,12 @@ #ifndef SPA_NODE_TYPES_H #define SPA_NODE_TYPES_H +#include + +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,12 +20,6 @@ extern "C" { * \{ */ -#include - -#include -#include -#include - #define SPA_TYPE_INFO_IO SPA_TYPE_INFO_ENUM_BASE "IO" #define SPA_TYPE_INFO_IO_BASE SPA_TYPE_INFO_IO ":" diff --git a/spa/include/spa/node/utils.h b/spa/include/spa/node/utils.h index b7724e922..a46cbe44b 100644 --- a/spa/include/spa/node/utils.h +++ b/spa/include/spa/node/utils.h @@ -5,6 +5,10 @@ #ifndef SPA_NODE_UTILS_H #define SPA_NODE_UTILS_H +#include + +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include - -#include - #ifndef SPA_API_NODE_UTILS #ifdef SPA_API_IMPL #define SPA_API_NODE_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/aac-types.h b/spa/include/spa/param/audio/aac-types.h index 6e5047394..176185bc0 100644 --- a/spa/include/spa/param/audio/aac-types.h +++ b/spa/include/spa/param/audio/aac-types.h @@ -5,13 +5,13 @@ #ifndef SPA_AUDIO_AAC_TYPES_H #define SPA_AUDIO_AAC_TYPES_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/aac-utils.h b/spa/include/spa/param/audio/aac-utils.h index 01f226bb8..3ec362d19 100644 --- a/spa/include/spa/param/audio/aac-utils.h +++ b/spa/include/spa/param/audio/aac-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_AAC_UTILS_H #define SPA_AUDIO_AAC_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_AAC_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_AAC_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/aac.h b/spa/include/spa/param/audio/aac.h index 0a46d5835..1a7fb1612 100644 --- a/spa/include/spa/param/audio/aac.h +++ b/spa/include/spa/param/audio/aac.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_AAC_H #define SPA_AUDIO_AAC_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/ac3-utils.h b/spa/include/spa/param/audio/ac3-utils.h index bfea5b563..9ee48d4ea 100644 --- a/spa/include/spa/param/audio/ac3-utils.h +++ b/spa/include/spa/param/audio/ac3-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_AC3_UTILS_H #define SPA_AUDIO_AC3_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_AC3_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_AC3_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/ac3.h b/spa/include/spa/param/audio/ac3.h index cab27c3e3..1a02c665a 100644 --- a/spa/include/spa/param/audio/ac3.h +++ b/spa/include/spa/param/audio/ac3.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_AC3_H #define SPA_AUDIO_AC3_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/alac-utils.h b/spa/include/spa/param/audio/alac-utils.h index 898a84e5f..11a76c581 100644 --- a/spa/include/spa/param/audio/alac-utils.h +++ b/spa/include/spa/param/audio/alac-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_ALAC_UTILS_H #define SPA_AUDIO_ALAC_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_ALAC_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_ALAC_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/alac.h b/spa/include/spa/param/audio/alac.h index 6e6f19fb2..cf682da4c 100644 --- a/spa/include/spa/param/audio/alac.h +++ b/spa/include/spa/param/audio/alac.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_ALAC_H #define SPA_AUDIO_ALAC_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/amr-types.h b/spa/include/spa/param/audio/amr-types.h index 9ab4c9e41..73bfa051b 100644 --- a/spa/include/spa/param/audio/amr-types.h +++ b/spa/include/spa/param/audio/amr-types.h @@ -5,13 +5,13 @@ #ifndef SPA_AUDIO_AMR_TYPES_H #define SPA_AUDIO_AMR_TYPES_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/amr-utils.h b/spa/include/spa/param/audio/amr-utils.h index cfe6aa5dc..6a782735d 100644 --- a/spa/include/spa/param/audio/amr-utils.h +++ b/spa/include/spa/param/audio/amr-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_AMR_UTILS_H #define SPA_AUDIO_AMR_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_AMR_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_AMR_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/amr.h b/spa/include/spa/param/audio/amr.h index d00125a45..2d970e388 100644 --- a/spa/include/spa/param/audio/amr.h +++ b/spa/include/spa/param/audio/amr.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_AMR_H #define SPA_AUDIO_AMR_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/ape-utils.h b/spa/include/spa/param/audio/ape-utils.h index d05c596c0..3068e0d2e 100644 --- a/spa/include/spa/param/audio/ape-utils.h +++ b/spa/include/spa/param/audio/ape-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_APE_UTILS_H #define SPA_AUDIO_APE_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_APE_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_APE_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/ape.h b/spa/include/spa/param/audio/ape.h index 03f787f53..27c2aa5e2 100644 --- a/spa/include/spa/param/audio/ape.h +++ b/spa/include/spa/param/audio/ape.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_APE_H #define SPA_AUDIO_APE_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/dsd-utils.h b/spa/include/spa/param/audio/dsd-utils.h index 3f7065b26..5b93b7a8b 100644 --- a/spa/include/spa/param/audio/dsd-utils.h +++ b/spa/include/spa/param/audio/dsd-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_DSD_UTILS_H #define SPA_AUDIO_DSD_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_DSD_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_DSD_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/dsd.h b/spa/include/spa/param/audio/dsd.h index 53678d4c5..73f3d4e8b 100644 --- a/spa/include/spa/param/audio/dsd.h +++ b/spa/include/spa/param/audio/dsd.h @@ -7,13 +7,13 @@ #include +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/dsp-utils.h b/spa/include/spa/param/audio/dsp-utils.h index af107f1eb..ec183a914 100644 --- a/spa/include/spa/param/audio/dsp-utils.h +++ b/spa/include/spa/param/audio/dsp-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_DSP_UTILS_H #define SPA_AUDIO_DSP_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_DSP_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_DSP_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/dsp.h b/spa/include/spa/param/audio/dsp.h index 592f25c18..a285fdf2d 100644 --- a/spa/include/spa/param/audio/dsp.h +++ b/spa/include/spa/param/audio/dsp.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_DSP_H #define SPA_AUDIO_DSP_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/dts-types.h b/spa/include/spa/param/audio/dts-types.h index 6cf999a1a..306859648 100644 --- a/spa/include/spa/param/audio/dts-types.h +++ b/spa/include/spa/param/audio/dts-types.h @@ -5,13 +5,13 @@ #ifndef SPA_AUDIO_DTS_TYPES_H #define SPA_AUDIO_DTS_TYPES_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/dts-utils.h b/spa/include/spa/param/audio/dts-utils.h index 445c7e8fb..182f1ebbc 100644 --- a/spa/include/spa/param/audio/dts-utils.h +++ b/spa/include/spa/param/audio/dts-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_DTS_UTILS_H #define SPA_AUDIO_DTS_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_DTS_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_DTS_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/dts.h b/spa/include/spa/param/audio/dts.h index fd7a4133c..285b8d96a 100644 --- a/spa/include/spa/param/audio/dts.h +++ b/spa/include/spa/param/audio/dts.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_DTS_H #define SPA_AUDIO_DTS_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/eac3-utils.h b/spa/include/spa/param/audio/eac3-utils.h index 3cb7db25e..926d0fd80 100644 --- a/spa/include/spa/param/audio/eac3-utils.h +++ b/spa/include/spa/param/audio/eac3-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_EAC3_UTILS_H #define SPA_AUDIO_EAC3_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_EAC3_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_EAC3_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/eac3.h b/spa/include/spa/param/audio/eac3.h index 8d27b460e..dc95bdd09 100644 --- a/spa/include/spa/param/audio/eac3.h +++ b/spa/include/spa/param/audio/eac3.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_EAC3_H #define SPA_AUDIO_EAC3_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/flac-utils.h b/spa/include/spa/param/audio/flac-utils.h index bc3d8afc2..2472abce0 100644 --- a/spa/include/spa/param/audio/flac-utils.h +++ b/spa/include/spa/param/audio/flac-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_FLAC_UTILS_H #define SPA_AUDIO_FLAC_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_FLAC_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_FLAC_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/flac.h b/spa/include/spa/param/audio/flac.h index f213e3f83..5b229ef16 100644 --- a/spa/include/spa/param/audio/flac.h +++ b/spa/include/spa/param/audio/flac.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_FLAC_H #define SPA_AUDIO_FLAC_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/format-utils.h b/spa/include/spa/param/audio/format-utils.h index da4d35fcb..d608a4bdf 100644 --- a/spa/include/spa/param/audio/format-utils.h +++ b/spa/include/spa/param/audio/format-utils.h @@ -5,10 +5,6 @@ #ifndef SPA_PARAM_AUDIO_FORMAT_UTILS_H #define SPA_PARAM_AUDIO_FORMAT_UTILS_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -33,6 +29,9 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif /** * \addtogroup spa_param diff --git a/spa/include/spa/param/audio/format.h b/spa/include/spa/param/audio/format.h index c38d505e3..ac9b10dda 100644 --- a/spa/include/spa/param/audio/format.h +++ b/spa/include/spa/param/audio/format.h @@ -5,15 +5,6 @@ #ifndef SPA_PARAM_AUDIO_FORMAT_H #define SPA_PARAM_AUDIO_FORMAT_H -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \addtogroup spa_param - * \{ - */ - #include #include #include @@ -35,6 +26,15 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \addtogroup spa_param + * \{ + */ + struct spa_audio_info { uint32_t media_type; uint32_t media_subtype; diff --git a/spa/include/spa/param/audio/iec958-types.h b/spa/include/spa/param/audio/iec958-types.h index adcffdc96..5fe876f1b 100644 --- a/spa/include/spa/param/audio/iec958-types.h +++ b/spa/include/spa/param/audio/iec958-types.h @@ -5,13 +5,13 @@ #ifndef SPA_AUDIO_IEC958_TYPES_H #define SPA_AUDIO_IEC958_TYPES_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/iec958-utils.h b/spa/include/spa/param/audio/iec958-utils.h index 1c4ec105b..4c0342f4b 100644 --- a/spa/include/spa/param/audio/iec958-utils.h +++ b/spa/include/spa/param/audio/iec958-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_IEC958_UTILS_H #define SPA_AUDIO_IEC958_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_IEC958_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_IEC958_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/layout.h b/spa/include/spa/param/audio/layout.h index 545ceae32..19e3a3c42 100644 --- a/spa/include/spa/param/audio/layout.h +++ b/spa/include/spa/param/audio/layout.h @@ -5,17 +5,18 @@ #ifndef SPA_AUDIO_LAYOUT_H #define SPA_AUDIO_LAYOUT_H +#include + +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ */ -#include struct spa_audio_layout_info { uint32_t n_channels; diff --git a/spa/include/spa/param/audio/mp3-types.h b/spa/include/spa/param/audio/mp3-types.h index a7ba22ace..826398d84 100644 --- a/spa/include/spa/param/audio/mp3-types.h +++ b/spa/include/spa/param/audio/mp3-types.h @@ -5,13 +5,13 @@ #ifndef SPA_AUDIO_MP3_TYPES_H #define SPA_AUDIO_MP3_TYPES_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/mp3-utils.h b/spa/include/spa/param/audio/mp3-utils.h index 3be1f13d0..44b7310ec 100644 --- a/spa/include/spa/param/audio/mp3-utils.h +++ b/spa/include/spa/param/audio/mp3-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_MP3_UTILS_H #define SPA_AUDIO_MP3_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_MP3_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_MP3_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/mp3.h b/spa/include/spa/param/audio/mp3.h index a28bba661..83a978f19 100644 --- a/spa/include/spa/param/audio/mp3.h +++ b/spa/include/spa/param/audio/mp3.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_MP3_H #define SPA_AUDIO_MP3_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/mpegh-utils.h b/spa/include/spa/param/audio/mpegh-utils.h index 6544c24c0..778dfa946 100644 --- a/spa/include/spa/param/audio/mpegh-utils.h +++ b/spa/include/spa/param/audio/mpegh-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_MPEGH_UTILS_H #define SPA_AUDIO_MPEGH_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_MPEGH_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_MPEGH_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/mpegh.h b/spa/include/spa/param/audio/mpegh.h index e654a500b..5c4c8afa1 100644 --- a/spa/include/spa/param/audio/mpegh.h +++ b/spa/include/spa/param/audio/mpegh.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_MPEGH_H #define SPA_AUDIO_MPEGH_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/opus.h b/spa/include/spa/param/audio/opus.h index cdd0e6c5b..ebdf678f7 100644 --- a/spa/include/spa/param/audio/opus.h +++ b/spa/include/spa/param/audio/opus.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_OPUS_H #define SPA_AUDIO_OPUS_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/ra-utils.h b/spa/include/spa/param/audio/ra-utils.h index 79e96514a..4fd6a87e3 100644 --- a/spa/include/spa/param/audio/ra-utils.h +++ b/spa/include/spa/param/audio/ra-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_RA_UTILS_H #define SPA_AUDIO_RA_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_RA_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_RA_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/ra.h b/spa/include/spa/param/audio/ra.h index b784ab588..5fb0dbc09 100644 --- a/spa/include/spa/param/audio/ra.h +++ b/spa/include/spa/param/audio/ra.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_RA_H #define SPA_AUDIO_RA_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/raw-json.h b/spa/include/spa/param/audio/raw-json.h index 07f0e0c45..92d7a1aad 100644 --- a/spa/include/spa/param/audio/raw-json.h +++ b/spa/include/spa/param/audio/raw-json.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_RAW_JSON_H #define SPA_AUDIO_RAW_JSON_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_RAW_JSON #ifdef SPA_API_IMPL #define SPA_API_AUDIO_RAW_JSON SPA_API_IMPL diff --git a/spa/include/spa/param/audio/raw-types.h b/spa/include/spa/param/audio/raw-types.h index 9aa9591c0..257789341 100644 --- a/spa/include/spa/param/audio/raw-types.h +++ b/spa/include/spa/param/audio/raw-types.h @@ -5,6 +5,10 @@ #ifndef SPA_AUDIO_RAW_TYPES_H #define SPA_AUDIO_RAW_TYPES_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include -#include -#include - #ifndef SPA_API_AUDIO_RAW_TYPES #ifdef SPA_API_IMPL #define SPA_API_AUDIO_RAW_TYPES SPA_API_IMPL diff --git a/spa/include/spa/param/audio/raw-utils.h b/spa/include/spa/param/audio/raw-utils.h index 178e3dd11..d0a174e85 100644 --- a/spa/include/spa/param/audio/raw-utils.h +++ b/spa/include/spa/param/audio/raw-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_RAW_UTILS_H #define SPA_AUDIO_RAW_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_RAW_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_RAW_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/raw.h b/spa/include/spa/param/audio/raw.h index 8bed3f8a4..804e5df1d 100644 --- a/spa/include/spa/param/audio/raw.h +++ b/spa/include/spa/param/audio/raw.h @@ -5,14 +5,14 @@ #ifndef SPA_AUDIO_RAW_H #define SPA_AUDIO_RAW_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/truehd-utils.h b/spa/include/spa/param/audio/truehd-utils.h index 61c67c017..7d386ee54 100644 --- a/spa/include/spa/param/audio/truehd-utils.h +++ b/spa/include/spa/param/audio/truehd-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_TRUEHD_UTILS_H #define SPA_AUDIO_TRUEHD_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_TRUEHD_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_TRUEHD_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/truehd.h b/spa/include/spa/param/audio/truehd.h index 44adbbb3e..fee222b87 100644 --- a/spa/include/spa/param/audio/truehd.h +++ b/spa/include/spa/param/audio/truehd.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_TRUEHD_H #define SPA_AUDIO_TRUEHD_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/vorbis-utils.h b/spa/include/spa/param/audio/vorbis-utils.h index bc901e616..13114e89b 100644 --- a/spa/include/spa/param/audio/vorbis-utils.h +++ b/spa/include/spa/param/audio/vorbis-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_VORBIS_UTILS_H #define SPA_AUDIO_VORBIS_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_VORBIS_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_VORBIS_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/vorbis.h b/spa/include/spa/param/audio/vorbis.h index e3ab490ef..e73895ba7 100644 --- a/spa/include/spa/param/audio/vorbis.h +++ b/spa/include/spa/param/audio/vorbis.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_VORBIS_H #define SPA_AUDIO_VORBIS_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/wma-types.h b/spa/include/spa/param/audio/wma-types.h index 40f9d6682..663e54f24 100644 --- a/spa/include/spa/param/audio/wma-types.h +++ b/spa/include/spa/param/audio/wma-types.h @@ -5,13 +5,13 @@ #ifndef SPA_AUDIO_WMA_TYPES_H #define SPA_AUDIO_WMA_TYPES_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/audio/wma-utils.h b/spa/include/spa/param/audio/wma-utils.h index ca15f7d0c..8dadb3992 100644 --- a/spa/include/spa/param/audio/wma-utils.h +++ b/spa/include/spa/param/audio/wma-utils.h @@ -5,6 +5,11 @@ #ifndef SPA_AUDIO_WMA_UTILS_H #define SPA_AUDIO_WMA_UTILS_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #ifndef SPA_API_AUDIO_WMA_UTILS #ifdef SPA_API_IMPL #define SPA_API_AUDIO_WMA_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/audio/wma.h b/spa/include/spa/param/audio/wma.h index dd1e53a86..1cd3ff465 100644 --- a/spa/include/spa/param/audio/wma.h +++ b/spa/include/spa/param/audio/wma.h @@ -5,12 +5,12 @@ #ifndef SPA_AUDIO_WMA_H #define SPA_AUDIO_WMA_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_param * \{ diff --git a/spa/include/spa/param/bluetooth/type-info.h b/spa/include/spa/param/bluetooth/type-info.h index 7d9cd3653..a936cca5f 100644 --- a/spa/include/spa/param/bluetooth/type-info.h +++ b/spa/include/spa/param/bluetooth/type-info.h @@ -5,6 +5,8 @@ #ifndef SPA_BLUETOOTH_TYPES_H #define SPA_BLUETOOTH_TYPES_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - #define SPA_TYPE_INFO_BluetoothAudioCodec SPA_TYPE_INFO_ENUM_BASE "BluetoothAudioCodec" #define SPA_TYPE_INFO_BLUETOOTH_AUDIO_CODEC_BASE SPA_TYPE_INFO_BluetoothAudioCodec ":" diff --git a/spa/include/spa/param/buffers-types.h b/spa/include/spa/param/buffers-types.h index 4ca45cb02..723aa1b3a 100644 --- a/spa/include/spa/param/buffers-types.h +++ b/spa/include/spa/param/buffers-types.h @@ -5,6 +5,11 @@ #ifndef SPA_PARAM_BUFFERS_TYPES_H #define SPA_PARAM_BUFFERS_TYPES_H +#include +#include + +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include - -#include - #define SPA_TYPE_INFO_PARAM_Meta SPA_TYPE_INFO_PARAM_BASE "Meta" #define SPA_TYPE_INFO_PARAM_META_BASE SPA_TYPE_INFO_PARAM_Meta ":" diff --git a/spa/include/spa/param/buffers.h b/spa/include/spa/param/buffers.h index 9c157ae2a..cf0b4a698 100644 --- a/spa/include/spa/param/buffers.h +++ b/spa/include/spa/param/buffers.h @@ -5,6 +5,8 @@ #ifndef SPA_PARAM_BUFFERS_H #define SPA_PARAM_BUFFERS_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - /** properties for SPA_TYPE_OBJECT_ParamBuffers */ enum spa_param_buffers { SPA_PARAM_BUFFERS_START, diff --git a/spa/include/spa/param/format-types.h b/spa/include/spa/param/format-types.h index 7af6f2784..13e475141 100644 --- a/spa/include/spa/param/format-types.h +++ b/spa/include/spa/param/format-types.h @@ -5,6 +5,13 @@ #ifndef SPA_PARAM_FORMAT_TYPES_H #define SPA_PARAM_FORMAT_TYPES_H +#include +#include + +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,13 +21,6 @@ extern "C" { * \{ */ -#include -#include - -#include -#include -#include - #define SPA_TYPE_INFO_Format SPA_TYPE_INFO_PARAM_BASE "Format" #define SPA_TYPE_INFO_FORMAT_BASE SPA_TYPE_INFO_Format ":" diff --git a/spa/include/spa/param/format-utils.h b/spa/include/spa/param/format-utils.h index 27fc5f58c..e4c96f391 100644 --- a/spa/include/spa/param/format-utils.h +++ b/spa/include/spa/param/format-utils.h @@ -5,6 +5,9 @@ #ifndef SPA_PARAM_FORMAT_UTILS_H #define SPA_PARAM_FORMAT_UTILS_H +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -15,9 +18,6 @@ extern "C" { * \{ */ -#include -#include - #ifndef SPA_API_FORMAT_UTILS #ifdef SPA_API_IMPL #define SPA_API_FORMAT_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/format.h b/spa/include/spa/param/format.h index 25052495a..6da11819f 100644 --- a/spa/include/spa/param/format.h +++ b/spa/include/spa/param/format.h @@ -5,6 +5,8 @@ #ifndef SPA_PARAM_FORMAT_H #define SPA_PARAM_FORMAT_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - /** media type for SPA_TYPE_OBJECT_Format */ enum spa_media_type { SPA_MEDIA_TYPE_unknown, diff --git a/spa/include/spa/param/latency-types.h b/spa/include/spa/param/latency-types.h index 883375f3f..4ab1f3625 100644 --- a/spa/include/spa/param/latency-types.h +++ b/spa/include/spa/param/latency-types.h @@ -5,6 +5,10 @@ #ifndef SPA_PARAM_LATENCY_TYPES_H #define SPA_PARAM_LATENCY_TYPES_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include -#include -#include - #define SPA_TYPE_INFO_PARAM_Latency SPA_TYPE_INFO_PARAM_BASE "Latency" #define SPA_TYPE_INFO_PARAM_LATENCY_BASE SPA_TYPE_INFO_PARAM_Latency ":" diff --git a/spa/include/spa/param/latency-utils.h b/spa/include/spa/param/latency-utils.h index 45f817ebb..907c92816 100644 --- a/spa/include/spa/param/latency-utils.h +++ b/spa/include/spa/param/latency-utils.h @@ -5,6 +5,12 @@ #ifndef SPA_PARAM_LATENCY_UTILS_H #define SPA_PARAM_LATENCY_UTILS_H +#include + +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,12 +20,6 @@ extern "C" { * \{ */ -#include - -#include -#include -#include - #ifndef SPA_API_LATENCY_UTILS #ifdef SPA_API_IMPL #define SPA_API_LATENCY_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/latency.h b/spa/include/spa/param/latency.h index 4087941ca..0e9cfffa2 100644 --- a/spa/include/spa/param/latency.h +++ b/spa/include/spa/param/latency.h @@ -5,6 +5,8 @@ #ifndef SPA_PARAM_LATENY_H #define SPA_PARAM_LATENY_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - /** * Properties for SPA_TYPE_OBJECT_ParamLatency * diff --git a/spa/include/spa/param/param-types.h b/spa/include/spa/param/param-types.h index 62ffe7da9..cb4bcd666 100644 --- a/spa/include/spa/param/param-types.h +++ b/spa/include/spa/param/param-types.h @@ -5,6 +5,10 @@ #ifndef SPA_PARAM_TYPES_H #define SPA_PARAM_TYPES_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include -#include -#include - /* base for parameter object enumerations */ #define SPA_TYPE_INFO_ParamId SPA_TYPE_INFO_ENUM_BASE "ParamId" #define SPA_TYPE_INFO_PARAM_ID_BASE SPA_TYPE_INFO_ParamId ":" diff --git a/spa/include/spa/param/param.h b/spa/include/spa/param/param.h index be8deb54c..cf72ac43e 100644 --- a/spa/include/spa/param/param.h +++ b/spa/include/spa/param/param.h @@ -5,6 +5,8 @@ #ifndef SPA_PARAM_H #define SPA_PARAM_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -18,8 +20,6 @@ extern "C" { * \{ */ -#include - /** different parameter types that can be queried */ enum spa_param_type { SPA_PARAM_Invalid, /**< invalid */ diff --git a/spa/include/spa/param/port-config-types.h b/spa/include/spa/param/port-config-types.h index 2eabb785c..9801b1117 100644 --- a/spa/include/spa/param/port-config-types.h +++ b/spa/include/spa/param/port-config-types.h @@ -5,6 +5,10 @@ #ifndef SPA_PARAM_PORT_CONFIG_TYPES_H #define SPA_PARAM_PORT_CONFIG_TYPES_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include -#include -#include - #define SPA_TYPE_INFO_ParamPortConfigMode SPA_TYPE_INFO_ENUM_BASE "ParamPortConfigMode" #define SPA_TYPE_INFO_PARAM_PORT_CONFIG_MODE_BASE SPA_TYPE_INFO_ParamPortConfigMode ":" diff --git a/spa/include/spa/param/port-config.h b/spa/include/spa/param/port-config.h index 7e05eda27..fcb39c162 100644 --- a/spa/include/spa/param/port-config.h +++ b/spa/include/spa/param/port-config.h @@ -5,6 +5,8 @@ #ifndef SPA_PARAM_PORT_CONFIG_H #define SPA_PARAM_PORT_CONFIG_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - enum spa_param_port_config_mode { SPA_PARAM_PORT_CONFIG_MODE_none, /**< no configuration */ SPA_PARAM_PORT_CONFIG_MODE_passthrough, /**< passthrough configuration */ diff --git a/spa/include/spa/param/profile-types.h b/spa/include/spa/param/profile-types.h index 3373d64c5..9edc9fc30 100644 --- a/spa/include/spa/param/profile-types.h +++ b/spa/include/spa/param/profile-types.h @@ -5,6 +5,10 @@ #ifndef SPA_PARAM_PROFILE_TYPES_H #define SPA_PARAM_PROFILE_TYPES_H +#include + +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include - -#include - #define SPA_TYPE_INFO_PARAM_Profile SPA_TYPE_INFO_PARAM_BASE "Profile" #define SPA_TYPE_INFO_PARAM_PROFILE_BASE SPA_TYPE_INFO_PARAM_Profile ":" diff --git a/spa/include/spa/param/profile.h b/spa/include/spa/param/profile.h index 00468f36d..11c195195 100644 --- a/spa/include/spa/param/profile.h +++ b/spa/include/spa/param/profile.h @@ -5,6 +5,8 @@ #ifndef SPA_PARAM_PROFILE_H #define SPA_PARAM_PROFILE_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - /** properties for SPA_TYPE_OBJECT_ParamProfile */ enum spa_param_profile { SPA_PARAM_PROFILE_START, diff --git a/spa/include/spa/param/profiler-types.h b/spa/include/spa/param/profiler-types.h index 57f3f3692..d378bae94 100644 --- a/spa/include/spa/param/profiler-types.h +++ b/spa/include/spa/param/profiler-types.h @@ -5,6 +5,9 @@ #ifndef SPA_PARAM_PROFILER_TYPES_H #define SPA_PARAM_PROFILER_TYPES_H +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,9 +17,6 @@ extern "C" { * \{ */ -#include -#include - #define SPA_TYPE_INFO_Profiler SPA_TYPE_INFO_OBJECT_BASE "Profiler" #define SPA_TYPE_INFO_PROFILER_BASE SPA_TYPE_INFO_Profiler ":" diff --git a/spa/include/spa/param/profiler.h b/spa/include/spa/param/profiler.h index 36af0fc24..eb3fbadc9 100644 --- a/spa/include/spa/param/profiler.h +++ b/spa/include/spa/param/profiler.h @@ -5,6 +5,8 @@ #ifndef SPA_PARAM_PROFILER_H #define SPA_PARAM_PROFILER_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - /** properties for SPA_TYPE_OBJECT_Profiler */ enum spa_profiler { SPA_PROFILER_START, diff --git a/spa/include/spa/param/props-types.h b/spa/include/spa/param/props-types.h index e66125992..4da520283 100644 --- a/spa/include/spa/param/props-types.h +++ b/spa/include/spa/param/props-types.h @@ -5,6 +5,10 @@ #ifndef SPA_PARAM_PROPS_TYPES_H #define SPA_PARAM_PROPS_TYPES_H +#include + +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include - -#include - /** Props Param */ #define SPA_TYPE_INFO_Props SPA_TYPE_INFO_PARAM_BASE "Props" #define SPA_TYPE_INFO_PROPS_BASE SPA_TYPE_INFO_Props ":" diff --git a/spa/include/spa/param/props.h b/spa/include/spa/param/props.h index a7a2e4c25..acc314ee1 100644 --- a/spa/include/spa/param/props.h +++ b/spa/include/spa/param/props.h @@ -5,6 +5,8 @@ #ifndef SPA_PARAM_PROPS_H #define SPA_PARAM_PROPS_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - /** properties of SPA_TYPE_OBJECT_PropInfo */ enum spa_prop_info { SPA_PROP_INFO_START, diff --git a/spa/include/spa/param/route-types.h b/spa/include/spa/param/route-types.h index 78ced495e..311491aaf 100644 --- a/spa/include/spa/param/route-types.h +++ b/spa/include/spa/param/route-types.h @@ -5,6 +5,11 @@ #ifndef SPA_PARAM_ROUTE_TYPES_H #define SPA_PARAM_ROUTE_TYPES_H +#include +#include + +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include - -#include - #define SPA_TYPE_INFO_PARAM_Route SPA_TYPE_INFO_PARAM_BASE "Route" #define SPA_TYPE_INFO_PARAM_ROUTE_BASE SPA_TYPE_INFO_PARAM_Route ":" diff --git a/spa/include/spa/param/route.h b/spa/include/spa/param/route.h index d73880c5a..b74267029 100644 --- a/spa/include/spa/param/route.h +++ b/spa/include/spa/param/route.h @@ -5,6 +5,8 @@ #ifndef SPA_PARAM_ROUTE_H #define SPA_PARAM_ROUTE_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - /** properties for SPA_TYPE_OBJECT_ParamRoute */ enum spa_param_route { SPA_PARAM_ROUTE_START, diff --git a/spa/include/spa/param/tag-types.h b/spa/include/spa/param/tag-types.h index 573fb4aff..0284684f2 100644 --- a/spa/include/spa/param/tag-types.h +++ b/spa/include/spa/param/tag-types.h @@ -5,6 +5,10 @@ #ifndef SPA_PARAM_TAG_TYPES_H #define SPA_PARAM_TAG_TYPES_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include -#include -#include - #define SPA_TYPE_INFO_PARAM_Tag SPA_TYPE_INFO_PARAM_BASE "Tag" #define SPA_TYPE_INFO_PARAM_TAG_BASE SPA_TYPE_INFO_PARAM_Tag ":" diff --git a/spa/include/spa/param/tag-utils.h b/spa/include/spa/param/tag-utils.h index ba8a952c1..590448ae0 100644 --- a/spa/include/spa/param/tag-utils.h +++ b/spa/include/spa/param/tag-utils.h @@ -5,6 +5,13 @@ #ifndef SPA_PARAM_TAG_UTILS_H #define SPA_PARAM_TAG_UTILS_H +#include + +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,13 +21,6 @@ extern "C" { * \{ */ -#include - -#include -#include -#include -#include - #ifndef SPA_API_TAG_UTILS #ifdef SPA_API_IMPL #define SPA_API_TAG_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/tag.h b/spa/include/spa/param/tag.h index 8e36ce5c3..5bfff552f 100644 --- a/spa/include/spa/param/tag.h +++ b/spa/include/spa/param/tag.h @@ -5,6 +5,8 @@ #ifndef SPA_PARAM_TAG_H #define SPA_PARAM_TAG_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - /** properties for SPA_TYPE_OBJECT_ParamTag */ enum spa_param_tag { SPA_PARAM_TAG_START, diff --git a/spa/include/spa/param/video/dsp-utils.h b/spa/include/spa/param/video/dsp-utils.h index 6e76309b3..338b21608 100644 --- a/spa/include/spa/param/video/dsp-utils.h +++ b/spa/include/spa/param/video/dsp-utils.h @@ -5,6 +5,10 @@ #ifndef SPA_VIDEO_DSP_UTILS_H #define SPA_VIDEO_DSP_UTILS_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include -#include -#include - #ifndef SPA_API_VIDEO_DSP_UTILS #ifdef SPA_API_IMPL #define SPA_API_VIDEO_DSP_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/video/format-utils.h b/spa/include/spa/param/video/format-utils.h index 43bbb22c8..f7d3864e5 100644 --- a/spa/include/spa/param/video/format-utils.h +++ b/spa/include/spa/param/video/format-utils.h @@ -5,10 +5,6 @@ #ifndef SPA_PARAM_VIDEO_FORMAT_UTILS_H #define SPA_PARAM_VIDEO_FORMAT_UTILS_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -17,6 +13,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_VIDEO_FORMAT_UTILS #ifdef SPA_API_IMPL #define SPA_API_VIDEO_FORMAT_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/video/format.h b/spa/include/spa/param/video/format.h index 7fa992c96..d49196b31 100644 --- a/spa/include/spa/param/video/format.h +++ b/spa/include/spa/param/video/format.h @@ -5,6 +5,11 @@ #ifndef SPA_PARAM_VIDEO_FORMAT_H #define SPA_PARAM_VIDEO_FORMAT_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - struct spa_video_info { uint32_t media_type; uint32_t media_subtype; diff --git a/spa/include/spa/param/video/h264-utils.h b/spa/include/spa/param/video/h264-utils.h index fa6933291..966315d1a 100644 --- a/spa/include/spa/param/video/h264-utils.h +++ b/spa/include/spa/param/video/h264-utils.h @@ -5,6 +5,10 @@ #ifndef SPA_VIDEO_H264_UTILS_H #define SPA_VIDEO_H264_UTILS_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include -#include -#include - #ifndef SPA_API_VIDEO_H264_UTILS #ifdef SPA_API_IMPL #define SPA_API_VIDEO_H264_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/video/h264.h b/spa/include/spa/param/video/h264.h index 33ddffc4e..3a1d62306 100644 --- a/spa/include/spa/param/video/h264.h +++ b/spa/include/spa/param/video/h264.h @@ -5,6 +5,8 @@ #ifndef SPA_VIDEO_H264_H #define SPA_VIDEO_H264_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - enum spa_h264_stream_format { SPA_H264_STREAM_FORMAT_UNKNOWN = 0, SPA_H264_STREAM_FORMAT_AVC, diff --git a/spa/include/spa/param/video/mjpg-utils.h b/spa/include/spa/param/video/mjpg-utils.h index f1aa27af5..3b15d3d68 100644 --- a/spa/include/spa/param/video/mjpg-utils.h +++ b/spa/include/spa/param/video/mjpg-utils.h @@ -5,6 +5,10 @@ #ifndef SPA_VIDEO_MJPG_UTILS_H #define SPA_VIDEO_MJPG_UTILS_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include -#include -#include - #ifndef SPA_API_VIDEO_MJPG_UTILS #ifdef SPA_API_IMPL #define SPA_API_VIDEO_MJPG_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/video/mjpg.h b/spa/include/spa/param/video/mjpg.h index fb85daade..eedd93f5e 100644 --- a/spa/include/spa/param/video/mjpg.h +++ b/spa/include/spa/param/video/mjpg.h @@ -5,6 +5,8 @@ #ifndef SPA_VIDEO_MJPG_H #define SPA_VIDEO_MJPG_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,8 +16,6 @@ extern "C" { * \{ */ -#include - struct spa_video_info_mjpg { struct spa_rectangle size; struct spa_fraction framerate; diff --git a/spa/include/spa/param/video/raw-types.h b/spa/include/spa/param/video/raw-types.h index bca0c8d4e..2b19d73a8 100644 --- a/spa/include/spa/param/video/raw-types.h +++ b/spa/include/spa/param/video/raw-types.h @@ -5,6 +5,9 @@ #ifndef SPA_VIDEO_RAW_TYPES_H #define SPA_VIDEO_RAW_TYPES_H +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -13,8 +16,6 @@ extern "C" { * \addtogroup spa_param * \{ */ -#include -#include #ifndef SPA_API_VIDEO_RAW_TYPES #ifdef SPA_API_IMPL diff --git a/spa/include/spa/param/video/raw-utils.h b/spa/include/spa/param/video/raw-utils.h index 8a5a27784..1e462036a 100644 --- a/spa/include/spa/param/video/raw-utils.h +++ b/spa/include/spa/param/video/raw-utils.h @@ -5,6 +5,10 @@ #ifndef SPA_VIDEO_RAW_UTILS_H #define SPA_VIDEO_RAW_UTILS_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,10 +18,6 @@ extern "C" { * \{ */ -#include -#include -#include - #ifndef SPA_API_VIDEO_RAW_UTILS #ifdef SPA_API_IMPL #define SPA_API_VIDEO_RAW_UTILS SPA_API_IMPL diff --git a/spa/include/spa/param/video/raw.h b/spa/include/spa/param/video/raw.h index 84f78ad6a..971aac5ba 100644 --- a/spa/include/spa/param/video/raw.h +++ b/spa/include/spa/param/video/raw.h @@ -5,6 +5,11 @@ #ifndef SPA_VIDEO_RAW_H #define SPA_VIDEO_RAW_H +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,11 +19,6 @@ extern "C" { * \{ */ -#include -#include -#include -#include - #define SPA_VIDEO_MAX_PLANES 4 #define SPA_VIDEO_MAX_COMPONENTS 4 diff --git a/spa/include/spa/pod/builder.h b/spa/include/spa/pod/builder.h index 8bd83b0ba..f4b68fd63 100644 --- a/spa/include/spa/pod/builder.h +++ b/spa/include/spa/pod/builder.h @@ -5,6 +5,12 @@ #ifndef SPA_POD_BUILDER_H #define SPA_POD_BUILDER_H +#include + +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif @@ -18,12 +24,6 @@ extern "C" { * \{ */ -#include - -#include -#include -#include - #ifndef SPA_API_POD_BUILDER #ifdef SPA_API_IMPL #define SPA_API_POD_BUILDER SPA_API_IMPL diff --git a/spa/include/spa/pod/command.h b/spa/include/spa/pod/command.h index 330f56edc..5afcca8b8 100644 --- a/spa/include/spa/pod/command.h +++ b/spa/include/spa/pod/command.h @@ -5,13 +5,13 @@ #ifndef SPA_COMMAND_H #define SPA_COMMAND_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** * \addtogroup spa_pod * \{ diff --git a/spa/include/spa/pod/compare.h b/spa/include/spa/pod/compare.h index 05c061363..a9d0f2696 100644 --- a/spa/include/spa/pod/compare.h +++ b/spa/include/spa/pod/compare.h @@ -5,10 +5,6 @@ #ifndef SPA_POD_COMPARE_H #define SPA_POD_COMPARE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -20,6 +16,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_POD_COMPARE #ifdef SPA_API_IMPL #define SPA_API_POD_COMPARE SPA_API_IMPL diff --git a/spa/include/spa/pod/dynamic.h b/spa/include/spa/pod/dynamic.h index dad9c3d71..ac69381a9 100644 --- a/spa/include/spa/pod/dynamic.h +++ b/spa/include/spa/pod/dynamic.h @@ -5,13 +5,13 @@ #ifndef SPA_POD_DYNAMIC_H #define SPA_POD_DYNAMIC_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - #ifndef SPA_API_POD_DYNAMIC #ifdef SPA_API_IMPL #define SPA_API_POD_DYNAMIC SPA_API_IMPL diff --git a/spa/include/spa/pod/event.h b/spa/include/spa/pod/event.h index c631bd392..00e66f194 100644 --- a/spa/include/spa/pod/event.h +++ b/spa/include/spa/pod/event.h @@ -5,12 +5,12 @@ #ifndef SPA_EVENT_H #define SPA_EVENT_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_pod * \{ diff --git a/spa/include/spa/pod/filter.h b/spa/include/spa/pod/filter.h index 3a2e4868f..5f94683fd 100644 --- a/spa/include/spa/pod/filter.h +++ b/spa/include/spa/pod/filter.h @@ -5,10 +5,6 @@ #ifndef SPA_POD_FILTER_H #define SPA_POD_FILTER_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -21,6 +17,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_POD_FILTER #ifdef SPA_API_IMPL #define SPA_API_POD_FILTER SPA_API_IMPL diff --git a/spa/include/spa/pod/iter.h b/spa/include/spa/pod/iter.h index 3c6b9e8af..19ed9823a 100644 --- a/spa/include/spa/pod/iter.h +++ b/spa/include/spa/pod/iter.h @@ -5,15 +5,15 @@ #ifndef SPA_POD_ITER_H #define SPA_POD_ITER_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_POD_ITER #ifdef SPA_API_IMPL #define SPA_API_POD_ITER SPA_API_IMPL diff --git a/spa/include/spa/pod/parser.h b/spa/include/spa/pod/parser.h index d2aa206ba..922992e92 100644 --- a/spa/include/spa/pod/parser.h +++ b/spa/include/spa/pod/parser.h @@ -5,16 +5,16 @@ #ifndef SPA_POD_PARSER_H #define SPA_POD_PARSER_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_POD_PARSER #ifdef SPA_API_IMPL #define SPA_API_POD_PARSER SPA_API_IMPL diff --git a/spa/include/spa/pod/pod.h b/spa/include/spa/pod/pod.h index 3703b4b06..398236e79 100644 --- a/spa/include/spa/pod/pod.h +++ b/spa/include/spa/pod/pod.h @@ -5,13 +5,13 @@ #ifndef SPA_POD_H #define SPA_POD_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** * \addtogroup spa_pod * \{ diff --git a/spa/include/spa/pod/vararg.h b/spa/include/spa/pod/vararg.h index a30e11479..df2efb51f 100644 --- a/spa/include/spa/pod/vararg.h +++ b/spa/include/spa/pod/vararg.h @@ -5,14 +5,14 @@ #ifndef SPA_POD_VARARG_H #define SPA_POD_VARARG_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** * \addtogroup spa_pod * \{ diff --git a/spa/include/spa/support/cpu.h b/spa/include/spa/support/cpu.h index ce8551e74..c69338855 100644 --- a/spa/include/spa/support/cpu.h +++ b/spa/include/spa/support/cpu.h @@ -5,16 +5,16 @@ #ifndef SPA_CPU_H #define SPA_CPU_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_CPU #ifdef SPA_API_IMPL #define SPA_API_CPU SPA_API_IMPL diff --git a/spa/include/spa/support/dbus.h b/spa/include/spa/support/dbus.h index 3908bfe53..d781bc1ba 100644 --- a/spa/include/spa/support/dbus.h +++ b/spa/include/spa/support/dbus.h @@ -5,12 +5,12 @@ #ifndef SPA_DBUS_H #define SPA_DBUS_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - #ifndef SPA_API_DBUS #ifdef SPA_API_IMPL #define SPA_API_DBUS SPA_API_IMPL diff --git a/spa/include/spa/support/i18n.h b/spa/include/spa/support/i18n.h index 3b258873f..859838e14 100644 --- a/spa/include/spa/support/i18n.h +++ b/spa/include/spa/support/i18n.h @@ -5,13 +5,13 @@ #ifndef SPA_I18N_H #define SPA_I18N_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - #ifndef SPA_API_I18N #ifdef SPA_API_IMPL #define SPA_API_I18N SPA_API_IMPL diff --git a/spa/include/spa/support/log-impl.h b/spa/include/spa/support/log-impl.h index 8132d05bf..c1ce51b82 100644 --- a/spa/include/spa/support/log-impl.h +++ b/spa/include/spa/support/log-impl.h @@ -5,15 +5,15 @@ #ifndef SPA_LOG_IMPL_H #define SPA_LOG_IMPL_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** * \addtogroup spa_log * \{ diff --git a/spa/include/spa/support/log.h b/spa/include/spa/support/log.h index e14414403..a1917886e 100644 --- a/spa/include/spa/support/log.h +++ b/spa/include/spa/support/log.h @@ -5,16 +5,16 @@ #ifndef SPA_LOG_H #define SPA_LOG_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_LOG #ifdef SPA_API_IMPL #define SPA_API_LOG SPA_API_IMPL diff --git a/spa/include/spa/support/loop.h b/spa/include/spa/support/loop.h index 97813bb14..c6c6df9f7 100644 --- a/spa/include/spa/support/loop.h +++ b/spa/include/spa/support/loop.h @@ -5,16 +5,16 @@ #ifndef SPA_LOOP_H #define SPA_LOOP_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_LOOP #ifdef SPA_API_IMPL #define SPA_API_LOOP SPA_API_IMPL diff --git a/spa/include/spa/support/plugin-loader.h b/spa/include/spa/support/plugin-loader.h index 9540853cd..0b059ec51 100644 --- a/spa/include/spa/support/plugin-loader.h +++ b/spa/include/spa/support/plugin-loader.h @@ -5,13 +5,13 @@ #ifndef SPA_PLUGIN_LOADER_H #define SPA_PLUGIN_LOADER_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - #ifndef SPA_API_PLUGIN_LOADER #ifdef SPA_API_IMPL #define SPA_API_PLUGIN_LOADER SPA_API_IMPL diff --git a/spa/include/spa/support/plugin.h b/spa/include/spa/support/plugin.h index 576c19509..68299fe5b 100644 --- a/spa/include/spa/support/plugin.h +++ b/spa/include/spa/support/plugin.h @@ -5,16 +5,16 @@ #ifndef SPA_PLUGIN_H #define SPA_PLUGIN_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_PLUGIN #ifdef SPA_API_IMPL #define SPA_API_PLUGIN SPA_API_IMPL diff --git a/spa/include/spa/support/system.h b/spa/include/spa/support/system.h index aa140c958..07a31a55f 100644 --- a/spa/include/spa/support/system.h +++ b/spa/include/spa/support/system.h @@ -5,12 +5,6 @@ #ifndef SPA_SYSTEM_H #define SPA_SYSTEM_H -#ifdef __cplusplus -extern "C" { -#endif - -struct itimerspec; - #include #include #include @@ -18,6 +12,12 @@ struct itimerspec; #include #include +#ifdef __cplusplus +extern "C" { +#endif + +struct itimerspec; + #ifndef SPA_API_SYSTEM #ifdef SPA_API_IMPL #define SPA_API_SYSTEM SPA_API_IMPL diff --git a/spa/include/spa/support/thread.h b/spa/include/spa/support/thread.h index b69cb688c..bb523ce5c 100644 --- a/spa/include/spa/support/thread.h +++ b/spa/include/spa/support/thread.h @@ -5,10 +5,6 @@ #ifndef SPA_THREAD_H #define SPA_THREAD_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -16,6 +12,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_THREAD #ifdef SPA_API_IMPL #define SPA_API_THREAD SPA_API_IMPL diff --git a/spa/include/spa/utils/defs.h b/spa/include/spa/utils/defs.h index 1c1a73abf..55bf9ad97 100644 --- a/spa/include/spa/utils/defs.h +++ b/spa/include/spa/utils/defs.h @@ -5,6 +5,13 @@ #ifndef SPA_UTILS_DEFS_H #define SPA_UTILS_DEFS_H +#include +#include +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { # if __cplusplus >= 201103L @@ -34,13 +41,6 @@ extern "C" { #define SPA_CONCAT_NOEXPAND(a, b) a ## b #define SPA_CONCAT(a, b) SPA_CONCAT_NOEXPAND(a, b) -#include -#include -#include -#include -#include -#include - /** * \defgroup spa_utils_defs Miscellaneous * Helper macros and functions diff --git a/spa/include/spa/utils/dict.h b/spa/include/spa/utils/dict.h index c88a833f4..979605d54 100644 --- a/spa/include/spa/utils/dict.h +++ b/spa/include/spa/utils/dict.h @@ -5,14 +5,14 @@ #ifndef SPA_DICT_H #define SPA_DICT_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_DICT #ifdef SPA_API_IMPL #define SPA_API_DICT SPA_API_IMPL diff --git a/spa/include/spa/utils/dll.h b/spa/include/spa/utils/dll.h index 7b8fd207e..824750f5d 100644 --- a/spa/include/spa/utils/dll.h +++ b/spa/include/spa/utils/dll.h @@ -5,15 +5,15 @@ #ifndef SPA_DLL_H #define SPA_DLL_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_DLL #ifdef SPA_API_IMPL #define SPA_API_DLL SPA_API_IMPL diff --git a/spa/include/spa/utils/enum-types.h b/spa/include/spa/utils/enum-types.h index 881ffd8b3..aebde1845 100644 --- a/spa/include/spa/utils/enum-types.h +++ b/spa/include/spa/utils/enum-types.h @@ -5,13 +5,13 @@ #ifndef SPA_ENUM_TYPES_H #define SPA_ENUM_TYPES_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** * \addtogroup spa_types * \{ diff --git a/spa/include/spa/utils/hook.h b/spa/include/spa/utils/hook.h index dbbb01976..d0ae744c8 100644 --- a/spa/include/spa/utils/hook.h +++ b/spa/include/spa/utils/hook.h @@ -5,13 +5,13 @@ #ifndef SPA_HOOK_H #define SPA_HOOK_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - #ifndef SPA_API_HOOK #ifdef SPA_API_IMPL #define SPA_API_HOOK SPA_API_IMPL diff --git a/spa/include/spa/utils/json-core.h b/spa/include/spa/utils/json-core.h index 10c87e68c..800763571 100644 --- a/spa/include/spa/utils/json-core.h +++ b/spa/include/spa/utils/json-core.h @@ -5,11 +5,6 @@ #ifndef SPA_UTILS_JSON_H #define SPA_UTILS_JSON_H -#ifdef __cplusplus -extern "C" { -#else -#include -#endif #include #include #include @@ -20,6 +15,12 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#else +#include +#endif + #ifndef SPA_API_JSON #ifdef SPA_API_IMPL #define SPA_API_JSON SPA_API_IMPL diff --git a/spa/include/spa/utils/json-pod.h b/spa/include/spa/utils/json-pod.h index 22f2b2817..6dfc6241f 100644 --- a/spa/include/spa/utils/json-pod.h +++ b/spa/include/spa/utils/json-pod.h @@ -5,16 +5,16 @@ #ifndef SPA_UTILS_JSON_POD_H #define SPA_UTILS_JSON_POD_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_JSON_POD #ifdef SPA_API_IMPL #define SPA_API_JSON_POD SPA_API_IMPL diff --git a/spa/include/spa/utils/json.h b/spa/include/spa/utils/json.h index a36554d1e..c8030345e 100644 --- a/spa/include/spa/utils/json.h +++ b/spa/include/spa/utils/json.h @@ -5,11 +5,6 @@ #ifndef SPA_UTILS_JSON_UTILS_H #define SPA_UTILS_JSON_UTILS_H -#ifdef __cplusplus -extern "C" { -#else -#include -#endif #include #include #include @@ -19,6 +14,12 @@ extern "C" { #include +#ifdef __cplusplus +extern "C" { +#else +#include +#endif + #ifndef SPA_API_JSON_UTILS #ifdef SPA_API_IMPL #define SPA_API_JSON_UTILS SPA_API_IMPL diff --git a/spa/include/spa/utils/list.h b/spa/include/spa/utils/list.h index 60c89f23b..05abc9518 100644 --- a/spa/include/spa/utils/list.h +++ b/spa/include/spa/utils/list.h @@ -5,12 +5,12 @@ #ifndef SPA_LIST_H #define SPA_LIST_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - #ifndef SPA_API_LIST #ifdef SPA_API_IMPL #define SPA_API_LIST SPA_API_IMPL diff --git a/spa/include/spa/utils/ratelimit.h b/spa/include/spa/utils/ratelimit.h index 2af2c26be..9dcd40405 100644 --- a/spa/include/spa/utils/ratelimit.h +++ b/spa/include/spa/utils/ratelimit.h @@ -5,15 +5,15 @@ #ifndef SPA_RATELIMIT_H #define SPA_RATELIMIT_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_RATELIMIT #ifdef SPA_API_IMPL #define SPA_API_RATELIMIT SPA_API_IMPL diff --git a/spa/include/spa/utils/result.h b/spa/include/spa/utils/result.h index 312a6bb0c..49f777e82 100644 --- a/spa/include/spa/utils/result.h +++ b/spa/include/spa/utils/result.h @@ -5,6 +5,10 @@ #ifndef SPA_UTILS_RESULT_H #define SPA_UTILS_RESULT_H +#include + +#include + #ifdef __cplusplus extern "C" { #endif @@ -19,10 +23,6 @@ extern "C" { * \{ */ -#include - -#include - #ifndef SPA_API_RESULT #ifdef SPA_API_IMPL #define SPA_API_RESULT SPA_API_IMPL diff --git a/spa/include/spa/utils/ringbuffer.h b/spa/include/spa/utils/ringbuffer.h index e8c5d6250..59bdd175f 100644 --- a/spa/include/spa/utils/ringbuffer.h +++ b/spa/include/spa/utils/ringbuffer.h @@ -5,6 +5,8 @@ #ifndef SPA_RINGBUFFER_H #define SPA_RINGBUFFER_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -21,8 +23,6 @@ extern "C" { struct spa_ringbuffer; -#include - #include #ifndef SPA_API_RINGBUFFER diff --git a/spa/include/spa/utils/string.h b/spa/include/spa/utils/string.h index 060ef7d62..4b6ad8bfd 100644 --- a/spa/include/spa/utils/string.h +++ b/spa/include/spa/utils/string.h @@ -5,10 +5,6 @@ #ifndef SPA_UTILS_STRING_H #define SPA_UTILS_STRING_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -17,6 +13,10 @@ extern "C" { #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SPA_API_STRING #ifdef SPA_API_IMPL #define SPA_API_STRING SPA_API_IMPL diff --git a/spa/include/spa/utils/type-info.h b/spa/include/spa/utils/type-info.h index 9ee2f3abc..a099b9f0d 100644 --- a/spa/include/spa/utils/type-info.h +++ b/spa/include/spa/utils/type-info.h @@ -5,12 +5,19 @@ #ifndef SPA_TYPE_INFO_H #define SPA_TYPE_INFO_H +#include +#include +#include + +#include +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * \addtogroup spa_types * \{ @@ -20,15 +27,6 @@ extern "C" { #define SPA_TYPE_ROOT spa_types #endif - -#include -#include - -#include -#include -#include -#include - static const struct spa_type_info spa_types[] = { /* Basic types */ { SPA_TYPE_START, SPA_TYPE_START, SPA_TYPE_INFO_BASE, NULL }, diff --git a/spa/include/spa/utils/type.h b/spa/include/spa/utils/type.h index 88de2c624..758a9bd58 100644 --- a/spa/include/spa/utils/type.h +++ b/spa/include/spa/utils/type.h @@ -5,13 +5,13 @@ #ifndef SPA_TYPE_H #define SPA_TYPE_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - #ifndef SPA_API_TYPE #ifdef SPA_API_IMPL #define SPA_API_TYPE SPA_API_IMPL diff --git a/spa/plugins/alsa/acp/acp.h b/spa/plugins/alsa/acp/acp.h index 01ad11806..ff5f360d7 100644 --- a/spa/plugins/alsa/acp/acp.h +++ b/spa/plugins/alsa/acp/acp.h @@ -5,18 +5,18 @@ #ifndef ACP_H #define ACP_H -#ifdef __cplusplus -extern "C" { -#else -#include -#endif - #include #include #include #include #include +#ifdef __cplusplus +extern "C" { +#else +#include +#endif + #ifdef __GNUC__ #define ACP_PRINTF_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1))) #else diff --git a/spa/plugins/alsa/acp/array.h b/spa/plugins/alsa/acp/array.h index 84e9f65eb..dfb344025 100644 --- a/spa/plugins/alsa/acp/array.h +++ b/spa/plugins/alsa/acp/array.h @@ -5,13 +5,13 @@ #ifndef PA_ARRAY_H #define PA_ARRAY_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - typedef struct pa_array { void *data; /**< pointer to array data */ size_t size; /**< length of array in bytes */ diff --git a/spa/plugins/alsa/acp/card.h b/spa/plugins/alsa/acp/card.h index c1126fe23..814e3c6ef 100644 --- a/spa/plugins/alsa/acp/card.h +++ b/spa/plugins/alsa/acp/card.h @@ -22,14 +22,14 @@ #ifndef PULSE_CARD_H #define PULSE_CARD_H +#include "compat.h" + #ifdef __cplusplus extern "C" { #else #include #endif -#include "compat.h" - typedef struct pa_card pa_card; struct pa_card { diff --git a/spa/plugins/alsa/acp/channelmap.h b/spa/plugins/alsa/acp/channelmap.h index adb486809..2d4b54444 100644 --- a/spa/plugins/alsa/acp/channelmap.h +++ b/spa/plugins/alsa/acp/channelmap.h @@ -21,12 +21,12 @@ #ifndef PULSE_CHANNELMAP_H #define PULSE_CHANNELMAP_H +#include "spa/utils/defs.h" + #ifdef __cplusplus extern "C" { #endif -#include "spa/utils/defs.h" - #define PA_CHANNELS_MAX 64 #define PA_CHANNEL_MAP_SNPRINT_MAX (PA_CHANNELS_MAX * 32) diff --git a/spa/plugins/alsa/acp/compat.h b/spa/plugins/alsa/acp/compat.h index 7660e1c27..c7779759f 100644 --- a/spa/plugins/alsa/acp/compat.h +++ b/spa/plugins/alsa/acp/compat.h @@ -22,12 +22,6 @@ #ifndef PULSE_COMPAT_H #define PULSE_COMPAT_H -#ifdef __cplusplus -extern "C" { -#else -#include -#endif - #include #include #include @@ -39,6 +33,12 @@ extern "C" { #include +#ifdef __cplusplus +extern "C" { +#else +#include +#endif + typedef struct pa_core pa_core; typedef void *(*pa_copy_func_t)(const void *p); diff --git a/spa/plugins/alsa/acp/device-port.h b/spa/plugins/alsa/acp/device-port.h index d6bdc2297..d0224b4e0 100644 --- a/spa/plugins/alsa/acp/device-port.h +++ b/spa/plugins/alsa/acp/device-port.h @@ -22,14 +22,14 @@ #ifndef PULSE_DEVICE_PORT_H #define PULSE_DEVICE_PORT_H +#include "compat.h" + #ifdef __cplusplus extern "C" { #else #include #endif -#include "compat.h" - typedef struct pa_card pa_card; typedef struct pa_device_port pa_device_port; diff --git a/spa/plugins/alsa/acp/dynarray.h b/spa/plugins/alsa/acp/dynarray.h index eb7961847..87904d165 100644 --- a/spa/plugins/alsa/acp/dynarray.h +++ b/spa/plugins/alsa/acp/dynarray.h @@ -5,12 +5,12 @@ #ifndef PA_DYNARRAY_H #define PA_DYNARRAY_H +#include "compat.h" + #ifdef __cplusplus extern "C" { #endif -#include "array.h" - typedef struct pa_dynarray_item { void *ptr; } pa_dynarray_item; diff --git a/spa/plugins/alsa/acp/hashmap.h b/spa/plugins/alsa/acp/hashmap.h index 02a4950e0..e2c3ddd3b 100644 --- a/spa/plugins/alsa/acp/hashmap.h +++ b/spa/plugins/alsa/acp/hashmap.h @@ -5,12 +5,12 @@ #ifndef PA_HASHMAP_H #define PA_HASHMAP_H +#include "array.h" + #ifdef __cplusplus extern "C" { #endif -#include "array.h" - typedef unsigned (*pa_hash_func_t)(const void *p); typedef int (*pa_compare_func_t)(const void *a, const void *b); diff --git a/spa/plugins/alsa/acp/idxset.h b/spa/plugins/alsa/acp/idxset.h index 2638133da..598017eb6 100644 --- a/spa/plugins/alsa/acp/idxset.h +++ b/spa/plugins/alsa/acp/idxset.h @@ -5,12 +5,12 @@ #ifndef PA_IDXSET_H #define PA_IDXSET_H +#include "array.h" + #ifdef __cplusplus extern "C" { #endif -#include "array.h" - #define PA_IDXSET_INVALID ((uint32_t) -1) typedef unsigned (*pa_hash_func_t)(const void *p); diff --git a/spa/plugins/alsa/acp/proplist.h b/spa/plugins/alsa/acp/proplist.h index a647f520a..23d03d0b1 100644 --- a/spa/plugins/alsa/acp/proplist.h +++ b/spa/plugins/alsa/acp/proplist.h @@ -5,15 +5,15 @@ #ifndef PA_PROPLIST_H #define PA_PROPLIST_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include "array.h" #include "acp.h" +#ifdef __cplusplus +extern "C" { +#endif + #define PA_PROP_DEVICE_DESCRIPTION "device.description" #define PA_PROP_DEVICE_CLASS "device.class" diff --git a/spa/plugins/alsa/acp/volume.h b/spa/plugins/alsa/acp/volume.h index de786b7c2..5b5585953 100644 --- a/spa/plugins/alsa/acp/volume.h +++ b/spa/plugins/alsa/acp/volume.h @@ -21,12 +21,12 @@ #ifndef PA_VOLUME_H #define PA_VOLUME_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - typedef uint32_t pa_volume_t; #define PA_VOLUME_MUTED ((pa_volume_t) 0U) diff --git a/spa/plugins/alsa/alsa-pcm.h b/spa/plugins/alsa/alsa-pcm.h index bd77abc2e..cc0b107e4 100644 --- a/spa/plugins/alsa/alsa-pcm.h +++ b/spa/plugins/alsa/alsa-pcm.h @@ -5,10 +5,6 @@ #ifndef SPA_ALSA_UTILS_H #define SPA_ALSA_UTILS_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -35,6 +31,9 @@ extern "C" { #include "alsa.h" +#ifdef __cplusplus +extern "C" { +#endif #define MAX_RATES 16 diff --git a/spa/plugins/alsa/alsa-seq.h b/spa/plugins/alsa/alsa-seq.h index 274311c70..3475de834 100644 --- a/spa/plugins/alsa/alsa-seq.h +++ b/spa/plugins/alsa/alsa-seq.h @@ -5,10 +5,6 @@ #ifndef SPA_ALSA_SEQ_H #define SPA_ALSA_SEQ_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -33,6 +29,9 @@ extern "C" { #include "alsa.h" +#ifdef __cplusplus +extern "C" { +#endif struct props { char device[64]; diff --git a/spa/plugins/audioconvert/hilbert.h b/spa/plugins/audioconvert/hilbert.h index aa00940ba..2a794592c 100644 --- a/spa/plugins/audioconvert/hilbert.h +++ b/spa/plugins/audioconvert/hilbert.h @@ -5,14 +5,13 @@ #ifndef HILBERT_H #define HILBERT_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif static inline void blackman_window(float *taps, int n_taps) { diff --git a/spa/plugins/avb/avb-pcm.h b/spa/plugins/avb/avb-pcm.h index d4dfa03fb..7e026741d 100644 --- a/spa/plugins/avb/avb-pcm.h +++ b/spa/plugins/avb/avb-pcm.h @@ -5,10 +5,6 @@ #ifndef SPA_AVB_PCM_H #define SPA_AVB_PCM_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -37,6 +33,10 @@ extern "C" { #include "avb.h" +#ifdef __cplusplus +extern "C" { +#endif + #define MAX_RATES 16 #define DEFAULT_IFNAME "eth0" diff --git a/spa/plugins/bluez5/defs.h b/spa/plugins/bluez5/defs.h index 148b00bbf..7b7922b15 100644 --- a/spa/plugins/bluez5/defs.h +++ b/spa/plugins/bluez5/defs.h @@ -5,10 +5,6 @@ #ifndef SPA_BLUEZ5_DEFS_H #define SPA_BLUEZ5_DEFS_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -23,6 +19,10 @@ extern "C" { #include "config.h" +#ifdef __cplusplus +extern "C" { +#endif + #define BLUEZ_SERVICE "org.bluez" #define BLUEZ_PROFILE_MANAGER_INTERFACE BLUEZ_SERVICE ".ProfileManager1" #define BLUEZ_PROFILE_INTERFACE BLUEZ_SERVICE ".Profile1" diff --git a/spa/plugins/jack/jack-client.h b/spa/plugins/jack/jack-client.h index decd9aea4..8ae37f93c 100644 --- a/spa/plugins/jack/jack-client.h +++ b/spa/plugins/jack/jack-client.h @@ -5,16 +5,16 @@ #ifndef SPA_JACK_CLIENT_H #define SPA_JACK_CLIENT_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + struct spa_jack_client_events { #define SPA_VERSION_JACK_CLIENT_EVENTS 0 uint32_t version; diff --git a/src/modules/module-avb/internal.h b/src/modules/module-avb/internal.h index d1e72c8cb..4a108a486 100644 --- a/src/modules/module-avb/internal.h +++ b/src/modules/module-avb/internal.h @@ -5,12 +5,12 @@ #ifndef AVB_INTERNAL_H #define AVB_INTERNAL_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - struct server; struct avb_mrp; diff --git a/src/modules/module-client-node/v0/ext-client-node.h b/src/modules/module-client-node/v0/ext-client-node.h index bd2f69bd6..ccc57e204 100644 --- a/src/modules/module-client-node/v0/ext-client-node.h +++ b/src/modules/module-client-node/v0/ext-client-node.h @@ -5,16 +5,16 @@ #ifndef __PIPEWIRE_EXT_CLIENT_NODE0_H__ #define __PIPEWIRE_EXT_CLIENT_NODE0_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #define PW_TYPE_INTERFACE_ClientNode PW_TYPE_INFO_INTERFACE_BASE "ClientNode" #define PW_VERSION_CLIENT_NODE0 0 diff --git a/src/modules/module-client-node/v0/transport.h b/src/modules/module-client-node/v0/transport.h index 46072a2e8..22b9a3036 100644 --- a/src/modules/module-client-node/v0/transport.h +++ b/src/modules/module-client-node/v0/transport.h @@ -5,16 +5,16 @@ #ifndef __PIPEWIRE_CLIENT_NODE0_TRANSPORT_H__ #define __PIPEWIRE_CLIENT_NODE0_TRANSPORT_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** information about the transport region \memberof pw_client_node */ struct pw_client_node0_transport_info { int memfd; /**< the memfd of the transport area */ diff --git a/src/modules/module-jack-tunnel/weakjack.h b/src/modules/module-jack-tunnel/weakjack.h index 1b057b0ba..6d5b5503e 100644 --- a/src/modules/module-jack-tunnel/weakjack.h +++ b/src/modules/module-jack-tunnel/weakjack.h @@ -5,10 +5,6 @@ #ifndef PIPEWIRE_WEAK_JACK_H #define PIPEWIRE_WEAK_JACK_H -#ifdef __cplusplus -extern "C" { -#endif - #include "config.h" #include @@ -17,6 +13,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + struct weakjack { jack_nframes_t (*cycle_wait) (jack_client_t* client); void (*cycle_signal) (jack_client_t* client, int status); diff --git a/src/modules/module-protocol-native/connection.h b/src/modules/module-protocol-native/connection.h index 56276fbac..0d3b4fba2 100644 --- a/src/modules/module-protocol-native/connection.h +++ b/src/modules/module-protocol-native/connection.h @@ -5,15 +5,15 @@ #ifndef PIPEWIRE_PROTOCOL_NATIVE_CONNECTION_H #define PIPEWIRE_PROTOCOL_NATIVE_CONNECTION_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + struct pw_protocol_native_connection_events { #define PW_VERSION_PROTOCOL_NATIVE_CONNECTION_EVENTS 0 uint32_t version; diff --git a/src/modules/module-protocol-native/v0/interfaces.h b/src/modules/module-protocol-native/v0/interfaces.h index 1951e69a9..09d0acfc7 100644 --- a/src/modules/module-protocol-native/v0/interfaces.h +++ b/src/modules/module-protocol-native/v0/interfaces.h @@ -5,16 +5,16 @@ #ifndef PIPEWIRE_INTERFACES_V0_H #define PIPEWIRE_INTERFACES_V0_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** Core */ #define PW_VERSION_CORE_V0 0 diff --git a/src/modules/module-protocol-pulse/manager.h b/src/modules/module-protocol-pulse/manager.h index 5e831b39b..6dc15b305 100644 --- a/src/modules/module-protocol-pulse/manager.h +++ b/src/modules/module-protocol-pulse/manager.h @@ -5,10 +5,6 @@ #ifndef PIPEWIRE_MANAGER_H #define PIPEWIRE_MANAGER_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -16,6 +12,10 @@ extern "C" { #include +#ifdef __cplusplus +extern "C" { +#endif + struct client; struct pw_manager_object; diff --git a/src/modules/module-protocol-pulse/pulse-server.h b/src/modules/module-protocol-pulse/pulse-server.h index df3e40848..dfcfd15f1 100644 --- a/src/modules/module-protocol-pulse/pulse-server.h +++ b/src/modules/module-protocol-pulse/pulse-server.h @@ -5,13 +5,13 @@ #ifndef PIPEWIRE_PROTOCOL_PULSE_H #define PIPEWIRE_PROTOCOL_PULSE_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - #define PW_PROTOCOL_PULSE_DEFAULT_PORT 4713 #define PW_PROTOCOL_PULSE_DEFAULT_SOCKET "native" diff --git a/src/modules/module-raop/rtsp-client.h b/src/modules/module-raop/rtsp-client.h index 1b832cbcc..bfb4a4fe2 100644 --- a/src/modules/module-raop/rtsp-client.h +++ b/src/modules/module-raop/rtsp-client.h @@ -5,14 +5,14 @@ #ifndef PIPEWIRE_RTSP_CLIENT_H #define PIPEWIRE_RTSP_CLIENT_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include +#ifdef __cplusplus +extern "C" { +#endif + struct pw_rtsp_client; struct pw_rtsp_client_events { diff --git a/src/pipewire/array.h b/src/pipewire/array.h index ca00e7b9b..4af60a961 100644 --- a/src/pipewire/array.h +++ b/src/pipewire/array.h @@ -5,14 +5,14 @@ #ifndef PIPEWIRE_ARRAY_H #define PIPEWIRE_ARRAY_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef PW_API_ARRAY #define PW_API_ARRAY static inline #endif diff --git a/src/pipewire/client.h b/src/pipewire/client.h index 7798e212d..7f9749bf0 100644 --- a/src/pipewire/client.h +++ b/src/pipewire/client.h @@ -5,10 +5,6 @@ #ifndef PIPEWIRE_CLIENT_H #define PIPEWIRE_CLIENT_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -16,6 +12,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_client Client * Client interface */ diff --git a/src/pipewire/context.h b/src/pipewire/context.h index 810127323..eef297b4f 100644 --- a/src/pipewire/context.h +++ b/src/pipewire/context.h @@ -5,13 +5,13 @@ #ifndef PIPEWIRE_CONTEXT_H #define PIPEWIRE_CONTEXT_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** \defgroup pw_context Context * * \brief The PipeWire context object manages all locally available diff --git a/src/pipewire/control.h b/src/pipewire/control.h index d5e73629b..daedcb8cf 100644 --- a/src/pipewire/control.h +++ b/src/pipewire/control.h @@ -5,12 +5,12 @@ #ifndef PIPEWIRE_CONTROL_H #define PIPEWIRE_CONTROL_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** \defgroup pw_control Control * * \brief A control can be used to control a port property. diff --git a/src/pipewire/core.h b/src/pipewire/core.h index be7beb416..cd4a5d551 100644 --- a/src/pipewire/core.h +++ b/src/pipewire/core.h @@ -5,10 +5,6 @@ #ifndef PIPEWIRE_CORE_H #define PIPEWIRE_CORE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -16,6 +12,10 @@ extern "C" { #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_core Core * * \brief The core global object. diff --git a/src/pipewire/data-loop.h b/src/pipewire/data-loop.h index 166d3e08d..5abf0e7f2 100644 --- a/src/pipewire/data-loop.h +++ b/src/pipewire/data-loop.h @@ -5,13 +5,13 @@ #ifndef PIPEWIRE_DATA_LOOP_H #define PIPEWIRE_DATA_LOOP_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** \defgroup pw_data_loop Data Loop * * \brief PipeWire rt-loop object diff --git a/src/pipewire/device.h b/src/pipewire/device.h index 9154daee0..bff40530f 100644 --- a/src/pipewire/device.h +++ b/src/pipewire/device.h @@ -5,15 +5,15 @@ #ifndef PIPEWIRE_DEVICE_H #define PIPEWIRE_DEVICE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_device Device * Device interface */ diff --git a/src/pipewire/extensions/client-node.h b/src/pipewire/extensions/client-node.h index 69f278e04..274441319 100644 --- a/src/pipewire/extensions/client-node.h +++ b/src/pipewire/extensions/client-node.h @@ -5,13 +5,13 @@ #ifndef PIPEWIRE_EXT_CLIENT_NODE_H #define PIPEWIRE_EXT_CLIENT_NODE_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** \defgroup pw_client_node Client Node * Client node interface */ diff --git a/src/pipewire/extensions/metadata.h b/src/pipewire/extensions/metadata.h index 58057c608..5a5f8d3c8 100644 --- a/src/pipewire/extensions/metadata.h +++ b/src/pipewire/extensions/metadata.h @@ -5,15 +5,15 @@ #ifndef PIPEWIRE_EXT_METADATA_H #define PIPEWIRE_EXT_METADATA_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_metadata Metadata * Metadata interface */ diff --git a/src/pipewire/extensions/profiler.h b/src/pipewire/extensions/profiler.h index d0e8908ed..c7a155d95 100644 --- a/src/pipewire/extensions/profiler.h +++ b/src/pipewire/extensions/profiler.h @@ -5,12 +5,12 @@ #ifndef PIPEWIRE_EXT_PROFILER_H #define PIPEWIRE_EXT_PROFILER_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** \defgroup pw_profiler Profiler * Profiler interface */ diff --git a/src/pipewire/extensions/protocol-native.h b/src/pipewire/extensions/protocol-native.h index ca4369200..7b88d8210 100644 --- a/src/pipewire/extensions/protocol-native.h +++ b/src/pipewire/extensions/protocol-native.h @@ -5,15 +5,15 @@ #ifndef PIPEWIRE_EXT_PROTOCOL_NATIVE_H #define PIPEWIRE_EXT_PROTOCOL_NATIVE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_protocol_native Native Protocol * PipeWire native protocol interface */ diff --git a/src/pipewire/extensions/security-context.h b/src/pipewire/extensions/security-context.h index 5a3cd2c13..3da96ff45 100644 --- a/src/pipewire/extensions/security-context.h +++ b/src/pipewire/extensions/security-context.h @@ -5,12 +5,12 @@ #ifndef PIPEWIRE_EXT_SECURITY_CONTEXT_H #define PIPEWIRE_EXT_SECURITY_CONTEXT_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** \defgroup pw_security_context Security Context * Security Context interface */ diff --git a/src/pipewire/factory.h b/src/pipewire/factory.h index 9c6ab74fc..e337b1d2f 100644 --- a/src/pipewire/factory.h +++ b/src/pipewire/factory.h @@ -5,10 +5,6 @@ #ifndef PIPEWIRE_FACTORY_H #define PIPEWIRE_FACTORY_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -17,6 +13,10 @@ extern "C" { #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_factory Factory * Factory interface */ diff --git a/src/pipewire/i18n.h b/src/pipewire/i18n.h index cfe981180..8ed238720 100644 --- a/src/pipewire/i18n.h +++ b/src/pipewire/i18n.h @@ -5,6 +5,8 @@ #ifndef PIPEWIRE_I18N_H #define PIPEWIRE_I18N_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -17,7 +19,6 @@ extern "C" { * \addtogroup pw_gettext * \{ */ -#include SPA_FORMAT_ARG_FUNC(1) const char *pw_gettext(const char *msgid); SPA_FORMAT_ARG_FUNC(1) const char *pw_ngettext(const char *msgid, const char *msgid_plural, unsigned long int n); diff --git a/src/pipewire/impl-client.h b/src/pipewire/impl-client.h index de9325cbd..98475c33f 100644 --- a/src/pipewire/impl-client.h +++ b/src/pipewire/impl-client.h @@ -5,12 +5,12 @@ #ifndef PIPEWIRE_IMPL_CLIENT_H #define PIPEWIRE_IMPL_CLIENT_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** \page page_client_impl Client Implementation * * \see \ref pw_impl_client diff --git a/src/pipewire/impl-module.h b/src/pipewire/impl-module.h index 6e0930333..37c6d51c9 100644 --- a/src/pipewire/impl-module.h +++ b/src/pipewire/impl-module.h @@ -7,14 +7,14 @@ #ifndef PIPEWIRE_IMPL_MODULE_H #define PIPEWIRE_IMPL_MODULE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include +#ifdef __cplusplus +extern "C" { +#endif + #define PIPEWIRE_SYMBOL_MODULE_INIT "pipewire__module_init" #define PIPEWIRE_MODULE_PREFIX "libpipewire-" diff --git a/src/pipewire/impl-port.h b/src/pipewire/impl-port.h index 34b8b7b9c..f68e850b8 100644 --- a/src/pipewire/impl-port.h +++ b/src/pipewire/impl-port.h @@ -5,12 +5,12 @@ #ifndef PIPEWIRE_IMPL_PORT_H #define PIPEWIRE_IMPL_PORT_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** \defgroup pw_impl_port Port Impl * * \brief A port can be used to link two nodes. diff --git a/src/pipewire/keys.h b/src/pipewire/keys.h index de4a9d408..ae7df2372 100644 --- a/src/pipewire/keys.h +++ b/src/pipewire/keys.h @@ -5,11 +5,12 @@ #ifndef PIPEWIRE_KEYS_H #define PIPEWIRE_KEYS_H +#include + #ifdef __cplusplus extern "C" { #endif -#include /** * \defgroup pw_keys Key Names * diff --git a/src/pipewire/link.h b/src/pipewire/link.h index 316fb0442..ac3133bc9 100644 --- a/src/pipewire/link.h +++ b/src/pipewire/link.h @@ -5,15 +5,15 @@ #ifndef PIPEWIRE_LINK_H #define PIPEWIRE_LINK_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_link Link * * A link is the connection between 2 nodes (\ref pw_node). Nodes are diff --git a/src/pipewire/loop.h b/src/pipewire/loop.h index d4f9be076..3fdf2818e 100644 --- a/src/pipewire/loop.h +++ b/src/pipewire/loop.h @@ -5,13 +5,13 @@ #ifndef PIPEWIRE_LOOP_H #define PIPEWIRE_LOOP_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /** \defgroup pw_loop Loop * * PipeWire loop object provides an implementation of diff --git a/src/pipewire/map.h b/src/pipewire/map.h index fb00ddf6c..3600fd0d7 100644 --- a/src/pipewire/map.h +++ b/src/pipewire/map.h @@ -5,16 +5,16 @@ #ifndef PIPEWIRE_MAP_H #define PIPEWIRE_MAP_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef PW_API_MAP #define PW_API_MAP static inline #endif diff --git a/src/pipewire/module.h b/src/pipewire/module.h index f5531af89..cd5fa2b7b 100644 --- a/src/pipewire/module.h +++ b/src/pipewire/module.h @@ -5,15 +5,15 @@ #ifndef PIPEWIRE_MODULE_H #define PIPEWIRE_MODULE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_module Module * Module interface */ diff --git a/src/pipewire/node.h b/src/pipewire/node.h index 1ee9d2123..6fcbeb312 100644 --- a/src/pipewire/node.h +++ b/src/pipewire/node.h @@ -5,10 +5,6 @@ #ifndef PIPEWIRE_NODE_H #define PIPEWIRE_NODE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -19,6 +15,10 @@ extern "C" { #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_node Node * Node interface */ diff --git a/src/pipewire/permission.h b/src/pipewire/permission.h index 22eebdb26..55eeff2a3 100644 --- a/src/pipewire/permission.h +++ b/src/pipewire/permission.h @@ -5,12 +5,12 @@ #ifndef PIPEWIRE_PERMISSION_H #define PIPEWIRE_PERMISSION_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** \defgroup pw_permission Permission * * Permissions are kept for a client and describe what the client is diff --git a/src/pipewire/pipewire.h b/src/pipewire/pipewire.h index 0c495ed39..f09d65faa 100644 --- a/src/pipewire/pipewire.h +++ b/src/pipewire/pipewire.h @@ -5,10 +5,6 @@ #ifndef PIPEWIRE_H #define PIPEWIRE_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -41,6 +37,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_pipewire Initialization * Initializing PipeWire and loading SPA modules. */ diff --git a/src/pipewire/port.h b/src/pipewire/port.h index ea4cb33b1..b711cda72 100644 --- a/src/pipewire/port.h +++ b/src/pipewire/port.h @@ -5,10 +5,6 @@ #ifndef PIPEWIRE_PORT_H #define PIPEWIRE_PORT_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include @@ -18,6 +14,10 @@ extern "C" { #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_port Port * Port interface */ diff --git a/src/pipewire/private.h b/src/pipewire/private.h index 3cdb258df..320e49912 100644 --- a/src/pipewire/private.h +++ b/src/pipewire/private.h @@ -7,10 +7,6 @@ /** \privatesection */ -#ifdef __cplusplus -extern "C" { -#endif - #include #include /* for pthread_t */ @@ -24,6 +20,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + #if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined(__GNU__) struct ucred { }; diff --git a/src/pipewire/properties.h b/src/pipewire/properties.h index 769198dc5..5dbcc283f 100644 --- a/src/pipewire/properties.h +++ b/src/pipewire/properties.h @@ -5,16 +5,16 @@ #ifndef PIPEWIRE_PROPERTIES_H #define PIPEWIRE_PROPERTIES_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef PW_API_PROPERTIES #define PW_API_PROPERTIES static inline #endif diff --git a/src/pipewire/protocol.h b/src/pipewire/protocol.h index 60a029033..bec5c4eb2 100644 --- a/src/pipewire/protocol.h +++ b/src/pipewire/protocol.h @@ -5,12 +5,12 @@ #ifndef PIPEWIRE_PROTOCOL_H #define PIPEWIRE_PROTOCOL_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** \defgroup pw_protocol Protocol * * \brief Manages protocols and their implementation diff --git a/src/pipewire/proxy.h b/src/pipewire/proxy.h index b46c41725..34bdfee06 100644 --- a/src/pipewire/proxy.h +++ b/src/pipewire/proxy.h @@ -5,12 +5,12 @@ #ifndef PIPEWIRE_PROXY_H #define PIPEWIRE_PROXY_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** \page page_proxy Proxy * * \see \ref pw_proxy diff --git a/src/pipewire/resource.h b/src/pipewire/resource.h index 86be9ee3d..41adab468 100644 --- a/src/pipewire/resource.h +++ b/src/pipewire/resource.h @@ -5,12 +5,12 @@ #ifndef PIPEWIRE_RESOURCE_H #define PIPEWIRE_RESOURCE_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** \defgroup pw_resource Resource * * \brief Client owned objects diff --git a/src/pipewire/thread-loop.h b/src/pipewire/thread-loop.h index 2734799df..0d8dbdcea 100644 --- a/src/pipewire/thread-loop.h +++ b/src/pipewire/thread-loop.h @@ -5,12 +5,12 @@ #ifndef PIPEWIRE_THREAD_LOOP_H #define PIPEWIRE_THREAD_LOOP_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** \page page_thread_loop Thread Loop * * \see \ref pw_thread_loop diff --git a/src/pipewire/thread.h b/src/pipewire/thread.h index f53e62950..2f214988c 100644 --- a/src/pipewire/thread.h +++ b/src/pipewire/thread.h @@ -5,15 +5,15 @@ #ifndef PIPEWIRE_THREAD_H #define PIPEWIRE_THREAD_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** \defgroup pw_thread Thread * * \brief functions to manipulate threads diff --git a/src/pipewire/type.h b/src/pipewire/type.h index a8f982c59..e55cbaf33 100644 --- a/src/pipewire/type.h +++ b/src/pipewire/type.h @@ -5,12 +5,12 @@ #ifndef PIPEWIRE_TYPE_H #define PIPEWIRE_TYPE_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** \defgroup pw_type Type info * Type information */ diff --git a/src/pipewire/utils.h b/src/pipewire/utils.h index 528f6764b..29e210a5a 100644 --- a/src/pipewire/utils.h +++ b/src/pipewire/utils.h @@ -5,10 +5,6 @@ #ifndef PIPEWIRE_UTILS_H #define PIPEWIRE_UTILS_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -17,14 +13,18 @@ extern "C" { #endif #include -#ifndef ENODATA -#define ENODATA 9919 -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef ENODATA +#define ENODATA 9919 +#endif + /** \defgroup pw_utils Utilities * * Various utility functions diff --git a/test/pwtest.h b/test/pwtest.h index 8234624ce..ae768f08e 100644 --- a/test/pwtest.h +++ b/test/pwtest.h @@ -7,10 +7,6 @@ #ifndef PWTEST_H #define PWTEST_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -20,6 +16,10 @@ extern "C" { #include #include "spa/support/plugin.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * \defgroup pwtest Test Suite * \brief `pwtest` is a test runner framework for PipeWire.