# -*- 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 = 'f1094397eaa7932f06e57ebbb075aa33aa2c76e4b75630a16b02c8d4af46832e' 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 = {} 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 = [ '%(libdir)s/gstreamer-1.0/libgstadder%(mext)s', '%(libdir)s/gstreamer-1.0/libgstapp%(mext)s', '%(libdir)s/gstreamer-1.0/libgstaudioconvert%(mext)s', '%(libdir)s/gstreamer-1.0/libgstaudiomixer%(mext)s', '%(libdir)s/gstreamer-1.0/libgstaudiorate%(mext)s', '%(libdir)s/gstreamer-1.0/libgstaudioresample%(mext)s', '%(libdir)s/gstreamer-1.0/libgstaudiotestsrc%(mext)s', '%(libdir)s/gstreamer-1.0/libgstcompositor%(mext)s', '%(libdir)s/gstreamer-1.0/libgstgio%(mext)s', '%(libdir)s/gstreamer-1.0/libgstoverlaycomposition%(mext)s', '%(libdir)s/gstreamer-1.0/libgstpango%(mext)s', '%(libdir)s/gstreamer-1.0/libgstrawparse%(mext)s', '%(libdir)s/gstreamer-1.0/libgsttypefindfunctions%(mext)s', '%(libdir)s/gstreamer-1.0/libgstvideoconvertscale%(mext)s', '%(libdir)s/gstreamer-1.0/libgstvideorate%(mext)s', '%(libdir)s/gstreamer-1.0/libgstvideotestsrc%(mext)s', '%(libdir)s/gstreamer-1.0/libgstvolume%(mext)s', ] files_plugins_core_devel = [ '%(libdir)s/gstreamer-1.0/libgstadder.a', '%(libdir)s/gstreamer-1.0/libgstadder.la', '%(libdir)s/gstreamer-1.0/libgstapp.a', '%(libdir)s/gstreamer-1.0/libgstapp.la', '%(libdir)s/gstreamer-1.0/libgstaudioconvert.a', '%(libdir)s/gstreamer-1.0/libgstaudioconvert.la', '%(libdir)s/gstreamer-1.0/libgstaudiomixer.a', '%(libdir)s/gstreamer-1.0/libgstaudiomixer.la', '%(libdir)s/gstreamer-1.0/libgstaudiorate.a', '%(libdir)s/gstreamer-1.0/libgstaudiorate.la', '%(libdir)s/gstreamer-1.0/libgstaudioresample.a', '%(libdir)s/gstreamer-1.0/libgstaudioresample.la', '%(libdir)s/gstreamer-1.0/libgstaudiotestsrc.a', '%(libdir)s/gstreamer-1.0/libgstaudiotestsrc.la', '%(libdir)s/gstreamer-1.0/libgstcompositor.a', '%(libdir)s/gstreamer-1.0/libgstcompositor.la', '%(libdir)s/gstreamer-1.0/libgstgio.a', '%(libdir)s/gstreamer-1.0/libgstgio.la', '%(libdir)s/gstreamer-1.0/libgstoverlaycomposition.a', '%(libdir)s/gstreamer-1.0/libgstoverlaycomposition.la', '%(libdir)s/gstreamer-1.0/libgstpango.a', '%(libdir)s/gstreamer-1.0/libgstpango.la', '%(libdir)s/gstreamer-1.0/libgstrawparse.a', '%(libdir)s/gstreamer-1.0/libgstrawparse.la', '%(libdir)s/gstreamer-1.0/libgsttypefindfunctions.a', '%(libdir)s/gstreamer-1.0/libgsttypefindfunctions.la', '%(libdir)s/gstreamer-1.0/libgstvideoconvertscale.a', '%(libdir)s/gstreamer-1.0/libgstvideoconvertscale.la', '%(libdir)s/gstreamer-1.0/libgstvideorate.a', '%(libdir)s/gstreamer-1.0/libgstvideorate.la', '%(libdir)s/gstreamer-1.0/libgstvideotestsrc.a', '%(libdir)s/gstreamer-1.0/libgstvideotestsrc.la', '%(libdir)s/gstreamer-1.0/libgstvolume.a', '%(libdir)s/gstreamer-1.0/libgstvolume.la', ] files_plugins_playback = [ '%(libdir)s/gstreamer-1.0/libgstplayback%(mext)s', ] files_plugins_playback_devel = [ '%(libdir)s/gstreamer-1.0/libgstplayback.a', '%(libdir)s/gstreamer-1.0/libgstplayback.la', ] # Not used currently files_plugins_encoding = [ '%(libdir)s/gstreamer-1.0/libgstencoding%(mext)s', ] files_plugins_encoding_devel = [ '%(libdir)s/gstreamer-1.0/libgstencoding.a', '%(libdir)s/gstreamer-1.0/libgstencoding.la', ] files_plugins_codecs = [ '%(libdir)s/gstreamer-1.0/libgstsubparse%(mext)s', '%(libdir)s/gstreamer-1.0/libgstogg%(mext)s', '%(libdir)s/gstreamer-1.0/libgsttheora%(mext)s', '%(libdir)s/gstreamer-1.0/libgstvorbis%(mext)s', '%(libdir)s/gstreamer-1.0/libgstopus%(mext)s', ] files_plugins_codecs_devel = [ '%(libdir)s/gstreamer-1.0/libgstsubparse.a', '%(libdir)s/gstreamer-1.0/libgstsubparse.la', '%(libdir)s/gstreamer-1.0/libgstogg.a', '%(libdir)s/gstreamer-1.0/libgstogg.la', '%(libdir)s/gstreamer-1.0/libgsttheora.a', '%(libdir)s/gstreamer-1.0/libgsttheora.la', '%(libdir)s/gstreamer-1.0/libgstvorbis.a', '%(libdir)s/gstreamer-1.0/libgstvorbis.la', '%(libdir)s/gstreamer-1.0/libgstopus.a', '%(libdir)s/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', '%(libdir)s/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', '%(libdir)s/pkgconfig/gstreamer-allocators-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-app-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-audio-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-fft-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-gl-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-gl-prototypes-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-pbutils-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-riff-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-rtp-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-rtsp-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-sdp-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-tag-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-video-1.0.pc', '%(libdir)s/pkgconfig/gstreamer-plugins-base-1.0.pc', ] files_plugins_net = [ '%(libdir)s/gstreamer-1.0/libgsttcp%(mext)s', ] files_plugins_net_devel = [ '%(libdir)s/gstreamer-1.0/libgsttcp.a', '%(libdir)s/gstreamer-1.0/libgsttcp.la', ] files_plugins_sys = [ '%(libdir)s/gstreamer-1.0/libgstopengl%(mext)s', ] files_plugins_sys_devel = [ '%(libdir)s/gstreamer-1.0/libgstopengl.a', '%(libdir)s/gstreamer-1.0/libgstopengl.la', ] platform_files_plugins_codecs = {} platform_files_plugins_codecs_devel = {} 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): self.enable_plugin('cdparanoia', 'sys', 'cdparanoia', dep='cdparanoia') self.enable_plugin('ximagesink', 'sys', 'x11', option='x11') self.enable_plugin('xvimagesink', 'sys', 'x11', option='xvideo') self.enable_plugin('alsa', 'sys', 'alsa') 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')