GNOME Bugzilla – Bug 774638
gst-devtools: Enable building with MSVC
Last modified: 2016-11-19 10:37:40 UTC
I don't promise everything is functioning properly with these patches, but at least it builds.
Created attachment 340171 [details] [review] [PATCH gst-devtools 1/5] Pass gint/guint pointers instead of enum pointers
Created attachment 340172 [details] [review] [PATCH gst-devtools 2/5] Fix MSVC const warnings
Created attachment 340173 [details] [review] [PATCH gst-devtools 3/5] validate: Remove #include <unistd.h>
Created attachment 340174 [details] [review] [PATCH gst-devtools 4/5] pad-monitor: fix return type of get_range_func
Created attachment 340175 [details] [review] [PATCH gst-devtools 5/5] Enable building with MSVC
Review of attachment 340171 [details] [review]: OK
Review of attachment 340172 [details] [review]: ::: validate/tools/gst-validate-transcoding.c @@ -798,2 +798,2 @@ GError *err = NULL; - const gchar *scenario = NULL, *configs = NULL; + gchar *scenario = NULL, *configs = NULL; Not sure why gcc/clang accept that though.
Review of attachment 340173 [details] [review]: OK
Review of attachment 340174 [details] [review]: OK
commit 9b18bafc68753a8f5277954642ea8623d8852236 Author: Scott D Phillips <scott.d.phillips@intel.com> Date: Thu Nov 17 10:00:25 2016 -0800 Enable building with MSVC https://bugzilla.gnome.org/show_bug.cgi?id=774638 commit 11c5a413ab0afdea16d73bf27181994fdd4a67ef Author: Scott D Phillips <scott.d.phillips@intel.com> Date: Thu Nov 17 10:28:01 2016 -0800 pad-monitor: fix return type of get_range_func The return type of GstPadGetRangeFunction is GstFlowReturn https://bugzilla.gnome.org/show_bug.cgi?id=774638 commit caafd6c36eab5c862810d8552ec371b2080cadef Author: Scott D Phillips <scott.d.phillips@intel.com> Date: Thu Nov 17 10:25:37 2016 -0800 validate: Remove #include <unistd.h> It isn't needed and isn't present in non-posix environments like windows with MSVC or mingw. https://bugzilla.gnome.org/show_bug.cgi?id=774638 commit 6299e1228cdf248ecfe3459b5ae095f3743a8448 Author: Scott D Phillips <scott.d.phillips@intel.com> Date: Thu Nov 17 10:24:08 2016 -0800 Fix MSVC const warnings https://bugzilla.gnome.org/show_bug.cgi?id=774638 commit 4e45b76c09259b59ecab72d40407372b2931d204 Author: Scott D Phillips <scott.d.phillips@intel.com> Date: Thu Nov 17 10:19:22 2016 -0800 Pass gint/guint pointers instead of enum pointers The underlying integer type for enums are implementation defined and may not be the same size as gint/guint. So implicitly casting from pointers- to-enum-types to pointers-to-int-types is unsafe. MSVC warns on these. https://bugzilla.gnome.org/show_bug.cgi?id=774638
The .def file should get the "update-exports" / "check-exports" magic we have in core/base, to prevent forgetting to update them.
Created attachment 340259 [details] [review] [PATCH gst-devtools 6/6] validate: make: include common/win32.mak
commit 665a2e732bb61db48012da7024024dd8bda9e5d3 Author: Scott D Phillips <scott.d.phillips@intel.com> Date: Fri Nov 18 10:06:14 2016 -0800 validate: make: include common/win32.mak With the addition of the .def file for validate we need to make sure the check-export script from common gets executed so that the .def stays up to date. https://bugzilla.gnome.org/show_bug.cgi?id=774638
This breaks the meson build here https://ci.gstreamer.net/job/GStreamer-master-meson/474/console: Build targets in project: 689 ninja: error: '/var/lib/jenkins/workspace/GStreamer-master-meson/subprojects/gst-devtools/win32/common/libgstvalidate.def', needed by 'subprojects/gst-devtools/validate/gst/validate/libgstvalidate-1.0.so.0.1100.0', missing and no known rule to make it + rm -Rf /tmp/tmp.c5iw54Xaj7 + GST_CHECK_XML=1 + ninja -C build/ test ninja: Entering directory `build/' ninja: error: '/var/lib/jenkins/workspace/GStreamer-master-meson/subprojects/gst-devtools/win32/common/libgstvalidate.def', needed by 'subprojects/gst-devtools/validate/gst/validate/libgstvalidate-1.0.so.0.1100.0', missing and no known rule to make it
commit b46e80080f91b0450517d354d90ea8d814724f58 Author: Sebastian Dröge <sebastian@centricular.com> Date: Sat Nov 19 12:36:32 2016 +0200 meson: Move vs_module_defs_dir to the validate subdirectory It's validate/win32/ and not just win32/ https://bugzilla.gnome.org/show_bug.cgi?id=774638