meson: List libraries and their corresponding gir definition

Introduces a `libraries` variable that contains all libraries in a
list with the following format:

``` meson
libraries = [
    [pkg_name, {
        'lib': library_object
        'gir': [ {full gir definition in a dict } ]
    ],
    ....
]
```

It therefore refactors the way we build the gir so that we can reuse the
same information to build them against 'gstreamer-full' in gst-build
when linking statically

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
This commit is contained in:
Thibault Saunier 2020-06-27 00:39:00 -04:00
parent e2dd28a753
commit 6e79932ad9
51 changed files with 873 additions and 569 deletions

View file

@ -152,9 +152,11 @@ plugins_doc_dep = []
plugins = [] plugins = []
i18n = import('i18n') i18n = import('i18n')
static_build = get_option('default_library') == 'static'
libraries = []
python_mod = import('python') python_mod = import('python')
python3 = python_mod.find_installation() python3 = python_mod.find_installation()
if not get_option('validate').disabled() if not get_option('validate').disabled()
subdir('validate') subdir('validate')
endif endif

View file

@ -76,35 +76,44 @@ gstvalidatetracer = library('gstvalidatetracer',
dependencies : validate_deps) dependencies : validate_deps)
plugins += gstvalidatetracer plugins += gstvalidatetracer
pkg_name = 'gst-validate-1.0'
library_def = {'lib': gstvalidate}
pkgconfig.generate(gstvalidate, pkgconfig.generate(gstvalidate,
libraries : [gst_dep], libraries : [gst_dep],
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gst-validate-1.0', name : pkg_name,
description : 'Gstreamer Validate', description : 'Gstreamer Validate',
) )
validate_gen_sources = [] validate_gen_sources = []
if build_gir if build_gir
gst_validate_gir_extra_args = gir_init_section + [ '--c-include=gst/validate/validate.h' ] gst_validate_gir_extra_args = gir_init_section + [ '--c-include=gst/validate/validate.h' ]
validate_gir = gnome.generate_gir(gstvalidate, gir = {
sources : gstvalidate_sources + gstvalidate_headers + gst_validate_enums, 'sources' : gstvalidate_sources + gstvalidate_headers + gst_validate_enums,
nsversion : '1.0', 'nsversion' : '1.0',
namespace : 'GstValidate', 'namespace' : 'GstValidate',
symbol_prefix : 'gst_validate', 'symbol_prefix' : 'gst_validate',
identifier_prefix : 'GstValidate', 'identifier_prefix' : 'GstValidate',
export_packages : 'gst-validate-' + apiversion, 'export_packages' : pkg_name,
includes : ['GObject-2.0', 'includes' : ['GObject-2.0',
'GLib-2.0', 'GLib-2.0',
'Gio-2.0', 'Gio-2.0',
'GModule-2.0', 'GModule-2.0',
'Gst-' + apiversion, 'Gst-' + apiversion,
'GstPbutils-' + apiversion], 'GstPbutils-' + apiversion],
install : true, 'install' : true,
dependencies : validate_deps, 'dependencies' : validate_deps,
extra_args : gst_validate_gir_extra_args, 'extra_args' : gst_validate_gir_extra_args,
) }
library_def += {'gir': [gir]}
if not static_build
validate_gir = gnome.generate_gir(gstvalidate, kwargs: gir)
validate_gen_sources += [validate_gir] validate_gen_sources += [validate_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
validate_dep = declare_dependency(link_with : gstvalidate, validate_dep = declare_dependency(link_with : gstvalidate,
include_directories : [inc_dirs], include_directories : [inc_dirs],
@ -112,6 +121,6 @@ validate_dep = declare_dependency(link_with : gstvalidate,
sources : validate_gen_sources sources : validate_gen_sources
) )
meson.override_dependency('gst-validate-1.0', validate_dep) meson.override_dependency(pkg_name, validate_dep)
pkgconfig.generate(gstvalidatetracer, install_dir : plugins_pkgconfig_install_dir) pkgconfig.generate(gstvalidatetracer, install_dir : plugins_pkgconfig_install_dir)

View file

@ -58,7 +58,7 @@ foreach extension: required_hotdoc_extensions
endif endif
endforeach endforeach
if not build_gir if not build_gir or static_build
if get_option('doc').enabled() if get_option('doc').enabled()
error('Documentation enabled but introspection not built.') error('Documentation enabled but introspection not built.')
endif endif

View file

@ -105,7 +105,6 @@ ges_headers = files([
'ges-audio-source.h', 'ges-audio-source.h',
'ges-video-uri-source.h', 'ges-video-uri-source.h',
'ges-audio-uri-source.h', 'ges-audio-uri-source.h',
'ges-image-source.h',
'ges-multi-file-source.h', 'ges-multi-file-source.h',
'ges-transition.h', 'ges-transition.h',
'ges-audio-transition.h', 'ges-audio-transition.h',
@ -149,8 +148,6 @@ ges_headers += [configure_file(input : 'ges-version.h.in',
install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/ges'), install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/ges'),
configuration : version_data)] configuration : version_data)]
install_headers(ges_headers, subdir : 'gstreamer-1.0/ges')
flex = find_program('flex', required : false) flex = find_program('flex', required : false)
if not flex.found() if not flex.found()
flex = find_program('win_flex', required : false) flex = find_program('win_flex', required : false)
@ -183,13 +180,16 @@ libges = library('ges-1.0', ges_sources, parser, ges_resources,
install : true, install : true,
dependencies : libges_deps) dependencies : libges_deps)
pkg_name = 'gst-editing-services-1.0'
pkgconfig.generate(libges, pkgconfig.generate(libges,
libraries : [gst_dep, gstbase_dep, gstpbutils_dep, gstcontroller_dep], libraries : [gst_dep, gstbase_dep, gstpbutils_dep, gstcontroller_dep],
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gst-editing-services-1.0', name : pkg_name,
description : 'GStreamer Editing Services', description : 'GStreamer Editing Services',
) )
library_def = {'lib': libges}
pkg_name = 'gst-editing-services-1.0'
ges_gen_sources = [] ges_gen_sources = []
if build_gir if build_gir
ges_gir_extra_args = gir_init_section + [ '--c-include=ges/ges.h' ] ges_gir_extra_args = gir_init_section + [ '--c-include=ges/ges.h' ]
@ -201,26 +201,34 @@ if build_gir
'-I' + meson.current_build_dir() + '/..', '-I' + meson.current_build_dir() + '/..',
'--cflags-end'] '--cflags-end']
endif endif
ges_gir = gnome.generate_gir(libges,
sources : ges_sources + ges_headers,
namespace : 'GES',
nsversion : apiversion,
identifier_prefix : 'GES',
symbol_prefix : 'ges',
export_packages : 'gst-editing-services-1.0',
includes : ['Gst-1.0', 'GstPbutils-1.0', 'GstVideo-1.0', 'Gio-2.0', 'GObject-2.0'],
install : true,
dependencies : libges_deps,
extra_args : ges_gir_extra_args
)
gir = {
'sources' : ges_sources + ges_headers,
'namespace' : 'GES',
'nsversion' : apiversion,
'identifier_prefix' : 'GES',
'symbol_prefix' : 'ges',
'export_packages' : pkg_name,
'includes' : ['Gst-1.0', 'GstPbutils-1.0', 'GstVideo-1.0', 'Gio-2.0', 'GObject-2.0'],
'install' : true,
'dependencies' : libges_deps,
'extra_args' : ges_gir_extra_args
}
library_def = {'gir': gir}
if not static_build
ges_gir = gnome.generate_gir(libges, kwargs: gir)
ges_gen_sources += [ges_gir] ges_gen_sources += [ges_gir]
endif endif
endif
# GESImageSource is unused and is internal only so it gets stripped out when we statically
# link GES. We keep the header for backward compatibility reasons.
install_headers(ges_headers + files('ges-image-source.h'), subdir : 'gstreamer-1.0/ges')
libraries += [[pkg_name, library_def]]
ges_dep = declare_dependency(link_with : libges, ges_dep = declare_dependency(link_with : libges,
include_directories : [configinc], include_directories : [configinc],
sources : ges_gen_sources, sources : ges_gen_sources,
dependencies : libges_deps, dependencies : libges_deps,
) )
meson.override_dependency(pkg_name, ges_dep)
meson.override_dependency('gst-editing-services-1.0', ges_dep)

View file

@ -254,6 +254,9 @@ pkgconfig = import('pkgconfig')
pkgconfig_subdirs = ['gstreamer-1.0'] pkgconfig_subdirs = ['gstreamer-1.0']
configinc = include_directories('.') configinc = include_directories('.')
static_build = get_option('default_library') == 'static'
libraries = []
subdir('ges') subdir('ges')
subdir('plugins') subdir('plugins')
if not get_option('tools').disabled() if not get_option('tools').disabled()

View file

@ -61,6 +61,15 @@ foreach extension: required_hotdoc_extensions
endif endif
endforeach endforeach
if static_build
if get_option('doc').enabled()
error('Documentation enabled but not supported when building statically.')
endif
message('Building statically, can\'t build the documentation')
subdir_done()
endif
if not build_gir if not build_gir
if get_option('doc').enabled() if get_option('doc').enabled()
error('Documentation enabled but introspection not built.') error('Documentation enabled but introspection not built.')

View file

@ -1,6 +1,7 @@
adaptivedemux_sources = files('gstadaptivedemux.c') adaptivedemux_sources = files('gstadaptivedemux.c')
adaptivedemux_headers = files('gstadaptivedemux.h') adaptivedemux_headers = files('gstadaptivedemux.h')
pkg_name = 'gstreamer-adaptivedemux-1.0'
gstadaptivedemux = library('gstadaptivedemux-' + api_version, gstadaptivedemux = library('gstadaptivedemux-' + api_version,
adaptivedemux_sources, adaptivedemux_sources,
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_ADAPTIVE_DEMUX'], c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_ADAPTIVE_DEMUX'],
@ -11,7 +12,10 @@ gstadaptivedemux = library('gstadaptivedemux-' + api_version,
install : true, install : true,
dependencies : [gstbase_dep, gsturidownloader_dep], dependencies : [gstbase_dep, gsturidownloader_dep],
) )
libraries += [[pkg_name, {'lib': gstadaptivedemux}]]
gstadaptivedemux_dep = declare_dependency(link_with : gstadaptivedemux, gstadaptivedemux_dep = declare_dependency(link_with : gstadaptivedemux,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gstbase_dep, gsturidownloader_dep]) dependencies : [gstbase_dep, gsturidownloader_dep])
meson.override_dependency(pkg_name, gstadaptivedemux_dep)

View file

@ -14,29 +14,37 @@ gstbadaudio = library('gstbadaudio-' + api_version,
dependencies : [gstaudio_dep, gstbase_dep], dependencies : [gstaudio_dep, gstbase_dep],
) )
library_def = {'lib': gstbadaudio}
pkg_name = 'gstreamer-bad-audio-1.0'
pkgconfig.generate(gstbadaudio, pkgconfig.generate(gstbadaudio,
libraries : [gst_dep, gstbase_dep], libraries : [gst_dep, gstbase_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-bad-audio-1.0', name : pkg_name,
description : 'Bad audio library for GStreamer elements', description : 'Bad audio library for GStreamer elements',
) )
gen_sources = [] gen_sources = []
if build_gir if build_gir
audio_gir = gnome.generate_gir(gstbadaudio, gir = {
sources : badaudio_sources + badaudio_headers, 'sources' : badaudio_sources + badaudio_headers,
namespace : 'GstBadAudio', 'namespace' : 'GstBadAudio',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-bad-audio-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstAudio-1.0', 'GstBase-1.0'], 'includes' : ['Gst-1.0', 'GstAudio-1.0', 'GstBase-1.0'],
install : true, 'install' : true,
extra_args : gir_init_section + ['-DGST_USE_UNSTABLE_API'], 'extra_args' : gir_init_section + ['-DGST_USE_UNSTABLE_API'],
dependencies : [gstbase_dep, gstaudio_dep] 'dependencies' : [gstbase_dep, gstaudio_dep]
) }
library_def += {'gir': [gir]}
if not static_build
audio_gir = gnome.generate_gir(gstbadaudio, kwargs: gir)
gen_sources += audio_gir gen_sources += audio_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
gstbadaudio_dep = declare_dependency(link_with : gstbadaudio, gstbadaudio_dep = declare_dependency(link_with : gstbadaudio,
include_directories : [libsinc], include_directories : [libsinc],

View file

@ -22,24 +22,32 @@ gstbasecamerabin = library('gstbasecamerabinsrc-' + api_version,
dependencies : [gstapp_dep], dependencies : [gstapp_dep],
) )
_sources = [] library_def = {'lib': gstbasecamerabin}
if build_gir pkg_name = 'gstreamer-bad-base-camerabinsrc-1.0'
basecamerabin_gir = gnome.generate_gir(gstbasecamerabin, gen_sources = []
sources : camerabin_sources + camerabin_headers, if build_gir and not static_build
namespace : 'GstBadBaseCameraBin', gir = {
nsversion : api_version, 'sources' : camerabin_sources + camerabin_headers,
identifier_prefix : 'Gst', 'namespace' : 'GstBadBaseCameraBin',
symbol_prefix : 'gst', 'nsversion' : api_version,
export_packages : 'gstreamer-bad-base-camerabinsrc-1.0', 'identifier_prefix' : 'Gst',
includes : ['Gst-1.0', 'GstApp-1.0'], 'symbol_prefix' : 'gst',
install : false, # Only for the documentation 'export_packages' : pkg_name,
extra_args : gir_init_section + ['-DGST_USE_UNSTABLE_API'], 'includes' : ['Gst-1.0', 'GstApp-1.0'],
dependencies : [gstapp_dep], 'install' : false, # Only for the documentation
build_by_default : true, 'extra_args' : gir_init_section + ['-DGST_USE_UNSTABLE_API'],
) 'dependencies' : [gstapp_dep],
_sources += [basecamerabin_gir] 'build_by_default' : true,
}
library_def += {'gir': [gir]}
if not static_build
basecamerabin_gir = gnome.generate_gir(gstbasecamerabin, kwargs: gir)
gen_sources += basecamerabin_gir
endif
endif endif
gstbasecamerabin_dep = declare_dependency(link_with : gstbasecamerabin, gstbasecamerabin_dep = declare_dependency(link_with : gstbasecamerabin,
include_directories : [libsinc], include_directories : [libsinc],
sources: gen_sources,
dependencies : [gstapp_dep]) dependencies : [gstapp_dep])
meson.override_dependency(pkg_name, gstbasecamerabin_dep)

View file

@ -53,11 +53,12 @@ gstcodecparsers = library('gstcodecparsers-' + api_version,
dependencies : [gstbase_dep, libm], dependencies : [gstbase_dep, libm],
) )
pkg_name = 'gstreamer-codecparsers-1.0'
pkgconfig.generate(gstcodecparsers, pkgconfig.generate(gstcodecparsers,
libraries : [gst_dep, gstbase_dep], libraries : [gst_dep, gstbase_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-codecparsers-1.0', name : pkg_name,
description : 'Bitstream parsers for GStreamer elements', description : 'Bitstream parsers for GStreamer elements',
) )
@ -65,4 +66,5 @@ gstcodecparsers_dep = declare_dependency(link_with : gstcodecparsers,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gstbase_dep]) dependencies : [gstbase_dep])
meson.override_dependency('gstreamer-codecparsers-1.0', gstcodecparsers_dep) libraries += [[pkg_name, {'lib': gstcodecparsers}]]
meson.override_dependency(pkg_name, gstcodecparsers_dep)

