# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python class Recipe(custom.GStreamer): name = 'gst-plugins-base-1.0' btype = BuildType.MESON tarball_checksum = '762abdd1a950809a1cea62fff7f86b5f7d6bd5f6841e3e585c700b823cdb7897' meson_options = {# enabled plugins 'gl': 'enabled', 'gl-graphene': 'enabled', 'gl-png': 'enabled', 'gl-jpeg': 'enabled', 'ogg': 'enabled', 'opus': 'enabled', 'pango': 'enabled', 'theora': 'enabled', 'vorbis': 'enabled', # disabled plugins 'tremor': 'disabled'} deps = ['glib', 'gstreamer-1.0', 'libogg', 'pango', 'libtheora', 'libvorbis', 'zlib', 'orc', 'opus', 'graphene', 'libjpeg-turbo', 'libpng'] platform_deps = {Platform.ANDROID: [ 'tremor' ], Platform.IOS: [ 'tremor' ] } use_system_libs = True files_bins = ['gst-discoverer-1.0', 'gst-play-1.0', 'gst-device-monitor-1.0'] files_libs = ['libgstallocators-1.0', 'libgstapp-1.0', 'libgstaudio-1.0', 'libgstfft-1.0', 'libgstpbutils-1.0', 'libgstriff-1.0', 'libgstrtp-1.0', 'libgstrtsp-1.0', 'libgstsdp-1.0', 'libgsttag-1.0', 'libgstvideo-1.0', 'libgstgl-1.0'] files_plugins_core = [ 'lib/gstreamer-1.0/libgstadder%(mext)s', 'lib/gstreamer-1.0/libgstapp%(mext)s', 'lib/gstreamer-1.0/libgstaudioconvert%(mext)s', 'lib/gstreamer-1.0/libgstaudiomixer%(mext)s', 'lib/gstreamer-1.0/libgstaudiorate%(mext)s', 'lib/gstreamer-1.0/libgstaudioresample%(mext)s', 'lib/gstreamer-1.0/libgstaudiotestsrc%(mext)s', 'lib/gstreamer-1.0/libgstcompositor%(mext)s', 'lib/gstreamer-1.0/libgstgio%(mext)s', 'lib/gstreamer-1.0/libgstoverlaycomposition%(mext)s', 'lib/gstreamer-1.0/libgstpango%(mext)s', 'lib/gstreamer-1.0/libgstrawparse%(mext)s', 'lib/gstreamer-1.0/libgsttypefindfunctions%(mext)s', 'lib/gstreamer-1.0/libgstvideoconvert%(mext)s', 'lib/gstreamer-1.0/libgstvideorate%(mext)s', 'lib/gstreamer-1.0/libgstvideoscale%(mext)s', 'lib/gstreamer-1.0/libgstvideotestsrc%(mext)s', 'lib/gstreamer-1.0/libgstvolume%(mext)s', ] files_plugins_core_devel = [ 'lib/gstreamer-1.0/libgstadder.a', 'lib/gstreamer-1.0/libgstadder.la', 'lib/gstreamer-1.0/libgstapp.a', 'lib/gstreamer-1.0/libgstapp.la', 'lib/gstreamer-1.0/libgstaudioconvert.a', 'lib/gstreamer-1.0/libgstaudioconvert.la', 'lib/gstreamer-1.0/libgstaudiomixer.a', 'lib/gstreamer-1.0/libgstaudiomixer.la', 'lib/gstreamer-1.0/libgstaudiorate.a', 'lib/gstreamer-1.0/libgstaudiorate.la', 'lib/gstreamer-1.0/libgstaudioresample.a', 'lib/gstreamer-1.0/libgstaudioresample.la', 'lib/gstreamer-1.0/libgstaudiotestsrc.a', 'lib/gstreamer-1.0/libgstaudiotestsrc.la', 'lib/gstreamer-1.0/libgstcompositor.a', 'lib/gstreamer-1.0/libgstcompositor.la', 'lib/gstreamer-1.0/libgstgio.a', 'lib/gstreamer-1.0/libgstgio.la', 'lib/gstreamer-1.0/libgstoverlaycomposition.a', 'lib/gstreamer-1.0/libgstoverlaycomposition.la', 'lib/gstreamer-1.0/libgstpango.a', 'lib/gstreamer-1.0/libgstpango.la', 'lib/gstreamer-1.0/libgstrawparse.a', 'lib/gstreamer-1.0/libgstrawparse.la', 'lib/gstreamer-1.0/libgsttypefindfunctions.a', 'lib/gstreamer-1.0/libgsttypefindfunctions.la', 'lib/gstreamer-1.0/libgstvideoconvert.a', 'lib/gstreamer-1.0/libgstvideoconvert.la', 'lib/gstreamer-1.0/libgstvideorate.a', 'lib/gstreamer-1.0/libgstvideorate.la', 'lib/gstreamer-1.0/libgstvideoscale.a', 'lib/gstreamer-1.0/libgstvideoscale.la', 'lib/gstreamer-1.0/libgstvideotestsrc.a', 'lib/gstreamer-1.0/libgstvideotestsrc.la', 'lib/gstreamer-1.0/libgstvolume.a', 'lib/gstreamer-1.0/libgstvolume.la', ] files_plugins_playback = [ 'lib/gstreamer-1.0/libgstplayback%(mext)s', ] files_plugins_playback_devel = [ 'lib/gstreamer-1.0/libgstplayback.a', 'lib/gstreamer-1.0/libgstplayback.la', ] # Not used currently files_plugins_encoding = [ 'lib/gstreamer-1.0/libgstencoding%(mext)s', ] files_plugins_encoding_devel = [ 'lib/gstreamer-1.0/libgstencoding.a', 'lib/gstreamer-1.0/libgstencoding.la', ] files_plugins_codecs = [ 'lib/gstreamer-1.0/libgstsubparse%(mext)s', 'lib/gstreamer-1.0/libgstogg%(mext)s', 'lib/gstreamer-1.0/libgsttheora%(mext)s', 'lib/gstreamer-1.0/libgstvorbis%(mext)s', 'lib/gstreamer-1.0/libgstopus%(mext)s', ] files_plugins_codecs_devel = [ 'lib/gstreamer-1.0/libgstsubparse.a', 'lib/gstreamer-1.0/libgstsubparse.la', 'lib/gstreamer-1.0/libgstogg.a', 'lib/gstreamer-1.0/libgstogg.la', 'lib/gstreamer-1.0/libgsttheora.a', 'lib/gstreamer-1.0/libgsttheora.la', 'lib/gstreamer-1.0/libgstvorbis.a', 'lib/gstreamer-1.0/libgstvorbis.la', 'lib/gstreamer-1.0/libgstopus.a', 'lib/gstreamer-1.0/libgstopus.la', ] files_plugins_devel = [ 'include/gstreamer-1.0/gst/allocators', 'include/gstreamer-1.0/gst/app', 'include/gstreamer-1.0/gst/audio', 'include/gstreamer-1.0/gst/fft', 'include/gstreamer-1.0/gst/gl', 'lib/gstreamer-1.0/include/gst/gl', 'include/gstreamer-1.0/gst/pbutils', 'include/gstreamer-1.0/gst/riff', 'include/gstreamer-1.0/gst/rtp', 'include/gstreamer-1.0/gst/rtsp', 'include/gstreamer-1.0/gst/sdp', 'include/gstreamer-1.0/gst/tag', 'include/gstreamer-1.0/gst/video', 'lib/pkgconfig/gstreamer-allocators-1.0.pc', 'lib/pkgconfig/gstreamer-app-1.0.pc', 'lib/pkgconfig/gstreamer-audio-1.0.pc', 'lib/pkgconfig/gstreamer-fft-1.0.pc', 'lib/pkgconfig/gstreamer-gl-1.0.pc', 'lib/pkgconfig/gstreamer-pbutils-1.0.pc', 'lib/pkgconfig/gstreamer-riff-1.0.pc', 'lib/pkgconfig/gstreamer-rtp-1.0.pc', 'lib/pkgconfig/gstreamer-rtsp-1.0.pc', 'lib/pkgconfig/gstreamer-sdp-1.0.pc', 'lib/pkgconfig/gstreamer-tag-1.0.pc', 'lib/pkgconfig/gstreamer-video-1.0.pc', 'lib/pkgconfig/gstreamer-plugins-base-1.0.pc', ] files_plugins_net = [ 'lib/gstreamer-1.0/libgsttcp%(mext)s', ] files_plugins_net_devel = [ 'lib/gstreamer-1.0/libgsttcp.a', 'lib/gstreamer-1.0/libgsttcp.la', ] files_plugins_sys = [ 'lib/gstreamer-1.0/libgstopengl%(mext)s', ] files_plugins_sys_devel = [ 'lib/gstreamer-1.0/libgstopengl.a', 'lib/gstreamer-1.0/libgstopengl.la', ] platform_files_plugins_codecs = { Platform.ANDROID: [ 'lib/gstreamer-1.0/libgstivorbisdec%(mext)s', ], Platform.IOS: [ 'lib/gstreamer-1.0/libgstivorbisdec%(mext)s', ] } platform_files_plugins_codecs_devel = { Platform.ANDROID: [ 'lib/gstreamer-1.0/libgstivorbisdec.a', 'lib/gstreamer-1.0/libgstivorbisdec.la', ], Platform.IOS: [ 'lib/gstreamer-1.0/libgstivorbisdec.a', 'lib/gstreamer-1.0/libgstivorbisdec.la', ] } files_lang = ['gst-plugins-base-1.0'] files_typelibs = [ 'GstAllocators-1.0', 'GstApp-1.0', 'GstGL-1.0', 'GstPbutils-1.0', # 'GstRiff-1.0', Gir disabled due to incompatibilities 'GstRtp-1.0', 'GstRtsp-1.0', 'GstSdp-1.0', 'GstTag-1.0', 'GstVideo-1.0', 'GstAudio-1.0' ] def prepare(self): # Disable Cocoa NSApp integration since we enable the Cocoa MainLoop # integration in the GLib recipe if self.config.target_platform in (Platform.DARWIN, Platform.IOS): self.append_env('CFLAGS', '-DGSTREAMER_GLIB_COCOA_NSAPPLICATION=1') self.append_env('OBJCFLAGS', '-DGSTREAMER_GLIB_COCOA_NSAPPLICATION=1') self.enable_plugin('cdparanoia', 'sys', 'cdparanoia', dep='cdparanoia') self.enable_plugin('ximagesink', 'sys', 'x11') self.enable_plugin('xvimagesink', 'sys', 'x11', option='xvideo') self.enable_plugin('alsa', 'sys', 'alsa') if self.config.target_platform in (Platform.ANDROID, Platform.IOS): self.meson_options['tremor'] = 'enabled' if self.using_uwp(): # All these can be ported to Meson/UWP self.disable_plugin('ogg', 'codecs', dep='libogg') self.disable_plugin('pango', 'core', dep='pango') self.disable_plugin('theora', 'codecs', dep='libtheora') self.disable_plugin('vorbis', 'codecs', dep='libvorbis') if self.config.target_arch in (Architecture.ARM64, Architecture.X86_64, Architecture.X86): self.deps.append('angle-uwp') # To avoid complicating winrt vs win32 detection, # explicitly select api/platform/winsys self.meson_options['gl_api'] = 'gles2' self.meson_options['gl_platform'] = 'egl' self.meson_options['gl_winsys'] = 'winrt' else: self.disable_plugin('opengl', 'sys', 'gl', library_name='gl') self.meson_options['gl-graphene'] = 'disabled' self.meson_options['gl-png'] = 'disabled' self.meson_options['gl-jpeg'] = 'disabled' for dep in ('graphene', 'libpng', 'libjpeg-turbo'): self.deps.remove(dep) if self.config.variants.nodebug: self.append_env('CFLAGS', '-DGST_LEVEL_MAX=GST_LEVEL_FIXME')