plugins: rename __PLUGIN__ to VLC_DYNAMIC_PLUGIN

We should not use names stating with underscore for our internal code.
This is almost the same name used in the makefile for more coherence.

HAVE_DYNAMIC_PLUGINS already exists in the core. We keep a different
name to separate the 2 usages. For now they mean exactly the same thing.
This commit is contained in:
Steve Lhomme 2023-03-02 10:05:55 +01:00
parent a8ad45a9a2
commit 722c0fa260
17 changed files with 20 additions and 20 deletions

View File

@ -242,7 +242,7 @@ enum vlc_config_subcat
/* If the module is built-in, then we need to define foo_InitModule instead
* of InitModule. Same for Activate- and DeactivateModule. */
#ifdef __PLUGIN__
#ifdef VLC_DYNAMIC_PLUGIN
# define VLC_SYMBOL(symbol) symbol
# define VLC_MODULE_NAME_HIDDEN_SYMBOL \
EXTERN_SYMBOL const char vlc_module_name[] = MODULE_STRING;
@ -252,7 +252,7 @@ enum vlc_config_subcat
#endif
#define CDECL_SYMBOL
#if defined (__PLUGIN__)
#if defined (VLC_DYNAMIC_PLUGIN)
# if defined (_WIN32)
# define DLL_SYMBOL __declspec(dllexport)
# undef CDECL_SYMBOL
@ -407,7 +407,7 @@ VLC_METADATA_EXPORTS
#define set_section( text, longtext ) \
add_typedesc_inner( CONFIG_SECTION, text, longtext )
#ifndef __PLUGIN__
#ifndef VLC_DYNAMIC_PLUGIN
#define add_category_hint(text, longtext) \
add_typedesc_inner( CONFIG_HINT_CATEGORY, text, longtext )
#endif
@ -438,7 +438,7 @@ VLC_METADATA_EXPORTS
add_string_inner(CONFIG_ITEM_MODULE_LIST, name, text, longtext, value) \
vlc_config_set (VLC_CONFIG_CAPABILITY, VLC_CHECKED_TYPE(const char *, cap));
#ifndef __PLUGIN__
#ifndef VLC_DYNAMIC_PLUGIN
#define add_module_cat(name, subcategory, value, text, longtext) \
add_string_inner(CONFIG_ITEM_MODULE_CAT, name, text, longtext, value) \
change_integer_range (subcategory /* gruik */, 0);

View File

@ -20,7 +20,7 @@ MODULE_NAME = $$(p="$@"; p=$$(echo "$$p"|sed 's/lib//g'); p="$${p%_plugin*}"; p=
AM_CPPFLAGS = -DMODULE_STRING=\"$(MODULE_STRING)\"
if HAVE_DYNAMIC_PLUGINS
AM_CPPFLAGS += -D__PLUGIN__
AM_CPPFLAGS += -DVLC_DYNAMIC_PLUGIN
else
AM_CPPFLAGS += -DMODULE_NAME=$(MODULE_NAME)
endif

View File

@ -282,7 +282,7 @@ foreach module : vlc_modules
common_args = [
'-DMODULE_STRING="@0@"'.format(module['name']),
'-D__PLUGIN__'
'-DVLC_DYNAMIC_PLUGIN'
]
library(module['name'] + '_plugin',

View File

@ -13,7 +13,7 @@ Name: VLC plugin API
Description: VLC media player plugin interface
Version: @VERSION@
Cflags: -I${includedir} -I${pkgincludedir}/plugins \
-D__PLUGIN__ \
-DVLC_DYNAMIC_PLUGIN \
-D_FILE_OFFSET_BITS=64 \
@DEFS_BIGENDIAN@
Libs: -L${libdir} -lvlccore

View File

@ -27,7 +27,7 @@
/* Define a builtin module for mocked parts */
#define MODULE_NAME test_lua_extension
#define MODULE_STRING "test_lua_extension"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
const char vlc_module_name[] = MODULE_STRING;
#include "../../libvlc/test.h"

View File

@ -27,7 +27,7 @@
/* Define a builtin module for mocked parts */
#define MODULE_NAME test_misc_medialibrary
#define MODULE_STRING "test_misc_medialibrary"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
const char vlc_module_name[] = MODULE_STRING;
#include "../../libvlc/test.h"

View File

@ -27,7 +27,7 @@
/* Define a builtin module for mocked parts */
#define MODULE_NAME test_transcode_mock
#define MODULE_STRING "test_transcode_mock"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
static const char dec_dev_arg[] = "--dec-dev=" MODULE_STRING;

View File

@ -22,7 +22,7 @@
#define MODULE_NAME test_transcode_mock
#define MODULE_STRING "test_transcode_mock"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
#include <vlc_fourcc.h>

View File

@ -26,7 +26,7 @@
#define MODULE_NAME test_transcode_mock
#define MODULE_STRING "test_transcode_mock"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
#include <vlc_common.h>
#include <vlc_frame.h>

View File

@ -27,7 +27,7 @@
/* Define a builtin module for mocked parts */
#define MODULE_NAME test_input_decoder_mock
#define MODULE_STRING "test_input_decoder_mock"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
const char vlc_module_name[] = MODULE_STRING;

View File

@ -26,7 +26,7 @@
#define MODULE_NAME test_input_decoder_mock
#define MODULE_STRING "test_input_decoder_mock"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
#include <vlc_common.h>
#include <vlc_messages.h>

View File

@ -27,7 +27,7 @@
/* Define a builtin module for mocked parts */
#define MODULE_NAME test_misc_image
#define MODULE_STRING "test_misc_image"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
const char vlc_module_name[] = MODULE_STRING;
#include "../../libvlc/test.h"

View File

@ -27,7 +27,7 @@
/* Define a builtin module for mocked parts */
#define MODULE_NAME test_misc_image_cvpx
#define MODULE_STRING "test_misc_image_cvpx"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
const char vlc_module_name[] = MODULE_STRING;
#include "../../libvlc/test.h"

View File

@ -25,7 +25,7 @@
/* Define a builtin module for mocked parts */
#define MODULE_NAME test_offscreen_mock
#define MODULE_STRING "test_offscreen_mock"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
#include "../../libvlc/test.h"
#include "../../../lib/libvlc_internal.h"

View File

@ -27,7 +27,7 @@
/* Define a builtin module for mocked parts */
#define MODULE_NAME test_vout_mock
#define MODULE_STRING "test_vout_mock"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
static const char dec_dev_arg[] = "--dec-dev=" MODULE_STRING;

View File

@ -22,7 +22,7 @@
#define MODULE_NAME test_vout_mock
#define MODULE_STRING "test_vout_mock"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
#include <vlc_fourcc.h>
#include <vlc_vout_display.h>

View File

@ -26,7 +26,7 @@
#define MODULE_NAME test_vout_mock
#define MODULE_STRING "test_vout_mock"
#undef __PLUGIN__
#undef VLC_DYNAMIC_PLUGIN
#include <vlc_common.h>
#include "video_output.h"