View file

@ -46,29 +46,38 @@ gstcodecs = library('gstcodecs-' + api_version,
dependencies : [gstvideo_dep, gstcodecparsers_dep], dependencies : [gstvideo_dep, gstcodecparsers_dep],
) )
library_def = {'lib': gstcodecs}
pkg_name = 'gstreamer-codecs-1.0'
gen_sources = [] gen_sources = []
if build_gir if build_gir
codecs_gir = gnome.generate_gir(gstcodecs, gir = {
sources : codecs_sources + codecs_headers, 'sources' : codecs_sources + codecs_headers,
namespace : 'GstCodecs', 'namespace' : 'GstCodecs',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-codecs-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstVideo-1.0'], 'includes' : ['Gst-1.0', 'GstVideo-1.0'],
install : true, 'install' : true,
extra_args : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + 'extra_args' : gir_init_section + ['-DGST_USE_UNSTABLE_API'] +
['--c-include=gst/codecs/gsth264decoder.h', ['--c-include=gst/codecs/gsth264decoder.h',
'--c-include=gst/codecs/gsth265decoder.h', '--c-include=gst/codecs/gsth265decoder.h',
'--c-include=gst/codecs/gstvp9decoder.h', '--c-include=gst/codecs/gstvp9decoder.h',
'--c-include=gst/codecs/gstvp8decoder.h', '--c-include=gst/codecs/gstvp8decoder.h',
'--c-include=gst/codecs/gstmpeg2decoder.h', '--c-include=gst/codecs/gstmpeg2decoder.h',
], ],
dependencies : [gstvideo_dep, gstcodecparsers_dep] 'dependencies' : [gstvideo_dep, gstcodecparsers_dep]
) }
library_def += {'gir': [gir]}
if not static_build
codecs_gir = gnome.generate_gir(gstcodecs, kwargs: gir)
gen_sources += codecs_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
gstcodecs_dep = declare_dependency(link_with : gstcodecs, gstcodecs_dep = declare_dependency(link_with : gstcodecs,
include_directories : [libsinc], include_directories : [libsinc],
sources: gen_sources, sources: gen_sources,
dependencies : [gstvideo_dep, gstcodecparsers_dep]) dependencies : [gstvideo_dep, gstcodecparsers_dep])
meson.override_dependency(pkg_name, gstcodecs_dep)

View file

@ -187,6 +187,7 @@ configure_file(
configuration: d3d11_conf, configuration: d3d11_conf,
) )
pkg_name = 'gstreamer-d3d11-' + api_version
gstd3d11 = library('gstd3d11-' + api_version, gstd3d11 = library('gstd3d11-' + api_version,
d3d11_sources, d3d11_sources,
c_args : gst_plugins_bad_args + extra_c_args + extra_comm_args, c_args : gst_plugins_bad_args + extra_c_args + extra_comm_args,
@ -198,6 +199,9 @@ gstd3d11 = library('gstd3d11-' + api_version,
dependencies : [gstbase_dep, gstvideo_dep, gmodule_dep, d3d11_lib, dxgi_lib] dependencies : [gstbase_dep, gstvideo_dep, gmodule_dep, d3d11_lib, dxgi_lib]
) )
library_def = {'lib': gstd3d11}
libraries += [[pkg_name, library_def]]
# Still non-public api, should not install headers # Still non-public api, should not install headers
gstd3d11_dep = declare_dependency(link_with : gstd3d11, gstd3d11_dep = declare_dependency(link_with : gstd3d11,
include_directories : [libsinc], include_directories : [libsinc],

View file

@ -13,34 +13,41 @@ gstinsertbin = library('gstinsertbin-' + api_version,
dependencies : [gst_dep], dependencies : [gst_dep],
) )
library_def = {'lib': gstinsertbin}
pkg_name = 'gstreamer-insertbin-1.0'
pkgconfig.generate(gstinsertbin, pkgconfig.generate(gstinsertbin,
libraries : [gst_dep], libraries : [gst_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-insertbin-1.0', name : pkg_name,
description : 'Bin to automatically and insertally link elements', description : 'Bin to automatically and insertally link elements',
) )
gen_sources = [] gen_sources = []
if build_gir if build_gir
insertbin_gir = gnome.generate_gir(gstinsertbin, gir = {
sources : insert_sources + insert_headers, 'sources' : insert_sources + insert_headers,
namespace : 'GstInsertBin', 'namespace' : 'GstInsertBin',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-insertbin-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0'], 'includes' : ['Gst-1.0'],
install : true, 'install' : true,
extra_args : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/insertbin/gstinsertbin.h'], 'extra_args' : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/insertbin/gstinsertbin.h'],
dependencies : [gst_dep] 'dependencies' : [gst_dep]
) }
library_def += {'gir': [gir]}
if not static_build
insertbin_gir = gnome.generate_gir(gstinsertbin, kwargs: gir)
gen_sources += insertbin_gir gen_sources += insertbin_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
gstinsertbin_dep = declare_dependency(link_with : gstinsertbin, gstinsertbin_dep = declare_dependency(link_with : gstinsertbin,
include_directories : [libsinc], include_directories : [libsinc],
sources: gen_sources, sources: gen_sources,
dependencies : [gst_dep]) dependencies : [gst_dep])
meson.override_dependency('gstreamer-insertbin-1.0', gstinsertbin_dep) meson.override_dependency(pkg_name, gstinsertbin_dep)

View file

@ -13,6 +13,7 @@ photo_enums = gnome.mkenums_simple('photography-enumtypes',
photoenum_c = photo_enums[0] photoenum_c = photo_enums[0]
photoenum_h = photo_enums[1] photoenum_h = photo_enums[1]
pkg_name = 'gstreamer-photography-1.0'
gstphotography = library('gstphotography-' + api_version, gstphotography = library('gstphotography-' + api_version,
photography_sources, photoenum_h, photoenum_c, photography_sources, photoenum_h, photoenum_c,
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_PHOTOGRAPHY'], c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_PHOTOGRAPHY'],
@ -28,7 +29,7 @@ pkgconfig.generate(gstphotography,
libraries : [gst_dep, gstbase_dep], libraries : [gst_dep, gstbase_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-photography-1.0', name : pkg_name,
description : 'High level API for transcoding using GStreamer', description : 'High level API for transcoding using GStreamer',
) )
@ -37,4 +38,5 @@ gstphotography_dep = declare_dependency(link_with : gstphotography,
dependencies : [gst_dep], dependencies : [gst_dep],
sources : [photoenum_h]) sources : [photoenum_h])
meson.override_dependency('gstreamer-photography-1.0', gstphotography_dep) libraries += [[pkg_name, {'lib': gstphotography}]]
meson.override_dependency(pkg_name, gstphotography_dep)

View file

@ -46,34 +46,39 @@ gstmpegts = library('gstmpegts-' + api_version,
dependencies : [gst_dep], dependencies : [gst_dep],
) )
library_def = {'lib': gstmpegts}
pkg_name = 'gstreamer-mpegts-1.0'
pkgconfig.generate(gstmpegts, pkgconfig.generate(gstmpegts,
libraries : [gst_dep, gstbase_dep], libraries : [gst_dep, gstbase_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-mpegts-1.0', name : pkg_name,
description : 'GStreamer MPEG-TS support', description : 'GStreamer MPEG-TS support',
) )
if build_gir if build_gir
mpegts_gir = gnome.generate_gir(gstmpegts, gir = {
sources : mpegts_sources + mpegts_headers, 'sources' : mpegts_sources + mpegts_headers,
namespace : 'GstMpegts', 'namespace' : 'GstMpegts',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'GstMpegts', 'identifier_prefix' : 'GstMpegts',
symbol_prefix : ['gst_mpegts', 'gst'], 'symbol_prefix' : ['gst_mpegts', 'gst'],
export_packages : 'gstreamer-mpegts-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0'], 'includes' : ['Gst-1.0'],
install : true, 'install' : true,
extra_args : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/mpegts/mpegts.h'], 'extra_args' : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/mpegts/mpegts.h'],
dependencies : [gst_dep] 'dependencies' : [gst_dep]
) }
library_def += {'gir': [gir]}
if not static_build
mpegts_gir = gnome.generate_gir(gstmpegts, kwargs: gir)
gen_sources += mpegts_gir gen_sources += mpegts_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
gstmpegts_dep = declare_dependency(link_with : gstmpegts, gstmpegts_dep = declare_dependency(link_with : gstmpegts,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gst_dep], dependencies : [gst_dep],
sources : gen_sources) sources : gen_sources)
meson.override_dependency(pkg_name, gstmpegts_dep)
meson.override_dependency('gstreamer-mpegts-1.0', gstmpegts_dep)

View file

@ -25,6 +25,7 @@ if opencv_dep.found()
# /usr/include/opencv4/opencv2/flann/logger.h:83:36: error: format string is not a string literal [-Werror,-Wformat-nonliteral] # /usr/include/opencv4/opencv2/flann/logger.h:83:36: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
gstopencv_cargs = cxx.get_supported_arguments(['-Wno-missing-include-dirs', '-Wno-format-nonliteral']) gstopencv_cargs = cxx.get_supported_arguments(['-Wno-missing-include-dirs', '-Wno-format-nonliteral'])
pkg_name = 'gstreamer-opencv-1.0'
gstopencv = library('gstopencv-' + api_version, gstopencv = library('gstopencv-' + api_version,
opencv_sources, opencv_sources,
c_args : gst_plugins_bad_args + ['-DBUILDING_GST_OPENCV'], c_args : gst_plugins_bad_args + ['-DBUILDING_GST_OPENCV'],
@ -38,9 +39,11 @@ if opencv_dep.found()
dependencies : [gstbase_dep, gstvideo_dep, opencv_dep], dependencies : [gstbase_dep, gstvideo_dep, opencv_dep],
) )
libraries += [[pkg_name, {'lib': gstopencv}]]
gstopencv_dep = declare_dependency(link_with: gstopencv, gstopencv_dep = declare_dependency(link_with: gstopencv,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gstvideo_dep, opencv_dep]) dependencies : [gstvideo_dep, opencv_dep])
meson.override_dependency(pkg_name, gstopencv_dep)
install_headers(opencv_headers, subdir : 'gstreamer-1.0/gst/opencv') install_headers(opencv_headers, subdir : 'gstreamer-1.0/gst/opencv')
elif get_option('opencv').enabled() elif get_option('opencv').enabled()

View file

