mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
validate: cleanup the use of GST_VALIDATE_API on Windows
Export or import properly the method from GST_VALIDATE_API with a proper config.h Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3429>
This commit is contained in:
parent
322739264f
commit
1ba066bda2
9 changed files with 43 additions and 9 deletions
|
@ -1,4 +1,9 @@
|
||||||
/*** BEGIN file-header ***/
|
/*** BEGIN file-header ***/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "gst-validate-enum-types.h"
|
#include "gst-validate-enum-types.h"
|
||||||
#include <gst/validate/validate.h>
|
#include <gst/validate/validate.h>
|
||||||
#define C_ENUM(v) ((gint) v)
|
#define C_ENUM(v) ((gint) v)
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include "validate.h"
|
#include "validate.h"
|
||||||
#include "gst-validate-utils.h"
|
#include "gst-validate-utils.h"
|
||||||
#include "gst-validate-internal.h"
|
#include "gst-validate-internal.h"
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EXTRA_CHECKS_WRONG_NUMBER_OF_INSTANCES g_quark_from_static_string ("extrachecks::wrong-number-of-instances")
|
#define EXTRA_CHECKS_WRONG_NUMBER_OF_INSTANCES g_quark_from_static_string ("extrachecks::wrong-number-of-instances")
|
||||||
|
|
||||||
|
|
|
@ -22,13 +22,14 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "validate.h"
|
#include "validate.h"
|
||||||
#include "gst-validate-internal.h"
|
#include "gst-validate-internal.h"
|
||||||
#include "gst-validate-report.h"
|
#include "gst-validate-report.h"
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "media-descriptor-parser.h"
|
#include "media-descriptor-parser.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <gst/validate/validate.h>
|
#include <gst/validate/validate.h>
|
||||||
#include "media-descriptor-writer.h"
|
#include "media-descriptor-writer.h"
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "media-descriptor.h"
|
#include "media-descriptor.h"
|
||||||
|
|
|
@ -58,14 +58,14 @@ gst_validate_enums = gnome.mkenums('gstvalidateenumtypes',
|
||||||
|
|
||||||
validate_deps = [gst_check_dep, gst_dep, gst_controller_dep, gstbase_dep,
|
validate_deps = [gst_check_dep, gst_dep, gst_controller_dep, gstbase_dep,
|
||||||
gio_dep, gmodule_dep, gst_pbutils_dep, mathlib, json_dep]
|
gio_dep, gmodule_dep, gst_pbutils_dep, mathlib, json_dep]
|
||||||
gstvalidate = library('gstvalidate-1.0',
|
gstvalidate = library('gstvalidate-@0@'.format(apiversion),
|
||||||
sources: gstvalidate_sources + gst_validate_enums + runner_file,
|
sources: gstvalidate_sources + gst_validate_enums + runner_file,
|
||||||
version : libversion,
|
version : libversion,
|
||||||
soversion : soversion,
|
soversion : soversion,
|
||||||
darwin_versions : osxversion,
|
darwin_versions : osxversion,
|
||||||
include_directories : [inc_dirs],
|
include_directories : [inc_dirs],
|
||||||
install: true,
|
install: true,
|
||||||
c_args : [gst_c_args] + ['-D_GNU_SOURCE'],
|
c_args : [gst_c_args] + ['-D_GNU_SOURCE', '-DBUILDING_GST_VALIDATE'],
|
||||||
dependencies : validate_deps)
|
dependencies : validate_deps)
|
||||||
|
|
||||||
if not static_build
|
if not static_build
|
||||||
|
@ -73,7 +73,7 @@ if not static_build
|
||||||
sources: gst_validate_enums + runner_file,
|
sources: gst_validate_enums + runner_file,
|
||||||
include_directories : [inc_dirs],
|
include_directories : [inc_dirs],
|
||||||
install: true,
|
install: true,
|
||||||
c_args : [gst_c_args] + ['-D__GST_VALIDATE_PLUGIN', '-D_GNU_SOURCE'],
|
c_args : [gst_c_args] + ['-D__GST_VALIDATE_PLUGIN', '-D_GNU_SOURCE', '-DBUILDING_GST_VALIDATE'],
|
||||||
install_dir : plugins_install_dir,
|
install_dir : plugins_install_dir,
|
||||||
objects: gstvalidate.extract_objects(gstvalidate_sources),
|
objects: gstvalidate.extract_objects(gstvalidate_sources),
|
||||||
dependencies : validate_deps)
|
dependencies : validate_deps)
|
||||||
|
|
|
@ -25,7 +25,11 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
#ifndef GST_VALIDATE_API
|
#ifndef GST_VALIDATE_API
|
||||||
#define GST_VALIDATE_API GST_EXPORT
|
#ifdef BUILDING_GST_VALIDATE
|
||||||
|
#define GST_VALIDATE_API GST_API_EXPORT /* from config.h */
|
||||||
|
#else
|
||||||
|
#define GST_VALIDATE_API GST_API_IMPORT
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __GST_VALIDATE_PRELUDE_H__ */
|
#endif /* __GST_VALIDATE_PRELUDE_H__ */
|
||||||
|
|
|
@ -16,6 +16,19 @@ if cc.has_header('unistd.h')
|
||||||
cdata.set('HAVE_UNISTD_H', 1)
|
cdata.set('HAVE_UNISTD_H', 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Symbol visibility
|
||||||
|
if cc.get_id() == 'msvc'
|
||||||
|
export_define = '__declspec(dllexport) extern'
|
||||||
|
elif cc.has_argument('-fvisibility=hidden')
|
||||||
|
add_project_arguments('-fvisibility=hidden', language: 'c')
|
||||||
|
export_define = 'extern __attribute__ ((visibility ("default")))'
|
||||||
|
else
|
||||||
|
export_define = 'extern'
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Passing this through the command line would be too messy
|
||||||
|
cdata.set('GST_API_EXPORT', export_define)
|
||||||
|
|
||||||
configure_file(output : 'config.h', configuration : cdata)
|
configure_file(output : 'config.h', configuration : cdata)
|
||||||
|
|
||||||
validate_plugins_install_dir = '@0@/gstreamer-1.0/validate'.format(get_option('libdir'))
|
validate_plugins_install_dir = '@0@/gstreamer-1.0/validate'.format(get_option('libdir'))
|
||||||
|
|
Loading…
Reference in a new issue