diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2019-02-22 02:08:26 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2019-02-22 02:34:27 +0530 |
commit | c877545cc9eec20002afdad43f72e73a14df302f (patch) | |
tree | dd54c50b956f54db6b9ee5d65b570e6c5664f0a9 | |
parent | 2467f20bfe8143361da8d13f6fe120ed21dd7b5f (diff) |
gst recipes: Disable plugins when building with MSVC
Some libraries have issues that cause us to be unable to include their
headers or link to their libraries when building with MSVC. Disable
them when we're building with MSVC on Windows.
With this, you can produce a mostly-complete gstreamer-1.0 package
that is built with MSVC on Windows.
The status of these plugins is tracked at:
https://gitlab.freedesktop.org/gstreamer/cerbero/issues/121
-rw-r--r-- | packages/base-system-1.0.package | 8 | ||||
-rw-r--r-- | packages/gstreamer-1.0-codecs.package | 5 | ||||
-rw-r--r-- | packages/gstreamer-1.0-effects.package | 7 | ||||
-rw-r--r-- | recipes/gst-plugins-bad-1.0.recipe | 11 | ||||
-rw-r--r-- | recipes/gst-plugins-good-1.0.recipe | 6 |
5 files changed, 30 insertions, 7 deletions
diff --git a/packages/base-system-1.0.package b/packages/base-system-1.0.package index b19eb499..e2a3b138 100644 --- a/packages/base-system-1.0.package +++ b/packages/base-system-1.0.package @@ -10,12 +10,11 @@ class Package(custom.GStreamer, package.Package): uuid = 'fae6046d-5a39-4d54-93ee-3770d2f316f5' files = ['cairo:libs', 'expat:libs', 'fontconfig:libs:etc', - 'gdk-pixbuf:bins:libs:modules:lang', 'libffi:libs', 'freetype:libs', + 'libffi:libs', 'freetype:libs', 'glib:libs:lang:bins:schemas', 'orc:libs', 'pango:libs:modules', - 'libpng:libs', 'tiff:libs', 'libjpeg-turbo:libs', + 'libpng:libs', 'libjpeg-turbo:libs', 'libxml2:libs', 'pixman:libs', 'fribidi:libs', 'zlib:libs', 'bzip2:libs', 'harfbuzz:libs', - 'libcroco:libs', 'librsvg:libs', 'json-glib:bins:libs'] platform_files = { @@ -29,3 +28,6 @@ class Package(custom.GStreamer, package.Package): def prepare(self): if self.config.variants.gi: self.files.append('gobject-introspection:libs:typelibs') + if not self.config.variants.visualstudio: + # gdk-pixbuf and librsvg plugins + self.files += ['tiff:libs', 'gdk-pixbuf:bins:libs:modules:lang', 'libcroco:libs', 'librsvg:libs'] diff --git a/packages/gstreamer-1.0-codecs.package b/packages/gstreamer-1.0-codecs.package index 61109520..8643f7d4 100644 --- a/packages/gstreamer-1.0-codecs.package +++ b/packages/gstreamer-1.0-codecs.package @@ -13,7 +13,7 @@ class Package(custom.GStreamer, package.Package): files = ['flac:libs', 'libkate:libs', 'libdv:libs', 'libogg:libs', 'speex:libs', 'libtheora:libs', 'wavpack:libs', 'libvpx:libs', - 'taglib:libs', 'opus:libs', 'libvorbis:libs', + 'opus:libs', 'libvorbis:libs', 'openjpeg:libs', 'openh264:libs', 'spandsp:libs', 'sbc:libs', 'mpg123:libs', 'lame:libs', 'gst-plugins-base-1.0:plugins_codecs', 'gst-plugins-good-1.0:plugins_codecs', @@ -33,3 +33,6 @@ class Package(custom.GStreamer, package.Package): if self.config.variants.rpi: self.files.append('gst-omx-1.0:plugins_codecs') self.files_devel.append('gst-omx-1.0:plugins_codecs_devel') + + if not self.config.variants.visualstudio: + self.files += ['taglib:libs'] diff --git a/packages/gstreamer-1.0-effects.package b/packages/gstreamer-1.0-effects.package index 59b32fc3..eba6a177 100644 --- a/packages/gstreamer-1.0-effects.package +++ b/packages/gstreamer-1.0-effects.package @@ -10,8 +10,7 @@ class Package(custom.GStreamer, package.Package): uuid = '4be3f88b-b552-4cd7-aecd-cf935fe270f7' deps = ['gstreamer-1.0-core'] - files = ['ladspa:libs', 'soundtouch:libs', - 'webrtc-audio-processing:libs', + files = ['ladspa:libs', 'gst-plugins-base-1.0:plugins_effects', 'gst-plugins-good-1.0:plugins_effects', 'gst-plugins-ugly-1.0:plugins_effects', @@ -21,3 +20,7 @@ class Package(custom.GStreamer, package.Package): 'gst-plugins-good-1.0:plugins_effects_devel', 'gst-plugins-ugly-1.0:plugins_effects_devel', 'gst-plugins-bad-1.0:plugins_effects_devel'] + + def prepare(self): + if not self.config.variants.visualstudio: + self.files += ['soundtouch:libs', 'webrtc-audio-processing:libs'] diff --git a/recipes/gst-plugins-bad-1.0.recipe b/recipes/gst-plugins-bad-1.0.recipe index a61d7729..2fa4c790 100644 --- a/recipes/gst-plugins-bad-1.0.recipe +++ b/recipes/gst-plugins-bad-1.0.recipe @@ -398,7 +398,16 @@ class Recipe(custom.GStreamer): def prepare(self): # webrtc-audio-processing headers require C++11, older GCCs require # explicitly opting in (f.ex., mingw gcc and android) - self.meson_options['cpp_std'] = 'gnu++11' + self.meson_options['cpp_std'] = 'c++11' + if self.using_msvc(): + # plugin is C++, library is Autotools + self.disable_plugin('soundtouch', 'effects', dep='soundtouch') + # Plugin is C++ and hence webrtc-audio-processing must also be + # built with MSVC, it uses Meson but it doesn't build: + # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/issues/2 + self.disable_plugin('webrtcdsp', 'effects', dep='webrtc-audio-processing') + # librsvg pulls in gdk-pixbuf, which must be built with MSVC + self.disable_plugin('rsvg', 'codecs', dep='librsvg') # Enable hardware codecs if variants are enabled self.enable_plugin('nvenc', 'codecs', 'nvcodec', option='nvenc') diff --git a/recipes/gst-plugins-good-1.0.recipe b/recipes/gst-plugins-good-1.0.recipe index 5a78f212..46e82642 100644 --- a/recipes/gst-plugins-good-1.0.recipe +++ b/recipes/gst-plugins-good-1.0.recipe @@ -222,6 +222,12 @@ class Recipe(custom.GStreamer): self.append_env('CFLAGS', '-DGSTREAMER_GLIB_COCOA_NSAPPLICATION=1') self.append_env('OBJCFLAGS', '-DGSTREAMER_GLIB_COCOA_NSAPPLICATION=1') + if self.using_msvc(): + # plugin is C++, library is Autotools + self.disable_plugin('taglib', 'codecs') + # gdk-pixbuf and all deps must be ported to MSVC first to fix CRT interop issues + self.disable_plugin('gdkpixbuf', 'effects', option='gdk-pixbuf', dep='gdk-pixbuf') + if self.config.target_platform == Platform.LINUX: self.use_system_libs = True |