From 9a580362a75ae7b262f5815d59c798f1158ae2a7 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 13 Jan 2023 11:41:38 +0100 Subject: [PATCH] spa: fix includes --- spa/include/spa/buffer/meta.h | 3 +- spa/include/spa/buffer/type-info.h | 1 + spa/include/spa/node/type-info.h | 2 +- spa/include/spa/param/audio/iec958-types.h | 1 + spa/include/spa/param/audio/raw-types.h | 1 + spa/include/spa/param/buffers-types.h | 1 + spa/include/spa/param/latency-types.h | 2 + spa/include/spa/param/param-types.h | 1 - spa/include/spa/param/port-config-types.h | 1 + spa/include/spa/param/profiler-types.h | 1 + spa/include/spa/param/route-types.h | 2 + spa/include/spa/param/video/dsp-utils.h | 5 +- spa/include/spa/param/video/raw-types.h | 1 + spa/include/spa/utils/enum-types.h | 65 ++++++++++++++++++++++ spa/include/spa/utils/type-info.h | 24 +------- 15 files changed, 83 insertions(+), 28 deletions(-) create mode 100644 spa/include/spa/utils/enum-types.h diff --git a/spa/include/spa/buffer/meta.h b/spa/include/spa/buffer/meta.h index ec09f18bd..dbd14466f 100644 --- a/spa/include/spa/buffer/meta.h +++ b/spa/include/spa/buffer/meta.h @@ -177,7 +177,8 @@ enum spa_meta_videotransform_value { /** a transformation of the buffer */ struct spa_meta_videotransform { - uint32_t transform; /**< orientation transformation that was applied to the buffer */ + uint32_t transform; /**< orientation transformation that was applied to the buffer, + * one of enum spa_meta_videotransform_value */ }; /** diff --git a/spa/include/spa/buffer/type-info.h b/spa/include/spa/buffer/type-info.h index 50f436b86..8b38c4909 100644 --- a/spa/include/spa/buffer/type-info.h +++ b/spa/include/spa/buffer/type-info.h @@ -79,6 +79,7 @@ static const struct spa_type_info spa_type_meta_type[] = { { SPA_META_Cursor, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Cursor", NULL }, { SPA_META_Control, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Control", NULL }, { SPA_META_Busy, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Busy", NULL }, + { SPA_META_VideoTransform, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "VideoTransform", NULL }, { 0, 0, NULL, NULL }, }; diff --git a/spa/include/spa/node/type-info.h b/spa/include/spa/node/type-info.h index 7c481fd66..1ebbfe5cb 100644 --- a/spa/include/spa/node/type-info.h +++ b/spa/include/spa/node/type-info.h @@ -34,7 +34,7 @@ extern "C" { * \{ */ -#include +#include #include #include diff --git a/spa/include/spa/param/audio/iec958-types.h b/spa/include/spa/param/audio/iec958-types.h index 64fc71d50..e0b8940ef 100644 --- a/spa/include/spa/param/audio/iec958-types.h +++ b/spa/include/spa/param/audio/iec958-types.h @@ -29,6 +29,7 @@ extern "C" { #endif +#include #include #define SPA_TYPE_INFO_AudioIEC958Codec SPA_TYPE_INFO_ENUM_BASE "AudioIEC958Codec" diff --git a/spa/include/spa/param/audio/raw-types.h b/spa/include/spa/param/audio/raw-types.h index ebcaffb29..94e6364bf 100644 --- a/spa/include/spa/param/audio/raw-types.h +++ b/spa/include/spa/param/audio/raw-types.h @@ -34,6 +34,7 @@ extern "C" { * \{ */ +#include #include #define SPA_TYPE_INFO_AudioFormat SPA_TYPE_INFO_ENUM_BASE "AudioFormat" diff --git a/spa/include/spa/param/buffers-types.h b/spa/include/spa/param/buffers-types.h index 0f024c395..50a09328a 100644 --- a/spa/include/spa/param/buffers-types.h +++ b/spa/include/spa/param/buffers-types.h @@ -35,6 +35,7 @@ extern "C" { */ #include +#include #include diff --git a/spa/include/spa/param/latency-types.h b/spa/include/spa/param/latency-types.h index c22a224b5..aa58b9f46 100644 --- a/spa/include/spa/param/latency-types.h +++ b/spa/include/spa/param/latency-types.h @@ -34,6 +34,8 @@ extern "C" { * \{ */ +#include +#include #include #define SPA_TYPE_INFO_PARAM_Latency SPA_TYPE_INFO_PARAM_BASE "Latency" diff --git a/spa/include/spa/param/param-types.h b/spa/include/spa/param/param-types.h index d53fff25b..56d1b1853 100644 --- a/spa/include/spa/param/param-types.h +++ b/spa/include/spa/param/param-types.h @@ -34,7 +34,6 @@ extern "C" { * \{ */ -#include #include #include #include diff --git a/spa/include/spa/param/port-config-types.h b/spa/include/spa/param/port-config-types.h index 865b4d75d..f05cdebd9 100644 --- a/spa/include/spa/param/port-config-types.h +++ b/spa/include/spa/param/port-config-types.h @@ -34,6 +34,7 @@ extern "C" { * \{ */ +#include #include #include diff --git a/spa/include/spa/param/profiler-types.h b/spa/include/spa/param/profiler-types.h index de7ae2306..3f7297fba 100644 --- a/spa/include/spa/param/profiler-types.h +++ b/spa/include/spa/param/profiler-types.h @@ -34,6 +34,7 @@ extern "C" { * \{ */ +#include #include #define SPA_TYPE_INFO_Profiler SPA_TYPE_INFO_OBJECT_BASE "Profiler" diff --git a/spa/include/spa/param/route-types.h b/spa/include/spa/param/route-types.h index cafb595d7..b370c6c04 100644 --- a/spa/include/spa/param/route-types.h +++ b/spa/include/spa/param/route-types.h @@ -34,7 +34,9 @@ extern "C" { * \{ */ +#include #include + #include #define SPA_TYPE_INFO_PARAM_Route SPA_TYPE_INFO_PARAM_BASE "Route" diff --git a/spa/include/spa/param/video/dsp-utils.h b/spa/include/spa/param/video/dsp-utils.h index 425d55671..524655f9b 100644 --- a/spa/include/spa/param/video/dsp-utils.h +++ b/spa/include/spa/param/video/dsp-utils.h @@ -34,7 +34,8 @@ extern "C" { * \{ */ -#include +#include +#include #include static inline int @@ -79,4 +80,4 @@ spa_format_video_dsp_build(struct spa_pod_builder *builder, uint32_t id, } /* extern "C" */ #endif -#endif /* SPA_VIDEO_DSP_H */ +#endif /* SPA_VIDEO_DSP_UTILS_H */ diff --git a/spa/include/spa/param/video/raw-types.h b/spa/include/spa/param/video/raw-types.h index eff60a157..45fc2308c 100644 --- a/spa/include/spa/param/video/raw-types.h +++ b/spa/include/spa/param/video/raw-types.h @@ -33,6 +33,7 @@ extern "C" { * \addtogroup spa_param * \{ */ +#include #include #define SPA_TYPE_INFO_VideoFormat SPA_TYPE_INFO_ENUM_BASE "VideoFormat" diff --git a/spa/include/spa/utils/enum-types.h b/spa/include/spa/utils/enum-types.h new file mode 100644 index 000000000..030d8f297 --- /dev/null +++ b/spa/include/spa/utils/enum-types.h @@ -0,0 +1,65 @@ +/* Simple Plugin API + * + * Copyright © 2018 Wim Taymans + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifndef SPA_ENUM_TYPES_H +#define SPA_ENUM_TYPES_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define SPA_TYPE_INFO_Direction SPA_TYPE_INFO_ENUM_BASE "Direction" +#define SPA_TYPE_INFO_DIRECTION_BASE SPA_TYPE_INFO_Direction ":" + +static const struct spa_type_info spa_type_direction[] = { + { SPA_DIRECTION_INPUT, SPA_TYPE_Int, SPA_TYPE_INFO_DIRECTION_BASE "Input", NULL }, + { SPA_DIRECTION_OUTPUT, SPA_TYPE_Int, SPA_TYPE_INFO_DIRECTION_BASE "Output", NULL }, + { 0, 0, NULL, NULL } +}; + +#include + +#define SPA_TYPE_INFO_Choice SPA_TYPE_INFO_ENUM_BASE "Choice" +#define SPA_TYPE_INFO_CHOICE_BASE SPA_TYPE_INFO_Choice ":" + +static const struct spa_type_info spa_type_choice[] = { + { SPA_CHOICE_None, SPA_TYPE_Int, SPA_TYPE_INFO_CHOICE_BASE "None", NULL }, + { SPA_CHOICE_Range, SPA_TYPE_Int, SPA_TYPE_INFO_CHOICE_BASE "Range", NULL }, + { SPA_CHOICE_Step, SPA_TYPE_Int, SPA_TYPE_INFO_CHOICE_BASE "Step", NULL }, + { SPA_CHOICE_Enum, SPA_TYPE_Int, SPA_TYPE_INFO_CHOICE_BASE "Enum", NULL }, + { SPA_CHOICE_Flags, SPA_TYPE_Int, SPA_TYPE_INFO_CHOICE_BASE "Flags", NULL }, + { 0, 0, NULL, NULL } +}; + +/** + * \} + */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* SPA_TYPE_INFO_H */ diff --git a/spa/include/spa/utils/type-info.h b/spa/include/spa/utils/type-info.h index 029327871..643a7aca8 100644 --- a/spa/include/spa/utils/type-info.h +++ b/spa/include/spa/utils/type-info.h @@ -46,35 +46,13 @@ static inline bool spa_type_is_a(const char *type, const char *parent) } #include - -/* base for parameter object enumerations */ -#define SPA_TYPE_INFO_Direction SPA_TYPE_INFO_ENUM_BASE "Direction" -#define SPA_TYPE_INFO_DIRECTION_BASE SPA_TYPE_INFO_Direction ":" - -static const struct spa_type_info spa_type_direction[] = { - { SPA_DIRECTION_INPUT, SPA_TYPE_Int, SPA_TYPE_INFO_DIRECTION_BASE "Input", NULL }, - { SPA_DIRECTION_OUTPUT, SPA_TYPE_Int, SPA_TYPE_INFO_DIRECTION_BASE "Output", NULL }, - { 0, 0, NULL, NULL } -}; +#include #include #include #include #include -/* base for parameter object enumerations */ -#define SPA_TYPE_INFO_Choice SPA_TYPE_INFO_ENUM_BASE "Choice" -#define SPA_TYPE_INFO_CHOICE_BASE SPA_TYPE_INFO_Choice ":" - -static const struct spa_type_info spa_type_choice[] = { - { SPA_CHOICE_None, SPA_TYPE_Int, SPA_TYPE_INFO_CHOICE_BASE "None", NULL }, - { SPA_CHOICE_Range, SPA_TYPE_Int, SPA_TYPE_INFO_CHOICE_BASE "Range", NULL }, - { SPA_CHOICE_Step, SPA_TYPE_Int, SPA_TYPE_INFO_CHOICE_BASE "Step", NULL }, - { SPA_CHOICE_Enum, SPA_TYPE_Int, SPA_TYPE_INFO_CHOICE_BASE "Enum", NULL }, - { SPA_CHOICE_Flags, SPA_TYPE_Int, SPA_TYPE_INFO_CHOICE_BASE "Flags", NULL }, - { 0, 0, NULL, NULL } -}; - static const struct spa_type_info spa_types[] = { /* Basic types */ { SPA_TYPE_START, SPA_TYPE_START, SPA_TYPE_INFO_BASE, NULL },