Skip to content

Commit

Permalink
fix: decklink output with driver 14.3 broken
Browse files Browse the repository at this point in the history
due to missing QueryInterface implementation on IDecklinkVideoFrame
  • Loading branch information
Julusian committed Jan 4, 2025
1 parent 0f7a9a8 commit f7a1e0e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/modules/decklink/consumer/decklink_consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,10 @@ class decklink_frame : public IDeckLinkVideoFrame

// IUnknown

HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID* ppv) override {
CFUUIDBytes iunknown = CFUUIDGetUUIDBytes(IUnknownUUID);
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID* ppv) override
{
REFIID iunknown = IID_IUnknown;

if (memcmp(&iid, &iunknown, sizeof(REFIID)) == 0)
{
*ppv = this;
Expand Down Expand Up @@ -247,7 +249,7 @@ class decklink_frame : public IDeckLinkVideoFrame
long STDMETHODCALLTYPE GetWidth() override { return static_cast<long>(format_desc_.width); }
long STDMETHODCALLTYPE GetHeight() override { return static_cast<long>(format_desc_.height); }
long STDMETHODCALLTYPE GetRowBytes() override { return static_cast<long>(format_desc_.width) * 4; }
BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat() override { return bmdFormat10BitYUV; }
BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat() override { return bmdFormat8BitBGRA; }
BMDFrameFlags STDMETHODCALLTYPE GetFlags() override { return bmdFrameFlagDefault; }

HRESULT STDMETHODCALLTYPE GetBytes(void** buffer) override
Expand Down Expand Up @@ -652,8 +654,6 @@ struct decklink_consumer final : public IDeckLinkVideoOutputCallback
CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info(print() + L" Failed to schedule primary playback."));
}

CASPAR_LOG(info) << "started playback";

for (auto& context : secondary_port_contexts_) {
context->start_playback([this]() { return print(); });
}
Expand Down

0 comments on commit f7a1e0e

Please sign in to comment.