Class SyncManager
The class used to synchronize the engine update loop to an external signal.
Namespace: Unity.LiveCapture
Assembly: Unity.LiveCapture.dll
Syntax
public class SyncManager
Remarks
When working with video or other data feeds in a live context (ex. broadcast, virtual production), it is important to ensure that each device in the processing pipeline outputs exactly one frame for every frame of input, and that all devices process inputs or outputs with steady, predictable timing. This helps to avoid frame drops caused by devices receiving more frames than they can handle at once (buffer overflows) or devices not having any input frames to process (buffer underflows).
This is usually achieved by feeding a signal that pulses at a specified frame rate (known as the genlock signal) into all the devices in the pipeline. When the signal is pulsed, every device will output one frame. The genlock signal is generated by one of the devices in the pipeline or an external reference clock. Devices synchronized in this manner are said to be genlocked.
This class provides a common way to configure the Unity engine update loop to synchronize to an external signal, such as a genlock signal, instead of executing the update loop as fast as possible or at the refresh rate of the output display.
Properties
ActiveSyncProvider
The ISync
Declaration
public ISyncProvider ActiveSyncProvider { get; }
Property Value
Type | Description |
---|---|
ISync |
Instance
The singleton instance.
Declaration
public static SyncManager Instance { get; }
Property Value
Type | Description |
---|---|
Sync |
Methods
TryGetSyncRate(out FrameRate)
Gets the pulse rate of the synchronization signal.
Declaration
public static bool TryGetSyncRate(out FrameRate syncRate)
Parameters
Type | Name | Description |
---|---|---|
Frame |
syncRate | The pulse rate of the synchronization signal. |
Returns
Events
SyncProviderActivated
An event invoked when a sync provider takes control of the engine update timing.
Declaration
public event Action<ISyncProvider> SyncProviderActivated
Event Type
Type | Description |
---|---|
Action<ISync |
See Also
SyncProviderDeactivated
An event invoked when a sync provider releases control of the engine update timing.
Declaration
public event Action<ISyncProvider> SyncProviderDeactivated
Event Type
Type | Description |
---|---|
Action<ISync |