Interface ISynchronizer
Manages a collection of ITimedDataSources for the purpose of coordinating their respective data to be presented in a temporally coherent manner.
Namespace: Unity.LiveCapture
Syntax
public interface ISynchronizer
Properties
CurrentTimecode
The timecode used for the most recent synchronized update.
Declaration
Timecode CurrentTimecode { get; }
Property Value
Type | Description |
---|---|
Timecode |
DataSourceCount
Get the number of timed data sources in the synchronization group.
Declaration
int DataSourceCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
FrameRate
Get the frequency of synchronized frames.
Declaration
FrameRate FrameRate { get; }
Property Value
Type | Description |
---|---|
FrameRate |
GlobalTimeOffset
The offset in frames applied to the timecode used for synchronization updates.
Declaration
FrameTime GlobalTimeOffset { get; set; }
Property Value
Type | Description |
---|---|
FrameTime |
Remarks
Set this to be negative (i.e. a delay) to compensate for high-latency sources.
Methods
AddDataSource(ITimedDataSource)
Add a timed data source to the synchronization group.
Declaration
bool AddDataSource(ITimedDataSource source)
Parameters
Type | Name | Description |
---|---|---|
ITimedDataSource | source | The timed data source to add. |
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
source
must derive from
CalibrationWith(ISynchronizationCalibrator)
Find the best synchronization parameters for the current source latencies.
Declaration
IEnumerator CalibrationWith(ISynchronizationCalibrator calibrator)
Parameters
Type | Name | Description |
---|---|---|
ISynchronizationCalibrator | calibrator | The calibration method used for finding the optimal settings. |
Returns
Type | Description |
---|---|
IEnumerator | The current status of the calibration. |
GetCurrentDataStatus(Int32)
Get the sample status of the data source as of the last synchronization update.
Declaration
TimedSampleStatus? GetCurrentDataStatus(int dataSourceIndex)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dataSourceIndex | The index of the timed data source. |
Returns
Type | Description |
---|---|
Nullable<TimedSampleStatus> | The sample status; |
GetDataSource(Int32)
Get the timed data source at the specified index.
Declaration
ITimedDataSource GetDataSource(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index of the timed data source. |
Returns
Type | Description |
---|---|
ITimedDataSource | The timed data source at the index; |
RemoveDataSource(ITimedDataSource)
Remove a timed data source from the synchronization group.
Declaration
void RemoveDataSource(ITimedDataSource source)
Parameters
Type | Name | Description |
---|---|---|
ITimedDataSource | source | The timed data source to remove. |
Update()
Perform synchronized update on synchronized group.
Declaration
void Update()