docs.unity3d.com
    Show / Hide Table of Contents

    Interface ITimedDataSource

    An interface for a collection of timecoded data samples. Represents a data source that can be synchronized.

    Inherited Members
    IRegistrable.Id
    IRegistrable.FriendlyName
    Namespace: Unity.LiveCapture
    Syntax
    public interface ITimedDataSource : IRegistrable

    Properties

    BufferSize

    Gets or sets the current buffer size.

    Declaration
    int BufferSize { get; set; }
    Property Value
    Type Description
    Int32

    IsSynchronized

    Signal to the data source whether it is being synchronized via PresentAt(Timecode, FrameRate).

    Declaration
    bool IsSynchronized { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    When true, the data source should disable its own update mechanism.

    MaxBufferSize

    Get the maximum size of the sample buffer, if limited.

    Declaration
    int? MaxBufferSize { get; }
    Property Value
    Type Description
    Nullable<Int32>

    MinBufferSize

    Get the minimum size of the sample buffer, if limited.

    Declaration
    int? MinBufferSize { get; }
    Property Value
    Type Description
    Nullable<Int32>

    PresentationOffset

    Apply this constant frame offset when invoking PresentAt(Timecode, FrameRate).

    Declaration
    FrameTime PresentationOffset { get; set; }
    Property Value
    Type Description
    FrameTime
    Remarks

    Set this to non-zero if the captured data's timecodes are "off" from the true values. For example, if you determined that the samples and timecodes as mismatched such that each sample lags its timecode by 2 frames, you would set this property to new FrameTime(2).

    Synchronizer

    Gets or sets the ISynchronizer controlling this source.

    Declaration
    ISynchronizer Synchronizer { get; set; }
    Property Value
    Type Description
    ISynchronizer
    Remarks

    In most cases you can simply implement this as an auto-property. The default Unity.LiveCapture.Synchronizer will automatically assign this property when you call Unity.LiveCapture.Synchronizer.AddDataSource(Unity.LiveCapture.ITimedDataSource).

    Methods

    PresentAt(Timecode, FrameRate)

    Set the currently active timecode for presentation.

    Declaration
    TimedSampleStatus PresentAt(Timecode timecode, FrameRate frameRate)
    Parameters
    Type Name Description
    Timecode timecode

    The timecode that we wish to present

    FrameRate frameRate

    The underlying framerate of the timecode value

    Returns
    Type Description
    TimedSampleStatus

    A status representing the ability of the source to present at the requested timecode.

    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