Detect when Constellation routing has changed

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

tautin

  • Posts: 108
  • Joined: Thu Oct 18, 2018 3:11 pm
  • Real Name: Tim Autin

Detect when Constellation routing has changed

PostFri 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?
Offline

Ian Morrish

  • Posts: 580
  • Joined: Sun Jan 18, 2015 9:24 pm
  • Location: New Zealand

Re: Detect when Constellation routing has changed

PostSat May 21, 2022 9:06 pm

Have you connected Genlock input of the decklink card to an output of the ATEM as well? That should make the 3 frame delay more reliable.
Also, to do the switching, ATEM api should be more accurate than video hub protocol.

Sent from my SM-G960F using Tapatalk
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com
Offline

tautin

  • Posts: 108
  • Joined: Thu Oct 18, 2018 3:11 pm
  • Real Name: Tim Autin

Re: Detect when Constellation routing has changed

PostSun May 22, 2022 6:39 pm

Hi Ian,

Thank you for your answer. No I didn't try to connect the genlock of the card to an output of the Constellation. Are you sure that it's supposed to work this way? Shouldn't both genlocks be connected to a reference generator?

I can't use the ATEM api unfortunately since this software has to work on Linux. I can however use either the VideoHub protocol or the ATEM protocol that I have reverse engineered. But I don't know if there's a difference, why are you suggesting that?

Also, I have 2 setups:
1°) Cameras -> Constellation -> Decklink card
2°) Cameras -> Smart VideoHub 40x40 -> Constellation -> Decklink card

In the second case I need to wait much more, ~20 frames rather than ~4. Any idea why (in both cases I switch the Constellation, never the VideoHub)?
Offline
User avatar

Xtreemtec

  • Posts: 5387
  • Joined: Wed Jan 02, 2013 11:48 am
  • Location: The Netherlands

Re: Detect when Constellation routing has changed

PostTue May 24, 2022 7:07 am

Yes it should be connected to a REF generator for that to work.

The REF inputs on the decklink cards are not SDI. But just tri-level
Daniel Wittenaar .:: Xtreemtec Media Productions ::. -= www.xtreemtec.nl =-
4K OBV Trailer, ATEM TVS HD, 4M/E Broadcast Studio 4K, Constelation 8K, Hyperdeck Studio 12G, Ursa Broadcast 4K, 4K fiber converters with Sony Control
Offline

tautin

  • Posts: 108
  • Joined: Thu Oct 18, 2018 3:11 pm
  • Real Name: Tim Autin

Re: Detect when Constellation routing has changed

PostMon May 30, 2022 2:16 pm

Hi Daniel,

Thanks for confirming. ~4 frames of delay is fine for our needs, so I'll leave it with no genlock for now. What is not fine is the ~20-30 frames of delay.

After more investigation, I found that the problem does not come from the Smart VideoHub, but from using a Sonnet Echo Express SE III in case 1 (with no VideoHub) vs a Sonnet Echo III Rackmount in case 2 (with the VideoHub).

So I have removed the VideoHub to reduce my testing and now have:
1°) Cameras > Constellation > Echo Express SE III = 4 frames of delay
2°) Cameras > Constellation > Echo III Rackmount = 20-30 frames of delay

I contacted Sonnet support. They told me to use the x8 electrical slots of the unit, which is already what I was doing (and using the x4 electrical of the Echo Express works...).

Any idea what could cause that ~0.5s of delay?

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 4 guests