@ -3,8 +3,8 @@ gstplay_sources = files(
'gstplay-signal-adapter.c', 'gstplay-signal-adapter.c',
'gstplay-video-renderer.c', 'gstplay-video-renderer.c',
'gstplay-media-info.c', 'gstplay-media-info.c',
'gstplay-video-overlay-video-renderer.c',
'gstplay-visualization.c', 'gstplay-visualization.c',
'gstplay-video-overlay-video-renderer.c',
) )
gstplay_headers = files( gstplay_headers = files(
@ -33,32 +33,39 @@ gstplay = library('gstplay-' + api_version,
gsttag_dep, gstpbutils_dep], gsttag_dep, gstpbutils_dep],
) )
pkg_name = 'gstreamer-play-1.0'
pkgconfig.generate(gstplay, pkgconfig.generate(gstplay,
libraries : [gst_dep, gstvideo_dep], libraries : [gst_dep, gstvideo_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-play-1.0', name : pkg_name,
description : 'GStreamer Player convenience library', description : 'GStreamer Player convenience library',
) )
library_def = {'lib': gstplay}
gen_sources = [] gen_sources = []
if build_gir if build_gir
play_gir = gnome.generate_gir(gstplay, gir = {
sources : gstplay_sources + gstplay_headers, 'sources' : gstplay_sources + gstplay_headers,
namespace : 'GstPlay', 'namespace' : 'GstPlay',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-play-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstPbutils-1.0', 'GstBase-1.0', 'GstVideo-1.0', 'includes' : ['Gst-1.0', 'GstPbutils-1.0', 'GstBase-1.0', 'GstVideo-1.0',
'GstAudio-1.0', 'GstTag-1.0'], 'GstAudio-1.0', 'GstTag-1.0'],
install : true, 'install' : true,
extra_args : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/play/play.h'], 'extra_args' : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/play/play.h'],
dependencies : [gstbase_dep, gstvideo_dep, gstaudio_dep, 'dependencies' : [gstbase_dep, gstvideo_dep, gstaudio_dep,
gsttag_dep, gstpbutils_dep] gsttag_dep, gstpbutils_dep]
) }
library_def += {'gir': [gir]}
if not static_build
play_gir = gnome.generate_gir(gstplay, kwargs: gir)
gen_sources += play_gir gen_sources += play_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
gstplay_dep = declare_dependency(link_with : gstplay, gstplay_dep = declare_dependency(link_with : gstplay,
include_directories : [libsinc], include_directories : [libsinc],
@ -66,4 +73,4 @@ gstplay_dep = declare_dependency(link_with : gstplay,
dependencies : [gstbase_dep, gstvideo_dep, gstaudio_dep, dependencies : [gstbase_dep, gstvideo_dep, gstaudio_dep,
gsttag_dep, gstpbutils_dep]) gsttag_dep, gstpbutils_dep])
meson.override_dependency('gstreamer-play-1.0', gstplay_dep) meson.override_dependency(pkg_name, gstplay_dep)

View file

@ -36,6 +36,8 @@ gstplayer = library('gstplayer-' + api_version,
gsttag_dep, gstpbutils_dep], gsttag_dep, gstpbutils_dep],
) )
library_def = {'lib': gstplayer}
pkg_name = 'gstreamer-player-1.0'
pkgconfig.generate(gstplayer, pkgconfig.generate(gstplayer,
libraries : [gst_dep, gstvideo_dep], libraries : [gst_dep, gstvideo_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
@ -46,22 +48,27 @@ pkgconfig.generate(gstplayer,
gen_sources = [] gen_sources = []
if build_gir if build_gir
player_gir = gnome.generate_gir(gstplayer, gir = {
sources : gstplayer_sources + gstplayer_headers, 'sources' : gstplayer_sources + gstplayer_headers,
namespace : 'GstPlayer', 'namespace' : 'GstPlayer',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-player-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstPbutils-1.0', 'GstBase-1.0', 'GstVideo-1.0', 'includes' : ['Gst-1.0', 'GstPbutils-1.0', 'GstBase-1.0', 'GstVideo-1.0',
'GstAudio-1.0', 'GstTag-1.0'], 'GstAudio-1.0', 'GstTag-1.0'],
install : true, 'install' : true,
extra_args : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/player/player.h'], 'extra_args' : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/player/player.h'],
dependencies : [gstbase_dep, gstvideo_dep, gstaudio_dep, gstplay_dep, 'dependencies' : [gstbase_dep, gstvideo_dep, gstaudio_dep, gstplay_dep,
gsttag_dep, gstpbutils_dep] gsttag_dep, gstpbutils_dep]
) }
library_def = {'lib': library_def['lib'], 'gir': [gir]}
if not static_build
player_gir = gnome.generate_gir(gstplayer, kwargs: gir)
gen_sources += player_gir gen_sources += player_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
gstplayer_dep = declare_dependency(link_with : gstplayer, gstplayer_dep = declare_dependency(link_with : gstplayer,
include_directories : [libsinc], include_directories : [libsinc],
@ -69,4 +76,4 @@ gstplayer_dep = declare_dependency(link_with : gstplayer,
dependencies : [gstbase_dep, gstvideo_dep, gstaudio_dep, gstplay_dep, dependencies : [gstbase_dep, gstvideo_dep, gstaudio_dep, gstplay_dep,
gsttag_dep, gstpbutils_dep]) gsttag_dep, gstpbutils_dep])
meson.override_dependency('gstreamer-player-1.0', gstplayer_dep) meson.override_dependency(pkg_name, gstplayer_dep)

View file

@ -21,11 +21,13 @@ libgstsctp = library('gstsctp-' + api_version,
dependencies : [gstbase_dep], dependencies : [gstbase_dep],
) )
pkg_name = 'gstreamer-sctp-1.0'
libraries += [[pkg_name, {'lib': libgstsctp}]]
pkgconfig.generate(libgstsctp, pkgconfig.generate(libgstsctp,
libraries : [gst_dep], libraries : [gst_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-sctp-1.0', name : pkg_name,
description : 'SCTP helper functions', description : 'SCTP helper functions',
) )
@ -33,4 +35,4 @@ gstsctp_dep = declare_dependency(link_with : libgstsctp,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gstbase_dep]) dependencies : [gstbase_dep])
meson.override_dependency('gstreamer-sctp-1.0', gstsctp_dep) meson.override_dependency(pkg_name, gstsctp_dep)

View file

@ -25,35 +25,42 @@ gst_transcoder = library('gsttranscoder-' + api_version,
soversion : soversion, soversion : soversion,
) )
library_def = {'lib': gst_transcoder}
pkg_name = 'gstreamer-transcoder-1.0'
pkgconfig.generate(gst_transcoder, pkgconfig.generate(gst_transcoder,
libraries : [gst_dep, gstbase_dep], libraries : [gst_dep, gstbase_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-transcoder-1.0', name : pkg_name,
description : 'High level API for transcoding using GStreamer', description : 'High level API for transcoding using GStreamer',
) )
if build_gir if build_gir
transcoder_gir = gnome.generate_gir(gst_transcoder, gir = {
sources : sources + headers + [gsttranscoder_h], 'sources' : sources + headers + [gsttranscoder_h],
nsversion : api_version, 'nsversion' : api_version,
namespace : 'GstTranscoder', 'namespace' : 'GstTranscoder',
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst_', 'symbol_prefix' : 'gst_',
includes : ['GObject-2.0', 'includes' : ['GObject-2.0',
'Gst-' + api_version, 'Gst-' + api_version,
'GstPbutils-' + api_version], 'GstPbutils-' + api_version],
dependencies: [gst_dep, gstpbutils_dep], 'dependencies' : [gst_dep, gstpbutils_dep],
install : true, 'export_packages' : pkg_name,
extra_args : gir_init_section 'install' : true,
) 'extra_args' : gir_init_section
}
library_def += { 'gir': [gir]}
if not static_build
transcoder_gir = gnome.generate_gir(gst_transcoder, kwargs: gir)
transcoder_gen_sources += transcoder_gir transcoder_gen_sources += transcoder_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
gst_transcoder_dep = declare_dependency(link_with: gst_transcoder, gst_transcoder_dep = declare_dependency(link_with: gst_transcoder,
dependencies : [gst_dep, gstpbutils_dep], dependencies : [gst_dep, gstpbutils_dep],
include_directories : [libsinc],
sources: transcoder_gen_sources, sources: transcoder_gen_sources,
include_directories : [libsinc]
) )
meson.override_dependency(pkg_name, gst_transcoder_dep)
meson.override_dependency('gstreamer-transcoder-1.0', gst_transcoder_dep)

View file

@ -10,6 +10,7 @@ urid_headers = [
] ]
install_headers(urid_headers, subdir : 'gstreamer-1.0/gst/uridownloader') install_headers(urid_headers, subdir : 'gstreamer-1.0/gst/uridownloader')
pkg_name = 'gstreamer-downloader-1.0'
gsturidownloader = library('gsturidownloader-' + api_version, gsturidownloader = library('gsturidownloader-' + api_version,
urid_sources, urid_sources,
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_URI_DOWNLOADER'], c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_URI_DOWNLOADER'],
@ -24,3 +25,6 @@ gsturidownloader = library('gsturidownloader-' + api_version,
gsturidownloader_dep = declare_dependency(link_with : gsturidownloader, gsturidownloader_dep = declare_dependency(link_with : gsturidownloader,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gstbase_dep]) dependencies : [gstbase_dep])
libraries += [[pkg_name, {'lib': gsturidownloader}]]
meson.override_dependency(pkg_name, gsturidownloader_dep)

View file

@ -45,15 +45,17 @@ gstva = library('gstva-' + api_version,
dependencies : [gst_dep, libva_dep, libva_drm_dep, libdrm_dep], dependencies : [gst_dep, libva_dep, libva_drm_dep, libdrm_dep],
) )
pkg_name = 'gstreamer-va-1.0'
libraries += [[pkg_name, {'lib': gstva}]]
pkgconfig.generate(gstva, pkgconfig.generate(gstva,
libraries : gst_dep, libraries : gst_dep,
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-va-1.0', name : pkg_name,
description : 'GStreamer VA support', description : 'GStreamer VA support',
) )
gstva_dep = declare_dependency(link_with : gstva, gstva_dep = declare_dependency(link_with : gstva,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gst_dep, libva_dep, libva_drm_dep, libdrm_dep]) dependencies : [gst_dep, libva_dep, libva_drm_dep, libdrm_dep])
meson.override_dependency('gstreamer-va-1.0', gstva_dep) meson.override_dependency(pkg_name, gstva_dep)

View file

@ -322,11 +322,13 @@ gstvulkan = library('gstvulkan-' + api_version,
# don't confuse gst/vulkan/xcb/xcb.h with xcb/xcb.h # don't confuse gst/vulkan/xcb/xcb.h with xcb/xcb.h
implicit_include_directories : false) implicit_include_directories : false)
library_def = {'lib': gstvulkan}
pkg_name = 'gstreamer-vulkan-1.0'
pkgconfig.generate(gstvulkan, pkgconfig.generate(gstvulkan,
libraries : [gst_dep, gstbase_dep, gstvideo_dep], libraries : [gst_dep, gstbase_dep, gstvideo_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-vulkan-1.0', name : pkg_name,
description : 'GStreamer Vulkan support', description : 'GStreamer Vulkan support',
) )
@ -338,27 +340,33 @@ if build_gir
extra_gir_includes += ['Vulkan-1.0'] extra_gir_includes += ['Vulkan-1.0']
endif endif
vulkan_gir = gnome.generate_gir(gstvulkan, gir = {
sources : vulkan_sources + vulkan_headers + [vulkan_enumtypes_h, vulkan_enumtypes_c], 'sources' : vulkan_sources + vulkan_headers + [vulkan_enumtypes_h, vulkan_enumtypes_c],
namespace : 'GstVulkan', 'namespace' : 'GstVulkan',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-vulkan-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'] + extra_gir_includes, 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'] + extra_gir_includes,
install : true, 'install' : true,
extra_args : gir_init_section + ['--c-include=gst/vulkan/vulkan.h'], 'extra_args' : gir_init_section + ['--c-include=gst/vulkan/vulkan.h'],
dependencies : [gstvideo_dep, gst_dep, gstbase_dep] + optional_deps 'dependencies' : [gstvideo_dep, gst_dep, gstbase_dep] + optional_deps
) }
library_def += {'gir': [gir]}
if not static_build
vulkan_gir = gnome.generate_gir(gstvulkan, kwargs: gir)
gen_sources += vulkan_gir gen_sources += vulkan_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
gstvulkan_dep = declare_dependency(link_with : gstvulkan, gstvulkan_dep = declare_dependency(link_with : gstvulkan,
include_directories : [libsinc], include_directories : [libsinc],
sources: gen_sources, sources: gen_sources,
dependencies : [gstvideo_dep, gstbase_dep, vulkan_dep] + optional_deps) dependencies : [gstvideo_dep, gstbase_dep, vulkan_dep] + optional_deps)
meson.override_dependency('gstreamer-vulkan-1.0', gstvulkan_dep) meson.override_dependency(pkg_name, gstvulkan_dep)
if enabled_vulkan_winsys.contains('xcb') if enabled_vulkan_winsys.contains('xcb')
install_headers(vulkan_xcb_headers, subdir : 'gstreamer-1.0/gst/vulkan/xcb') install_headers(vulkan_xcb_headers, subdir : 'gstreamer-1.0/gst/vulkan/xcb')
@ -371,18 +379,25 @@ if enabled_vulkan_winsys.contains('xcb')
) )
vulkan_xcb_gir = [] vulkan_xcb_gir = []
if build_gir if build_gir
vulkan_xcb_gir = gnome.generate_gir(gstvulkan, gir = {
sources : vulkan_xcb_sources + vulkan_xcb_headers, 'sources' : vulkan_xcb_sources + vulkan_xcb_headers,
namespace : 'GstVulkanXCB', 'namespace' : 'GstVulkanXCB',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-vulkan-xcb-1.0', 'export_packages' : 'gstreamer-vulkan-xcb-1.0',
includes : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', vulkan_gir[0]] + extra_gir_includes, 'install' : true,
install : true, 'extra_args' : gir_init_section + ['--c-include=gst/vulkan/xcb/xcb.h'],
extra_args : gir_init_section + ['--c-include=gst/vulkan/xcb/xcb.h'], 'dependencies' : [gstvideo_dep, gst_dep, gstbase_dep] + optional_deps
dependencies : [gstvideo_dep, gst_dep, gstbase_dep] + optional_deps }
)
if not static_build
gir += {'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', vulkan_gir[0]] + extra_gir_includes}
vulkan_xcb_gir = gnome.generate_gir(gstvulkan, kwargs: gir)
endif
gir += {'includes' :['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', 'GstVulkan-1.0'] + extra_gir_includes}
library_def += {'gir': library_def['gir'] + [gir]}
endif endif
gstvulkanxcb_dep = declare_dependency(dependencies : [gstvulkan_dep], gstvulkanxcb_dep = declare_dependency(dependencies : [gstvulkan_dep],
sources : vulkan_xcb_gir) sources : vulkan_xcb_gir)
@ -400,20 +415,26 @@ if enabled_vulkan_winsys.contains('wayland')
) )
vulkan_wayland_gir = [] vulkan_wayland_gir = []
if build_gir if build_gir
vulkan_wayland_gir = gnome.generate_gir(gstvulkan, gir = {
sources : vulkan_wayland_sources + vulkan_wayland_headers, 'sources' : vulkan_wayland_sources + vulkan_wayland_headers,
namespace : 'GstVulkanWayland', 'namespace' : 'GstVulkanWayland',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-vulkan-wayland-1.0', 'export_packages' : 'gstreamer-vulkan-wayland-1.0',
includes : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', vulkan_gir[0]] + extra_gir_includes, 'install' : true,
install : true, 'extra_args' : gir_init_section + ['--c-include=gst/vulkan/wayland/wayland.h'],
extra_args : gir_init_section + ['--c-include=gst/vulkan/wayland/wayland.h'], 'dependencies' : [gstvideo_dep, gst_dep, gstbase_dep] + optional_deps
dependencies : [gstvideo_dep, gst_dep, gstbase_dep] + optional_deps }
) if not static_build
gir += {'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', vulkan_gir[0]] + extra_gir_includes}
vulkan_wayland_gir += gnome.generate_gir(gstvulkan, kwargs: gir)
endif
gir += {'includes' :['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', 'GstVulkan-1.0'] + extra_gir_includes}
library_def += {'gir': library_def['gir'] + [gir]}
endif endif
gstvulkanwayland_dep = declare_dependency(dependencies : [gstvulkan_dep], gstvulkanwayland_dep = declare_dependency(dependencies : [gstvulkan_dep],
sources : vulkan_wayland_gir) sources : vulkan_wayland_gir)
meson.override_dependency('gstreamer-vulkan-wayland-1.0', gstvulkanwayland_dep) meson.override_dependency('gstreamer-vulkan-wayland-1.0', gstvulkanwayland_dep)
endif endif

