diff --git a/src/lib/clapper/clapper.c b/src/lib/clapper/clapper-basic-functions.c similarity index 98% rename from src/lib/clapper/clapper.c rename to src/lib/clapper/clapper-basic-functions.c index 8d181f59..32e58f45 100644 --- a/src/lib/clapper/clapper.c +++ b/src/lib/clapper/clapper-basic-functions.c @@ -1,5 +1,5 @@ /* Clapper Playback Library - * Copyright (C) 2024 Rafał Dzięgiel + * Copyright (C) 2025 Rafał Dzięgiel * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,7 +22,7 @@ #include #include -#include "clapper.h" +#include "clapper-basic-functions.h" #include "clapper-cache-private.h" #include "clapper-utils-private.h" #include "clapper-playbin-bus-private.h" @@ -31,6 +31,8 @@ #include "clapper-enhancer-proxy-list-private.h" #include "gst/clapper-plugin-private.h" +#include "clapper-functionalities-availability.h" + #if CLAPPER_WITH_ENHANCERS_LOADER #include "clapper-enhancers-loader-private.h" #endif diff --git a/src/lib/clapper/clapper-basic-functions.h b/src/lib/clapper/clapper-basic-functions.h new file mode 100644 index 00000000..2aacc876 --- /dev/null +++ b/src/lib/clapper/clapper-basic-functions.h @@ -0,0 +1,46 @@ +/* Clapper Playback Library + * Copyright (C) 2025 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#pragma once + +#if !defined(__CLAPPER_INSIDE__) && !defined(CLAPPER_COMPILATION) +#error "Only can be included directly." +#endif + +#include +#include + +#include +#include + +G_BEGIN_DECLS + +CLAPPER_API +void clapper_init (int *argc, char **argv[]); + +CLAPPER_API +gboolean clapper_init_check (int *argc, char **argv[]); + +CLAPPER_DEPRECATED +gboolean clapper_enhancer_check (GType iface_type, const gchar *scheme, const gchar *host, const gchar **name); + +CLAPPER_API +ClapperEnhancerProxyList * clapper_get_global_enhancer_proxies (void); + +G_END_DECLS diff --git a/src/lib/clapper/clapper-enhancer-proxy-list.c b/src/lib/clapper/clapper-enhancer-proxy-list.c index e2756421..619436bd 100644 --- a/src/lib/clapper/clapper-enhancer-proxy-list.c +++ b/src/lib/clapper/clapper-enhancer-proxy-list.c @@ -27,7 +27,7 @@ #include -#include "clapper.h" +#include "clapper-basic-functions.h" #include "clapper-enhancer-proxy-list-private.h" #include "clapper-enhancer-proxy-private.h" diff --git a/src/lib/clapper/clapper-enhancer-proxy.c b/src/lib/clapper/clapper-enhancer-proxy.c index 703e053f..cd70a9ce 100644 --- a/src/lib/clapper/clapper-enhancer-proxy.c +++ b/src/lib/clapper/clapper-enhancer-proxy.c @@ -43,8 +43,9 @@ #include -#include "clapper.h" #include "clapper-enhancer-proxy-private.h" +#include "clapper-enhancer-proxy-list.h" +#include "clapper-basic-functions.h" #include "clapper-cache-private.h" #include "clapper-extractable.h" #include "clapper-enums.h" diff --git a/src/lib/clapper/clapper.h b/src/lib/clapper/clapper.h index 8c94e56f..aacad5bf 100644 --- a/src/lib/clapper/clapper.h +++ b/src/lib/clapper/clapper.h @@ -19,9 +19,6 @@ #pragma once -#include -#include - #define __CLAPPER_INSIDE__ #include @@ -30,6 +27,7 @@ #include #include +#include #include #include #include @@ -61,20 +59,4 @@ #include #endif -G_BEGIN_DECLS - -CLAPPER_API -void clapper_init (int *argc, char **argv[]); - -CLAPPER_API -gboolean clapper_init_check (int *argc, char **argv[]); - -CLAPPER_DEPRECATED -gboolean clapper_enhancer_check (GType iface_type, const gchar *scheme, const gchar *host, const gchar **name); - -CLAPPER_API -ClapperEnhancerProxyList * clapper_get_global_enhancer_proxies (void); - -G_END_DECLS - #undef __CLAPPER_INSIDE__ diff --git a/src/lib/clapper/gst/clapper-enhancer-src-private.h b/src/lib/clapper/gst/clapper-enhancer-src-private.h index 6aeca22e..4e313d74 100644 --- a/src/lib/clapper/gst/clapper-enhancer-src-private.h +++ b/src/lib/clapper/gst/clapper-enhancer-src-private.h @@ -20,6 +20,7 @@ #pragma once #include +#include #include #include diff --git a/src/lib/clapper/gst/clapper-enhancer-src.c b/src/lib/clapper/gst/clapper-enhancer-src.c index e0d8fa17..9297e622 100644 --- a/src/lib/clapper/gst/clapper-enhancer-src.c +++ b/src/lib/clapper/gst/clapper-enhancer-src.c @@ -22,9 +22,10 @@ #include "clapper-enhancer-src-private.h" #include "clapper-enhancer-director-private.h" -#include "../clapper.h" -#include "../clapper-enhancer-proxy-list-private.h" -#include "../clapper-extractable-private.h" +#include "../clapper-basic-functions.h" +#include "../clapper-enhancer-proxy.h" +#include "../clapper-enhancer-proxy-list.h" +#include "../clapper-extractable.h" #include "../clapper-harvest-private.h" #define GST_CAT_DEFAULT clapper_enhancer_src_debug diff --git a/src/lib/clapper/gst/clapper-plugin.c b/src/lib/clapper/gst/clapper-plugin.c index f6d51165..7a758722 100644 --- a/src/lib/clapper/gst/clapper-plugin.c +++ b/src/lib/clapper/gst/clapper-plugin.c @@ -21,10 +21,13 @@ #include -#include "../clapper.h" -#include "clapper-enhancer-src-private.h" +#include "../clapper-basic-functions.h" +#include "../clapper-enhancer-proxy.h" +#include "../clapper-enhancer-proxy-list.h" +#include "../clapper-extractable.h" #include "clapper-plugin-private.h" +#include "clapper-enhancer-src-private.h" #include "clapper-uri-list-demux-private.h" /* diff --git a/src/lib/clapper/gst/clapper-uri-list-demux-private.h b/src/lib/clapper/gst/clapper-uri-list-demux-private.h index 2839673f..0ba953fd 100644 --- a/src/lib/clapper/gst/clapper-uri-list-demux-private.h +++ b/src/lib/clapper/gst/clapper-uri-list-demux-private.h @@ -20,6 +20,7 @@ #pragma once #include +#include #include #include diff --git a/src/lib/clapper/meson.build b/src/lib/clapper/meson.build index 7ed03631..d126de82 100644 --- a/src/lib/clapper/meson.build +++ b/src/lib/clapper/meson.build @@ -111,6 +111,7 @@ clapper_headers = [ 'clapper.h', 'clapper-enums.h', 'clapper-audio-stream.h', + 'clapper-basic-functions.h', 'clapper-enhancer-proxy.h', 'clapper-enhancer-proxy-list.h', 'clapper-extractable.h', @@ -131,9 +132,9 @@ clapper_headers = [ clapper_visibility_header, ] clapper_sources = [ - 'clapper.c', 'clapper-app-bus.c', 'clapper-audio-stream.c', + 'clapper-basic-functions.c', 'clapper-cache.c', 'clapper-enhancer-proxy.c', 'clapper-enhancer-proxy-list.c',