Page 1 of 1

Black Magic SDK: Exception within

PostPosted: Thu Jan 17, 2013 12:23 pm
by bm_okx
Hello,

I have modified the OpenGLOutput Sample (Windows) in order to output 3D over HDMI. Following the instructions, I have create a class (VideoFrame3D), which implements the interfaces IDeckLinkVideoFrame and public IDeckLinkVideoFrame3DExtensions.
QueryInterface casts the void pointer to (IDeckLinkVideoFrame3DExtensions *) and returns this pointer. (Thunk is used correctly)

Unfortunately, the programs throws an exception within the third call to ScheduleVideoFrame.
Can you please provide a working sample, which does 3D output over HDMI?


Detailed description:

1. new VideoFrame3D()
2. AddRef() // Refs: 1
3. Call ScheduleVideoFrame
a. QueryInterface // My own implementation calls AddRef within: Refs: 2
b. Get3DPackingFormat
c. AddRef // Refs: 3
d. GetFrameForRightEye
e. Release // Refs: 2
f. Release // Refs:1 If I would not hold a reference in step 2 here,
the destructor would be called. Is this an SDK error here?
g. AddRef // Refs:2
h. Leaving ScheduleVideoFrame
4. Call ScheduleVideoFrame
a. QueryInterface //Refs: 3
b. Get3DPackingFormat
c. AddRef // Refs: 4
d. GetFrameForRightEye
e. Release // Refs: 3
f. Release // Refs:2
g. AddRef // Refs:3
h. Leaving ScheduleVideoFrame
5. Call ScheduleVideoFrame
a. QueryInterface //Refs: 4
b. Get3DPackingFormat
c. AddRef // Refs: 5
d. GetFrameForRightEye
Exception