This way we no longer need custom wrapper scripts or template files.
AUTHORS COPYING COPYING.LIB NEWS README RELEASE REQUIREMENTS \
ChangeLog gst-plugins-base.doap autogen.sh \
$(shell find "$(top_srcdir)" -type f -name meson.build ! -path "$(top_srcdir)/$(PACKAGE_TARNAME)-*" ) \
- gst-libs/gst/audio/audio_mkenum.py \
- gst-libs/gst/app/app_mkenum.py \
- gst-libs/gst/pbutils/pbutils_mkenum.py \
- gst-libs/gst/rtp/rtp_mkenum.py \
- gst-libs/gst/rtsp/rtsp_mkenum.py \
- gst-libs/gst/tag/tag_mkenum.py \
- gst-libs/gst/video/video_mkenum.py \
gst-libs/gst/gl/gstglconfig.h.meson \
meson_options.txt
+++ /dev/null
-#!/usr/bin/env python3
-
-# This is in its own file rather than inside meson.build
-# because a) mixing the two is ugly and b) trying to
-# make special characters such as \n go through all
-# backends is a fool's errand.
-
-import sys, os, shutil, subprocess
-
-h_array = ['--fhead',
- "#ifndef __GST_APP_ENUM_TYPES_H__\n#define __GST_APP_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n#include <gst/app/app-prelude.h>\nG_BEGIN_DECLS\n",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */\n",
- '--vhead',
- 'GST_APP_API GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n',
- '--ftail',
- 'G_END_DECLS\n\n#endif /* __GST_APP_ENUM_TYPES_H__ */',
- ]
-
-c_array = ['--fhead',
- "#include \"app-enumtypes.h\"\n\n#include \"app.h\" \n#include \"gstappsrc.h\"",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */",
- '--vhead',
- "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {",
- '--vprod',
- " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },",
- '--vtail',
- " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n",
- ]
-
-cmd = []
-argn = 1
-# Find the full command needed to run glib-mkenums
-# On UNIX-like, this is just the full path to glib-mkenums
-# On Windows, this is the full path to interpreter + full path to glib-mkenums
-for arg in sys.argv[1:]:
- cmd.append(arg)
- argn += 1
- if arg.endswith('glib-mkenums'):
- break
-ofilename = sys.argv[argn]
-headers = sys.argv[argn + 1:]
-
-if ofilename.endswith('.h'):
- arg_array = h_array
-else:
- arg_array = c_array
-
-cmd_array = cmd + arg_array + headers
-pc = subprocess.Popen(cmd_array, stdout=subprocess.PIPE)
-(stdo, _) = pc.communicate()
-if pc.returncode != 0:
- sys.exit(pc.returncode)
-open(ofilename, 'wb').write(stdo)
app_headers = app_mkenum_headers + [ 'app.h', 'app-prelude.h', 'gstappsink.h' ]
install_headers(app_headers, subdir : 'gstreamer-1.0/gst/app/')
-mkenums = find_program('app_mkenum.py')
-gstapp_h = custom_target('gstappenum_h',
- output : 'app-enumtypes.h',
- input : app_mkenum_headers,
- install : true,
- install_dir : 'include/gstreamer-1.0/gst/app/',
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+app_enums = gnome.mkenums_simple('app-enumtypes',
+ sources : app_mkenum_headers,
+ header_prefix : '#include <gst/app/app-prelude.h>',
+ decorator : 'GST_APP_API',
+ install_header: true,
+ install_dir : 'include/gstreamer-1.0/gst/app/')
+gstapp_c = app_enums[0]
+gstapp_h = app_enums[1]
-gstapp_c = custom_target('gstappenum_c',
- output : 'app-enumtypes.c',
- input : app_mkenum_headers,
- depends : [gstapp_h],
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
app_gen_sources = [gstapp_h]
gstapp = library('gstapp-@0@'.format(api_version),
+++ /dev/null
-#!/usr/bin/env python3
-
-# This is in its own file rather than inside meson.build
-# because a) mixing the two is ugly and b) trying to
-# make special characters such as \n go through all
-# backends is a fool's errand.
-
-import sys, os, shutil, subprocess
-
-h_array = ['--fhead',
- "#ifndef __GST_AUDIO_ENUM_TYPES_H__\n#define __GST_AUDIO_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n#include <gst/audio/audio-prelude.h>\nG_BEGIN_DECLS\n",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */\n",
- '--vhead',
- 'GST_AUDIO_API GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n',
- '--ftail',
- 'G_END_DECLS\n\n#endif /* __GST_AUDIO_ENUM_TYPES_H__ */',
- ]
-
-c_array = ['--fhead',
- "#include \"audio-enumtypes.h\"\n\n#include \"audio.h\" \n#include \"audio-format.h\" \n#include \"audio-channels.h\" \n#include \"audio-info.h\" \n#include \"gstaudioringbuffer.h\"",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */",
- '--vhead',
- "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {",
- '--vprod',
- " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },",
- '--vtail',
- " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n",
- ]
-
-cmd = []
-argn = 1
-# Find the full command needed to run glib-mkenums
-# On UNIX-like, this is just the full path to glib-mkenums
-# On Windows, this is the full path to interpreter + full path to glib-mkenums
-for arg in sys.argv[1:]:
- cmd.append(arg)
- argn += 1
- if arg.endswith('glib-mkenums'):
- break
-ofilename = sys.argv[argn]
-headers = sys.argv[argn + 1:]
-
-if ofilename.endswith('.h'):
- arg_array = h_array
-else:
- arg_array = c_array
-
-cmd_array = cmd + arg_array + headers
-pc = subprocess.Popen(cmd_array, stdout=subprocess.PIPE)
-(stdo, _) = pc.communicate()
-if pc.returncode != 0:
- sys.exit(pc.returncode)
-open(ofilename, 'wb').write(stdo)
]
install_headers(audio_headers, subdir : 'gstreamer-1.0/gst/audio/')
-mkenums = find_program('audio_mkenum.py')
-gstaudio_h = custom_target('gstaudioenum_h',
- output : 'audio-enumtypes.h',
- input : audio_mkenum_headers,
- install : true,
- install_dir : 'include/gstreamer-1.0/gst/audio/',
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+audio_enums = gnome.mkenums_simple('audio-enumtypes',
+ sources : audio_mkenum_headers,
+ header_prefix : '#include <gst/audio/audio-prelude.h>',
+ decorator : 'GST_AUDIO_API',
+ install_header: true,
+ install_dir : 'include/gstreamer-1.0/gst/audio/')
+gstaudio_c = audio_enums[0]
+gstaudio_h = audio_enums[1]
-gstaudio_c = custom_target('gstaudioenum_c',
- output : 'audio-enumtypes.c',
- input : audio_mkenum_headers,
- depends : [gstaudio_h],
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
audio_gen_sources = [gstaudio_h]
gstaudio_deps = [tag_dep, gst_base_dep, libm]
pbutils_mkenum_headers = pbutils_headers
-mkenums = find_program('pbutils_mkenum.py')
-gstpbutils_h = custom_target('gstpbutilsenum_h',
- output : 'pbutils-enumtypes.h',
- input : pbutils_mkenum_headers,
- install : true,
- install_dir : 'include/gstreamer-1.0/gst/pbutils/',
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
-
-gstpbutils_c = custom_target('gstpbutilsenum_c',
- output : 'pbutils-enumtypes.c',
- input : pbutils_mkenum_headers,
- depends : [gstaudio_h, gstvideo_h, gstpbutils_h],
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+pbutils_enums = gnome.mkenums_simple('pbutils-enumtypes',
+ sources : pbutils_mkenum_headers,
+ header_prefix : '#include <gst/pbutils/pbutils-prelude.h>',
+ decorator : 'GST_PBUTILS_API',
+ install_header: true,
+ install_dir : 'include/gstreamer-1.0/gst/pbutils/')
+gstpbutils_c = pbutils_enums[0]
+gstpbutils_h = pbutils_enums[1]
gstpbutils_deps = [video_dep, audio_dep, tag_dep]
pbutils = library('gstpbutils-@0@'.format(api_version),
+++ /dev/null
-#!/usr/bin/env python3
-
-# This is in its own file rather than inside meson.build
-# because a) mixing the two is ugly and b) trying to
-# make special characters such as \n go through all
-# backends is a fool's errand.
-
-import sys, os, shutil, subprocess
-
-h_array = ['--fhead',
- "#ifndef __PB_UTILS_ENUM_TYPES_H__\n#define __PB_UTILS_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n#include <gst/pbutils/pbutils-prelude.h>\nG_BEGIN_DECLS\n",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */\n",
- '--vhead',
- "GST_PBUTILS_API GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n",
- '--ftail',
- "G_END_DECLS\n\n#endif /* __PB_UTILS_ENUM_TYPES_H__ */"
-]
-
-c_array = ['--fhead',
- "#include \"pbutils-enumtypes.h\"\n\n#include \"pbutils.h\" \n#include \"codec-utils.h\" \n#include \"descriptions.h\" \n#include \"encoding-profile.h\" \n#include \"encoding-target.h\" \n#include \"install-plugins.h\" \n#include \"missing-plugins.h\" \n#include \"gstdiscoverer.h\" \n#include \"gstaudiovisualizer.h\"",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */",
- '--vhead',
- "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {",
- '--vprod',
- " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },",
- '--vtail',
- " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n"
-]
-
-cmd = []
-argn = 1
-# Find the full command needed to run glib-mkenums
-# On UNIX-like, this is just the full path to glib-mkenums
-# On Windows, this is the full path to interpreter + full path to glib-mkenums
-for arg in sys.argv[1:]:
- cmd.append(arg)
- argn += 1
- if arg.endswith('glib-mkenums'):
- break
-ofilename = sys.argv[argn]
-headers = sys.argv[argn + 1:]
-
-if ofilename.endswith('.h'):
- arg_array = h_array
-else:
- arg_array = c_array
-
-cmd_array = cmd + arg_array + headers
-pc = subprocess.Popen(cmd_array, stdout=subprocess.PIPE)
-(stdo, _) = pc.communicate()
-if pc.returncode != 0:
- sys.exit(pc.returncode)
-open(ofilename, 'wb').write(stdo)
]
install_headers(rtp_headers, subdir : 'gstreamer-1.0/gst/rtp/')
-mkenums = find_program('rtp_mkenum.py')
-
-gstrtp_enum_h = custom_target('gstrtp_enum_h',
- output : 'gstrtp-enumtypes.h',
- input : rtp_headers,
- install : true,
- install_dir : 'include/gstreamer-1.0/gst/rtp/',
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
-
-gstrtp_enum_c = custom_target('gstrtp_enum_c',
- output : 'gstrtp-enumtypes.c',
- input : rtp_headers,
- depends : [gstaudio_h, gstrtp_enum_h],
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+rtp_enums = gnome.mkenums_simple('gstrtp-enumtypes',
+ sources : rtp_headers,
+ header_prefix : '#include <gst/rtp/rtp-prelude.h>',
+ decorator : 'GST_RTP_API',
+ install_header: true,
+ install_dir : 'include/gstreamer-1.0/gst/rtp/')
+gstrtp_enum_c = rtp_enums[0]
+gstrtp_enum_h = rtp_enums[1]
gstrtp_deps = [audio_dep, gst_base_dep]
gst_rtp = library('gstrtp-@0@'.format(api_version),
+++ /dev/null
-#!/usr/bin/env python3
-
-# This is in its own file rather than inside meson.build
-# because a) mixing the two is ugly and b) trying to
-# make special characters such as \n go through all
-# backends is a fool's errand.
-
-import sys, os, shutil, subprocess
-
-h_array = ['--fhead',
- "#ifndef __GST_RTP_ENUM_TYPES_H__\n#define __GST_RTP_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n#include <gst/rtp/rtp-prelude.h>\nG_BEGIN_DECLS\n",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */\n",
- '--vhead',
- 'GST_RTP_API GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n',
- '--ftail',
- 'G_END_DECLS\n\n#endif /* __GST_RTP_ENUM_TYPES_H__ */',
- ]
-
-c_array = ['--fhead',
- '#include "rtp.h"',
- '--fprod',
- "\n/* enumerations from \"@filename@\" */",
- '--vhead',
- "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {",
- '--vprod',
- " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },",
- '--vtail',
- " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n",
- ]
-
-cmd = []
-argn = 1
-# Find the full command needed to run glib-mkenums
-# On UNIX-like, this is just the full path to glib-mkenums
-# On Windows, this is the full path to interpreter + full path to glib-mkenums
-for arg in sys.argv[1:]:
- cmd.append(arg)
- argn += 1
- if arg.endswith('glib-mkenums'):
- break
-ofilename = sys.argv[argn]
-headers = sys.argv[argn + 1:]
-
-if ofilename.endswith('.h'):
- arg_array = h_array
-else:
- arg_array = c_array
-
-cmd_array = cmd + arg_array + headers
-pc = subprocess.Popen(cmd_array, stdout=subprocess.PIPE)
-(stdo, _) = pc.communicate()
-if pc.returncode != 0:
- sys.exit(pc.returncode)
-open(ofilename, 'wb').write(stdo)
]
install_headers(rtsp_headers, subdir : 'gstreamer-1.0/gst/rtsp/')
-mkenums = find_program('rtsp_mkenum.py')
-
-gstrtsp_h = custom_target('gstrtspenum_h',
- output : 'gstrtsp-enumtypes.h',
- input : rtsp_headers,
- install : true,
- install_dir : 'include/gstreamer-1.0/gst/rtsp/',
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
-
-gstrtsp_c = custom_target('gstrtspenum_c',
- output : 'gstrtsp-enumtypes.c',
- input : rtsp_headers,
- depends : [gstrtsp_h],
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+rtsp_enums = gnome.mkenums_simple('gstrtsp-enumtypes',
+ sources : rtsp_headers,
+ header_prefix : '#include <gst/rtsp/rtsp-prelude.h>',
+ decorator : 'GST_RTSP_API',
+ install_header: true,
+ install_dir : 'include/gstreamer-1.0/gst/rtsp/')
+gstrtsp_c = rtsp_enums[0]
+gstrtsp_h = rtsp_enums[1]
winsock2 = cc.find_library('ws2_32', required : false)
+++ /dev/null
-#!/usr/bin/env python3
-
-# This is in its own file rather than inside meson.build
-# because a) mixing the two is ugly and b) trying to
-# make special characters such as \n go through all
-# backends is a fool's errand.
-
-import sys, os, shutil, subprocess
-
-h_array = [
- '--fhead',
- "#ifndef __gst_rtsp_ENUM_TYPES_H__\n#define __gst_rtsp_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n#include <gst/rtsp/rtsp-prelude.h>\nG_BEGIN_DECLS\n",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */\n",
- '--vhead',
- "GST_RTSP_API GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n",
- '--ftail',
- "G_END_DECLS\n\n#endif /* __gst_rtsp_ENUM_TYPES_H__ */"
-]
-
-c_array = ['--fhead',
- "#include \"gstrtsp-enumtypes.h\"\n\n#include \"rtsp.h\"",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */",
- '--vhead',
- "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {",
- '--vprod',
- " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },",
- '--vtail',
- " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n"
-]
-
-
-cmd = []
-argn = 1
-# Find the full command needed to run glib-mkenums
-# On UNIX-like, this is just the full path to glib-mkenums
-# On Windows, this is the full path to interpreter + full path to glib-mkenums
-for arg in sys.argv[1:]:
- cmd.append(arg)
- argn += 1
- if arg.endswith('glib-mkenums'):
- break
-ofilename = sys.argv[argn]
-headers = sys.argv[argn + 1:]
-
-if ofilename.endswith('.h'):
- arg_array = h_array
-else:
- arg_array = c_array
-
-cmd_array = cmd + arg_array + headers
-pc = subprocess.Popen(cmd_array, stdout=subprocess.PIPE)
-(stdo, _) = pc.communicate()
-if pc.returncode != 0:
- sys.exit(pc.returncode)
-open(ofilename, 'wb').write(stdo)
]
install_headers(tag_headers, subdir : 'gstreamer-1.0/gst/tag/')
-mkenums = find_program('tag_mkenum.py')
-gsttag_h = custom_target('gsttagenum_h',
- output : 'tag-enumtypes.h',
- input : tag_mkenum_headers,
- install : true,
- install_dir : 'include/gstreamer-1.0/gst/tag/',
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
-
-gsttag_c = custom_target('gsttagenum_c',
- output : 'tag-enumtypes.c',
- input : tag_mkenum_headers,
- depends : [gsttag_h],
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+tag_enums = gnome.mkenums_simple('tag-enumtypes',
+ sources : tag_mkenum_headers,
+ header_prefix : '#include <gst/tag/tag-prelude.h>',
+ decorator : 'GST_TAG_API',
+ install_header: true,
+ install_dir : 'include/gstreamer-1.0/gst/tag/')
+gsttag_c = tag_enums[0]
+gsttag_h = tag_enums[1]
tag_gen_sources = [gsttag_h]
tag_deps = [gst_base_dep, libm]
+++ /dev/null
-#!/usr/bin/env python3
-
-# This is in its own file rather than inside meson.build
-# because a) mixing the two is ugly and b) trying to
-# make special characters such as \n go through all
-# backends is a fool's errand.
-
-import sys, os, shutil, subprocess
-
-h_array = ['--fhead',
- "#ifndef __GST_TAG_ENUM_TYPES_H__\n#define __GST_TAG_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n#include <gst/tag/tag-prelude.h>\nG_BEGIN_DECLS\n",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */\n",
- '--vhead',
- 'GST_TAG_API GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n',
- '--ftail',
- 'G_END_DECLS\n\n#endif /* __GST_TAG_ENUM_TYPES_H__ */',
- ]
-
-c_array = ['--fhead',
- "#include \"tag-enumtypes.h\"\n\n#include \"tag.h\" \n#include \"gsttagdemux.h\"",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */",
- '--vhead',
- "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {",
- '--vprod',
- " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },",
- '--vtail',
- " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n",
- ]
-
-cmd = []
-argn = 1
-# Find the full command needed to run glib-mkenums
-# On UNIX-like, this is just the full path to glib-mkenums
-# On Windows, this is the full path to interpreter + full path to glib-mkenums
-for arg in sys.argv[1:]:
- cmd.append(arg)
- argn += 1
- if arg.endswith('glib-mkenums'):
- break
-ofilename = sys.argv[argn]
-headers = sys.argv[argn + 1:]
-
-if ofilename.endswith('.h'):
- arg_array = h_array
-else:
- arg_array = c_array
-
-cmd_array = cmd + arg_array + headers
-pc = subprocess.Popen(cmd_array, stdout=subprocess.PIPE)
-(stdo, _) = pc.communicate()
-if pc.returncode != 0:
- sys.exit(pc.returncode)
-open(ofilename, 'wb').write(stdo)
'navigation.h',
]
-mkenums = find_program('video_mkenum.py')
-gstvideo_h = custom_target('gstvideoenum_h',
- output : 'video-enumtypes.h',
- input : video_mkenum_headers,
- install : true,
- install_dir : 'include/gstreamer-1.0/gst/video/',
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
-
-gstvideo_c = custom_target('gstvideoenum_c',
- output : 'video-enumtypes.c',
- input : video_mkenum_headers,
- depends : [gstvideo_h],
- command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+video_enums = gnome.mkenums_simple('video-enumtypes',
+ sources : video_mkenum_headers,
+ header_prefix : '#include <gst/video/video-prelude.h>',
+ decorator : 'GST_VIDEO_API',
+ install_header: true,
+ install_dir : 'include/gstreamer-1.0/gst/video/')
+gstvideo_c = video_enums[0]
+gstvideo_h = video_enums[1]
video_gen_sources = [gstvideo_h]
orcsrc = 'video-orc'
+++ /dev/null
-#!/usr/bin/env python3
-
-# This is in its own file rather than inside meson.build
-# because a) mixing the two is ugly and b) trying to
-# make special characters such as \n go through all
-# backends is a fool's errand.
-
-import sys, os, shutil, subprocess
-
-h_array = ['--fhead',
- "#ifndef __GST_VIDEO_ENUM_TYPES_H__\n#define __GST_VIDEO_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n#include <gst/video/video-prelude.h>\nG_BEGIN_DECLS\n",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */\n",
- '--vhead',
- "GST_VIDEO_API GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n",
- '--ftail',
- "G_END_DECLS\n\n#endif /* __GST_VIDEO_ENUM_TYPES_H__ */"
-]
-
-c_array = ['--fhead',
- "#include \"video-enumtypes.h\"\n\n#include \"video.h\" \n#include \"video-format.h\" \n#include \"video-color.h\" \n#include \"video-info.h\" \n#include \"colorbalance.h\" \n#include \"navigation.h\" \n#include \"video-chroma.h\" \n#include \"video-tile.h\"",
- '--fprod',
- "\n/* enumerations from \"@filename@\" */",
- '--vhead',
- "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {",
- '--vprod',
- " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },",
- '--vtail',
- " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n"
-]
-
-cmd = []
-argn = 1
-# Find the full command needed to run glib-mkenums
-# On UNIX-like, this is just the full path to glib-mkenums
-# On Windows, this is the full path to interpreter + full path to glib-mkenums
-for arg in sys.argv[1:]:
- cmd.append(arg)
- argn += 1
- if arg.endswith('glib-mkenums'):
- break
-ofilename = sys.argv[argn]
-headers = sys.argv[argn + 1:]
-
-if ofilename.endswith('.h'):
- arg_array = h_array
-else:
- arg_array = c_array
-
-cmd_array = cmd + arg_array + headers
-pc = subprocess.Popen(cmd_array, stdout=subprocess.PIPE)
-(stdo, _) = pc.communicate()
-if pc.returncode != 0:
- sys.exit(pc.returncode)
-open(ofilename, 'wb').write(stdo)
project('gst-plugins-base', 'c',
version : '1.15.0.1',
- meson_version : '>= 0.36.0',
+ meson_version : '>= 0.42.0',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
gst_controller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_controller_dep'])
-# Used by the *_mkenum.py helper scripts
-glib_mkenums = find_program('glib-mkenums')
-
have_orcc = false
orcc_args = []
if get_option('use_orc') != 'no'