15 'gstcontrolbinding.c',
20 'gstdeviceprovider.c',
21 'gstdeviceproviderfactory.c',
22 'gstdynamictypefactory.c',
24 'gstelementfactory.c',
50 'gstregistrychunks.c',
54 'gststreamcollection.c',
69 'gsttypefindfactory.c',
92 'gstcontrolbinding.h',
97 'gstelementmetadata.h',
99 'gstdeviceprovider.h',
100 'gstdeviceproviderfactory.h',
101 'gstdynamictypefactory.h',
102 'gstelementfactory.h',
107 'gstdevicemonitor.h',
121 'gstpluginfeature.h',
129 'gststreamcollection.h',
140 'gsttracerfactory.h',
143 'gsttypefindfactory.h',
151 install_headers(gst_headers, subdir : 'gstreamer-1.0/gst')
153 gst_registry = get_option('registry')
155 gst_registry_sources = files('gstregistrybinary.c')
157 gst_registry_sources = []
160 # Make copy so configure_file consumes the copy and we can
161 # still add to the original cdata later.
165 gst_cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#undef GST_DISABLE_GST_DEBUG')
167 gst_cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#define GST_DISABLE_GST_DEBUG 1')
171 gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#undef GST_DISABLE_REGISTRY')
173 gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#define GST_DISABLE_REGISTRY 1')
176 gst_parse = get_option('gst_parse')
178 gst_cdata.set('GST_DISABLE_PARSE_DEFINE', '#undef GST_DISABLE_PARSE')
180 gst_cdata.set('GST_DISABLE_PARSE_DEFINE', '#define GST_DISABLE_PARSE 1')
183 gst_cdata.set10('GST_DISABLE_CAST_CHECKS_DEFINE', cast_checks.disabled())
184 gst_cdata.set10('GST_DISABLE_GLIB_ASSERTS_DEFINE', glib_asserts.disabled())
185 gst_cdata.set10('GST_DISABLE_GLIB_CHECKS_DEFINE', glib_checks.disabled())
187 # FIXME: add --disable-plugin option?
188 gst_cdata.set('GST_DISABLE_PLUGIN_DEFINE', '#undef GST_DISABLE_PLUGIN')
190 configure_file(input : 'gstconfig.h.in',
191 output : 'gstconfig.h',
192 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst'),
193 configuration : gst_cdata)
195 version_cdata = configuration_data()
196 version_cdata.set('GST_VERSION_MAJOR', gst_version_major)
197 version_cdata.set('GST_VERSION_MINOR', gst_version_minor)
198 version_cdata.set('GST_VERSION_MICRO', gst_version_micro)
199 version_cdata.set('GST_VERSION_NANO', gst_version_nano)
201 gst_version_h = configure_file(input : 'gstversion.h.in',
202 output : 'gstversion.h',
203 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst'),
204 configuration : version_cdata)
206 gst_enums = gnome.mkenums_simple('gstenumtypes',
207 sources : gst_headers,
208 header_prefix : '#include <gst/gstconfig.h>',
209 body_prefix : '#include "gst/gst_private.h"\n#include <gst/gst.h>',
210 decorator : 'GST_API',
211 install_header : true,
212 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst'))
214 gstenum_h = gst_enums[1]
215 gstenum_c = gst_enums[0]
217 gst_parse_sources = []
224 libgst_c_args = gst_c_args + [
226 '-DG_LOG_DOMAIN="GStreamer"',
227 '-DGST_DISABLE_DEPRECATED',
230 tracer_hooks = get_option('tracer_hooks')
232 libgst_c_args += ['-DGST_DISABLE_GST_TRACER_HOOKS']
235 # Make sure that subproject building gir files work
236 gst_incdirs = [configinc]
237 gst_gen_sources = [gstenum_h]
238 libgst = library('gstreamer-1.0', gst_sources,
239 gstenum_h, gstenum_c, gst_parse_sources, gst_registry_sources,
240 version : libversion,
241 soversion : soversion,
242 darwin_versions : osxversion,
243 c_args : libgst_c_args + ['-DBUILDING_GST'],
244 include_directories : [configinc,
245 # HACK, change include paths in .y and .l in final version.
246 include_directories('parse')],
247 link_with : printf_lib,
249 dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, dl_dep] + backtrace_deps
253 pkg_name = 'gstreamer-1.0'
254 library_def = {'lib': libgst}
255 pkgconfig.generate(libgst,
256 libraries : [glib_dep, gobject_dep],
257 variables : pkgconfig_variables,
258 uninstalled_variables: pkgconfig_uninstalled_variables,
259 subdirs : pkgconfig_subdirs,
261 description : 'Streaming media framework',
265 gst_gir_extra_args = gir_init_section + ['--c-include=gst/gst.h']
266 if meson.is_subproject()
267 # FIXME: There must be a better way to do this
268 # Need to pass the include path to find gst/gst.h and gst/gstenumtypes.h (built)
269 gst_gir_extra_args += ['--cflags-begin',
270 '-I' + meson.current_source_dir() + '/..',
271 '-I' + meson.current_build_dir() + '/..',
272 '-DGST_DISABLE_MINIOBJECT_INLINE_FUNCTIONS',
276 gst_incdirs += [configinc]
278 'sources' : gst_sources + gst_headers + gst_enums + [gst_version_h],
280 'nsversion' : apiversion,
281 'identifier_prefix' : 'Gst',
282 'symbol_prefix' : 'gst',
283 'export_packages' : pkg_name,
284 'includes' : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0' ],
286 'extra_args' : gst_gir_extra_args,
288 library_def += {'gir': [gir]}
289 # When building statically the information about the gir is going to be
290 # consumed by `gst-build` to generate gir files linked against
291 # `libgstreamer-full-1.0.so`. We do not build it here as it is currently
292 # broken. Once that is fixed we could build it here, even though we would keep
293 # creating another gir which links against gst-full.
295 gst_gir = gnome.generate_gir(libgst, kwargs: gir)
296 gst_gen_sources += gst_gir
299 libraries += [[pkg_name, library_def]]
301 gst_compile_args = []
302 if get_option('default_library') == 'static'
303 gst_compile_args += ['-DGST_STATIC_COMPILATION']
306 gst_dep = declare_dependency(link_with : libgst,
307 compile_args : gst_compile_args,
308 include_directories : gst_incdirs,
309 dependencies : [glib_dep, gobject_dep, gmodule_dep],
310 # Everything that uses libgst needs this built to compile
311 sources : gst_gen_sources,
314 meson.override_dependency(pkg_name, gst_dep)