[vlc-commits] [Git][videolan/vlc][master] contrib: mingw64: add missing DXVAHD_CreateDevice for x86
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sun Feb 2 07:10:06 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
64d1d524 by Steve Lhomme at 2025-02-02T06:34:00+00:00
contrib: mingw64: add missing DXVAHD_CreateDevice for x86
- - - - -
3 changed files:
- + contrib/src/mingw64/0001-crt-add-missing-DXVAHD_CreateDevice-for-x86.patch
- + contrib/src/mingw64/0001-headers-dxvahd-Add-missing-WINAPI-on-DXVAHD_CreateDe.patch
- contrib/src/mingw64/rules.mak
Changes:
=====================================
contrib/src/mingw64/0001-crt-add-missing-DXVAHD_CreateDevice-for-x86.patch
=====================================
@@ -0,0 +1,29 @@
+From 9b6446b15771822edb28f4624aa54c10d3c5983b Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Thu, 30 Jan 2025 06:53:18 +0100
+Subject: [PATCH] crt: add missing DXVAHD_CreateDevice for x86
+
+It was first added to arm32 in 4a306baa4a206c9314bdc129e98abfa1aebe2b0e.
+Then to the common one in 96fe9ec413001bfc3f5971df64bcdedc216a9020.
+But it was always missing in x86.
+
+I verified that's the only one missing in that .def.
+---
+ mingw-w64-crt/lib32/dxva2.def | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mingw-w64-crt/lib32/dxva2.def b/mingw-w64-crt/lib32/dxva2.def
+index d43af5be3..ea343a53f 100644
+--- a/mingw-w64-crt/lib32/dxva2.def
++++ b/mingw-w64-crt/lib32/dxva2.def
+@@ -8,6 +8,7 @@ EXPORTS
+ CapabilitiesRequestAndCapabilitiesReply at 12
+ DXVA2CreateDirect3DDeviceManager9 at 8
+ DXVA2CreateVideoService at 12
++DXVAHD_CreateDevice at 20
+ DegaussMonitor at 4
+ DestroyPhysicalMonitor at 4
+ DestroyPhysicalMonitors at 8
+--
+2.45.2
+
=====================================
contrib/src/mingw64/0001-headers-dxvahd-Add-missing-WINAPI-on-DXVAHD_CreateDe.patch
=====================================
@@ -0,0 +1,39 @@
+From 0a5b3814cf63bcb1c275cc35d75b20c1f328f2a7 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Thu, 30 Jan 2025 10:21:26 +0100
+Subject: [PATCH] headers/dxvahd: Add missing WINAPI on DXVAHD_CreateDevice()
+
+---
+ mingw-w64-headers/include/dxvahd.h | 2 +-
+ mingw-w64-headers/include/dxvahd.idl | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mingw-w64-headers/include/dxvahd.h b/mingw-w64-headers/include/dxvahd.h
+index 2258d2836..65c37d34f 100644
+--- a/mingw-w64-headers/include/dxvahd.h
++++ b/mingw-w64-headers/include/dxvahd.h
+@@ -415,7 +415,7 @@ typedef struct _DXVAHDSW_CALLBACKS {
+ PDXVAHDSW_DestroyVideoProcessor DestroyVideoProcessor;
+ } DXVAHDSW_CALLBACKS;
+
+-HRESULT DXVAHD_CreateDevice(IDirect3DDevice9Ex *pD3DDevice,const DXVAHD_CONTENT_DESC *pContentDesc,DXVAHD_DEVICE_USAGE Usage,PDXVAHDSW_Plugin pPlugin,IDXVAHD_Device **ppDevice);
++HRESULT WINAPI DXVAHD_CreateDevice(IDirect3DDevice9Ex *pD3DDevice,const DXVAHD_CONTENT_DESC *pContentDesc,DXVAHD_DEVICE_USAGE Usage,PDXVAHDSW_Plugin pPlugin,IDXVAHD_Device **ppDevice);
+
+ /*****************************************************************************
+ * IDXVAHD_Device interface
+diff --git a/mingw-w64-headers/include/dxvahd.idl b/mingw-w64-headers/include/dxvahd.idl
+index 607f3778e..519e9ed3c 100644
+--- a/mingw-w64-headers/include/dxvahd.idl
++++ b/mingw-w64-headers/include/dxvahd.idl
+@@ -398,7 +398,7 @@ cpp_quote(" PDXVAHDSW_VideoProcessBltHD VideoProcessBltHD;")
+ cpp_quote(" PDXVAHDSW_DestroyVideoProcessor DestroyVideoProcessor;")
+ cpp_quote("} DXVAHDSW_CALLBACKS;")
+ cpp_quote("")
+-cpp_quote("HRESULT DXVAHD_CreateDevice(IDirect3DDevice9Ex *pD3DDevice,const DXVAHD_CONTENT_DESC *pContentDesc,DXVAHD_DEVICE_USAGE Usage,PDXVAHDSW_Plugin pPlugin,IDXVAHD_Device **ppDevice);")
++cpp_quote("HRESULT WINAPI DXVAHD_CreateDevice(IDirect3DDevice9Ex *pD3DDevice,const DXVAHD_CONTENT_DESC *pContentDesc,DXVAHD_DEVICE_USAGE Usage,PDXVAHDSW_Plugin pPlugin,IDXVAHD_Device **ppDevice);")
+ cpp_quote("")
+ [
+ object,
+--
+2.45.2
+
=====================================
contrib/src/mingw64/rules.mak
=====================================
@@ -15,6 +15,9 @@ else # !HAVE_WINSTORE
PKGS += dcomp
endif # !HAVE_WINSTORE
PKGS += dxva dxvahd mingw11-fixes mingw12-fixes mft10 d3d12 uiautomationcore
+ifeq ($(ARCH),i386)
+PKGS += dxva_x86
+endif
ifdef HAVE_WINSTORE
PKGS_FOUND += winrt_headers
@@ -26,13 +29,16 @@ ifeq ($(call mingw_at_least, 10), true)
PKGS_FOUND += dcomp
endif
ifeq ($(call mingw_at_least, 11), true)
-PKGS_FOUND += dxvahd uiautomationcore
+PKGS_FOUND += uiautomationcore
endif # MINGW 11
ifeq ($(call mingw_at_least, 12), true)
PKGS_FOUND += mingw11-fixes d3d12
endif # MINGW 12
ifeq ($(call mingw_at_least, 13), true)
-PKGS_FOUND += mingw12-fixes
+PKGS_FOUND += mingw12-fixes dxvahd
+ifeq ($(ARCH),i386)
+PKGS_FOUND += dxva_x86
+endif
endif # MINGW 13
endif # !HAVE_VISUALSTUDIO
@@ -43,7 +49,7 @@ endif
endif # HAVE_WIN32
-PKGS_ALL += winpthreads winrt_headers dxva dxvahd dcomp mingw11-fixes mingw12-fixes alloweduwp mft10 d3d12 uiautomationcore
+PKGS_ALL += winpthreads winrt_headers dxva dxvahd dxva_x86 dcomp mingw11-fixes mingw12-fixes alloweduwp mft10 d3d12 uiautomationcore
# $(TARBALLS)/mingw-w64-$(MINGW64_HASH).tar.xz:
# $(call download_git,$(MINGW64_GITURL),,$(MINGW64_HASH))
@@ -58,6 +64,8 @@ mingw64: mingw-w64-v$(MINGW64_VERSION).tar.bz2 .sum-mingw64
# mingw64: mingw-w64-$(MINGW64_HASH).tar.xz .sum-mingw64
$(UNPACK)
$(APPLY) $(SRC)/mingw64/0001-headers-disable-more-strmif-interfaces-in-UWP.patch
+ $(APPLY) $(SRC)/mingw64/0001-crt-add-missing-DXVAHD_CreateDevice-for-x86.patch
+ $(APPLY) $(SRC)/mingw64/0001-headers-dxvahd-Add-missing-WINAPI-on-DXVAHD_CreateDe.patch
$(MOVE)
.mingw64: mingw64
@@ -216,3 +224,20 @@ endif
+$(MAKEBUILD) -C mingw-w64-crt LIBRARIES=$(MINGW64_BUILDDIR)/libuiautomationcore.a DATA= HEADERS=
+$(MAKEBUILD) -C mingw-w64-crt $(MINGW64_BUILDDIR)_LIBRARIES=$(MINGW64_BUILDDIR)/libuiautomationcore.a install-$(MINGW64_BUILDDIR)LIBRARIES
touch $@
+
+.sum-dxva_x86: .sum-mingw64
+ touch $@
+
+.dxva_x86: BUILD_DIR=$</vlc_build_dxva_x86
+.dxva_x86: mingw64
+ifeq ($(ARCH),i386)
+ install -d "$(PREFIX)/include"
+
+ # Trick mingw-w64 into just building libdxva2.a
+ $(MAKEBUILDDIR)
+ $(MAKECONFIGURE) $(MINGW64_MINIMALCRT_CONF)
+ mkdir -p $(BUILD_DIR)/mingw-w64-crt/$(MINGW64_BUILDDIR)
+ +$(MAKEBUILD) -C mingw-w64-crt LIBRARIES=$(MINGW64_BUILDDIR)/libdxva2.a DATA= HEADERS=
+ +$(MAKEBUILD) -C mingw-w64-crt $(MINGW64_BUILDDIR)_LIBRARIES=$(MINGW64_BUILDDIR)/libdxva2.a install-$(MINGW64_BUILDDIR)LIBRARIES
+endif
+ touch $@
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/64d1d524cb5e5f6e6869c3669395f65cdaf16647
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/64d1d524cb5e5f6e6869c3669395f65cdaf16647
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