After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 653718 - d3dvideosink compilation with MinGW
d3dvideosink compilation with MinGW
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal normal
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-06-30 08:03 UTC by LRN
Modified: 2012-03-03 17:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds DIRECTX_CFLAGS and DIRECTX_LDFLAGS to the makefile (1.42 KB, patch)
2011-06-30 08:04 UTC, LRN
committed Details | Review
Adds _attribute_ ((unused)) to some d3dvideosink functions (3.46 KB, patch)
2011-06-30 08:05 UTC, LRN
none Details | Review
Adds one more _attribute_ ((unused)) (1.81 KB, patch)
2011-06-30 08:05 UTC, LRN
none Details | Review
Fix unused function warnings using G_GNUC_UNUSED (3.33 KB, patch)
2011-07-13 11:52 UTC, Raimo Järvi
none Details | Review
Fixes warnings related to d3dvideosink (7.51 KB, patch)
2012-03-02 18:12 UTC, LRN
committed Details | Review

Description LRN 2011-06-30 08:03:03 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.
Comment 1 LRN 2011-06-30 08:04:43 UTC
Created attachment 190992 [details] [review]
Adds DIRECTX_CFLAGS and DIRECTX_LDFLAGS to the makefile
Comment 2 LRN 2011-06-30 08:05:15 UTC
Created attachment 190993 [details] [review]
Adds _attribute_ ((unused)) to some d3dvideosink functions
Comment 3 LRN 2011-06-30 08:05:37 UTC
Created attachment 190994 [details] [review]
Adds one more _attribute_ ((unused))
Comment 4 Tim-Philipp Müller 2011-06-30 10:22:18 UTC
There's also G_GNUC_UNUSED
Comment 5 Raimo Järvi 2011-07-13 11:52:05 UTC
Created attachment 191877 [details] [review]
Fix unused function warnings using G_GNUC_UNUSED
Comment 6 Andoni Morales 2012-03-02 16:19:58 UTC
Looks good to me.
Comment 7 Tim-Philipp Müller 2012-03-02 16:55:53 UTC
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
Comment 8 LRN 2012-03-02 18:12:19 UTC
Created attachment 208866 [details] [review]
Fixes warnings related to d3dvideosink

Also includes a warning hack-fix related to #656905
Comment 9 Tim-Philipp Müller 2012-03-03 17:49:12 UTC
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 10 Tim-Philipp Müller 2012-03-03 17:50:07 UTC
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.