meson: libs: use gnome.mkenums_simple() to generate enumtypes files
This way we no longer need custom wrapper scripts or template files.
This commit is contained in:
parent
9324ada729
commit
345aa2cd9e
@ -33,13 +33,6 @@ EXTRA_DIST = \
|
|||||||
AUTHORS COPYING COPYING.LIB NEWS README RELEASE REQUIREMENTS \
|
AUTHORS COPYING COPYING.LIB NEWS README RELEASE REQUIREMENTS \
|
||||||
ChangeLog gst-plugins-base.doap autogen.sh \
|
ChangeLog gst-plugins-base.doap autogen.sh \
|
||||||
$(shell find "$(top_srcdir)" -type f -name meson.build ! -path "$(top_srcdir)/$(PACKAGE_TARNAME)-*" ) \
|
$(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 \
|
gst-libs/gst/gl/gstglconfig.h.meson \
|
||||||
meson_options.txt
|
meson_options.txt
|
||||||
|
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
#!/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)
|
|
@ -7,19 +7,15 @@ app_mkenum_headers = [
|
|||||||
app_headers = app_mkenum_headers + [ 'app.h', 'app-prelude.h', 'gstappsink.h' ]
|
app_headers = app_mkenum_headers + [ 'app.h', 'app-prelude.h', 'gstappsink.h' ]
|
||||||
install_headers(app_headers, subdir : 'gstreamer-1.0/gst/app/')
|
install_headers(app_headers, subdir : 'gstreamer-1.0/gst/app/')
|
||||||
|
|
||||||
mkenums = find_program('app_mkenum.py')
|
app_enums = gnome.mkenums_simple('app-enumtypes',
|
||||||
gstapp_h = custom_target('gstappenum_h',
|
sources : app_mkenum_headers,
|
||||||
output : 'app-enumtypes.h',
|
header_prefix : '#include <gst/app/app-prelude.h>',
|
||||||
input : app_mkenum_headers,
|
decorator : 'GST_APP_API',
|
||||||
install : true,
|
install_header: true,
|
||||||
install_dir : 'include/gstreamer-1.0/gst/app/',
|
install_dir : 'include/gstreamer-1.0/gst/app/')
|
||||||
command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
|
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]
|
app_gen_sources = [gstapp_h]
|
||||||
|
|
||||||
gstapp = library('gstapp-@0@'.format(api_version),
|
gstapp = library('gstapp-@0@'.format(api_version),
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
#!/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)
|
|
@ -60,19 +60,15 @@ audio_headers = audio_mkenum_headers + [
|
|||||||
]
|
]
|
||||||
install_headers(audio_headers, subdir : 'gstreamer-1.0/gst/audio/')
|
install_headers(audio_headers, subdir : 'gstreamer-1.0/gst/audio/')
|
||||||
|
|
||||||
mkenums = find_program('audio_mkenum.py')
|
audio_enums = gnome.mkenums_simple('audio-enumtypes',
|
||||||
gstaudio_h = custom_target('gstaudioenum_h',
|
sources : audio_mkenum_headers,
|
||||||
output : 'audio-enumtypes.h',
|
header_prefix : '#include <gst/audio/audio-prelude.h>',
|
||||||
input : audio_mkenum_headers,
|
decorator : 'GST_AUDIO_API',
|
||||||
install : true,
|
install_header: true,
|
||||||
install_dir : 'include/gstreamer-1.0/gst/audio/',
|
install_dir : 'include/gstreamer-1.0/gst/audio/')
|
||||||
command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
|
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]
|
audio_gen_sources = [gstaudio_h]
|
||||||
|
|
||||||
gstaudio_deps = [tag_dep, gst_base_dep, libm]
|
gstaudio_deps = [tag_dep, gst_base_dep, libm]
|
||||||
|
@ -38,19 +38,14 @@ install_headers(pbutils_headers, subdir : 'gstreamer-1.0/gst/pbutils/')
|
|||||||
|
|
||||||
pbutils_mkenum_headers = pbutils_headers
|
pbutils_mkenum_headers = pbutils_headers
|
||||||
|
|
||||||
mkenums = find_program('pbutils_mkenum.py')
|
pbutils_enums = gnome.mkenums_simple('pbutils-enumtypes',
|
||||||
gstpbutils_h = custom_target('gstpbutilsenum_h',
|
sources : pbutils_mkenum_headers,
|
||||||
output : 'pbutils-enumtypes.h',
|
header_prefix : '#include <gst/pbutils/pbutils-prelude.h>',
|
||||||
input : pbutils_mkenum_headers,
|
decorator : 'GST_PBUTILS_API',
|
||||||
install : true,
|
install_header: true,
|
||||||
install_dir : 'include/gstreamer-1.0/gst/pbutils/',
|
install_dir : 'include/gstreamer-1.0/gst/pbutils/')
|
||||||
command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
|
gstpbutils_c = pbutils_enums[0]
|
||||||
|
gstpbutils_h = pbutils_enums[1]
|
||||||
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@'])
|
|
||||||
|
|
||||||
gstpbutils_deps = [video_dep, audio_dep, tag_dep]
|
gstpbutils_deps = [video_dep, audio_dep, tag_dep]
|
||||||
pbutils = library('gstpbutils-@0@'.format(api_version),
|
pbutils = library('gstpbutils-@0@'.format(api_version),
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
#!/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)
|
|
@ -22,20 +22,14 @@ rtp_headers = [
|
|||||||
]
|
]
|
||||||
install_headers(rtp_headers, subdir : 'gstreamer-1.0/gst/rtp/')
|
install_headers(rtp_headers, subdir : 'gstreamer-1.0/gst/rtp/')
|
||||||
|
|
||||||
mkenums = find_program('rtp_mkenum.py')
|
rtp_enums = gnome.mkenums_simple('gstrtp-enumtypes',
|
||||||
|
sources : rtp_headers,
|
||||||
gstrtp_enum_h = custom_target('gstrtp_enum_h',
|
header_prefix : '#include <gst/rtp/rtp-prelude.h>',
|
||||||
output : 'gstrtp-enumtypes.h',
|
decorator : 'GST_RTP_API',
|
||||||
input : rtp_headers,
|
install_header: true,
|
||||||
install : true,
|
install_dir : 'include/gstreamer-1.0/gst/rtp/')
|
||||||
install_dir : 'include/gstreamer-1.0/gst/rtp/',
|
gstrtp_enum_c = rtp_enums[0]
|
||||||
command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
|
gstrtp_enum_h = rtp_enums[1]
|
||||||
|
|
||||||
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@'])
|
|
||||||
|
|
||||||
gstrtp_deps = [audio_dep, gst_base_dep]
|
gstrtp_deps = [audio_dep, gst_base_dep]
|
||||||
gst_rtp = library('gstrtp-@0@'.format(api_version),
|
gst_rtp = library('gstrtp-@0@'.format(api_version),
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
#!/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)
|
|
@ -22,20 +22,14 @@ rtsp_headers = [
|
|||||||
]
|
]
|
||||||
install_headers(rtsp_headers, subdir : 'gstreamer-1.0/gst/rtsp/')
|
install_headers(rtsp_headers, subdir : 'gstreamer-1.0/gst/rtsp/')
|
||||||
|
|
||||||
mkenums = find_program('rtsp_mkenum.py')
|
rtsp_enums = gnome.mkenums_simple('gstrtsp-enumtypes',
|
||||||
|
sources : rtsp_headers,
|
||||||
gstrtsp_h = custom_target('gstrtspenum_h',
|
header_prefix : '#include <gst/rtsp/rtsp-prelude.h>',
|
||||||
output : 'gstrtsp-enumtypes.h',
|
decorator : 'GST_RTSP_API',
|
||||||
input : rtsp_headers,
|
install_header: true,
|
||||||
install : true,
|
install_dir : 'include/gstreamer-1.0/gst/rtsp/')
|
||||||
install_dir : 'include/gstreamer-1.0/gst/rtsp/',
|
gstrtsp_c = rtsp_enums[0]
|
||||||
command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
|
gstrtsp_h = rtsp_enums[1]
|
||||||
|
|
||||||
gstrtsp_c = custom_target('gstrtspenum_c',
|
|
||||||
output : 'gstrtsp-enumtypes.c',
|
|
||||||
input : rtsp_headers,
|
|
||||||
depends : [gstrtsp_h],
|
|
||||||
command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
|
|
||||||
|
|
||||||
winsock2 = cc.find_library('ws2_32', required : false)
|
winsock2 = cc.find_library('ws2_32', required : false)
|
||||||
|
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
#!/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)
|
|
@ -26,19 +26,14 @@ tag_headers = tag_mkenum_headers + [
|
|||||||
]
|
]
|
||||||
install_headers(tag_headers, subdir : 'gstreamer-1.0/gst/tag/')
|
install_headers(tag_headers, subdir : 'gstreamer-1.0/gst/tag/')
|
||||||
|
|
||||||
mkenums = find_program('tag_mkenum.py')
|
tag_enums = gnome.mkenums_simple('tag-enumtypes',
|
||||||
gsttag_h = custom_target('gsttagenum_h',
|
sources : tag_mkenum_headers,
|
||||||
output : 'tag-enumtypes.h',
|
header_prefix : '#include <gst/tag/tag-prelude.h>',
|
||||||
input : tag_mkenum_headers,
|
decorator : 'GST_TAG_API',
|
||||||
install : true,
|
install_header: true,
|
||||||
install_dir : 'include/gstreamer-1.0/gst/tag/',
|
install_dir : 'include/gstreamer-1.0/gst/tag/')
|
||||||
command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
|
gsttag_c = tag_enums[0]
|
||||||
|
gsttag_h = tag_enums[1]
|
||||||
gsttag_c = custom_target('gsttagenum_c',
|
|
||||||
output : 'tag-enumtypes.c',
|
|
||||||
input : tag_mkenum_headers,
|
|
||||||
depends : [gsttag_h],
|
|
||||||
command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
|
|
||||||
tag_gen_sources = [gsttag_h]
|
tag_gen_sources = [gsttag_h]
|
||||||
|
|
||||||
tag_deps = [gst_base_dep, libm]
|
tag_deps = [gst_base_dep, libm]
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
#!/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)
|
|
@ -84,19 +84,14 @@ video_mkenum_headers = [
|
|||||||
'navigation.h',
|
'navigation.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
mkenums = find_program('video_mkenum.py')
|
video_enums = gnome.mkenums_simple('video-enumtypes',
|
||||||
gstvideo_h = custom_target('gstvideoenum_h',
|
sources : video_mkenum_headers,
|
||||||
output : 'video-enumtypes.h',
|
header_prefix : '#include <gst/video/video-prelude.h>',
|
||||||
input : video_mkenum_headers,
|
decorator : 'GST_VIDEO_API',
|
||||||
install : true,
|
install_header: true,
|
||||||
install_dir : 'include/gstreamer-1.0/gst/video/',
|
install_dir : 'include/gstreamer-1.0/gst/video/')
|
||||||
command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
|
gstvideo_c = video_enums[0]
|
||||||
|
gstvideo_h = video_enums[1]
|
||||||
gstvideo_c = custom_target('gstvideoenum_c',
|
|
||||||
output : 'video-enumtypes.c',
|
|
||||||
input : video_mkenum_headers,
|
|
||||||
depends : [gstvideo_h],
|
|
||||||
command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
|
|
||||||
video_gen_sources = [gstvideo_h]
|
video_gen_sources = [gstvideo_h]
|
||||||
|
|
||||||
orcsrc = 'video-orc'
|
orcsrc = 'video-orc'
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
#!/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)
|
|
@ -1,6 +1,6 @@
|
|||||||
project('gst-plugins-base', 'c',
|
project('gst-plugins-base', 'c',
|
||||||
version : '1.15.0.1',
|
version : '1.15.0.1',
|
||||||
meson_version : '>= 0.36.0',
|
meson_version : '>= 0.42.0',
|
||||||
default_options : [ 'warning_level=1',
|
default_options : [ 'warning_level=1',
|
||||||
'buildtype=debugoptimized' ])
|
'buildtype=debugoptimized' ])
|
||||||
|
|
||||||
@ -239,9 +239,6 @@ endif
|
|||||||
gst_controller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
|
gst_controller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
|
||||||
fallback : ['gstreamer', 'gst_controller_dep'])
|
fallback : ['gstreamer', 'gst_controller_dep'])
|
||||||
|
|
||||||
# Used by the *_mkenum.py helper scripts
|
|
||||||
glib_mkenums = find_program('glib-mkenums')
|
|
||||||
|
|
||||||
have_orcc = false
|
have_orcc = false
|
||||||
orcc_args = []
|
orcc_args = []
|
||||||
if get_option('use_orc') != 'no'
|
if get_option('use_orc') != 'no'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user