Files
ffmpeg/libavdevice
Jake Fineman 215351c1c3 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 <jake@wave.online>
2026-10-27 18:06:45 +00:00
..
2025-08-03 13:48:47 +02:00
2024-03-31 00:08:43 +01:00
2025-08-03 13:48:47 +02:00
2024-03-31 00:08:43 +01:00