PR #25540 opened by ffmpeg-devel URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25540 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25540.patch
**Backport:** https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25507 Since 0cd75dbfa0 and 27e94281d1 added QueryInterface() implementations that compare against IID_IUnknown, building with --enable-decklink on macOS fails: ``` libavdevice/decklink_dec.cpp:138:43: error: use of undeclared identifier 'IID_IUnknown' libavdevice/decklink_dec.cpp:603:43: error: use of undeclared identifier 'IID_IUnknown' libavdevice/decklink_enc.cpp:120:39: error: use of undeclared identifier 'IID_IUnknown' libavdevice/decklink_enc.cpp:181:39: error: use of undeclared identifier 'IID_IUnknown' ``` The Linux SDK defines IID_IUnknown in LinuxCOM.h and Windows gets it from the platform COM headers. The macOS SDK uses CoreFoundation's COM types from CFPlugInCOM.h, which only provide IUnknownUUID. This defines IID_IUnknown from it with CFUUIDGetUUIDBytes(), the same definition the macOS samples in the DeckLink SDK use (Mac/Samples/KeyerOutput/com_utils.h; Mac/Samples/MultiPreview/platform.h uses the same expression), so the GUID bytes are not duplicated. The definition is limited to __APPLE__, so Linux and Windows are unchanged. This affects every release since n8.1. Tested on macOS arm64 with Apple clang 21 and DeckLink SDK 16.0. Before the patch decklink_dec.cpp and decklink_enc.cpp fail to compile (decklink_common.cpp and the two C files do not use IID_IUnknown); after it all five libavdevice/decklink_* objects compile and `ffmpeg -devices` lists decklink. On a DeckLink Duo, listing the sources, sinks and formats works, and a 300-frame 1080p29.97 output run completes without errors. Nothing was connected to the card, so the output signal was not checked and capture is untested. >From ae19868753c5bcc2044e331d7a64187e58dde619 Mon Sep 17 00:00:00 2001 From: Jake Fineman <[email protected]> Date: Mon, 26 Oct 2026 22:39:23 -0400 Subject: [PATCH] avdevice/decklink: fix build on macOS by defining IID_IUnknown Commits 0cd75dbfa0 and 27e94281d1 added QueryInterface() implementations that compare the requested interface against IID_IUnknown. The Linux SDK defines it in LinuxCOM.h and the Windows SDK gets it from the platform COM headers, but the macOS SDK uses CoreFoundation's COM types from <CoreFoundation/CFPlugInCOM.h>, which only provide IUnknownUUID as a CFUUIDRef. Since then, building with --enable-decklink on macOS fails: libavdevice/decklink_dec.cpp:138:43: error: use of undeclared identifier 'IID_IUnknown' libavdevice/decklink_dec.cpp:603:43: error: use of undeclared identifier 'IID_IUnknown' libavdevice/decklink_enc.cpp:120:39: error: use of undeclared identifier 'IID_IUnknown' libavdevice/decklink_enc.cpp:181:39: error: use of undeclared identifier 'IID_IUnknown' On macOS, REFIID is CFUUIDBytes, so derive IID_IUnknown from IUnknownUUID with CFUUIDGetUUIDBytes(), the same definition used by the macOS samples shipped with the DeckLink SDK. This avoids duplicating the GUID bytes, and CFUUIDGetConstantUUIDWithBytes() returns a constant that must not be released. The definition is limited to __APPLE__, so Linux and Windows builds are unchanged. Tested with DeckLink SDK 16.0 and Apple clang 21 on macOS arm64. Signed-off-by: Jake Fineman <[email protected]> (cherry picked from commit 215351c1c37dc0345a6794f4c96af54cf30e1c7b) --- libavdevice/decklink_common.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h index 11430787ced..bd0f59dc5ea 100644 --- a/libavdevice/decklink_common.h +++ b/libavdevice/decklink_common.h @@ -103,6 +103,11 @@ static inline bool DECKLINK_IsEqualIID(const REFIID& riid1, const REFIID& riid2) } #endif +#ifdef __APPLE__ +/* The macOS SDK only provides IUnknownUUID. */ +#define IID_IUnknown CFUUIDGetUUIDBytes(IUnknownUUID) +#endif + class decklink_output_callback; class decklink_input_callback; -- 2.54.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
