[vlc-commits] [Git][videolan/vlc][3.0.x] d3d11_deinterlace: conditionally define d3d11 enum
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sun Jan 7 15:28:06 UTC 2024
Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC
Commits:
81d9c4c7 by Johannes Kauffmann at 2024-01-07T15:14:47+00:00
d3d11_deinterlace: conditionally define d3d11 enum
Newer d3d11.h already defines the enum, resulting in the following error:
../../modules/hw/d3d11/d3d11_deinterlace.c:43:14: error: redefinition of typedef ‘D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS’ with different type
43 | typedef UINT D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../modules/hw/d3d11/d3d11_deinterlace.c:36:
/usr/share/mingw-w64/include/d3d11.h:954:3: note: previous declaration of ‘D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS’ with type ‘D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS’
954 | } D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS is available since MinGW-W64 6.0.0:
https://github.com/mirror/mingw-w64/commit/474a85ab51aadbe24a03081684d9cd17dcc3b353
Contribs d3d11.h doesn't have it, but distro-provided d3d11.h does, so
check if the type is available.
- - - - -
2 changed files:
- configure.ac
- modules/hw/d3d11/d3d11_deinterlace.c
Changes:
=====================================
configure.ac
=====================================
@@ -3370,6 +3370,7 @@ AS_IF([test "${enable_directx}" != "no"], [
dnl Direct3D11
AC_CHECK_HEADERS(d3d11.h, [
+ AC_CHECK_TYPES([D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS],,,[#include <d3d11.h>])
VLC_ADD_PLUGIN([direct3d11 direct3d11_filters])
])
=====================================
modules/hw/d3d11/d3d11_deinterlace.c
=====================================
@@ -39,7 +39,7 @@
#include "../../video_chroma/d3d11_fmt.h"
#include "../../video_filter/deinterlace/common.h"
-#ifdef __MINGW32__
+#ifndef HAVE_D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS
typedef UINT D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS;
#define D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BLEND 0x1
#define D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB 0x2
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/81d9c4c7027df1fdd937da64c9f969265f300fd1
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/81d9c4c7027df1fdd937da64c9f969265f300fd1
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list