docs.unity3d.com
    目次を表示する/隠す

    Interface ITimedDataSource

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

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

    Properties

    BufferSize

    The current buffer size.

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

    FrameRate

    The number of data samples per second.

    Declaration
    FrameRate FrameRate { get; }
    Property Value
    Type Description
    FrameRate

    IsSynchronized

    Signal to the data source whether it is being synchronized via PresentAt(FrameTimeWithRate).

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

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

    MaxBufferSize

    The maximum size of the sample buffer, if limited.

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

    MinBufferSize

    The minimum size of the sample buffer, if limited.

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

    Offset

    The time offset applied to sample timecodes, in frames.

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

    The frame duration corresponds to the FrameRate of this source. This value should typically match the time delay between timecode generation and data sampling.

    Synchronizer

    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 synchronizer implementation automatically assigns this property when you call AddDataSource(ITimedDataSource).

    UndoTarget

    The object to record to the undo stack when the user modifies the properties of this data source.

    Declaration
    Object UndoTarget { get; }
    Property Value
    Type Description
    Object
    Remarks

    To enable undo when using the synchronization windows, this must be the object that stores the serialized state for this data source. When null, this data source will not support undo operations.

    Methods

    PresentAt(FrameTimeWithRate)

    Applies the data for a given timecode to the scene.

    Declaration
    TimedSampleStatus PresentAt(FrameTimeWithRate presentTime)
    Parameters
    Type Name Description
    FrameTimeWithRate presentTime

    The timecode to present.

    Returns
    Type Description
    TimedSampleStatus

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

    TryGetBufferRange(out FrameTime, out FrameTime)

    Gets the frame time of the newest and oldest samples buffered by the data source.

    Declaration
    bool TryGetBufferRange(out FrameTime oldestSample, out FrameTime newestSample)
    Parameters
    Type Name Description
    FrameTime oldestSample

    The frame time of the oldest buffered sample, or langword_csharp_default if there are no buffered samples.

    FrameTime newestSample

    The frame time of the newest buffered sample, or langword_csharp_default if there are no buffered samples.

    Returns
    Type Description
    Boolean

    true if there are any buffered samples; otherwise, false.

    Remarks

    The frame duration corresponds to the FrameRate of this source.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)