docs.unity3d.com
    Show / Hide Table of Contents

    Class TimecodeSourceManager

    A singleton class that keeps track of ITimecodeSource instances.

    Inheritance
    Object
    TimecodeSourceManager
    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

    true if a new ID was generated; false otherwise.

    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

    true if the source was registered successfully, false if source is null, the source's ID is null or empty, or another source was already registered with the same ID.

    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

    true if the source was unregistered successfully, false if source didn't exist in the registry.

    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>
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023