- Posts: 3
- Joined: Thu Jul 13, 2017 4:13 am
Hello;
I'm making my way through coding a complete interface for DeckLink cards, including all the SDK trees.
I'm writing in C# (Visual Studio 2017), under Windows 10 Professional. I'm building the app as MTATHREAD ed and compiled in 64-bit mode.
The current problem I'm having is getting the GetHardwareReferenceClock() method to work.
Here's my reference code
long desiredTimeScale = 1;
long HardwareTime;
long timeInFrame;
long ticksPerFrame = 0;
if (dl != null)
{
dli = (IDeckLinkInput)dl;
dli.GetHardwareReferenceClock(desiredTimeScale, out HardwareTime, out timeInFrame, out ticksPerFrame);
}
I've tried many work-arounds and fixes, but each time, I get an "E_FAIL" HRESULT.
I have not hooked up the DeckLink SDI card to a SDI input source yet, nor an external reference.
The (badly written and badly executed, despite ok graphical design and layout) SDK says that GetHardwareReferenceClock() can be run while the card is inputting video. Simple question: will this method work when the card is not inputting video?
If the answer to that question is yes, I need help. If no, a few extra words in the SDK could have prevented me from going in circles for more than 24 hours ...
I'm making my way through coding a complete interface for DeckLink cards, including all the SDK trees.
I'm writing in C# (Visual Studio 2017), under Windows 10 Professional. I'm building the app as MTATHREAD ed and compiled in 64-bit mode.
The current problem I'm having is getting the GetHardwareReferenceClock() method to work.
Here's my reference code
long desiredTimeScale = 1;
long HardwareTime;
long timeInFrame;
long ticksPerFrame = 0;
if (dl != null)
{
dli = (IDeckLinkInput)dl;
dli.GetHardwareReferenceClock(desiredTimeScale, out HardwareTime, out timeInFrame, out ticksPerFrame);
}
I've tried many work-arounds and fixes, but each time, I get an "E_FAIL" HRESULT.
I have not hooked up the DeckLink SDI card to a SDI input source yet, nor an external reference.
The (badly written and badly executed, despite ok graphical design and layout) SDK says that GetHardwareReferenceClock() can be run while the card is inputting video. Simple question: will this method work when the card is not inputting video?
If the answer to that question is yes, I need help. If no, a few extra words in the SDK could have prevented me from going in circles for more than 24 hours ...