PR #24403 opened by Forgejo_Fairy URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24403 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24403.patch
After 0ce413af9cc80 separated C and C++ compiler flags, the documented DeckLink configuration using only `--extra-cflags` continued to pass configure but failed when compiling the C++ sources. Compile the `DeckLinkAPI.h` check as C++ and validate the minimum SDK version in both languages. Update the input and output device documentation to require the SDK include directory in both `--extra-cflags` and `--extra-cxxflags`: the C wrappers also include `DeckLinkAPIVersion.h` and use its version macro. This preserves the intentional separation of compiler flags and rejects incomplete configurations before compilation. Fixes #23072. Validation on Linux/aarch64 with GCC/G++ 13.3.0 and DeckLink SDK 12.0 headers bundled in OBS at 6b3e550729f125b6c5b3767df88c08f5aef9d264: - Verified the reported regression by compiling the three DeckLink C++ objects at 0362cb38062b and 0ce413af9cc80: parent passes, successor fails. - Reproduced the C-flags-only compilation failure and C++-flags-only configure failure on master ef533ef3a3ea. - With this patch, configured using `--disable-everything --disable-autodetect --enable-decklink --enable-indev=decklink --enable-outdev=decklink` plus the SDK include path in both compiler flags, then completed `make -j6`. The resulting `ffmpeg -devices` lists DeckLink input and output support. - Confirmed configure rejects either include flag alone, missing API/version headers, and a version header modified to report API 10.10. - `sh -n configure` and `git diff --check` pass. Build validation does not exercise capture or playback hardware. >From 12321e5eddba37668c8e8209169276c137d6a21c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <[email protected]> Date: Mon, 7 Sep 2026 00:14:03 +0000 Subject: [PATCH] configure: validate DeckLink headers with the C++ compiler After CFLAGS stopped being passed to the C++ compiler, supplying the DeckLink SDK include path only through --extra-cflags still passed configure but failed when building the DeckLink C++ sources. Compile the DeckLinkAPI.h check as C++ and check the SDK version in both languages. The C wrappers also include DeckLinkAPIVersion.h, so document that both --extra-cflags and --extra-cxxflags need the SDK include path. Fixes: 0ce413af9cc8040095a6b714600d6a8dceaca514 Fixes: #23072 Assisted-by: Fairy --- configure | 5 +++-- doc/indevs.texi | 5 +++-- doc/outdevs.texi | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/configure b/configure index c025dbc95d..c513182c61 100755 --- a/configure +++ b/configure @@ -7322,8 +7322,9 @@ enabled cairo && require_pkg_config cairo cairo "cairo.h" cairo_crea enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; } enabled chromaprint && { check_pkg_config chromaprint libchromaprint "chromaprint.h" chromaprint_get_version || require chromaprint chromaprint.h chromaprint_get_version -lchromaprint; } -enabled decklink && { require_headers DeckLinkAPI.h && - { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0b0000" || die "ERROR: Decklink API version must be >= 10.11"; } } +enabled decklink && { { test_cxxflags_cc "" DeckLinkAPI.h 1 || die "ERROR: DeckLinkAPI.h not found"; } && + { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0b0000" && + test_cxxflags_cc "" DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0b0000" || die "ERROR: Decklink API version must be >= 10.11"; } } enabled frei0r && require_headers "frei0r.h" enabled gmp && require gmp gmp.h mpz_export -lgmp enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init diff --git a/doc/indevs.texi b/doc/indevs.texi index 31dfc098bb..dc4b92a0a0 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -240,8 +240,9 @@ The decklink input device provides capture capabilities for Blackmagic DeckLink devices. To enable this input device, you need the Blackmagic DeckLink SDK and you -need to configure with the appropriate @code{--extra-cflags} -and @code{--extra-ldflags}. +need to configure with the appropriate @code{--extra-cflags}, +@code{--extra-cxxflags} and @code{--extra-ldflags}. The SDK include directory +must be available to both the C and C++ compilers. On Windows, you need to run the IDL files through @command{widl}. DeckLink is very picky about the formats it supports. Pixel format of the diff --git a/doc/outdevs.texi b/doc/outdevs.texi index 86c78f31b7..0c730ff992 100644 --- a/doc/outdevs.texi +++ b/doc/outdevs.texi @@ -172,8 +172,9 @@ The decklink output device provides playback capabilities for Blackmagic DeckLink devices. To enable this output device, you need the Blackmagic DeckLink SDK and you -need to configure with the appropriate @code{--extra-cflags} -and @code{--extra-ldflags}. +need to configure with the appropriate @code{--extra-cflags}, +@code{--extra-cxxflags} and @code{--extra-ldflags}. The SDK include directory +must be available to both the C and C++ compilers. On Windows, you need to run the IDL files through @command{widl}. DeckLink is very picky about the formats it supports. Pixel format is always -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
