com.aliyun.svideosdk.common.struct.effect

## Class TrackEffect<BEAN extends EffectBase>

- java.lang.Object
- - com.aliyun.svideosdk.common.struct.effect.TrackEffect<BEAN>

- Direct Known Subclasses:
    TrackEffectFilter

      public class TrackEffect<BEAN extends EffectBase>
      extends java.lang.Object

  Added in v3.27.0 The track effect bean

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected BEAN` | `bean`
    `protected long` | `duration`
    `protected long` | `startTime`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TrackEffect(long startTime, long duration, BEAN bean)` Build Track Effect Object

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `BEAN` | `getBean()` Get the bean of the track
    `long` | `getDuration()` Get the duration in the track
    `long` | `getDuration(java.util.concurrent.TimeUnit timeUnit)` Get the duration in the track
    `long` | `getEndTime()` Get the end time in the track
    `long` | `getEndTime(java.util.concurrent.TimeUnit timeUnit)` Get the end time in the track
    `int` | `getResId()` Gets the id of a resource.
    `Source` | `getSource()` Get the file of a resource.
    `long` | `getStartTime()` Get the start time in the track
    `long` | `getStartTime(java.util.concurrent.TimeUnit timeUnit)` Get the start time in the track
    `int` | `getViewId()` Gets the id of an effect.
    `void` | `setDuration(long duration, java.util.concurrent.TimeUnit timeUnit)` Set the execute duration in the track
    `void` | `setSource(Source source)` Sets the file of a resource.
    `void` | `setStartTime(long startTime, java.util.concurrent.TimeUnit timeUnit)` Sets the start time in the track
    `void` | `setViewId(int aId)` Sets the id of an effect.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### startTime

          protected long startTime

    - #### duration

          protected long duration

    - #### bean

          protected BEAN extends EffectBase bean

  - ### Constructor Detail

    - #### TrackEffect

          public TrackEffect(long startTime,
                             long duration,
                             BEAN bean)

      Build Track Effect Object
      Parameters:
        `startTime,` - the start time of track effect, Unit: milliseconds
        `duration,` - the duration of track effect, Unit: milliseconds
        `bean，` - the bean of track effect

  - ### Method Detail

    - #### setStartTime

          public void setStartTime(long startTime,
                                   java.util.concurrent.TimeUnit timeUnit)

      Sets the start time in the track
      Parameters:
        `startTime` -
        `timeUnit` - TimeUnit

    - #### setDuration

          public void setDuration(long duration,
                                  java.util.concurrent.TimeUnit timeUnit)

      Set the execute duration in the track
      Parameters:
        `timeUnit` - TimeUnit

    - #### getViewId

          public int getViewId()

      Gets the id of an effect.
      Returns:
        The effect id. This method is used to get effect ids for video editing.

    - #### setViewId

          public void setViewId(int aId)

      Sets the id of an effect.
      Parameters:
        `id` - It is not recommended to call this method.

    - #### getResId

          public int getResId()

      Gets the id of a resource.
      Returns:
        The resource id. This method is used to get resource ids for video recording.

    - #### getSource

          public Source getSource()

      Get the file of a resource.
      Returns:
        source

    - #### setSource

          public void setSource(Source source)

      Sets the file of a resource.
      Parameters:
        `source` - Source

    - #### getStartTime

          public long getStartTime()

      Get the start time in the track
      Returns:
        startTime Unit: milliseconds.

    - #### getStartTime

          public long getStartTime(java.util.concurrent.TimeUnit timeUnit)

      Get the start time in the track
      Parameters:
        `timeUnit` - TimeUnit
      Returns:
        startTime

    - #### getEndTime

          public long getEndTime()

      Get the end time in the track
      Returns:
        end time Unit: milliseconds.

    - #### getEndTime

          public long getEndTime(java.util.concurrent.TimeUnit timeUnit)

      Get the end time in the track
      Parameters:
        `timeUnit` - TimeUnit
      Returns:
        end time

    - #### getDuration

          public long getDuration()

      Get the duration in the track
      Returns:
        duration Unit: milliseconds.

    - #### getDuration

          public long getDuration(java.util.concurrent.TimeUnit timeUnit)

      Get the duration in the track
      Parameters:
        `timeUnit` - 时间单位
      Returns:
        duration

    - #### getBean

          public BEAN getBean()

      Get the bean of the track
      Returns:
        BEAN the bean in the track