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 disable_registry = get_option('disable_registry')
154 if not disable_registry
155 gst_registry = ['gstregistrybinary.c']
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', '#define GST_DISABLE_GST_DEBUG 1')
167 gst_cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#undef GST_DISABLE_GST_DEBUG')
171 gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#define GST_DISABLE_REGISTRY 1')
173 gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#undef GST_DISABLE_REGISTRY')
176 # FIXME: add --disable-parse option? (but autotools doesn't seem to set this
177 # define properly at all either even though it does expose the option)
178 gst_cdata.set('GST_DISABLE_PARSE_DEFINE', '#undef GST_DISABLE_PARSE')
180 # FIXME: add --disable-plugin option?
181 gst_cdata.set('GST_DISABLE_PLUGIN_DEFINE', '#undef GST_DISABLE_PLUGIN')
183 configure_file(input : 'gstconfig.h.in',
184 output : 'gstconfig.h',
185 install_dir : 'include/gstreamer-1.0/gst',
186 configuration : gst_cdata)
188 version_cdata = configuration_data()
189 version_cdata.set('GST_VERSION_MAJOR', gst_version_major)
190 version_cdata.set('GST_VERSION_MINOR', gst_version_minor)
191 version_cdata.set('GST_VERSION_MICRO', gst_version_micro)
192 version_cdata.set('GST_VERSION_NANO', gst_version_nano)
194 gst_version_h = configure_file(input : 'gstversion.h.in',
195 output : 'gstversion.h',
196 install_dir : 'include/gstreamer-1.0/gst',
197 configuration : version_cdata)
199 gst_enums = gnome.mkenums_simple('gstenumtypes',
200 sources : gst_headers,
201 header_prefix : '#include <gst/gstconfig.h>',
202 body_prefix : '#include "gst/gst_private.h"\n#include <gst/gst.h>',
203 decorator : 'GST_API',
204 install_header : true,
205 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst'))
207 gstenum_h = gst_enums[1]
208 gstenum_c = gst_enums[0]
214 libgst_c_args = gst_c_args + [
217 '-DG_LOG_DOMAIN=g_log_domain_gstreamer',
218 '-DGST_DISABLE_DEPRECATED',
221 disable_tracer_hooks = get_option('disable_tracer_hooks')
222 if disable_tracer_hooks
223 libgst_c_args += ['-DGST_DISABLE_GST_TRACER_HOOKS']
226 # Make it possible to build both static and shared versions
227 # at the same time. By default use shared for unit tests etc.
228 # This choice is arbitrary.
229 if libtype != 'shared'
230 libgst_static = static_library('gstreamer-1.0', gst_sources,
231 gstenum_h, gstenum_c, grammar, parser, gst_registry,
232 c_args : [libgst_c_args],
233 include_directories : [configinc,
234 # HACK, change include paths in .y and .l in final version.
235 include_directories('parse')],
237 link_with : printf_lib,
238 dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib] + backtrace_deps + platform_deps,
240 libgst = libgst_static
243 # Make sure that subproject building gir files work
244 gst_incdirs = [configinc]
245 gst_gen_sources = [gstenum_h]
246 if libtype != 'static'
247 libgst_shared = shared_library('gstreamer-1.0', gst_sources,
248 gstenum_h, gstenum_c, grammar, parser, gst_registry,
249 version : libversion,
250 soversion : soversion,
251 c_args : libgst_c_args,
252 include_directories : [configinc,
253 # HACK, change include paths in .y and .l in final version.
254 include_directories('parse')],
255 link_with : printf_lib,
257 dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, dl_dep] + backtrace_deps
260 libgst = libgst_shared
262 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/gst.h' ]
263 if meson.is_subproject()
264 # FIXME: There must be a better way to do this
265 # Need to pass the include path to find gst/gst.h and gst/gstenumtypes.h (built)
266 gst_gir_extra_args += ['--cflags-begin',
267 '-I' + meson.current_source_dir() + '/..',
268 '-I' + meson.current_build_dir() + '/..',
272 gst_incdirs += [configinc]
273 gst_gen_sources += [gnome.generate_gir(libgst_shared,
274 sources : gst_sources + gst_headers + gst_enums + [gst_version_h],
276 nsversion : apiversion,
277 identifier_prefix : 'Gst',
278 symbol_prefix : 'gst',
279 export_packages : 'gstreamer-1.0',
280 includes : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0' ],
282 extra_args : gst_gir_extra_args,
287 gst_dep = declare_dependency(link_with : libgst,
288 include_directories : gst_incdirs,
289 dependencies : [glib_dep, gobject_dep, gmodule_dep],
290 # Everything that uses libgst needs this built to compile
291 sources : gst_gen_sources,