docs.unity3d.com
    Show / Hide Table of Contents

    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

    true if added successfully; false if data source is already in the group.

    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; null if no status is available or no source exists at the index.

    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; null if no source exists 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()
    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