Class TimecodeSourceManager
A singleton class that keeps track of ITimecode
Namespace: Unity.LiveCapture
Assembly: Unity.LiveCapture.dll
Syntax
public sealed class TimecodeSourceManager
Properties
Entries
Gets the list of registered sources.
Declaration
public IReadOnlyList<ITimecodeSource> Entries { get; }
Property Value
Type | Description |
---|---|
IRead |
Instance
The Timecode
Declaration
public static TimecodeSourceManager Instance { get; }
Property Value
Type | Description |
---|---|
Timecode |
this[string]
Gets the ITimecode
Declaration
public ITimecodeSource this[string id] { get; }
Parameters
Type | Name | Description |
---|---|---|
string | id | The ID of the source to get. |
Property Value
Type | Description |
---|---|
ITimecode |
The source, or null if none with the given ID are registered. |
Methods
Clear()
Unregister all sources.
Declaration
public void Clear()
EnsureIdIsValid(ref string)
Creates a new ID if the given ID is uninitialized or is already used.
Declaration
public bool EnsureIdIsValid(ref string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | The ID to initialize. |
Returns
GetEnumerator()
Gets an enumerator that iterates over all registered sources.
Declaration
public IEnumerator<ITimecodeSource> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<ITimecode |
An enumerator for the collection. |
Register(ITimecodeSource)
Adds a ITimecode
Declaration
public bool Register(ITimecodeSource source)
Parameters
Type | Name | Description |
---|---|---|
ITimecode |
source | The source to register. |
Returns
Type | Description |
---|---|
bool |
|
Unregister(ITimecodeSource)
Removes a ITimecode
Declaration
public bool Unregister(ITimecodeSource source)
Parameters
Type | Name | Description |
---|---|---|
ITimecode |
source | The source to unregister. |
Returns
Type | Description |
---|---|
bool |
|
Events
Added
An event triggered when a new source is registered.
Declaration
public event Action<ITimecodeSource> Added
Event Type
Type | Description |
---|---|
Action<ITimecode |
Removed
An event triggered when a source is unregistered.
Declaration
public event Action<ITimecodeSource> Removed
Event Type
Type | Description |
---|---|
Action<ITimecode |