Detect when Constellation routing has changed
Posted: Fri May 13, 2022 3:57 pm
Hello,
I have a DeckLink 8K Pro card connected to one output (say output #1) of a Constellation 8K. I need to write a function that takes a Constellation input number in argument, and that takes a snapshot of that input using the DeckLink card.
To do so:
- I wrote a DeckLink input class having a waitNextFrame function which waits until a new frame arrives
- when my takeSnaphost(int inputNumber) function is called:
- I route the requested inputNumber to the output #1 of the Constellation
- I call my DeckLink input waitNextFrame function
- I get the frame and write the picture to the disk
Doing so, I'm writing the frame on disk to early, and either the Constellation has not done the routing yet, or the DeckLink card has not received the change yet.
What is the proper way to handle the situation (I'd like to avoid waiting X milliseconds)?
EDIT: I rewrote my waitNextFrame function to a waitXFrames function (taking a number of frames to skip). When waiting 3 frames it works most of the time, when waiting 4 frames it seems to work all the time. Can I be sure that it's indeed the case?
I have a DeckLink 8K Pro card connected to one output (say output #1) of a Constellation 8K. I need to write a function that takes a Constellation input number in argument, and that takes a snapshot of that input using the DeckLink card.
To do so:
- I wrote a DeckLink input class having a waitNextFrame function which waits until a new frame arrives
- when my takeSnaphost(int inputNumber) function is called:
- I route the requested inputNumber to the output #1 of the Constellation
- I call my DeckLink input waitNextFrame function
- I get the frame and write the picture to the disk
Doing so, I'm writing the frame on disk to early, and either the Constellation has not done the routing yet, or the DeckLink card has not received the change yet.
What is the proper way to handle the situation (I'd like to avoid waiting X milliseconds)?
EDIT: I rewrote my waitNextFrame function to a waitXFrames function (taking a number of frames to skip). When waiting 3 frames it works most of the time, when waiting 4 frames it seems to work all the time. Can I be sure that it's indeed the case?