- Posts: 2
- Joined: Wed May 04, 2022 12:53 pm
- Real Name: Matheus Berçot
Greetings,
I am an engineering student whose first project in my internship is to code a software to perform a very basic capture operation in a Decklink Duo 2 card. This is actually my very first "real life" code, other than the basic programming we learn at the university.
Trying to follow page 20 from the SDK manual to create this operation without success so far.
The few lines of code I have so far read as follows:
It builds with zero errors, but when either executing or trying to debug this I get "Run-Time Check Failure #3 - The variable 'deckLinkInput' is being used without being initialized". That makes me believe that I am using the classes wrongly (to say the least) here. I've been checking files such as Capture.cpp (Linux) and DeviceList.cpp (Windows) and I fail to see the difference in instantiation. I didn't use IDeckLinkIterator yet because so far I don't have a concern of which camera to capture, but rather I want to test these methods and be able to capture any camera.
Isn't the idea to instantiate the class with a pointer and then apply the methods over this pointer? What things am I missing?
Apologies for the very elementar questions, been stuck with this for over a week without having a lot of progress. Any suggestions on how to study this SDK and improve are also very welcome.
I am an engineering student whose first project in my internship is to code a software to perform a very basic capture operation in a Decklink Duo 2 card. This is actually my very first "real life" code, other than the basic programming we learn at the university.
Trying to follow page 20 from the SDK manual to create this operation without success so far.
The few lines of code I have so far read as follows:
- Code: Select all
#include <DeckLinkAPI.h>
...
int main (int argc, char** argv) {
IDeckLink* deckLink;
IDeckLinkIterator* deckLinkIterator;
IDeckLinkInput* deckLinkInput;
HRESULT result;
//Initializing COM
result = CoInitializeEx(NULL, COINIT_MULTITHREADED);
result = CoCreateInstance (CLSID_CDeckLinkIterator, NULL, CLSCTX_ALL, IID_IDeckLinkIterator, (void**)&deckLinkIterator);
result = deckLinkInput->EnableVideoInput(bmdModelHD1080p6000, bmdFormat8BitYUV, bmdVideoInputFlagdefault);
getch();
}
It builds with zero errors, but when either executing or trying to debug this I get "Run-Time Check Failure #3 - The variable 'deckLinkInput' is being used without being initialized". That makes me believe that I am using the classes wrongly (to say the least) here. I've been checking files such as Capture.cpp (Linux) and DeviceList.cpp (Windows) and I fail to see the difference in instantiation. I didn't use IDeckLinkIterator yet because so far I don't have a concern of which camera to capture, but rather I want to test these methods and be able to capture any camera.
Isn't the idea to instantiate the class with a pointer and then apply the methods over this pointer? What things am I missing?
Apologies for the very elementar questions, been stuck with this for over a week without having a lot of progress. Any suggestions on how to study this SDK and improve are also very welcome.