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 765250 - d3dvideosink includes deprecated and unused d3dx9tex.h header
d3dvideosink includes deprecated and unused d3dx9tex.h header
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Windows
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-19 08:10 UTC by Nirbheek Chauhan
Modified: 2016-04-19 12:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't include deprecated and unavailable d3dx9tex.h on native Windows (884 bytes, patch)
2016-04-19 09:40 UTC, Nirbheek Chauhan
committed Details | Review

Description Nirbheek Chauhan 2016-04-19 08:10:12 UTC
d3dvideosink uses Direct3D 9, and uses the D3DX9 API; specifically the D3DX9Tex (texture) API. 4 years ago Microsoft deprecated all of D3DX (D3DX9, D3DX10, D3DX11)[1]. The D3DX headers are no longer shipped with the Windows SDK (which is shipped with Visual Studio) since then (Windows 8 and later)[2].

1. https://blogs.msdn.microsoft.com/chuckw/2013/08/20/living-without-d3dx/
2. https://msdn.microsoft.com/en-us/library/windows/desktop/bb172965%28v=vs.85%29.aspx

The only way to access the required headers (unless you use Cerbero's Wine headers) is to download the June 2010 DirectX SDK (the last release ever made).

We should continue using Direct3D 9 since it's still the most well-supported API out there, but we should move from D3DX9Tex to DirectXTex[3].

3. https://blogs.msdn.microsoft.com/chuckw/2011/10/27/directxtex/

It actually doesn't look too difficult since our usage of d3dx9tex is very basic, so I'll give it a shot and report back.
Comment 1 Nirbheek Chauhan 2016-04-19 09:39:42 UTC
Well, this is embarrassing. It includes that header but uses nothing from it on native windows. Attaching a patch that fixes this.
Comment 2 Nirbheek Chauhan 2016-04-19 09:40:46 UTC
Created attachment 326315 [details] [review]
Don't include deprecated and unavailable d3dx9tex.h on native Windows
Comment 3 Sebastian Dröge (slomo) 2016-04-19 11:18:59 UTC
Review of attachment 326315 [details] [review]:

::: sys/d3dvideosink/d3dhelpers.h
@@ +47,3 @@
+
+/* Deprecated and unneeded on native Windows */
+#if defined(__MINGW32__)

We should check if this is actually needed with MINGW :)
Comment 4 Tim-Philipp Müller 2016-04-19 12:35:14 UTC
Removing the d3dx9tex.h include works fine with mingw (cross-build on linux) as well for me?.
Comment 5 Sebastian Dröge (slomo) 2016-04-19 12:45:18 UTC
Let's remove it unconditionally then
Comment 6 Tim-Philipp Müller 2016-04-19 12:52:22 UTC
Modified to just remove and pushed:

commit 6472482680e3adfd1c03798e9b9f74a280e2bbe4
Author: Nirbheek Chauhan <nirbheek@centricular.com>
Date:   Tue Apr 19 14:57:22 2016 +0530

    d3dvideosink: Don't include deprecated and unavailable d3dx9tex.h
    
    It's not needed, not on native Windows nor with mingw, and
    we don't use anything from it anyway
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765250
Comment 7 Tim-Philipp Müller 2016-04-19 12:52:45 UTC
Comment on attachment 326315 [details] [review]
Don't include deprecated and unavailable d3dx9tex.h on native Windows

pushed modified.