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 if host_system == 'darwin'
152 gst_headers += 'gstmacos.h'
153 gst_sources += 'gstmacos.m'
156 install_headers(gst_headers, subdir : 'gstreamer-1.0/gst')
159 if host_system == 'android'
160 gst_sources += 'gstandroid.c'
161 extra_deps += cc.find_library('log')
164 if host_system == 'darwin'
165 extra_deps += dependency('appleframeworks', modules : ['Cocoa'])
168 gst_registry = get_option('registry')
170 gst_registry_sources = files('gstregistrybinary.c')
172 gst_registry_sources = []
175 # Make copy so configure_file consumes the copy and we can
176 # still add to the original cdata later.
180 gst_cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#undef GST_DISABLE_GST_DEBUG')
182 gst_cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#define GST_DISABLE_GST_DEBUG 1')
186 gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#undef GST_DISABLE_REGISTRY')
188 gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#define GST_DISABLE_REGISTRY 1')
191 gst_parse = get_option('gst_parse')
193 gst_cdata.set('GST_DISABLE_PARSE_DEFINE', '#undef GST_DISABLE_PARSE')
195 gst_cdata.set('GST_DISABLE_PARSE_DEFINE', '#define GST_DISABLE_PARSE 1')
198 gst_cdata.set10('GST_DISABLE_CAST_CHECKS_DEFINE', cast_checks.disabled())
199 gst_cdata.set10('GST_DISABLE_GLIB_ASSERTS_DEFINE', glib_asserts.disabled())
200 gst_cdata.set10('GST_DISABLE_GLIB_CHECKS_DEFINE', glib_checks.disabled())
202 # FIXME: add --disable-plugin option?
203 gst_cdata.set('GST_DISABLE_PLUGIN_DEFINE', '#undef GST_DISABLE_PLUGIN')
205 configure_file(input : 'gstconfig.h.in',
206 output : 'gstconfig.h',
207 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst'),
208 configuration : gst_cdata)
210 version_cdata = configuration_data()
211 version_cdata.set('GST_VERSION_MAJOR', gst_version_major)
212 version_cdata.set('GST_VERSION_MINOR', gst_version_minor)
213 version_cdata.set('GST_VERSION_MICRO', gst_version_micro)
214 version_cdata.set('GST_VERSION_NANO', gst_version_nano)
216 gst_version_h = configure_file(input : 'gstversion.h.in',
217 output : 'gstversion.h',
218 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst'),
219 configuration : version_cdata)
221 gst_enums = gnome.mkenums_simple('gstenumtypes',
222 sources : gst_headers,
223 header_prefix : '#include <gst/gstconfig.h>',
224 body_prefix : '#include "gst/gst_private.h"\n#include <gst/gst.h>',
225 decorator : 'GST_API',
226 install_header : true,
227 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst'))
229 gstenum_h = gst_enums[1]
230 gstenum_c = gst_enums[0]
232 gst_parse_sources = []
239 libgst_c_args = gst_c_args + [
241 '-DG_LOG_DOMAIN="GStreamer"',
242 '-DGST_DISABLE_DEPRECATED',
245 tracer_hooks = get_option('tracer_hooks')
247 libgst_c_args += ['-DGST_DISABLE_GST_TRACER_HOOKS']
250 # Make sure that subproject building gir files work
251 gst_incdirs = [configinc]
252 gst_gen_sources = [gstenum_h]
253 libgst = library('gstreamer-1.0', gst_sources,
254 gstenum_h, gstenum_c, gst_parse_sources, gst_registry_sources,
255 version : libversion,
256 soversion : soversion,
257 darwin_versions : osxversion,
258 c_args : libgst_c_args + ['-DBUILDING_GST'],
259 include_directories : [configinc,
260 # HACK, change include paths in .y and .l in final version.
261 include_directories('parse')],
262 link_with : printf_lib,
264 dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, dl_dep,
265 backtrace_deps, platform_deps, extra_deps],
268 pkg_name = 'gstreamer-1.0'
269 library_def = {'lib': libgst}
270 pkgconfig.generate(libgst,
271 libraries : [glib_dep, gobject_dep] + pkgconfig_libs,
272 variables : pkgconfig_variables,
273 uninstalled_variables: pkgconfig_uninstalled_variables,
274 subdirs : pkgconfig_subdirs,
276 description : 'Streaming media framework',
280 gst_gir_extra_args = gir_init_section + ['--c-include=gst/gst.h']
281 if meson.is_subproject()
282 # FIXME: There must be a better way to do this
283 # Need to pass the include path to find gst/gst.h and gst/gstenumtypes.h (built)
284 gst_gir_extra_args += ['--cflags-begin',
285 '-I' + meson.current_source_dir() + '/..',
286 '-I' + meson.current_build_dir() + '/..',
287 '-DGST_DISABLE_MINIOBJECT_INLINE_FUNCTIONS',
291 gst_incdirs += [configinc]
293 'sources' : gst_sources + gst_headers + gst_enums + [gst_version_h],
295 'nsversion' : apiversion,
296 'identifier_prefix' : 'Gst',
297 'symbol_prefix' : 'gst',
298 'export_packages' : pkg_name,
299 'includes' : ['GLib-2.0', 'GObject-2.0', 'GModule-2.0' ],
301 'extra_args' : gst_gir_extra_args,
303 library_def += {'gir': [gir]}
304 # When building statically the information about the gir is going to be
305 # consumed by `gst-build` to generate gir files linked against
306 # `libgstreamer-full-1.0.so`. We do not build it here as it is currently
307 # broken. Once that is fixed we could build it here, even though we would keep
308 # creating another gir which links against gst-full.
310 gst_gir = gnome.generate_gir(libgst, kwargs: gir)
311 gst_gen_sources += gst_gir
314 gst_libraries += [[pkg_name, library_def]]
316 gst_compile_args = []
317 if get_option('default_library') == 'static'
318 gst_compile_args += ['-DGST_STATIC_COMPILATION']
321 gst_dep = declare_dependency(link_with : libgst,
322 compile_args : gst_compile_args,
323 include_directories : gst_incdirs,
324 dependencies : [glib_dep, gobject_dep, gmodule_dep],
325 # Everything that uses libgst needs this built to compile
326 sources : gst_gen_sources,
329 meson.override_dependency(pkg_name, gst_dep)