diff options
author | Wim Taymans <wtaymans@redhat.com> | 2019-10-25 15:01:02 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2019-10-25 15:01:02 +0200 |
commit | 9ffec214b82a9f297e7a39d51e5bbadfc4da74b8 (patch) | |
tree | 2989f3d19cc6ac15a0af15d43e37144453a1eace /spa | |
parent | af73585948af88ab1963bae560402e4cbfc802d8 (diff) |
fix includes
Diffstat (limited to 'spa')
38 files changed, 52 insertions, 22 deletions
diff --git a/spa/examples/example-control.c b/spa/examples/example-control.c index f502cdff..ec7dd4bd 100644 --- a/spa/examples/example-control.c +++ b/spa/examples/example-control.c @@ -32,6 +32,7 @@ #include <pthread.h> #include <poll.h> +#include <spa/support/plugin.h> #include <spa/support/log-impl.h> #include <spa/support/loop.h> #include <spa/node/node.h> @@ -41,6 +42,7 @@ #include <spa/param/props.h> #include <spa/param/audio/format-utils.h> #include <spa/utils/names.h> +#include <spa/utils/result.h> #define M_PI_M2 ( M_PI + M_PI ) diff --git a/spa/examples/local-v4l2.c b/spa/examples/local-v4l2.c index fd7cec9c..5168ce57 100644 --- a/spa/examples/local-v4l2.c +++ b/spa/examples/local-v4l2.c @@ -34,7 +34,9 @@ #include <SDL2/SDL.h> +#include <spa/support/plugin.h> #include <spa/utils/names.h> +#include <spa/utils/result.h> #include <spa/support/log-impl.h> #include <spa/support/loop.h> #include <spa/node/node.h> diff --git a/spa/include/spa/monitor/device.h b/spa/include/spa/monitor/device.h index ef41c6e2..e2741d15 100644 --- a/spa/include/spa/monitor/device.h +++ b/spa/include/spa/monitor/device.h @@ -30,9 +30,8 @@ extern "C" { #endif #include <spa/utils/defs.h> +#include <spa/utils/hook.h> #include <spa/utils/dict.h> -#include <spa/support/plugin.h> -#include <spa/pod/builder.h> #include <spa/pod/event.h> /** diff --git a/spa/include/spa/monitor/utils.h b/spa/include/spa/monitor/utils.h index 4c68a207..87e3c7db 100644 --- a/spa/include/spa/monitor/utils.h +++ b/spa/include/spa/monitor/utils.h @@ -29,6 +29,7 @@ extern "C" { #endif +#include <spa/pod/builder.h> #include <spa/monitor/device.h> struct spa_result_device_params_data { diff --git a/spa/include/spa/node/event.h b/spa/include/spa/node/event.h index ff3513cf..ffc25e33 100644 --- a/spa/include/spa/node/event.h +++ b/spa/include/spa/node/event.h @@ -29,9 +29,7 @@ extern "C" { #endif -#include <spa/utils/defs.h> #include <spa/pod/event.h> -#include <spa/node/node.h> /* object id of SPA_TYPE_EVENT_Node */ enum spa_node_event { diff --git a/spa/include/spa/node/node.h b/spa/include/spa/node/node.h index 9cba84cc..4bb9ca62 100644 --- a/spa/include/spa/node/node.h +++ b/spa/include/spa/node/node.h @@ -30,9 +30,12 @@ extern "C" { #endif #include <spa/utils/defs.h> -#include <spa/utils/result.h> #include <spa/utils/type.h> #include <spa/utils/hook.h> +#include <spa/buffer/buffer.h> +#include <spa/node/event.h> +#include <spa/node/command.h> + /** * A spa_node is a component that can consume and produce buffers. @@ -40,12 +43,6 @@ extern "C" { #define SPA_VERSION_NODE 0 struct spa_node { struct spa_interface iface; }; -#include <spa/support/plugin.h> - -#include <spa/buffer/buffer.h> -#include <spa/node/event.h> -#include <spa/node/command.h> - /** * Node information structure * diff --git a/spa/include/spa/param/type-info.h b/spa/include/spa/param/type-info.h index 0b12f9ac..6065e6c2 100644 --- a/spa/include/spa/param/type-info.h +++ b/spa/include/spa/param/type-info.h @@ -32,7 +32,6 @@ extern "C" { #include <spa/utils/defs.h> #include <spa/param/props.h> #include <spa/param/format.h> -#include <spa/node/io.h> #include <spa/buffer/type-info.h> /* base for parameter object enumerations */ diff --git a/spa/include/spa/support/loop.h b/spa/include/spa/support/loop.h index f892d0bb..3e040df4 100644 --- a/spa/include/spa/support/loop.h +++ b/spa/include/spa/support/loop.h @@ -31,7 +31,6 @@ extern "C" { #include <spa/utils/defs.h> #include <spa/utils/hook.h> -#include <spa/utils/result.h> #include <spa/support/system.h> #define SPA_VERSION_LOOP 0 diff --git a/spa/include/spa/support/system.h b/spa/include/spa/support/system.h index dae9062a..0e9dcfa1 100644 --- a/spa/include/spa/support/system.h +++ b/spa/include/spa/support/system.h @@ -33,7 +33,6 @@ extern "C" { #include <spa/utils/defs.h> #include <spa/utils/hook.h> -#include <spa/utils/result.h> /** * a collection of core system functions diff --git a/spa/include/spa/utils/defs.h b/spa/include/spa/utils/defs.h index f445ffdf..8992bcd5 100644 --- a/spa/include/spa/utils/defs.h +++ b/spa/include/spa/utils/defs.h @@ -236,14 +236,6 @@ struct spa_param_info { #define spa_memzero(x,l) (memset((x), 0, (l))) #define spa_zero(x) (spa_memzero(&(x), sizeof(x))) -#define spa_strerror(err) \ -({ \ - int _err = -err; \ - if (SPA_RESULT_IS_ASYNC(err)) \ - _err = EINPROGRESS; \ - strerror(_err); \ -}) - #ifdef SPA_DEBUG_MEMCPY #define spa_memcpy(d,s,n) \ ({ \ diff --git a/spa/include/spa/utils/result.h b/spa/include/spa/utils/result.h index 6ec612a6..1b09570e 100644 --- a/spa/include/spa/utils/result.h +++ b/spa/include/spa/utils/result.h @@ -43,6 +43,14 @@ extern "C" { #define SPA_RESULT_ASYNC_SEQ(res) ((res) & SPA_ASYNC_SEQ_MASK) #define SPA_RESULT_RETURN_ASYNC(seq) (SPA_ASYNC_BIT | SPA_RESULT_ASYNC_SEQ(seq)) +#define spa_strerror(err) \ +({ \ + int _err = -err; \ + if (SPA_RESULT_IS_ASYNC(err)) \ + _err = EINPROGRESS; \ + strerror(_err); \ +}) + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/spa/plugins/alsa/alsa-pcm.h b/spa/plugins/alsa/alsa-pcm.h index 38f54606..b7a2dd29 100644 --- a/spa/plugins/alsa/alsa-pcm.h +++ b/spa/plugins/alsa/alsa-pcm.h @@ -34,6 +34,7 @@ extern "C" { #include <alsa/asoundlib.h> +#include <spa/support/plugin.h> #include <spa/support/loop.h> #include <spa/support/log.h> #include <spa/utils/list.h> diff --git a/spa/plugins/alsa/alsa-seq.c b/spa/plugins/alsa/alsa-seq.c index a598c455..a1f35696 100644 --- a/spa/plugins/alsa/alsa-seq.c +++ b/spa/plugins/alsa/alsa-seq.c @@ -32,6 +32,7 @@ #include <math.h> #include <limits.h> +#include <spa/utils/result.h> #include <spa/pod/filter.h> #include <spa/support/system.h> #include <spa/control/control.h> diff --git a/spa/plugins/alsa/alsa-seq.h b/spa/plugins/alsa/alsa-seq.h index 66bb16be..903b15b4 100644 --- a/spa/plugins/alsa/alsa-seq.h +++ b/spa/plugins/alsa/alsa-seq.h @@ -34,6 +34,7 @@ extern "C" { #include <alsa/asoundlib.h> +#include <spa/support/plugin.h> #include <spa/support/loop.h> #include <spa/support/log.h> #include <spa/utils/list.h> diff --git a/spa/plugins/audioconvert/audioadapter.c b/spa/plugins/audioconvert/audioadapter.c index 5dddaf69..96f8e727 100644 --- a/spa/plugins/audioconvert/audioadapter.c +++ b/spa/plugins/audioconvert/audioadapter.c @@ -22,6 +22,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/cpu.h> @@ -29,6 +30,7 @@ #include <spa/node/io.h> #include <spa/node/utils.h> #include <spa/utils/names.h> +#include <spa/utils/result.h> #include <spa/buffer/alloc.h> #include <spa/pod/parser.h> #include <spa/pod/filter.h> diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c index 4dd08d4b..827aea69 100644 --- a/spa/plugins/audioconvert/audioconvert.c +++ b/spa/plugins/audioconvert/audioconvert.c @@ -26,8 +26,10 @@ #include <string.h> #include <stdio.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/cpu.h> +#include <spa/utils/result.h> #include <spa/utils/list.h> #include <spa/utils/names.h> #include <spa/node/node.h> diff --git a/spa/plugins/audioconvert/channelmix.c b/spa/plugins/audioconvert/channelmix.c index 5b7daa88..df66309d 100644 --- a/spa/plugins/audioconvert/channelmix.c +++ b/spa/plugins/audioconvert/channelmix.c @@ -26,6 +26,7 @@ #include <string.h> #include <stdio.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/cpu.h> #include <spa/utils/list.h> diff --git a/spa/plugins/audioconvert/fmtconvert.c b/spa/plugins/audioconvert/fmtconvert.c index a57307e3..7cb9b049 100644 --- a/spa/plugins/audioconvert/fmtconvert.c +++ b/spa/plugins/audioconvert/fmtconvert.c @@ -27,6 +27,7 @@ #include <stdio.h> #include <limits.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/cpu.h> #include <spa/utils/list.h> diff --git a/spa/plugins/audioconvert/merger.c b/spa/plugins/audioconvert/merger.c index a13222e7..eeec4a73 100644 --- a/spa/plugins/audioconvert/merger.c +++ b/spa/plugins/audioconvert/merger.c @@ -27,8 +27,10 @@ #include <stdio.h> #include <limits.h> +#include <spa/support/plugin.h> #include <spa/support/cpu.h> #include <spa/support/log.h> +#include <spa/utils/result.h> #include <spa/utils/list.h> #include <spa/utils/names.h> #include <spa/node/node.h> diff --git a/spa/plugins/audioconvert/resample.c b/spa/plugins/audioconvert/resample.c index 9ffecb07..7ba90626 100644 --- a/spa/plugins/audioconvert/resample.c +++ b/spa/plugins/audioconvert/resample.c @@ -26,6 +26,7 @@ #include <string.h> #include <stdio.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/utils/list.h> #include <spa/utils/names.h> diff --git a/spa/plugins/audioconvert/splitter.c b/spa/plugins/audioconvert/splitter.c index a7683a0b..acd3ef94 100644 --- a/spa/plugins/audioconvert/splitter.c +++ b/spa/plugins/audioconvert/splitter.c @@ -27,6 +27,7 @@ #include <stdio.h> #include <limits.h> +#include <spa/support/plugin.h> #include <spa/support/cpu.h> #include <spa/support/log.h> #include <spa/utils/list.h> diff --git a/spa/plugins/audioconvert/test-source.c b/spa/plugins/audioconvert/test-source.c index daa98619..5b7e9cb4 100644 --- a/spa/plugins/audioconvert/test-source.c +++ b/spa/plugins/audioconvert/test-source.c @@ -26,6 +26,7 @@ #include <string.h> #include <stdio.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/cpu.h> #include <spa/utils/list.h> diff --git a/spa/plugins/audiomixer/audiomixer.c b/spa/plugins/audiomixer/audiomixer.c index 15743dad..601c5971 100644 --- a/spa/plugins/audiomixer/audiomixer.c +++ b/spa/plugins/audiomixer/audiomixer.c @@ -26,6 +26,7 @@ #include <string.h> #include <stdio.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/cpu.h> #include <spa/utils/list.h> diff --git a/spa/plugins/audiomixer/mixer-dsp.c b/spa/plugins/audiomixer/mixer-dsp.c index 89baf8ed..f73eabdc 100644 --- a/spa/plugins/audiomixer/mixer-dsp.c +++ b/spa/plugins/audiomixer/mixer-dsp.c @@ -26,6 +26,7 @@ #include <string.h> #include <stdio.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/cpu.h> #include <spa/utils/list.h> diff --git a/spa/plugins/bluez5/a2dp-sink.c b/spa/plugins/bluez5/a2dp-sink.c index 57017b80..4436f4b3 100644 --- a/spa/plugins/bluez5/a2dp-sink.c +++ b/spa/plugins/bluez5/a2dp-sink.c @@ -28,12 +28,14 @@ #include <arpa/inet.h> #include <sys/ioctl.h> +#include <spa/support/plugin.h> #include <spa/support/loop.h> #include <spa/support/log.h> #include <spa/support/system.h> #include <spa/utils/list.h> #include <spa/utils/keys.h> #include <spa/utils/names.h> +#include <spa/utils/result.h> #include <spa/monitor/device.h> #include <spa/node/node.h> diff --git a/spa/plugins/bluez5/a2dp-source.c b/spa/plugins/bluez5/a2dp-source.c index 7056aaad..2d09761e 100644 --- a/spa/plugins/bluez5/a2dp-source.c +++ b/spa/plugins/bluez5/a2dp-source.c @@ -31,12 +31,14 @@ #include <sys/types.h> #include <sys/socket.h> +#include <spa/support/plugin.h> #include <spa/support/loop.h> #include <spa/support/log.h> #include <spa/support/system.h> #include <spa/utils/list.h> #include <spa/utils/keys.h> #include <spa/utils/names.h> +#include <spa/utils/result.h> #include <spa/monitor/device.h> #include <spa/node/node.h> diff --git a/spa/plugins/bluez5/sco-sink.c b/spa/plugins/bluez5/sco-sink.c index c02c00b0..f9dcee85 100644 --- a/spa/plugins/bluez5/sco-sink.c +++ b/spa/plugins/bluez5/sco-sink.c @@ -28,6 +28,7 @@ #include <arpa/inet.h> #include <sys/ioctl.h> +#include <spa/support/plugin.h> #include <spa/support/loop.h> #include <spa/support/log.h> #include <spa/support/system.h> diff --git a/spa/plugins/bluez5/sco-source.c b/spa/plugins/bluez5/sco-source.c index 7fdb0b05..68846e95 100644 --- a/spa/plugins/bluez5/sco-source.c +++ b/spa/plugins/bluez5/sco-source.c @@ -30,6 +30,7 @@ #include <sys/types.h> #include <sys/socket.h> +#include <spa/support/plugin.h> #include <spa/support/loop.h> #include <spa/support/log.h> #include <spa/support/system.h> diff --git a/spa/plugins/control/mixer.c b/spa/plugins/control/mixer.c index 66f2ff8f..2a473efe 100644 --- a/spa/plugins/control/mixer.c +++ b/spa/plugins/control/mixer.c @@ -26,6 +26,7 @@ #include <string.h> #include <stdio.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/cpu.h> #include <spa/utils/list.h> diff --git a/spa/plugins/jack/jack-device.c b/spa/plugins/jack/jack-device.c index 73382069..27959cc8 100644 --- a/spa/plugins/jack/jack-device.c +++ b/spa/plugins/jack/jack-device.c @@ -33,6 +33,7 @@ #include <spa/utils/type.h> #include <spa/utils/keys.h> #include <spa/utils/names.h> +#include <spa/utils/result.h> #include <spa/support/loop.h> #include <spa/support/plugin.h> #include <spa/monitor/device.h> diff --git a/spa/plugins/jack/jack-sink.c b/spa/plugins/jack/jack-sink.c index 794fffbb..8a2f7989 100644 --- a/spa/plugins/jack/jack-sink.c +++ b/spa/plugins/jack/jack-sink.c @@ -31,6 +31,7 @@ #include <jack/jack.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/loop.h> #include <spa/utils/list.h> diff --git a/spa/plugins/jack/jack-source.c b/spa/plugins/jack/jack-source.c index 77fd135c..3981ef22 100644 --- a/spa/plugins/jack/jack-source.c +++ b/spa/plugins/jack/jack-source.c @@ -31,6 +31,7 @@ #include <jack/jack.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/loop.h> #include <spa/utils/list.h> diff --git a/spa/plugins/v4l2/v4l2-device.c b/spa/plugins/v4l2/v4l2-device.c index a561195e..2abb5260 100644 --- a/spa/plugins/v4l2/v4l2-device.c +++ b/spa/plugins/v4l2/v4l2-device.c @@ -29,6 +29,7 @@ #include <linux/videodev2.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/loop.h> #include <spa/utils/keys.h> diff --git a/spa/plugins/v4l2/v4l2-source.c b/spa/plugins/v4l2/v4l2-source.c index 8b263a34..65a680bb 100644 --- a/spa/plugins/v4l2/v4l2-source.c +++ b/spa/plugins/v4l2/v4l2-source.c @@ -29,6 +29,7 @@ #include <linux/videodev2.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/loop.h> #include <spa/utils/list.h> diff --git a/spa/plugins/videoconvert/videoadapter.c b/spa/plugins/videoconvert/videoadapter.c index 7c893f35..2c891853 100644 --- a/spa/plugins/videoconvert/videoadapter.c +++ b/spa/plugins/videoconvert/videoadapter.c @@ -22,11 +22,13 @@ * DEALINGS IN THE SOFTWARE. */ +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/node/node.h> #include <spa/node/io.h> #include <spa/node/utils.h> +#include <spa/utils/result.h> #include <spa/utils/names.h> #include <spa/buffer/alloc.h> #include <spa/pod/parser.h> diff --git a/spa/plugins/vulkan/vulkan-compute-source.c b/spa/plugins/vulkan/vulkan-compute-source.c index 3e9e6e1f..ee7a2b8e 100644 --- a/spa/plugins/vulkan/vulkan-compute-source.c +++ b/spa/plugins/vulkan/vulkan-compute-source.c @@ -29,6 +29,7 @@ #include <stdio.h> #include <sys/timerfd.h> +#include <spa/support/plugin.h> #include <spa/support/log.h> #include <spa/support/loop.h> #include <spa/utils/list.h> diff --git a/spa/tests/test-node.c b/spa/tests/test-node.c index 63bf6f7c..1f329e43 100644 --- a/spa/tests/test-node.c +++ b/spa/tests/test-node.c @@ -23,6 +23,7 @@ */ #include <spa/utils/defs.h> +#include <spa/node/node.h> #include <spa/node/io.h> #include <spa/node/command.h> #include <spa/node/event.h> diff --git a/spa/tools/spa-inspect.c b/spa/tools/spa-inspect.c index 1f71f116..d02cd8b1 100644 --- a/spa/tools/spa-inspect.c +++ b/spa/tools/spa-inspect.c @@ -28,8 +28,10 @@ #include <unistd.h> #include <dlfcn.h> +#include <spa/support/plugin.h> #include <spa/support/log-impl.h> #include <spa/support/loop.h> +#include <spa/utils/result.h> #include <spa/node/node.h> #include <spa/node/utils.h> #include <spa/pod/parser.h> |