The Matrix-API framework decodes incoming SDI data into pixels (in a programmable format), audio samples and ANC data structures. When a new frame has been received, the framework calls a user-supplied "frame-processor callback" for processing of the data. The user callback can create output video, audio and ANC data, which is encoded by the framework into SDI frames.
Synchronization of multiple input streams is straightforward: The video/audio/anc data of all SDI frames supplied to the callback function have the same arrival time by definition. Past frames can be accessed by an integer frame index. The framework ensures that if frames from different input ports have the same frame index, they have entered the system at the same time instance.