Class TimecodeSourceManager
A singleton class that keeps track of ITimecodeSource instances.
Namespace: Unity.LiveCapture
Syntax
public sealed class TimecodeSourceManager : IEnumerable<ITimecodeSource>
Properties
Entries
Gets the list of registered sources.
Declaration
public IReadOnlyList<ITimecodeSource> Entries { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<ITimecodeSource> |
Instance
The TimecodeSourceManager instance.
Declaration
public static TimecodeSourceManager Instance { get; }
Property Value
Type | Description |
---|---|
TimecodeSourceManager |
Item[String]
Gets the ITimecodeSource with the specified ID.
Declaration
public ITimecodeSource this[string id] { get; }
Parameters
Type | Name | Description |
---|---|---|
String | id | The ID of the source to get. |
Property Value
Type | Description |
---|---|
ITimecodeSource | 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
Type | Description |
---|---|
Boolean |
GetEnumerator()
Gets an enumerator that iterates over all registered sources.
Declaration
public IEnumerator<ITimecodeSource> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<ITimecodeSource> | An enumerator for the collection. |
Register(ITimecodeSource)
Adds a ITimecodeSource to the registry.
Declaration
public bool Register(ITimecodeSource source)
Parameters
Type | Name | Description |
---|---|---|
ITimecodeSource | source | The source to register. |
Returns
Type | Description |
---|---|
Boolean |
|
Unregister(ITimecodeSource)
Removes a ITimecodeSource from the registry.
Declaration
public bool Unregister(ITimecodeSource source)
Parameters
Type | Name | Description |
---|---|---|
ITimecodeSource | source | The source to unregister. |
Returns
Type | Description |
---|---|
Boolean |
|
Events
Added
An event triggered when a new source is registered.
Declaration
public event Action<ITimecodeSource> Added
Event Type
Type | Description |
---|---|
Action<ITimecodeSource> |
Removed
An event triggered when a source is unregistered.
Declaration
public event Action<ITimecodeSource> Removed
Event Type
Type | Description |
---|---|
Action<ITimecodeSource> |