View file

@ -18,11 +18,13 @@ if use_wayland
dependencies : [gst_dep, gstvideo_dep, wl_client_dep] dependencies : [gst_dep, gstvideo_dep, wl_client_dep]
) )
pkg_name = 'gstreamer-wayland-1.0'
libraries += [[pkg_name, {'lib': gstwayland}]]
pkgconfig.generate(gstwayland, pkgconfig.generate(gstwayland,
libraries : [gst_dep, gstvideo_dep], libraries : [gst_dep, gstvideo_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-wayland-1.0', name : pkg_name,
description : 'GStreamer Wayland support', description : 'GStreamer Wayland support',
) )
@ -30,6 +32,6 @@ if use_wayland
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gst_dep, gstvideo_dep]) dependencies : [gst_dep, gstvideo_dep])
meson.override_dependency('gstreamer-wayland-1.0', gstwayland_dep)
install_headers('wayland.h', subdir: 'gstreamer-1.0/gst/wayland') install_headers('wayland.h', subdir: 'gstreamer-1.0/gst/wayland')
meson.override_dependency(pkg_name, gstwayland_dep)
endif endif

View file

@ -55,29 +55,36 @@ gstwebrtc = library('gstwebrtc-' + api_version,
dependencies : gstwebrtc_dependencies, dependencies : gstwebrtc_dependencies,
) )
library_def = {'lib': gstwebrtc}
pkg_name = 'gstreamer-webrtc-1.0'
pkgconfig.generate(gstwebrtc, pkgconfig.generate(gstwebrtc,
libraries : [gst_dep, gstbase_dep], libraries : [gst_dep, gstbase_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-webrtc-1.0', name : pkg_name,
description : 'GStreamer WebRTC support', description : 'GStreamer WebRTC support',
) )
if build_gir if build_gir
webrtc_gir = gnome.generate_gir(gstwebrtc, gir = {
sources : webrtc_sources + webrtc_headers + [gstwebrtc_h], 'sources' : webrtc_sources + webrtc_headers + [gstwebrtc_h],
namespace : 'GstWebRTC', 'namespace' : 'GstWebRTC',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-webrtc-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstSdp-1.0'], 'includes' : ['Gst-1.0', 'GstSdp-1.0'],
install : true, 'install' : true,
extra_args : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/webrtc/webrtc.h'], 'extra_args' : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/webrtc/webrtc.h'],
dependencies : [gstbase_dep, gstsdp_dep] 'dependencies' : gstwebrtc_dependencies,
) }
library_def = {'lib': library_def['lib'], 'gir': [gir]}
if not static_build
webrtc_gir = gnome.generate_gir(gstwebrtc, kwargs: gir)
webrtc_gen_sources += webrtc_gir webrtc_gen_sources += webrtc_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
install_headers(webrtc_headers, subdir : 'gstreamer-1.0/gst/webrtc') install_headers(webrtc_headers, subdir : 'gstreamer-1.0/gst/webrtc')
@ -86,4 +93,4 @@ gstwebrtc_dep = declare_dependency(link_with: gstwebrtc,
sources: webrtc_gen_sources, sources: webrtc_gen_sources,
dependencies: gstwebrtc_dependencies) dependencies: gstwebrtc_dependencies)
meson.override_dependency('gstreamer-webrtc-1.0', gstwebrtc_dep) meson.override_dependency(pkg_name, gstwebrtc_dep)

View file

@ -29,7 +29,9 @@ libversion = '@0@.@1@.0'.format(soversion, curversion)
osxversion = curversion + 1 osxversion = curversion + 1
plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
static_build = get_option('default_library') == 'static'
plugins = [] plugins = []
libraries = []
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp') cxx = meson.get_compiler('cpp')

View file

@ -61,7 +61,7 @@ foreach extension: required_hotdoc_extensions
endif endif
endforeach endforeach
if not build_gir if not build_gir or static_build
if get_option('doc').enabled() if get_option('doc').enabled()
error('Documentation enabled but introspection not built.') error('Documentation enabled but introspection not built.')
endif endif

View file

