What's behind a Q-SYS ATEM plugin
While building our Q-SYS ATEM plugin, we captured the network traffic from real ATEM switchers and wrote our tests from it. Here's what a switcher sends, and the test that still failed on a real 4 M/E.
Press Cut on a Q-SYS panel and the camera changes. It looks like one message going one way.
A2Q Direct, our Q-SYS ATEM plugin, sits in the middle of that exchange. Before we wrote much of it, we captured the network traffic of real switchers and read it packet by packet.
What the switcher sends
A new connection starts with the switcher sending its whole state: every input name, every bus, every keyer, every macro. On the 4 M/E Constellation HD we tested against, that came to 164 packets carrying 3,619 records. It sends all of it again on every reconnect.
One capture didn't show us everything, so we watched the same connection being made over and over. On our 2 M/E, 8 connections out of 86 began differently. The first packet carried only timecode, the second was empty, and the state started with the third. We saw that because we watched 86 connections and not one.
After the state, the switcher keeps talking. Our 2 M/E sent timecode 50 times a second with nothing else going on. It also expects its packets to be acknowledged, and it drops a client that stops answering after about four seconds. So a healthy connection never has a long silence in either direction.
Two answers to every command
The switcher acknowledges what we send, too. An acknowledgement only says the command arrived. To report that something changed, the switcher sends its new state.
Streaming shows the gap best. Press Stream and the acknowledgement comes straight back, while the switcher's state moves to Connecting and only later to Streaming. The panel follows the state, so a stream that hasn't connected still reads Connecting, whatever was pressed.
That became a rule for the plugin and for our tests: a command counts when the switcher reports the result.
From captures to tests
A capture can be played back. The part of the plugin that talks to the switcher also runs without a Core. Our tests feed it the packets real switchers sent and check the result. The connection that starts with timecode and an empty packet has a test of its own.
Recorded state also let us try a big switcher before we had one connected to a Core. A test build filled each block on a Core Nano from a recorded switcher state, with no switcher attached. The recorded 4 M/E state loaded without reaching the Core's execution limit, which is the cap Q-SYS puts on how much work one call may do.
A recording can't show how a live switcher and a live Core behave together.
What the real 4 M/E caught
So before 4 M/E support shipped, we put a Core Nano on a real 4 M/E and forced a re-sync. The first one failed. The block stopped on the execution limit that the recorded runs had cleared.
A failed sync fails the test, so we stopped there. We had captured the whole session, and replaying it offline gave us the cause. We fixed it, proved the fix on the bench, and went back. On the rerun we forced 110 re-syncs across two blocks, some on one block at a time and some on both at once, and none failed.
Before release
Every release has gone through a set of checks on a Core Nano against a real switcher. These three are from the first release, run against the two switchers on our bench, an ATEM SDI Extreme ISO and a 2 M/E Constellation HD.
The command check used the rule above. A script pressed 370 controls one at a time and compared each with the state the switcher reported back. All 370 matched.
For the link, we disabled the network port feeding the 2 M/E five times. The plugin saw the loss every time and re-synced by itself when the link returned. Part of the wait belongs to the switcher. For the first 7.5 to 8.8 seconds after the link came back, it couldn't be reached at all. That's one reason the product page says to allow about 20 seconds after a cable is reconnected.
The last check is on the switcher itself. Testing had loaded a macro and a clip onto the 2 M/E. We removed them, then compared the switcher's full state with a copy taken before we started. Across 6,334 fields there were no differences.
Try it on your own switcher
A2Q Direct runs a 10-minute demo with every function and no activation code, and the download is on the A2Q Direct page. What the plugin costs a Core, and how to size a design around it, is in What a 4 M/E ATEM costs a Q-SYS Core Nano.
Need something that doesn't exist? We build that too.