The branch, master has been updated
       via  0cd75dbfa0fc6c213cf9240b3c03c809070c5209 (commit)
      from  5169b0c3dca3a142a84ed157c964cb650ff5a25e (commit)


- Log -----------------------------------------------------------------
commit 0cd75dbfa0fc6c213cf9240b3c03c809070c5209
Author:     Thomas Gritzan <[email protected]>
AuthorDate: Mon Nov 24 00:26:33 2025 +0100
Commit:     Marton Balint <[email protected]>
CommitDate: Thu Nov 27 20:12:03 2025 +0000

    libavdevice/decklink: Implement QueryInterface to support newer driver
    
    Playback to a decklink device with a newer version of the
    DeckLink SDK (14.3) stalls because the driver code calls
    IDeckLinkVideoFrame::QueryInterface, which is not
    implemented by ffmpeg.
    This patch implements decklink_frame::QueryInterface,
    so that playback works with both older (12.x) and
    newer (>= 14.3) drivers.
    
    Note: The patch still does not allow the code to compile
    with DeckLink SDK 14.3 or newer, as the API has changed.

diff --git a/configure b/configure
index a7b0c18d9c..883539e361 100755
--- a/configure
+++ b/configure
@@ -7405,8 +7405,8 @@ fi
 if enabled decklink; then
     case $target_os in
         mingw32*|mingw64*|win32|win64)
-            decklink_outdev_extralibs="$decklink_outdev_extralibs -lole32 
-loleaut32"
-            decklink_indev_extralibs="$decklink_indev_extralibs -lole32 
-loleaut32"
+            decklink_outdev_extralibs="$decklink_outdev_extralibs -lole32 
-luuid -loleaut32"
+            decklink_indev_extralibs="$decklink_indev_extralibs -lole32 -luuid 
-loleaut32"
             ;;
     esac
 fi
diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
index cb8f91730e..195f005c17 100644
--- a/libavdevice/decklink_enc.cpp
+++ b/libavdevice/decklink_enc.cpp
@@ -47,6 +47,16 @@ extern "C" {
 #include "libklvanc/pixels.h"
 #endif
 
+#ifdef _WIN32
+#include <guiddef.h>
+#else
+/* There is no guiddef.h in Linux builds, so we provide our own IsEqualIID() */
+static bool IsEqualIID(REFIID riid1, REFIID riid2)
+{
+    return memcmp(&riid1, &riid2, sizeof(REFIID)) == 0;
+}
+#endif
+
 /* DeckLink callback class declaration */
 class decklink_frame : public IDeckLinkVideoFrame
 {
@@ -111,7 +121,21 @@ public:
         _ancillary->AddRef();
         return S_OK;
     }
-    virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) 
{ return E_NOINTERFACE; }
+    virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID *ppv)
+    {
+        if (IsEqualIID(riid, IID_IUnknown)) {
+            *ppv = static_cast<IUnknown*>(this);
+        } else if (IsEqualIID(riid, IID_IDeckLinkVideoFrame)) {
+            *ppv = static_cast<IDeckLinkVideoFrame*>(this);
+        } else {
+            *ppv = NULL;
+            return E_NOINTERFACE;
+        }
+
+        AddRef();
+        return S_OK;
+    }
+
     virtual ULONG   STDMETHODCALLTYPE AddRef(void)                            
{ return ++_refs; }
     virtual ULONG   STDMETHODCALLTYPE Release(void)
     {

-----------------------------------------------------------------------

Summary of changes:
 configure                    |  4 ++--
 libavdevice/decklink_enc.cpp | 26 +++++++++++++++++++++++++-
 2 files changed, 27 insertions(+), 3 deletions(-)


hooks/post-receive
-- 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to