2016-08-12 15:26:31 +00:00
|
|
|
tag_sources = [
|
|
|
|
'gstvorbistag.c',
|
|
|
|
'gstid3tag.c',
|
|
|
|
'gstxmptag.c',
|
|
|
|
'gstexiftag.c',
|
|
|
|
'lang.c',
|
|
|
|
'licenses.c',
|
|
|
|
'tags.c',
|
|
|
|
'gsttagdemux.c',
|
|
|
|
'gsttagmux.c',
|
|
|
|
'gsttageditingprivate.c',
|
|
|
|
'id3v2.c',
|
|
|
|
'id3v2frames.c',
|
|
|
|
'xmpwriter.c',
|
|
|
|
]
|
|
|
|
|
2017-04-09 09:54:12 +00:00
|
|
|
tag_mkenum_headers = [
|
2016-08-12 15:26:31 +00:00
|
|
|
'gsttagdemux.h',
|
|
|
|
'tag.h',
|
2017-04-09 09:54:12 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
tag_headers = tag_mkenum_headers + [
|
|
|
|
'gsttagmux.h',
|
2016-08-12 15:26:31 +00:00
|
|
|
'xmpwriter.h',
|
2018-03-13 11:32:02 +00:00
|
|
|
'tag-prelude.h',
|
2016-08-12 15:26:31 +00:00
|
|
|
]
|
|
|
|
install_headers(tag_headers, subdir : 'gstreamer-1.0/gst/tag/')
|
|
|
|
|
2017-07-20 04:15:30 +00:00
|
|
|
tag_enums = gnome.mkenums_simple('tag-enumtypes',
|
|
|
|
sources : tag_mkenum_headers,
|
2018-04-28 13:50:11 +00:00
|
|
|
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
|
2017-07-20 04:15:30 +00:00
|
|
|
header_prefix : '#include <gst/tag/tag-prelude.h>',
|
|
|
|
decorator : 'GST_TAG_API',
|
|
|
|
install_header: true,
|
2018-08-10 11:43:38 +00:00
|
|
|
install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/tag'))
|
2017-07-20 04:15:30 +00:00
|
|
|
gsttag_c = tag_enums[0]
|
|
|
|
gsttag_h = tag_enums[1]
|
2017-04-09 09:51:52 +00:00
|
|
|
tag_gen_sources = [gsttag_h]
|
|
|
|
|
2018-05-20 11:33:13 +00:00
|
|
|
install_data('license-translations.dict',
|
|
|
|
install_dir : join_paths(get_option('datadir'), 'gst-plugins-base', api_version))
|
|
|
|
|
|
|
|
gst_tag_args = [
|
|
|
|
'-DLICENSE_TRANSLATIONS_PATH="@0@"'.format(
|
|
|
|
join_paths(
|
|
|
|
get_option('prefix'),
|
|
|
|
get_option('datadir'),
|
|
|
|
'gst-plugins-base',
|
|
|
|
api_version,
|
|
|
|
'license-translations.dict'))
|
|
|
|
]
|
|
|
|
|
2018-08-12 11:55:00 +00:00
|
|
|
# iso-codes (optional, used for language names lookup and translation)
|
|
|
|
have_iso_codes = false
|
|
|
|
iso_codes_dep = dependency('iso-codes', required: get_option('iso-codes'))
|
|
|
|
if iso_codes_dep.found()
|
|
|
|
if iso_codes_dep.get_pkgconfig_variable('domains').split(' ').contains('iso_639-2')
|
|
|
|
iso_codes_prefix = iso_codes_dep.get_pkgconfig_variable('prefix')
|
|
|
|
if iso_codes_prefix != ''
|
|
|
|
core_conf.set_quoted('ISO_CODES_PREFIX', iso_codes_prefix)
|
|
|
|
core_conf.set_quoted('ISO_CODES_VERSION', iso_codes_dep.version())
|
|
|
|
have_iso_codes = true
|
|
|
|
elif get_option('iso-codes').enabled()
|
|
|
|
error('iso-codes was requested for libgsttag, but could not determine prefix')
|
|
|
|
endif
|
|
|
|
elif get_option('iso-codes').enabled()
|
|
|
|
error('iso-codes was requested for libgsttag, but does not provide iso 639')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
core_conf.set('HAVE_ISO_CODES', have_iso_codes)
|
|
|
|
|
2018-08-11 17:49:10 +00:00
|
|
|
# could drop optional zlib dep and use g_zlib_decompressor_new()
|
2018-11-19 21:31:20 +00:00
|
|
|
zlib_dep = dependency('zlib', required : false)
|
|
|
|
if not zlib_dep.found()
|
|
|
|
zlib_dep = cc.find_library('z', required : false)
|
2018-11-21 20:08:42 +00:00
|
|
|
if not zlib_dep.found() or not cc.has_header('zlib.h')
|
2018-11-19 21:31:20 +00:00
|
|
|
zlib_dep = subproject('zlib').get_variable('zlib_dep')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
core_conf.set('HAVE_ZLIB', true)
|
2018-08-11 17:49:10 +00:00
|
|
|
|
|
|
|
tag_deps = [gst_base_dep, libm, zlib_dep]
|
2016-08-12 15:26:31 +00:00
|
|
|
gsttag = library('gsttag-@0@'.format(api_version),
|
2017-04-09 09:51:52 +00:00
|
|
|
tag_sources, gsttag_h, gsttag_c,
|
2018-04-28 13:50:11 +00:00
|
|
|
c_args : gst_plugins_base_args + gst_tag_args + ['-DBUILDING_GST_TAG'],
|
2016-08-12 15:26:31 +00:00
|
|
|
include_directories: [configinc, libsinc],
|
|
|
|
version : libversion,
|
|
|
|
soversion : soversion,
|
2018-08-31 09:06:30 +00:00
|
|
|
darwin_versions : osxversion,
|
2016-08-12 15:26:31 +00:00
|
|
|
install : true,
|
2016-10-20 20:17:27 +00:00
|
|
|
dependencies : tag_deps,
|
2016-08-12 15:26:31 +00:00
|
|
|
)
|
2016-10-20 20:17:27 +00:00
|
|
|
|
|
|
|
if build_gir
|
2017-04-12 14:06:45 +00:00
|
|
|
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/tag/tag.h' ]
|
2018-10-22 09:44:37 +00:00
|
|
|
tag_gir = gnome.generate_gir(gsttag,
|
2017-04-09 09:51:52 +00:00
|
|
|
sources : tag_sources + tag_headers + [gsttag_h] + [gsttag_c],
|
2016-10-20 20:17:27 +00:00
|
|
|
namespace : 'GstTag',
|
|
|
|
nsversion : api_version,
|
|
|
|
identifier_prefix : 'Gst',
|
|
|
|
symbol_prefix : 'gst',
|
|
|
|
export_packages : 'gstreamer-tag-1.0',
|
2017-10-05 12:28:42 +00:00
|
|
|
includes : ['Gst-1.0', 'GstBase-1.0'],
|
2016-10-20 20:17:27 +00:00
|
|
|
install : true,
|
2017-04-12 14:06:45 +00:00
|
|
|
extra_args : gst_gir_extra_args,
|
2016-10-20 20:17:27 +00:00
|
|
|
dependencies : tag_deps
|
2018-10-22 09:44:37 +00:00
|
|
|
)
|
|
|
|
tag_gen_sources += [tag_gir]
|
2016-10-20 20:17:27 +00:00
|
|
|
endif
|
2016-08-12 15:26:31 +00:00
|
|
|
|
|
|
|
tag_dep = declare_dependency(link_with: gsttag,
|
|
|
|
include_directories : [libsinc],
|
2016-10-20 20:17:27 +00:00
|
|
|
dependencies : tag_deps,
|
|
|
|
sources: tag_gen_sources)
|
2016-08-12 15:26:31 +00:00
|
|
|
|
2018-08-12 11:55:00 +00:00
|
|
|
# Little program that reads iso_639.xml and outputs tables for us as fallback
|
2016-08-12 15:26:31 +00:00
|
|
|
# for when iso-codes are not available (and so we don't have to read the xml
|
|
|
|
# just to map codes)
|
2018-08-12 11:55:00 +00:00
|
|
|
if have_iso_codes
|
|
|
|
executable('mklangtables', 'mklangtables.c',
|
|
|
|
c_args: ['-DHAVE_CONFIG_H'],
|
|
|
|
include_directories: [configinc, libsinc],
|
|
|
|
dependencies: gst_dep,
|
|
|
|
install: false)
|
|
|
|
endif
|
|
|
|
|
2016-08-12 15:26:31 +00:00
|
|
|
executable('mklicensestables', 'mklicensestables.c',
|
|
|
|
c_args : gst_plugins_base_args,
|
|
|
|
include_directories: [configinc],
|
|
|
|
dependencies : [tag_dep, gst_base_dep],
|
2018-08-12 11:55:00 +00:00
|
|
|
install : false)
|
2016-10-04 20:44:51 +00:00
|
|
|
|
|
|
|
gst_tag_dir = meson.current_source_dir()
|