Class SyncProvider
A base class that includes functionality suitable for most ISyncProvider implementations.
Namespace: Unity.LiveCapture
Syntax
[Serializable]
public abstract class SyncProvider : ISyncProvider
Properties
DroppedFrameCount
The number of synchronization signal pulses that have been skipped since starting the synchronization provider.
Declaration
public int DroppedFrameCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Implements
LastPulseCountDelta
The number of synchronization signal pulses between the last two WaitForNextPulse() calls.
Declaration
public int? LastPulseCountDelta { get; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
Implements
Name
The display name of the synchronization provider.
Declaration
public abstract string Name { get; }
Property Value
Type | Description |
---|---|
String |
Implements
RunInEditMode
Determines if this synchronization provider can synchronize while the Editor is in edit mode.
Declaration
protected virtual bool RunInEditMode { get; }
Property Value
Type | Description |
---|---|
Boolean |
Status
The status of the synchronization provider.
Declaration
public SyncStatus Status { get; protected set; }
Property Value
Type | Description |
---|---|
SyncStatus |
Implements
SyncRate
The pulse rate of the synchronization signal.
Declaration
public abstract FrameRate SyncRate { get; }
Property Value
Type | Description |
---|---|
FrameRate |
Implements
Methods
OnStart()
Called when the sync provider becomes active.
Declaration
protected virtual void OnStart()
OnStop()
Called when the sync provider becomes inactive.
Declaration
protected virtual void OnStop()
OnWaitForNextPulse(out Int32)
Blocks execution on the current thread until the next synchronization signal pulse is received.
Declaration
protected abstract bool OnWaitForNextPulse(out int pulseCount)
Parameters
Type | Name | Description |
---|---|---|
Int32 | pulseCount | The number of synchronization signal pulses since this method was last called. |
Returns
Type | Description |
---|---|
Boolean | true when a pulse was successfully received; otherwise, false. |
Explicit Interface Implementations
ISyncProvider.StartSynchronizing()
Begin listening for synchronization pulses.
Declaration
void ISyncProvider.StartSynchronizing()
Implements
ISyncProvider.StopSynchronizing()
Stop listening for synchronization pulses.
Declaration
void ISyncProvider.StopSynchronizing()
Implements
ISyncProvider.WaitForNextPulse()
Blocks execution on the current thread until the next synchronization signal pulse is received.
Declaration
bool ISyncProvider.WaitForNextPulse()
Returns
Type | Description |
---|---|
Boolean | true when a pulse was successfully received; otherwise, false. |
Implements
Remarks
This is expected to be called once per frame.