GNOME Bugzilla – Bug 653718
d3dvideosink compilation with MinGW
Last modified: 2012-03-03 17:50:07 UTC
There are a few problems. One of them (the lack of DECLARE_INTERFACE_IID_ macro) can only be fixed by MinGW devs (i've already filed a bug report). Others are on gst side. First, some definitions in d3dvideosink code are unused, and since gstreamer is built with -Werror, they trigger a build failure. The attached patches fix that by adding _attribute_ ((unused)). Since this code, apparently, also compiles with MSVC (or at least someone will want to compile it with MSVC), it might be a good idea to use some kind of macro for this attribute, such as: #ifdef _MSC_VER #define UNUSED #else #define UNUSED _attribute_ ((unused)) #endif Second, makefile for d3dvideosink doesn't use any special C/LD flag variables. I don't know how other people compile it, but i often make use of variables, such as PLUGINNAME_CFLAGS and PLUGINNAME_LDFLAGS to pass plugin-specific flags (usually - include directories and library directories). Other direct-x-dependent plugins in -bad already make use of DIRECTX_CFLAGS and DIRECTX_LDFLAGS, and the patch here adds these variables to d3dvideosink as well.
Created attachment 190992 [details] [review] Adds DIRECTX_CFLAGS and DIRECTX_LDFLAGS to the makefile
Created attachment 190993 [details] [review] Adds _attribute_ ((unused)) to some d3dvideosink functions
Created attachment 190994 [details] [review] Adds one more _attribute_ ((unused))
There's also G_GNUC_UNUSED
Created attachment 191877 [details] [review] Fix unused function warnings using G_GNUC_UNUSED
Looks good to me.
Comment on attachment 190992 [details] [review] Adds DIRECTX_CFLAGS and DIRECTX_LDFLAGS to the makefile This was also just fixed by Andoni and pushed by Sebastian, without them being aware of this bug: commit 4b48c43b31b18f30b706b715c23151a577d34b86 Author: Andoni Morales Alastruey <ylatuya@gmail.com> Date: Fri Mar 2 15:37:57 2012 +0100 d3dvideosink: add missing directx headers
Created attachment 208866 [details] [review] Fixes warnings related to d3dvideosink Also includes a warning hack-fix related to #656905
commit 740c3101ac538a4a3f7e502aa2d8ceea54c2dca6 Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Fri Mar 2 21:41:39 2012 +0400 d3dvideosink: fix compiler warnings and build failure with mingw shared.d3ddev was removed a while back, not sure how this still compiles for anyone (tpm). https://bugzilla.gnome.org/show_bug.cgi?id=653718 https://bugzilla.gnome.org/show_bug.cgi?id=670143 https://bugzilla.gnome.org/show_bug.cgi?id=656905
Comment on attachment 191877 [details] [review] Fix unused function warnings using G_GNUC_UNUSED Thanks for the patch. Seems to have gotten subsumed in the other one. Hope you don't mind.