[vlc-commits] [Git][videolan/vlc][master] 4 commits: mft: fix codec API definitions on mingw older than 8.0.1

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Feb 9 09:17:38 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
d2fd51d6 by Steve Lhomme at 2024-02-09T08:31:12+00:00
mft: fix codec API definitions on mingw older than 8.0.1

- - - - -
da6bdfb3 by Steve Lhomme at 2024-02-09T08:31:12+00:00
contrib: mingw64: add updated MediaFoundation headers before mingw 10

The headers are missing at least IMFShutdown.
We bring all the headers so they are coherent with each other.

- - - - -
93c33657 by Steve Lhomme at 2024-02-09T08:31:12+00:00
mft: only define values if the older mingw didn't get newer headers

Because IMFShutdown is missing from older mingw, we need to update the headers.
But then the detected version of the headers don't match what's available.

- - - - -
60e3c2f4 by Steve Lhomme at 2024-02-09T08:31:12+00:00
CI: switch win64 gcc build to posix model version

So we can use std::thread and std::mutex.

- - - - -


3 changed files:

- contrib/src/mingw64/rules.mak
- extras/ci/gitlab-ci.yml
- modules/codec/mft.cpp


Changes:

=====================================
contrib/src/mingw64/rules.mak
=====================================
@@ -14,7 +14,7 @@ PKGS += winrt_headers alloweduwp
 else  # !HAVE_WINSTORE
 PKGS += d3d9 dcomp
 endif # !HAVE_WINSTORE
-PKGS += dxva dxvahd mingw11-fixes
+PKGS += dxva dxvahd mingw11-fixes mft10
 
 ifeq ($(call mingw_at_least, 8), true)
 PKGS_FOUND += d3d9
@@ -25,7 +25,7 @@ PKGS_FOUND += winrt_headers
 endif # HAVE_WINSTORE
 endif # MINGW 9
 ifeq ($(call mingw_at_least, 10), true)
-PKGS_FOUND += dxva
+PKGS_FOUND += dxva mft10
 endif # MINGW 10
 ifeq ($(call mingw_at_least, 10), true)
 PKGS_FOUND += dcomp
@@ -45,7 +45,7 @@ endif
 
 endif # HAVE_WIN32
 
-PKGS_ALL += winpthreads winrt_headers d3d9 dxva dxvahd dcomp mingw11-fixes alloweduwp
+PKGS_ALL += winpthreads winrt_headers d3d9 dxva dxvahd dcomp mingw11-fixes alloweduwp mft10
 
 $(TARBALLS)/mingw-w64-$(MINGW64_HASH).tar.xz:
 	$(call download_git,$(MINGW64_GITURL),,$(MINGW64_HASH))
@@ -141,6 +141,16 @@ MINGW_HEADERS_WINRT := \
 	install $</mingw-w64-headers/include/dcomp.h "$(PREFIX)/include"
 	touch $@
 
+.sum-mft10: .sum-mingw64
+	touch $@
+
+MINGW_HEADERS_MFT := mfidl.h mfapi.h mftransform.h mferror.h mfobjects.h mmreg.h
+
+.mft10: mingw64
+	install -d "$(PREFIX)/include"
+	install $(addprefix $</mingw-w64-headers/include/,$(MINGW_HEADERS_MFT)) "$(PREFIX)/include"
+	touch $@
+
 .sum-d3d9: .sum-mingw64
 	touch $@
 


=====================================
extras/ci/gitlab-ci.yml
=====================================
@@ -20,7 +20,7 @@ default:
 
 variables:
     VLC_TEST_TIMEOUT: 60
-    VLC_WIN64_IMAGE: registry.videolan.org/vlc-debian-win64:20240122094311
+    VLC_WIN64_IMAGE: registry.videolan.org/vlc-debian-win64-posix:20240205174710
     VLC_WIN_LLVM_MSVCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-msvcrt:20240205142500
     VLC_WIN_LLVM_UCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-ucrt:20240205142500
     VLC_DEBIAN_IMAGE: registry.videolan.org/vlc-debian-unstable:20231013031209


=====================================
modules/codec/mft.cpp
=====================================
@@ -53,7 +53,10 @@ extern "C" {
 #include <mfidl.h>
 
 
-#if !defined(CODECAPI_AVDecVideoAcceleration_H264) // MINGW < 8
+#if !defined(CODECAPI_AVDecVideoAcceleration_H264) // MINGW < 8.0.1
+DEFINE_CODECAPI_GUID(AVDecVideoAcceleration_H264,  "f7db8a2f-4f48-4ee8-ae31-8b6ebe558ae2", 0xf7db8a2f, 0x4f48, 0x4ee8, 0xae, 0x31, 0x8b, 0x6e, 0xbe, 0x55, 0x8a, 0xe2)
+DEFINE_CODECAPI_GUID(AVDecVideoAcceleration_VC1,   "f7db8a30-4f48-4ee8-ae31-8b6ebe558ae2", 0xf7db8a30, 0x4f48, 0x4ee8, 0xae, 0x31, 0x8b, 0x6e, 0xbe, 0x55, 0x8a, 0xe2)
+DEFINE_CODECAPI_GUID(AVDecVideoAcceleration_MPEG2, "f7db8a2e-4f48-4ee8-ae31-8b6ebe558ae2", 0xf7db8a2e, 0x4f48, 0x4ee8, 0xae, 0x31, 0x8b, 0x6e, 0xbe, 0x55, 0x8a, 0xe2)
 #define CODECAPI_AVDecVideoAcceleration_H264  DEFINE_CODECAPI_GUIDNAMED(AVDecVideoAcceleration_H264)
 #define CODECAPI_AVDecVideoAcceleration_VC1   DEFINE_CODECAPI_GUIDNAMED(AVDecVideoAcceleration_VC1)
 #define CODECAPI_AVDecVideoAcceleration_MPEG2 DEFINE_CODECAPI_GUIDNAMED(AVDecVideoAcceleration_MPEG2)
@@ -308,7 +311,7 @@ typedef struct
 } pair_format_guid;
 
 #if defined(__MINGW64_VERSION_MAJOR)
-# if __MINGW64_VERSION_MAJOR < 10
+# if __MINGW64_VERSION_MAJOR < 10 && !defined(CODECAPI_AVDecVideoAcceleration_H264)
 // 8-bit luminance only
 // Older versions of mingw-w64 lack this GUID, but it was added in mingw-w64
 // git on 2021-07-11 (during __MINGW64_VERSION_MAJOR 10). Use a local



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f16e9b0201abbc494f0df1210f3db997067f0a83...60e3c2f497cd31b4dc2fffcf13c5d45be8499342

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f16e9b0201abbc494f0df1210f3db997067f0a83...60e3c2f497cd31b4dc2fffcf13c5d45be8499342
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