@ -19,31 +19,38 @@ gstallocators = library('gstallocators-@0@'.format(api_version),
dependencies : [gst_dep], dependencies : [gst_dep],
) )
pkg_name = 'gstreamer-allocators-1.0'
pkgconfig.generate(gstallocators, pkgconfig.generate(gstallocators,
libraries : [gst_dep], libraries : [gst_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-allocators-1.0', name : pkg_name,
description : 'Allocators implementation', description : 'Allocators implementation',
) )
library_def = {'lib': gstallocators}
allocators_gen_sources = [] allocators_gen_sources = []
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/allocators/allocators.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/allocators/allocators.h' ]
allocators_gir = gnome.generate_gir(gstallocators, gir = {
sources : gst_allocators_sources + gst_allocators_headers, 'sources' : gst_allocators_sources + gst_allocators_headers,
namespace : 'GstAllocators', 'namespace' : 'GstAllocators',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-allocators-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0'], 'includes' : ['Gst-1.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
dependencies : [gst_dep] 'dependencies' : [gst_dep]
) }
library_def += {'gir': [gir]}
if not static_build
allocators_gir = gnome.generate_gir(gstallocators, kwargs: gir)
allocators_gen_sources += allocators_gir allocators_gen_sources += allocators_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
allocators_dep = declare_dependency(link_with: gstallocators, allocators_dep = declare_dependency(link_with: gstallocators,
include_directories : [libsinc], include_directories : [libsinc],

View file

@ -30,35 +30,41 @@ gstapp = library('gstapp-@0@'.format(api_version),
dependencies : [gst_base_dep], dependencies : [gst_base_dep],
) )
pkg_name = 'gstreamer-app-1.0'
pkgconfig.generate(gstapp, pkgconfig.generate(gstapp,
libraries : [gst_dep, gst_base_dep], libraries : [gst_dep, gst_base_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-app-1.0', name : pkg_name,
description : 'Helper functions and base classes for application integration', description : 'Helper functions and base classes for application integration',
) )
library_def = {'lib': gstapp}
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/app/app.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/app/app.h' ]
app_gir = gnome.generate_gir(gstapp, gir = {
sources : app_sources + app_headers + [gstapp_c] + [gstapp_h], 'sources' : app_sources + app_headers + [gstapp_c] + [gstapp_h],
namespace : 'GstApp', 'namespace' : 'GstApp',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-app-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstBase-1.0'], 'includes' : ['Gst-1.0', 'GstBase-1.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
dependencies : [gst_dep, gst_base_dep] 'dependencies' : [gst_dep, gst_base_dep]
) }
library_def += {'gir': [gir]}
if not static_build
app_gir = gnome.generate_gir(gstapp, kwargs: gir)
app_gen_sources += app_gir app_gen_sources += app_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
app_dep = declare_dependency(link_with: gstapp, app_dep = declare_dependency(link_with: gstapp,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gst_base_dep], dependencies : [gst_base_dep],
sources : app_gen_sources) sources : app_gen_sources)
meson.override_dependency('gstreamer-app-1.0', app_dep) meson.override_dependency(pkg_name, app_dep)

View file

@ -151,35 +151,41 @@ gstaudio = library('gstaudio-@0@'.format(api_version),
install : true, install : true,
dependencies : gstaudio_deps, dependencies : gstaudio_deps,
) )
pkg_name = 'gstreamer-audio-1.0'
pkgconfig.generate(gstaudio, pkgconfig.generate(gstaudio,
libraries : [gst_dep, gst_base_dep], libraries : [gst_dep, gst_base_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-audio-1.0', name : pkg_name,
description : 'Audio helper functions and base classes', description : 'Audio helper functions and base classes',
) )
library_def = {'lib': gstaudio}
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/audio/audio.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/audio/audio.h' ]
audio_gir = gnome.generate_gir(gstaudio, gir = {
sources : audio_src + audio_headers + [gstaudio_c] + [gstaudio_h], 'sources' : audio_src + audio_headers + [gstaudio_c] + [gstaudio_h],
namespace : 'GstAudio', 'namespace' : 'GstAudio',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-audio-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstBase-1.0', 'GLib-2.0', 'GObject-2.0', 'GModule-2.0' ], 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GLib-2.0', 'GObject-2.0', 'GModule-2.0' ],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
dependencies : gstaudio_deps 'dependencies' : gstaudio_deps
) }
library_def = {'lib': library_def['lib'], 'gir': [gir]}
if not static_build
audio_gir = gnome.generate_gir(gstaudio, kwargs: gir)
audio_gen_sources += [audio_gir] audio_gen_sources += [audio_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
audio_dep = declare_dependency(link_with : gstaudio, audio_dep = declare_dependency(link_with : gstaudio,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : gstaudio_deps, dependencies : gstaudio_deps,
sources : audio_gen_sources) sources : audio_gen_sources)
meson.override_dependency('gstreamer-audio-1.0', audio_dep) meson.override_dependency(pkg_name, audio_dep)

View file

@ -35,17 +35,18 @@ gstfft = library('gstfft-@0@'.format(api_version),
install : true, install : true,
dependencies : [gst_dep, libm], dependencies : [gst_dep, libm],
) )
pkg_name = 'gstreamer-fft-1.0'
pkgconfig.generate(gstfft, pkgconfig.generate(gstfft,
libraries : [gst_dep], libraries : [gst_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-fft-1.0', name : pkg_name,
description : 'FFT implementation', description : 'FFT implementation',
) )
libraries += [[pkg_name, {'lib': gstfft}]]
fft_dep = declare_dependency(link_with: gstfft, fft_dep = declare_dependency(link_with: gstfft,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gst_dep]) dependencies : [gst_dep])
meson.override_dependency('gstreamer-fft-1.0', fft_dep) meson.override_dependency(pkg_name, fft_dep)

View file

@ -37,7 +37,7 @@ gl_sources = files([
'gstglwindow.c', 'gstglwindow.c',
]) ])
gl_priv_sources = files([]) gl_priv_sources = []
gir_gl_headers = files([ gir_gl_headers = files([
'gl.h', 'gl.h',
@ -615,12 +615,12 @@ if need_win_wayland != 'no'
gl_wayland_sources += files([ gl_wayland_sources += files([
'wayland/gstgldisplay_wayland.c', 'wayland/gstgldisplay_wayland.c',
]) ])
gl_priv_sources += files([ gl_priv_sources += [
'wayland/gstglwindow_wayland_egl.c', 'wayland/gstglwindow_wayland_egl.c',
'wayland/wayland_event_source.c', 'wayland/wayland_event_source.c',
xdg_shell_header, xdg_shell_header,
xdg_shell_code, xdg_shell_code,
]) ]
gl_wayland_headers += files([ gl_wayland_headers += files([
'wayland/wayland.h', 'wayland/wayland.h',
'wayland/gstgldisplay_wayland.h' 'wayland/gstgldisplay_wayland.h'
@ -655,10 +655,10 @@ if need_win_x11 != 'no'
gl_x11_sources += files([ gl_x11_sources += files([
'x11/gstgldisplay_x11.c', 'x11/gstgldisplay_x11.c',
]) ])
gl_priv_sources += files([ gl_priv_sources += [
'x11/gstglwindow_x11.c', 'x11/gstglwindow_x11.c',
'x11/xcb_event_source.c', 'x11/xcb_event_source.c',
]) ]
gl_x11_headers += files([ gl_x11_headers += files([
'x11/x11.h', 'x11/x11.h',
'x11/gstgldisplay_x11.h', 'x11/gstgldisplay_x11.h',
@ -669,9 +669,9 @@ if need_win_x11 != 'no'
if need_platform_glx != 'no' and glx_dep.found() and cc.has_function ('glXMakeCurrent', dependencies : glx_dep) if need_platform_glx != 'no' and glx_dep.found() and cc.has_function ('glXMakeCurrent', dependencies : glx_dep)
glconf.set('GST_GL_HAVE_PLATFORM_GLX', 1) glconf.set('GST_GL_HAVE_PLATFORM_GLX', 1)
gl_priv_sources += files([ gl_priv_sources += [
'x11/gstglcontext_glx.c', 'x11/gstglcontext_glx.c',
]) ]
# GLX is in the opengl library on linux # GLX is in the opengl library on linux
gl_platform_deps += glx_dep gl_platform_deps += glx_dep
enabled_gl_platforms += 'glx' enabled_gl_platforms += 'glx'
@ -687,9 +687,9 @@ if need_win_dispmanx != 'no'
error('dispmanx requires the use of egl') error('dispmanx requires the use of egl')
endif endif
gl_priv_sources += files([ gl_priv_sources += [
'dispmanx/gstglwindow_dispmanx_egl.c' 'dispmanx/gstglwindow_dispmanx_egl.c'
]) ]
glconf.set('GST_GL_HAVE_WINDOW_DISPMANX', 1) glconf.set('GST_GL_HAVE_WINDOW_DISPMANX', 1)
gl_winsys_deps += bcm_host_dep gl_winsys_deps += bcm_host_dep
@ -724,18 +724,18 @@ if host_system == 'windows' and need_win_win32 != 'no'
if have_wgl or have_egl_win32 if have_wgl or have_egl_win32
gl_includes += [compat_includes] gl_includes += [compat_includes]
gl_platform_deps += gdi_dep gl_platform_deps += gdi_dep
gl_priv_sources += files([ gl_priv_sources += [
'win32/gstglwindow_win32.c', 'win32/gstglwindow_win32.c',
]) ]
enabled_gl_winsys += 'win32' enabled_gl_winsys += 'win32'
gl_winsys_deps += gdi_dep gl_winsys_deps += gdi_dep
glconf.set('GST_GL_HAVE_WINDOW_WIN32', 1) glconf.set('GST_GL_HAVE_WINDOW_WIN32', 1)
endif endif
if have_wgl if have_wgl
gl_priv_sources += files([ gl_priv_sources += [
'wgl/gstglcontext_wgl.c', 'wgl/gstglcontext_wgl.c',
]) ]
enabled_gl_platforms += 'wgl' enabled_gl_platforms += 'wgl'
glconf.set('GST_GL_HAVE_PLATFORM_WGL', 1) glconf.set('GST_GL_HAVE_PLATFORM_WGL', 1)
endif endif
@ -756,9 +756,9 @@ if need_win_winrt != 'no' and host_system == 'windows'
if windows_graphics_h and windows_app_dep.found() and runtimeobject_lib.found() if windows_graphics_h and windows_app_dep.found() and runtimeobject_lib.found()
enabled_gl_winsys += 'winrt' enabled_gl_winsys += 'winrt'
glconf.set10('GST_GL_HAVE_WINDOW_WINRT', 1) glconf.set10('GST_GL_HAVE_WINDOW_WINRT', 1)
gl_priv_sources += files([ gl_priv_sources += [
'winrt/gstglwindow_winrt_egl.cpp' 'winrt/gstglwindow_winrt_egl.cpp'
]) ]
gl_winsys_deps += runtimeobject_lib gl_winsys_deps += runtimeobject_lib
elif need_win_winrt == 'yes' elif need_win_winrt == 'yes'
error('WinRT is enabled, but headers/libraries were not found') error('WinRT is enabled, but headers/libraries were not found')
@ -808,12 +808,12 @@ if host_system == 'darwin'
if need_win_cocoa != 'no' if need_win_cocoa != 'no'
cocoa_dep = dependency('appleframeworks', modules : ['Cocoa'], required : false) cocoa_dep = dependency('appleframeworks', modules : ['Cocoa'], required : false)
if cocoa_dep.found() if cocoa_dep.found()
gl_priv_sources += files([ gl_priv_sources += [
'cocoa/gstglcaopengllayer.m', 'cocoa/gstglcaopengllayer.m',
'cocoa/gstglcontext_cocoa.m', 'cocoa/gstglcontext_cocoa.m',
'cocoa/gstgldisplay_cocoa.m', 'cocoa/gstgldisplay_cocoa.m',
'cocoa/gstglwindow_cocoa.m' 'cocoa/gstglwindow_cocoa.m'
]) ]
gl_winsys_deps += cocoa_dep gl_winsys_deps += cocoa_dep
enabled_gl_winsys += 'cocoa' enabled_gl_winsys += 'cocoa'
glconf.set10('GST_GL_HAVE_WINDOW_COCOA', 1) glconf.set10('GST_GL_HAVE_WINDOW_COCOA', 1)
@ -855,10 +855,10 @@ if host_system == 'ios' and need_platform_eagl != 'no' and need_win_eagl != 'no'
quartzcore_dep, quartzcore_dep,
uikit_dep, uikit_dep,
] ]
gl_priv_sources += files([ gl_priv_sources += [
'eagl/gstglcontext_eagl.m', 'eagl/gstglcontext_eagl.m',
'eagl/gstglwindow_eagl.m', 'eagl/gstglwindow_eagl.m',
]) ]
enabled_gl_winsys += 'eagl' enabled_gl_winsys += 'eagl'
enabled_gl_platforms += 'eagl' enabled_gl_platforms += 'eagl'
glconf.set('GST_GL_HAVE_WINDOW_EAGL', 1) glconf.set('GST_GL_HAVE_WINDOW_EAGL', 1)
@ -883,11 +883,11 @@ if need_win_gbm != 'no'
gbm_libdrm_dep = dependency('libdrm', version : '>= 2.4.55', required : false) gbm_libdrm_dep = dependency('libdrm', version : '>= 2.4.55', required : false)
gbm_dep = dependency('gbm', required : false) gbm_dep = dependency('gbm', required : false)
if egl_dep.found() and gbm_gudev_dep.found() and gbm_libdrm_dep.found() and gbm_dep.found() if egl_dep.found() and gbm_gudev_dep.found() and gbm_libdrm_dep.found() and gbm_dep.found()
gl_priv_sources += files([ gl_priv_sources += [
'gbm/gstgldisplay_gbm.c', 'gbm/gstgldisplay_gbm.c',
'gbm/gstgl_gbm_utils.c', 'gbm/gstgl_gbm_utils.c',
'gbm/gstglwindow_gbm_egl.c', 'gbm/gstglwindow_gbm_egl.c',
]) ]
enabled_gl_winsys += 'gbm' enabled_gl_winsys += 'gbm'
gl_winsys_deps += [gbm_gudev_dep, gbm_libdrm_dep, gbm_dep] gl_winsys_deps += [gbm_gudev_dep, gbm_libdrm_dep, gbm_dep]
glconf.set('GST_GL_HAVE_WINDOW_GBM', 1) glconf.set('GST_GL_HAVE_WINDOW_GBM', 1)
@ -907,10 +907,10 @@ if need_platform_egl != 'no' and need_win_viv_fb != 'no'
enabled_gl_winsys += 'viv-fb' enabled_gl_winsys += 'viv-fb'
glconf.set10('GST_GL_HAVE_WINDOW_VIV_FB', 1) glconf.set10('GST_GL_HAVE_WINDOW_VIV_FB', 1)
glconf.set10('GST_GL_HAVE_VIV_DIRECTVIV', 1) glconf.set10('GST_GL_HAVE_VIV_DIRECTVIV', 1)
gl_priv_sources += files([ gl_priv_sources += [
'viv-fb/gstgldisplay_viv_fb.c', 'viv-fb/gstgldisplay_viv_fb.c',
'viv-fb/gstglwindow_viv_fb_egl.c', 'viv-fb/gstglwindow_viv_fb_egl.c',
]) ]
gl_cpp_args += ['-DEGL_API_FB'] gl_cpp_args += ['-DEGL_API_FB']
endif endif
endif endif
@ -930,9 +930,9 @@ if host_system == 'android' and need_win_android != 'no' and need_platform_egl !
if gles2_dep.found() and egl_dep.found() if gles2_dep.found() and egl_dep.found()
enabled_gl_winsys += ['android'] enabled_gl_winsys += ['android']
glconf.set10('GST_GL_HAVE_WINDOW_ANDROID', 1) glconf.set10('GST_GL_HAVE_WINDOW_ANDROID', 1)
gl_priv_sources += files([ gl_priv_sources += [
'android/gstglwindow_android_egl.c' 'android/gstglwindow_android_egl.c'
]) ]
endif endif
endif endif
@ -1059,13 +1059,15 @@ if build_gstgl
'gl_apis=' + ' '.join(enabled_gl_apis), 'gl_apis=' + ' '.join(enabled_gl_apis),
] ]
library_def = {'lib': pbutils}
pkg_name = 'gstreamer-gl-1.0'
pkgconfig.generate(gstgl, pkgconfig.generate(gstgl,
libraries : [gstvideo, gst_base_dep, gst_dep], libraries : [gstvideo, gst_base_dep, gst_dep],
variables : pkgconfig_variables + pkgconfig_gl_variables, variables : pkgconfig_variables + pkgconfig_gl_variables,
uninstalled_variables : pkgconfig_gl_variables, uninstalled_variables : pkgconfig_gl_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
extra_cflags : ['-I${libdir}/gstreamer-1.0/include'], extra_cflags : ['-I${libdir}/gstreamer-1.0/include'],
name : 'gstreamer-gl-1.0', name : pkg_name,
description : 'Streaming media framework, OpenGL plugins libraries', description : 'Streaming media framework, OpenGL plugins libraries',
) )
@ -1082,21 +1084,25 @@ if build_gstgl
) )
if build_gir if build_gir
gl_gir = gnome.generate_gir(gstgl, gir = {
sources : gl_sources + [gl_enumtypes_h] + [gl_enumtypes_c] + gir_gl_headers, 'sources' : gl_sources + [gl_enumtypes_h] + [gl_enumtypes_c] + gir_gl_headers,
namespace : 'GstGL', 'namespace' : 'GstGL',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-gl-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'], 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
install : true, 'install' : true,
extra_args : gir_init_section + ['--c-include=gst/gl/gl.h'], 'extra_args' : gir_init_section + ['--c-include=gst/gl/gl.h'],
dependencies : [video_dep, gst_dep, gst_base_dep] 'dependencies' : [video_dep, gst_dep, gst_base_dep],
) }
gen_sources += gl_gir library_def += {'gir': [gir]}
if not static_build
gl_gir = gnome.generate_gir(gstgl, kwargs: gir)
gen_sources += [gl_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
gstgl_dep = declare_dependency(link_with : gstgl, gstgl_dep = declare_dependency(link_with : gstgl,
include_directories : [libsinc, compat_includes], include_directories : [libsinc, compat_includes],
sources: gen_sources, sources: gen_sources,
@ -1107,27 +1113,34 @@ if build_gstgl
if gl_x11_headers.length() > 0 if gl_x11_headers.length() > 0
install_headers(gl_x11_headers, subdir : 'gstreamer-1.0/gst/gl/x11') install_headers(gl_x11_headers, subdir : 'gstreamer-1.0/gst/gl/x11')
pkg_name = 'gstreamer-gl-x11-1.0'
pkgconfig.generate( pkgconfig.generate(
libraries : [gstgl], libraries : [gstgl],
requires: ['x11-xcb'], requires: ['x11-xcb'],
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-gl-x11-1.0', name : pkg_name,
description : 'Streaming media framework, OpenGL plugins libraries (X11 specifics)', description : 'Streaming media framework, OpenGL plugins libraries (X11 specifics)',
) )
gl_x11_gir = [] gl_x11_gir = []
if build_gir if build_gir
gl_x11_gir = gnome.generate_gir(gstgl, gir = {
sources : gl_x11_sources + gl_x11_headers, 'sources' : gl_x11_sources + gl_x11_headers,
namespace : 'GstGLX11', 'namespace' : 'GstGLX11',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-gl-x11-1.0', 'export_packages' : 'gstreamer-gl-x11-1.0',
includes : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', gl_gir[0]], 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
install : true, 'install' : true,
extra_args : gir_init_section + ['--c-include=gst/gl/x11/x11.h'], 'extra_args' : gir_init_section + ['--c-include=gst/gl/x11/x11.h'],
dependencies : [video_dep, gst_dep, gst_base_dep] 'dependencies' : [video_dep, gst_dep, gst_base_dep]
) }
gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']}
libraries += [[pkg_name, {'gir': gir_dict}]]
if not static_build
gir += {'includes': gir['includes'] + [gl_gir[0]]}
gl_x11_gir = gnome.generate_gir(gstgl, kwargs: gir)
endif
endif endif
gstglx11_dep = declare_dependency(dependencies : [gstgl_dep], gstglx11_dep = declare_dependency(dependencies : [gstgl_dep],
sources : gl_x11_gir) sources : gl_x11_gir)
@ -1136,59 +1149,72 @@ if build_gstgl
if gl_wayland_headers.length() > 0 if gl_wayland_headers.length() > 0
install_headers(gl_wayland_headers, subdir : 'gstreamer-1.0/gst/gl/wayland') install_headers(gl_wayland_headers, subdir : 'gstreamer-1.0/gst/gl/wayland')
pkg_name = 'gstreamer-gl-wayland-1.0'
pkgconfig.generate( pkgconfig.generate(
libraries : [gstgl], libraries : [gstgl],
requires: ['wayland-egl', 'wayland-client'], requires: ['wayland-egl', 'wayland-client'],
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-gl-wayland-1.0', name : pkg_name,
description : 'Streaming media framework, OpenGL plugins libraries (Wayland specifics)', description : 'Streaming media framework, OpenGL plugins libraries (Wayland specifics)',
) )
gl_wayland_gir = [] gl_wayland_gir = []
if build_gir if build_gir
gl_wayland_gir = gnome.generate_gir(gstgl, gir = {
sources : gl_wayland_sources + gl_wayland_headers, 'sources' : gl_wayland_sources + gl_wayland_headers,
namespace : 'GstGLWayland', 'namespace' : 'GstGLWayland',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-gl-wayland-1.0', 'export_packages' : 'gstreamer-gl-wayland-1.0',
includes : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', gl_gir[0]], 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
install : true, 'install' : true,
extra_args : gir_init_section + ['--c-include=gst/gl/wayland/wayland.h'], 'extra_args' : gir_init_section + ['--c-include=gst/gl/wayland/wayland.h'],
dependencies : [video_dep, gst_dep, gst_base_dep] 'dependencies' : [video_dep, gst_dep, gst_base_dep]
) }
gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']}
libraries += [[pkg_name, {'gir': gir_dict}]]
if not static_build
gir += {'includes': gir['includes'] + [gl_gir[0]]}
gl_wayland_gir = gnome.generate_gir(gstgl, kwargs: gir)
endif
endif endif
gstglwayland_dep = declare_dependency(dependencies : [gstgl_dep], gstglwayland_dep = declare_dependency(dependencies : [gstgl_dep],
sources : gl_wayland_gir) sources : gl_wayland_gir)
meson.override_dependency('gstreamer-gl-wayland-1.0', gstglwayland_dep) meson.override_dependency(pkg_name, gstglwayland_dep)
endif endif
if gl_egl_headers.length() > 0 if gl_egl_headers.length() > 0
install_headers(gl_egl_headers, subdir : 'gstreamer-1.0/gst/gl/egl') install_headers(gl_egl_headers, subdir : 'gstreamer-1.0/gst/gl/egl')
pkg_name = 'gstreamer-gl-egl-1.0'
pkgconfig.generate( pkgconfig.generate(
libraries : [gstgl, egl_dep], libraries : [gstgl, egl_dep],
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-gl-egl-1.0', name : pkg_name,
description : 'Streaming media framework, OpenGL plugins libraries (EGL specifics)', description : 'Streaming media framework, OpenGL plugins libraries (EGL specifics)',
) )
gl_egl_gir = [] gl_egl_gir = []
if build_gir if build_gir
gl_egl_gir = gnome.generate_gir(gstgl, gir = {
sources : gl_egl_sources + gl_egl_headers, 'sources' : gl_egl_sources + gl_egl_headers,
namespace : 'GstGLEGL', 'namespace' : 'GstGLEGL',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-gl-egl-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', gl_gir[0]], 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
install : true, 'install' : true,
extra_args : gir_init_section + ['--c-include=gst/gl/egl/egl.h'], 'extra_args' : gir_init_section + ['--c-include=gst/gl/egl/egl.h'],
dependencies : [video_dep, gst_dep, gst_base_dep] 'dependencies' : [video_dep, gst_dep, gst_base_dep]
) }
if not static_build
gl_egl_gir = gnome.generate_gir(gstgl, kwargs: gir)
endif
libraries += [[pkg_name, {'gir': gir}]]
endif endif
gstglegl_dep = declare_dependency(dependencies : [gstgl_dep], gstglegl_dep = declare_dependency(dependencies : [gstgl_dep],
sources : gl_egl_gir) sources : gl_egl_gir)
meson.override_dependency('gstreamer-gl-egl-1.0', gstglegl_dep) meson.override_dependency(pkg_name, gstglegl_dep)
endif endif
elif get_option('gl').enabled() elif get_option('gl').enabled()

View file

@ -60,33 +60,42 @@ pbutils = library('gstpbutils-@0@'.format(api_version),
dependencies : gstpbutils_deps, dependencies : gstpbutils_deps,
) )
library_def = {'lib': pbutils}
pkg_name = 'gstreamer-pbutils-1.0'
pkgconfig.generate(pbutils, pkgconfig.generate(pbutils,
libraries : [gst_dep, video_dep, audio_dep, gst_base_dep], libraries : [gst_dep, video_dep, audio_dep, gst_base_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-pbutils-1.0', name : pkg_name,
description : 'General utility functions', description : 'General utility functions',
) )
pbutils_gen_sources = [gstpbutils_h, gst_pbutils_version_h] pbutils_gen_sources = [gstpbutils_h, gst_pbutils_version_h]
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/pbutils/pbutils.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/pbutils/pbutils.h' ]
pbutils_gir = gnome.generate_gir(pbutils, gir = {
sources : pbutils_sources + pbutils_headers + [gstpbutils_h, gst_pbutils_version_h], 'sources' : pbutils_sources + pbutils_headers + [gstpbutils_h, gst_pbutils_version_h],
namespace : 'GstPbutils', 'namespace' : 'GstPbutils',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-pbutils-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstBase-1.0', 'GstAudio-1.0', 'GstVideo-1.0'], 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstAudio-1.0', 'GstVideo-1.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
dependencies : gstpbutils_deps 'dependencies' : gstpbutils_deps
) }
library_def = {'lib': library_def['lib'], 'gir': [gir]}
if not static_build
pbutils_gir = gnome.generate_gir(pbutils, kwargs: gir)
pbutils_gen_sources += [pbutils_gir] pbutils_gen_sources += [pbutils_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
pbutils_dep = declare_dependency(link_with : pbutils, pbutils_dep = declare_dependency(link_with : pbutils,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : gstpbutils_deps, dependencies : gstpbutils_deps,
sources : pbutils_gen_sources) sources : pbutils_gen_sources)
meson.override_dependency(pkg_name, pbutils_dep)

View file

@ -25,15 +25,17 @@ gstriff = library('gstriff-@0@'.format(api_version),
dependencies : riff_deps, dependencies : riff_deps,
) )
pkg_name = 'gstreamer-riff-1.0'
pkgconfig.generate(gstriff, pkgconfig.generate(gstriff,
libraries : [gst_dep], libraries : [gst_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-riff-1.0', name : pkg_name,
description : 'RIFF helper functions', description : 'RIFF helper functions',
) )
riff_gen_sources = [] riff_gen_sources = []
libraries += [[pkg_name, {'lib': gstriff}]]
# *** GIR DISABLED for this library *** # *** GIR DISABLED for this library ***
# This library does not respect the type naming conventions required to be # This library does not respect the type naming conventions required to be
@ -59,4 +61,4 @@ riff_dep = declare_dependency(link_with: gstriff,
dependencies : riff_deps, dependencies : riff_deps,
sources : riff_gen_sources ) sources : riff_gen_sources )
meson.override_dependency('gstreamer-riff-1.0', riff_dep) meson.override_dependency(pkg_name, riff_dep)

View file

@ -46,37 +46,42 @@ gst_rtp = library('gstrtp-@0@'.format(api_version),
dependencies : gstrtp_deps, dependencies : gstrtp_deps,
) )
library_def = {'lib': gst_rtp}
pkg_name = 'gstreamer-rtp-1.0'
pkgconfig.generate(gst_rtp, pkgconfig.generate(gst_rtp,
libraries : [gst_dep, gst_base_dep], libraries : [gst_dep, gst_base_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-rtp-1.0', name : pkg_name,
description : 'RTP base classes and helper functions', description : 'RTP base classes and helper functions',
) )
rtp_gen_sources = [gstrtp_enum_h] rtp_gen_sources = [gstrtp_enum_h]
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtp/rtp.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtp/rtp.h' ]
rtp_gir = gnome.generate_gir(gst_rtp, gir = {
sources : rtp_sources + rtp_headers + [gstrtp_enum_c] + [gstrtp_enum_h], 'sources' : rtp_sources + rtp_headers + [gstrtp_enum_c] + [gstrtp_enum_h],
namespace : 'GstRtp', 'namespace' : 'GstRtp',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-rtp-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstBase-1.0'], 'includes' : ['Gst-1.0', 'GstBase-1.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
dependencies : gstrtp_deps 'dependencies' : gstrtp_deps
) }
library_def = {'lib': library_def['lib'], 'gir': [gir]}
if not static_build
rtp_gir = gnome.generate_gir(gst_rtp, kwargs: gir)
rtp_gen_sources += [rtp_gir] rtp_gen_sources += [rtp_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
rtp_dep = declare_dependency(link_with : gst_rtp, rtp_dep = declare_dependency(link_with : gst_rtp,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : gstrtp_deps, dependencies : gstrtp_deps,
sources : rtp_gen_sources) sources : rtp_gen_sources)
meson.override_dependency('gstreamer-rtp-1.0', rtp_dep) meson.override_dependency(pkg_name, rtp_dep)

View file

@ -51,35 +51,42 @@ gst_rtsp = library('gstrtsp-@0@'.format(api_version),
dependencies : gstrtsp_deps, dependencies : gstrtsp_deps,
) )
library_def = {'lib': gst_rtsp}
pkg_name = 'gstreamer-rtsp-1.0'
pkgconfig.generate(gst_rtsp, pkgconfig.generate(gst_rtsp,
libraries : [gst_dep, sdp_dep, gio_dep], libraries : [gst_dep, sdp_dep, gio_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-rtsp-1.0', name : pkg_name,
description : 'RTSP base classes and helper functions', description : 'RTSP base classes and helper functions',
) )
rtsp_gen_sources = [gstrtsp_h] rtsp_gen_sources = [gstrtsp_h]
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtsp/rtsp.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtsp/rtsp.h' ]
rtsp_gir = gnome.generate_gir(gst_rtsp, gir = {
sources : rtsp_sources + rtsp_headers + [gstrtsp_c] + [gstrtsp_h], 'sources' : rtsp_sources + rtsp_headers + [gstrtsp_c] + [gstrtsp_h],
namespace : 'GstRtsp', 'namespace' : 'GstRtsp',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-rtsp-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstBase-1.0', 'GstSdp-1.0', 'Gio-2.0'], 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstSdp-1.0', 'Gio-2.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
dependencies : gstrtsp_deps + [sdp_dep] 'dependencies' : gstrtsp_deps + [sdp_dep]
) }
library_def = {'lib': library_def['lib'], 'gir': [gir]}
if not static_build
rtsp_gir = gnome.generate_gir(gst_rtsp, kwargs: gir)
rtsp_gen_sources += [rtsp_gir] rtsp_gen_sources += [rtsp_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
rtsp_dep = declare_dependency(link_with : gst_rtsp, rtsp_dep = declare_dependency(link_with : gst_rtsp,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : gstrtsp_deps, dependencies : gstrtsp_deps,
sources : rtsp_gen_sources) sources : rtsp_gen_sources)
meson.override_dependency('gstreamer-rtsp-1.0', rtsp_dep) meson.override_dependency(pkg_name, rtsp_dep)

View file

@ -20,36 +20,43 @@ gstsdp = library('gstsdp-@0@'.format(api_version),
dependencies : sdp_deps, dependencies : sdp_deps,
) )
library_def = {'lib': gstsdp}
pkg_name = 'gstreamer-sdp-1.0'
sdp_gen_sources = []
pkgconfig.generate(gstsdp, pkgconfig.generate(gstsdp,
libraries : [glib_deps], libraries : [glib_deps],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-sdp-1.0', name : pkg_name,
description : 'SDP helper functions', description : 'SDP helper functions',
) )
sdp_gen_sources = []
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/sdp/sdp.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/sdp/sdp.h' ]
sdp_gir = gnome.generate_gir(gstsdp, gir = {
sources : gst_sdp_sources + gst_sdp_headers, 'sources' : gst_sdp_sources + gst_sdp_headers,
namespace : 'GstSdp', 'namespace' : 'GstSdp',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-sdp-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0'], 'includes' : ['Gst-1.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
dependencies : sdp_deps 'dependencies' : sdp_deps
) }
library_def = {'lib': library_def['lib'], 'gir': [gir]}
if not static_build
sdp_gir = gnome.generate_gir(gstsdp, kwargs: gir)
sdp_gen_sources += [sdp_gir] sdp_gen_sources += [sdp_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
sdp_dep = declare_dependency(link_with: gstsdp, sdp_dep = declare_dependency(link_with: gstsdp,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : sdp_deps, dependencies : sdp_deps,
sources: sdp_gen_sources) sources: sdp_gen_sources)
meson.override_dependency('gstreamer-sdp-1.0', sdp_dep) meson.override_dependency(pkg_name, sdp_dep)

View file

@ -91,37 +91,44 @@ gsttag = library('gsttag-@0@'.format(api_version),
dependencies : tag_deps, dependencies : tag_deps,
) )
library_def = {'lib': gsttag}
pkg_name = 'gstreamer-tag-1.0'
pkgconfig.generate(gsttag, pkgconfig.generate(gsttag,
libraries : [gst_dep], libraries : [gst_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-tag-1.0', name : pkg_name,
description : 'Tag base classes and helper functions', description : 'Tag base classes and helper functions',
) )
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/tag/tag.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/tag/tag.h' ]
tag_gir = gnome.generate_gir(gsttag, gir = {
sources : tag_sources + tag_headers + [gsttag_h] + [gsttag_c], 'sources' : tag_sources + tag_headers + [gsttag_h] + [gsttag_c],
namespace : 'GstTag', 'namespace' : 'GstTag',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-tag-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstBase-1.0'], 'includes' : ['Gst-1.0', 'GstBase-1.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
dependencies : tag_deps 'dependencies' : tag_deps,
) }
library_def = {'lib': library_def['lib'], 'gir': [gir]}
if not static_build
tag_gir = gnome.generate_gir(gsttag, kwargs: gir)
tag_gen_sources += [tag_gir] tag_gen_sources += [tag_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
tag_dep = declare_dependency(link_with: gsttag, tag_dep = declare_dependency(link_with: gsttag,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : tag_deps, dependencies : tag_deps,
sources: tag_gen_sources) sources: tag_gen_sources)
meson.override_dependency('gstreamer-tag-1.0', tag_dep) meson.override_dependency(pkg_name, tag_dep)
# Little program that reads iso_639.xml and outputs tables for us as fallback # Little program that reads iso_639.xml and outputs tables for us as fallback
# for when iso-codes are not available (and so we don't have to read the xml # for when iso-codes are not available (and so we don't have to read the xml

View file

@ -142,34 +142,41 @@ gstvideo = library('gstvideo-@0@'.format(api_version),
dependencies : gstvideo_deps, dependencies : gstvideo_deps,
) )
library_def = {'lib': gstvideo}
pkg_name = 'gstreamer-video-1.0'
pkgconfig.generate(gstvideo, pkgconfig.generate(gstvideo,
libraries : [gst_dep, gst_base_dep], libraries : [gst_dep, gst_base_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-video-1.0', name : pkg_name,
description : 'Video base classes and helper functions', description : 'Video base classes and helper functions',
) )
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/video/video.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/video/video.h' ]
video_gir = gnome.generate_gir(gstvideo, gir = {
sources : video_sources + video_headers + [gstvideo_c] + [gstvideo_h], 'sources' : video_sources + video_headers + [gstvideo_c] + [gstvideo_h],
namespace : 'GstVideo', 'namespace' : 'GstVideo',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-video-1.0', 'export_packages' : pkg_name,
includes : ['Gst-1.0', 'GstBase-1.0'], 'includes' : ['Gst-1.0','GstBase-1.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
dependencies : gstvideo_deps 'dependencies' : gstvideo_deps
) }
library_def += {'gir': [gir]}
if not static_build
video_gir = gnome.generate_gir(gstvideo, kwargs: gir)
video_gen_sources += [video_gir] video_gen_sources += [video_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
video_dep = declare_dependency(link_with : gstvideo, video_dep = declare_dependency(link_with : gstvideo,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : gstvideo_deps, dependencies : gstvideo_deps,
sources : video_gen_sources) sources : video_gen_sources)
meson.override_dependency('gstreamer-video-1.0', video_dep) meson.override_dependency(pkg_name, video_dep)

View file

@ -41,7 +41,7 @@ osxversion = curversion + 1
plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
static_build = get_option('default_library') == 'static' static_build = get_option('default_library') == 'static'
plugins = [] plugins = []
libraries = {} libraries = []
cc = meson.get_compiler('c') cc = meson.get_compiler('c')

View file

@ -61,6 +61,15 @@ foreach extension: required_hotdoc_extensions
endif endif
endforeach endforeach
if static_build
if get_option('doc').enabled()
error('Documentation enabled but not supported when building statically.')
endif
message('Building statically, can\'t build the documentation')
subdir_done()
endif
if not build_gir if not build_gir
if get_option('doc').enabled() if get_option('doc').enabled()
error('Documentation enabled but introspection not built.') error('Documentation enabled but introspection not built.')

View file

@ -66,6 +66,8 @@ gst_rtsp_server = library('gstrtspserver-@0@'.format(api_version),
install : true, install : true,
dependencies : gst_rtsp_server_deps) dependencies : gst_rtsp_server_deps)
library_def = {'lib': gst_rtsp_server}
pkg_name = 'gstreamer-rtsp-server-' + api_version
pkgconfig.generate(gst_rtsp_server, pkgconfig.generate(gst_rtsp_server,
libraries : [gst_dep], libraries : [gst_dep],
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
@ -76,24 +78,31 @@ pkgconfig.generate(gst_rtsp_server,
rtsp_server_gen_sources = [] rtsp_server_gen_sources = []
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + ['--c-include=gst/rtsp-server/rtsp-server.h'] gst_gir_extra_args = gir_init_section + ['--c-include=gst/rtsp-server/rtsp-server.h']
rtsp_server_gir = gnome.generate_gir(gst_rtsp_server, gir = {
sources : rtsp_server_headers + rtsp_server_sources, 'sources' : rtsp_server_headers + rtsp_server_sources,
namespace : 'GstRtspServer', 'namespace' : 'GstRtspServer',
nsversion : api_version, 'nsversion' : api_version,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-rtsp-server-' + api_version, 'export_packages' : pkg_name,
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
includes : ['Gst-1.0', 'GstRtsp-1.0', 'GstNet-1.0'], 'includes' : ['Gst-1.0', 'GstRtsp-1.0', 'GstNet-1.0'],
dependencies : gst_rtsp_server_deps, 'dependencies' : gst_rtsp_server_deps,
) }
# FIXME: Expose gir for use in gstreamer-full
# Disabled for now as we get `undefined reference` to many symbols
# library_def = {'gir': [gir]}
if not static_build
rtsp_server_gir = gnome.generate_gir(gst_rtsp_server, kwargs: gir)
rtsp_server_gen_sources += [rtsp_server_gir] rtsp_server_gen_sources += [rtsp_server_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
gst_rtsp_server_dep = declare_dependency(link_with : gst_rtsp_server, gst_rtsp_server_dep = declare_dependency(link_with : gst_rtsp_server,
include_directories : rtspserver_incs, include_directories : rtspserver_incs,
sources : rtsp_server_gen_sources, sources : rtsp_server_gen_sources,
dependencies : [gstrtsp_dep, gstrtp_dep, gstsdp_dep, gstnet_dep, gstapp_dep]) dependencies : [gstrtsp_dep, gstrtp_dep, gstsdp_dep, gstnet_dep, gstapp_dep])
meson.override_dependency('gstreamer-rtsp-server-1.0', gst_rtsp_server_dep) meson.override_dependency(pkg_name, gst_rtsp_server_dep)

View file

@ -187,6 +187,8 @@ endif
plugins = [] plugins = []
pkgconfig_subdirs = ['gstreamer-1.0'] pkgconfig_subdirs = ['gstreamer-1.0']
static_build = get_option('default_library') == 'static'
libraries = []
subdir('gst') subdir('gst')
if not get_option('tests').disabled() if not get_option('tests').disabled()

View file

@ -65,6 +65,14 @@ foreach extension: required_hotdoc_extensions
endif endif
endforeach endforeach
if static_build
if get_option('doc').enabled()
error('Documentation enabled but not supported when building statically.')
endif
message('Building statically, can\'t build the documentation')
subdir_done()
endif
if not build_gir if not build_gir
if get_option('doc').enabled() if get_option('doc').enabled()

View file

@ -1,4 +1,4 @@
gst_sources = files([ gst_sources = files(
'gst.c', 'gst.c',
'gstobject.c', 'gstobject.c',
'gstallocator.c', 'gstallocator.c',
@ -71,9 +71,9 @@ gst_sources = files([
'gstutils.c', 'gstutils.c',
'gstvalue.c', 'gstvalue.c',
'gstparse.c', 'gstparse.c',
]) )
gst_headers = files([ gst_headers = files(
'gst.h', 'gst.h',
'glib-compat.h', 'glib-compat.h',
'gstobject.h', 'gstobject.h',
@ -147,12 +147,12 @@ gst_headers = files([
'gstregistry.h', 'gstregistry.h',
'gstparse.h', 'gstparse.h',
'math-compat.h', 'math-compat.h',
]) )
install_headers(gst_headers, subdir : 'gstreamer-1.0/gst') install_headers(gst_headers, subdir : 'gstreamer-1.0/gst')
gst_registry = get_option('registry') gst_registry = get_option('registry')
if gst_registry if gst_registry
gst_registry_sources = files(['gstregistrybinary.c']) gst_registry_sources = files('gstregistrybinary.c')
else else
gst_registry_sources = [] gst_registry_sources = []
endif endif
@ -250,12 +250,14 @@ libgst = library('gstreamer-1.0', gst_sources,
+ platform_deps, + platform_deps,
) )
pkg_name = 'gstreamer-1.0'
library_def = {'lib': libgst}
pkgconfig.generate(libgst, pkgconfig.generate(libgst,
libraries : [glib_dep, gobject_dep], libraries : [glib_dep, gobject_dep],
variables : pkgconfig_variables, variables : pkgconfig_variables,
uninstalled_variables: pkgconfig_uninstalled_variables, uninstalled_variables: pkgconfig_uninstalled_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-1.0', name : pkg_name,
description : 'Streaming media framework', description : 'Streaming media framework',
) )
@ -272,19 +274,29 @@ if build_gir
endif endif
gst_incdirs += [configinc] gst_incdirs += [configinc]
gst_gir = gnome.generate_gir(libgst, gir = {
sources : gst_sources + gst_headers + gst_enums + [gst_version_h], 'sources' : gst_sources + gst_headers + gst_enums + [gst_version_h],
namespace : 'Gst', 'namespace' : 'Gst',
nsversion : apiversion, 'nsversion' : apiversion,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-1.0', 'export_packages' : pkg_name,
includes : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0' ], 'includes' : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0' ],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
) }
library_def += {'gir': [gir]}
# When building statically the information about the gir is going to be
# consumed by `gst-build` to generate gir files linked against
# `libgstreamer-full-1.0.so`. We do not build it here as it is currently
# broken. Once that is fixed we could build it here, even though we would keep
# creating another gir which links against gst-full.
if not static_build
gst_gir = gnome.generate_gir(libgst, kwargs: gir)
gst_gen_sources += gst_gir gst_gen_sources += gst_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
gst_compile_args = [] gst_compile_args = []
if get_option('default_library') == 'static' if get_option('default_library') == 'static'
@ -299,4 +311,4 @@ gst_dep = declare_dependency(link_with : libgst,
sources : gst_gen_sources, sources : gst_gen_sources,
) )
meson.override_dependency('gstreamer-1.0', gst_dep) meson.override_dependency(pkg_name, gst_dep)

View file

@ -1,4 +1,4 @@
gst_base_sources = files([ gst_base_sources = files(
'gstadapter.c', 'gstadapter.c',
'gstaggregator.c', 'gstaggregator.c',
'gstbaseparse.c', 'gstbaseparse.c',
@ -15,9 +15,9 @@ gst_base_sources = files([
'gstpushsrc.c', 'gstpushsrc.c',
'gstqueuearray.c', 'gstqueuearray.c',
'gsttypefindhelper.c', 'gsttypefindhelper.c',
]) )
gst_base_headers = files([ gst_base_headers = files(
'base.h', 'base.h',
'base-prelude.h', 'base-prelude.h',
'gstadapter.h', 'gstadapter.h',
@ -36,7 +36,7 @@ gst_base_headers = files([
'gstpushsrc.h', 'gstpushsrc.h',
'gstqueuearray.h', 'gstqueuearray.h',
'gsttypefindhelper.h', 'gsttypefindhelper.h',
]) )
gst_base = library('gstbase-@0@'.format(apiversion), gst_base = library('gstbase-@0@'.format(apiversion),
gst_base_sources, gst_base_sources,
@ -49,39 +49,47 @@ gst_base = library('gstbase-@0@'.format(apiversion),
dependencies : [gobject_dep, glib_dep, gst_dep], dependencies : [gobject_dep, glib_dep, gst_dep],
) )
library_def = {'lib': gst_base}
pkg_name = 'gstreamer-base-1.0'
gst_base_gen_sources = []
pkgconfig.generate(gst_base, pkgconfig.generate(gst_base,
libraries : [libgst], libraries : [libgst],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-base-1.0', name : pkg_name,
description : 'Base classes for GStreamer elements', description : 'Base classes for GStreamer elements',
) )
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/base/base.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/base/base.h' ]
gst_base_gir = gnome.generate_gir(gst_base, gir = {
sources : gst_base_sources + gst_base_headers, 'sources' : gst_base_sources + gst_base_headers,
namespace : 'GstBase', 'namespace' : 'GstBase',
nsversion : apiversion, 'nsversion' : apiversion,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-base-1.0', 'export_packages' : pkg_name,
dependencies : [gst_dep], 'dependencies' : [gst_dep],
include_directories : [configinc, libsinc, privinc], 'include_directories' : [configinc, libsinc, privinc],
includes : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0', 'Gst-1.0'], 'includes' : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0', 'Gst-1.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
) }
library_def += {'gir': [gir]}
if not static_build
gst_base_gir = gnome.generate_gir(gst_base, kwargs: gir)
gst_base_gen_sources += [gst_base_gir] gst_base_gen_sources += [gst_base_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
gst_base_dep = declare_dependency(link_with : gst_base, gst_base_dep = declare_dependency(link_with : gst_base,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gst_dep], dependencies : [gst_dep],
sources : gst_base_gen_sources) sources : gst_base_gen_sources)
meson.override_dependency('gstreamer-base-1.0', gst_base_dep) meson.override_dependency(pkg_name, gst_base_dep)
install_headers('base.h', install_headers('base.h',
'base-prelude.h', 'base-prelude.h',

View file

@ -1,4 +1,4 @@
libcheck_files = files([ libcheck_files = files(
'check.c', 'check.c',
'check_error.c', 'check_error.c',
'check_list.c', 'check_list.c',
@ -9,7 +9,7 @@ libcheck_files = files([
'check_run.c', 'check_run.c',
'check_str.c', 'check_str.c',
'libcompat/libcompat.c' 'libcompat/libcompat.c'
]) )
if not cdata.has('HAVE_ALARM') if not cdata.has('HAVE_ALARM')
libcheck_files += ['libcompat/alarm.c'] libcheck_files += ['libcompat/alarm.c']
@ -41,11 +41,11 @@ endif
# FIXME: check that timer_create, timer_settime, timer_delete are in rt_lib # FIXME: check that timer_create, timer_settime, timer_delete are in rt_lib
if not rt_lib.found() if not rt_lib.found()
libcheck_files += files([ libcheck_files += files(
'libcompat/timer_create.c', 'libcompat/timer_create.c',
'libcompat/timer_settime.c', 'libcompat/timer_settime.c',
'libcompat/timer_delete.c' 'libcompat/timer_delete.c'
]) )
endif endif
configure_file(input : 'check.h.in', configure_file(input : 'check.h.in',

View file

@ -1,11 +1,11 @@
gst_check_sources = files([ gst_check_sources = files(
'gstbufferstraw.c', 'gstbufferstraw.c',
'gstcheck.c', 'gstcheck.c',
'gstconsistencychecker.c', 'gstconsistencychecker.c',
'gstharness.c', 'gstharness.c',
'gsttestclock.c', 'gsttestclock.c',
]) )
gst_check_headers = files([ gst_check_headers = files(
'check.h', 'check.h',
'check-prelude.h', 'check-prelude.h',
'gstbufferstraw.h', 'gstbufferstraw.h',
@ -13,7 +13,7 @@ gst_check_headers = files([
'gstconsistencychecker.h', 'gstconsistencychecker.h',
'gstharness.h', 'gstharness.h',
'gsttestclock.h', 'gsttestclock.h',
]) )
install_headers(gst_check_headers, subdir : 'gstreamer-1.0/gst/check/') install_headers(gst_check_headers, subdir : 'gstreamer-1.0/gst/check/')
@ -48,6 +48,8 @@ gst_check = library('gstcheck-@0@'.format(apiversion),
dependencies : [gobject_dep, glib_dep, gst_dep], dependencies : [gobject_dep, glib_dep, gst_dep],
) )
library_def = {'lib': gst_check}
pkg_name = 'gstreamer-check-1.0'
pkgconfig.generate(gst_check, pkgconfig.generate(gst_check,
libraries : [libgst], libraries : [libgst],
# FIXME: Add manually libcheck's dependencies because it's an uninstalled static # FIXME: Add manually libcheck's dependencies because it's an uninstalled static
@ -56,33 +58,37 @@ pkgconfig.generate(gst_check,
libraries_private: [rt_lib, mathlib], libraries_private: [rt_lib, mathlib],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-check-1.0', name : pkg_name,
description : 'Unit testing helper library for GStreamer modules', description : 'Unit testing helper library for GStreamer modules',
) )
gst_check_gen_sources = [] gst_check_gen_sources = []
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/check/check.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/check/check.h' ]
gst_check_gir = gnome.generate_gir(gst_check, gir = {
sources : gst_check_sources + gst_check_headers, 'sources' : gst_check_sources + gst_check_headers,
namespace : 'GstCheck', 'namespace' : 'GstCheck',
nsversion : apiversion, 'nsversion' : apiversion,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-check-1.0', 'export_packages' : pkg_name,
dependencies : [gst_dep], 'dependencies' : [gst_dep],
include_directories : [configinc, libsinc, privinc], 'include_directories' : [configinc, libsinc, privinc],
includes : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0', 'Gst-1.0'], 'includes' : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0', 'Gst-1.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
) }
library_def += {'gir': [gir]}
if not static_build
gst_check_gir = gnome.generate_gir(gst_check, kwargs: gir)
gst_check_gen_sources += gst_check_gir gst_check_gen_sources += gst_check_gir
endif endif
endif
libraries += [[pkg_name, library_def]]
gst_check_dep = declare_dependency(link_with : gst_check, gst_check_dep = declare_dependency(link_with : gst_check,
include_directories : [libsinc], include_directories : [libsinc],
dependencies : [gst_dep], dependencies : [gst_dep],
sources : gst_check_gen_sources) sources : gst_check_gen_sources)
meson.override_dependency('gstreamer-check-1.0', gst_check_dep) meson.override_dependency(pkg_name, gst_check_dep)

View file

@ -1,4 +1,4 @@
gst_controller_sources = files([ gst_controller_sources = files(
'gstargbcontrolbinding.c', 'gstargbcontrolbinding.c',
'gstdirectcontrolbinding.c', 'gstdirectcontrolbinding.c',
'gsttimedvaluecontrolsource.c', 'gsttimedvaluecontrolsource.c',
@ -6,14 +6,14 @@ gst_controller_sources = files([
'gstproxycontrolbinding.c', 'gstproxycontrolbinding.c',
'gsttriggercontrolsource.c', 'gsttriggercontrolsource.c',
'gstlfocontrolsource.c', 'gstlfocontrolsource.c',
]) )
controller_mkenum_headers = files([ controller_mkenum_headers = files(
'gstinterpolationcontrolsource.h', 'gstinterpolationcontrolsource.h',
'gstlfocontrolsource.h', 'gstlfocontrolsource.h',
]) )
gst_controller_headers = controller_mkenum_headers + files([ gst_controller_headers = controller_mkenum_headers + files(
'gstargbcontrolbinding.h', 'gstargbcontrolbinding.h',
'gstdirectcontrolbinding.h', 'gstdirectcontrolbinding.h',
'gsttimedvaluecontrolsource.h', 'gsttimedvaluecontrolsource.h',
@ -23,7 +23,7 @@ gst_controller_headers = controller_mkenum_headers + files([
'gstlfocontrolsource.h', 'gstlfocontrolsource.h',
'controller-prelude.h', 'controller-prelude.h',
'controller.h', 'controller.h',
]) )
install_headers(gst_controller_headers, subdir : 'gstreamer-1.0/gst/controller/') install_headers(gst_controller_headers, subdir : 'gstreamer-1.0/gst/controller/')
controller_enums = gnome.mkenums_simple('controller-enumtypes', controller_enums = gnome.mkenums_simple('controller-enumtypes',
@ -48,35 +48,42 @@ gst_controller = library('gstcontroller-@0@'.format(apiversion),
dependencies : [gobject_dep, glib_dep, mathlib, gst_dep], dependencies : [gobject_dep, glib_dep, mathlib, gst_dep],
) )
library_def = {'lib': gst_controller}
pkg_name = 'gstreamer-controller-1.0'
pkgconfig.generate(gst_controller, pkgconfig.generate(gst_controller,
libraries : [libgst], libraries : [libgst],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-controller-1.0', name : pkg_name,
description : 'Dynamic parameter control for GStreamer elements', description : 'Dynamic parameter control for GStreamer elements',
) )
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/controller/controller.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/controller/controller.h' ]
gst_controller_gir = gnome.generate_gir(gst_controller, gir = {
sources : gst_controller_sources + gst_controller_headers + [gstcontroller_h] + [gstcontroller_c], 'sources' : gst_controller_sources + gst_controller_headers + [gstcontroller_h] + [gstcontroller_c],
namespace : 'GstController', 'namespace': 'GstController',
nsversion : apiversion, 'nsversion': apiversion,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-controller-1.0', 'export_packages' : pkg_name,
dependencies : [gst_dep], 'dependencies' : [gst_dep],
include_directories : [configinc, libsinc, privinc], 'include_directories' : [configinc, libsinc, privinc],
includes : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0', 'Gst-1.0'], 'includes' : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0', 'Gst-1.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
) }
library_def += {'gir': [gir]}
if not static_build
gst_controller_gir = gnome.generate_gir(gst_controller, kwargs: gir)
gst_controller_gen_sources += [gst_controller_gir] gst_controller_gen_sources += [gst_controller_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
gst_controller_dep = declare_dependency(link_with : gst_controller, gst_controller_dep = declare_dependency(link_with : gst_controller,
include_directories : [libsinc], include_directories : [libsinc],
sources: gst_controller_gen_sources, sources: gst_controller_gen_sources,
dependencies : [gst_dep]) dependencies : [gst_dep])
meson.override_dependency('gstreamer-controller-1.0', gst_controller_dep) meson.override_dependency(pkg_name, gst_controller_dep)

View file

@ -1,4 +1,4 @@
gst_net_sources = files([ gst_net_sources = files(
'gstnetaddressmeta.c', 'gstnetaddressmeta.c',
'gstnetclientclock.c', 'gstnetclientclock.c',
'gstnetcontrolmessagemeta.c', 'gstnetcontrolmessagemeta.c',
@ -7,9 +7,9 @@ gst_net_sources = files([
'gstptpclock.c', 'gstptpclock.c',
'gstntppacket.c', 'gstntppacket.c',
'gstnetutils.c', 'gstnetutils.c',
]) )
gst_net_headers = files([ gst_net_headers = files(
'gstnet.h', 'gstnet.h',
'gstnetaddressmeta.h', 'gstnetaddressmeta.h',
'gstnetclientclock.h', 'gstnetclientclock.h',
@ -20,7 +20,7 @@ gst_net_headers = files([
'gstptpclock.h', 'gstptpclock.h',
'net-prelude.h', 'net-prelude.h',
'net.h', 'net.h',
]) )
install_headers(gst_net_headers, subdir : 'gstreamer-1.0/gst/net/') install_headers(gst_net_headers, subdir : 'gstreamer-1.0/gst/net/')
gst_net_gen_sources = [] gst_net_gen_sources = []
@ -35,35 +35,42 @@ gst_net = library('gstnet-@0@'.format(apiversion),
dependencies : [gio_dep, gst_base_dep], dependencies : [gio_dep, gst_base_dep],
) )
library_def = {'lib': gst_net}
pkg_name = 'gstreamer-net-1.0'
pkgconfig.generate(gst_net, pkgconfig.generate(gst_net,
libraries : [libgst], libraries : [libgst],
variables : pkgconfig_variables, variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs, subdirs : pkgconfig_subdirs,
name : 'gstreamer-net-1.0', name : pkg_name,
description : 'Network-enabled GStreamer plug-ins and clocking', description : 'Network-enabled GStreamer plug-ins and clocking',
) )
if build_gir if build_gir
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/net/net.h' ] gst_gir_extra_args = gir_init_section + [ '--c-include=gst/net/net.h' ]
gst_net_gir = gnome.generate_gir(gst_net, gir = {
sources : gst_net_sources + gst_net_headers, 'sources' : gst_net_sources + gst_net_headers,
namespace : 'GstNet', 'namespace' : 'GstNet',
nsversion : apiversion, 'nsversion' : apiversion,
identifier_prefix : 'Gst', 'identifier_prefix' : 'Gst',
symbol_prefix : 'gst', 'symbol_prefix' : 'gst',
export_packages : 'gstreamer-net-1.0', 'export_packages' : pkg_name,
dependencies : [gst_base_dep], 'dependencies' : [gst_base_dep],
include_directories : [configinc, libsinc], 'include_directories' : [configinc, libsinc],
includes : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0', 'Gio-2.0', 'Gst-1.0'], 'includes' : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0', 'Gio-2.0', 'Gst-1.0'],
install : true, 'install' : true,
extra_args : gst_gir_extra_args, 'extra_args' : gst_gir_extra_args,
) }
library_def += {'gir': [gir]}
if not static_build
gst_net_gir = gnome.generate_gir(gst_net, kwargs: gir)
gst_net_gen_sources += [gst_net_gir] gst_net_gen_sources += [gst_net_gir]
endif endif
endif
libraries += [[pkg_name, library_def]]
gst_net_dep = declare_dependency(link_with : gst_net, gst_net_dep = declare_dependency(link_with : gst_net,
include_directories : [libsinc], include_directories : [libsinc],
sources: gst_net_gen_sources, sources: gst_net_gen_sources,
dependencies : [gst_base_dep]) dependencies : [gst_base_dep])
meson.override_dependency('gstreamer-net-1.0', gst_net_dep) meson.override_dependency(pkg_name, gst_net_dep)

View file

@ -585,6 +585,8 @@ pkgconfig_uninstalled_variables = ['exec_prefix=${prefix}',
'helpersdir=${gstreamerdir}/libs/gst/helpers'] 'helpersdir=${gstreamerdir}/libs/gst/helpers']
pkgconfig_subdirs = ['gstreamer-1.0'] pkgconfig_subdirs = ['gstreamer-1.0']
static_build = get_option('default_library') == 'static'
libraries = []
subdir('gst') subdir('gst')
subdir('libs') subdir('libs')
subdir('plugins') subdir('plugins')