com.aliyun.svideosdk.common.struct.effect

## Class TrackAudioStream

- java.lang.Object
- - com.aliyun.svideosdk.common.struct.effect.EffectBase
  - - com.aliyun.svideosdk.common.struct.effect.TrackAudioStream

-     public class TrackAudioStream
      extends EffectBase

  Added in v3.27.0 The audio stream bean of track

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TrackAudioStream.Builder`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected long` | `duration`
    `protected long` | `streamDuration`
    `protected int` | `streamId`
    `protected long` | `streamStartTime`

    - ### Fields inherited from class com.aliyun.svideosdk.common.struct.effect.EffectBase

      `mSource, resId, viewId`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TrackAudioStream()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkIsInvalid()`
    `int` | `getAudioWeight()` Get the mix weight of audio stream
    `long` | `getDuration()` Get the duration of stream file.
    `long` | `getDuration(java.util.concurrent.TimeUnit timeUnit)` Get the duration of stream file.
    `long` | `getStartTime()` Get the start time of audio stream in the track， Unit : milliseconds
    `long` | `getStartTime(java.util.concurrent.TimeUnit timeUnit)` Get the start time of audio stream in the track
    `long` | `getStreamDuration()` Get the duration of stream.
    `long` | `getStreamDuration(java.util.concurrent.TimeUnit timeUnit)` Get the duration of stream
    `long` | `getStreamEndTime()` Get the end time of stream.
    `long` | `getStreamEndTime(java.util.concurrent.TimeUnit unit)` Get the end time of stream
    `int` | `getStreamId()` Get the identify of stream.
    `long` | `getStreamStartTime()` Get the start time of stream.
    `long` | `getStreamStartTime(java.util.concurrent.TimeUnit unit)` Get the start time of stream.
    `void` | `setStreamDuration(long duration, java.util.concurrent.TimeUnit timeUnit)` Sets the duration of stream.
    `void` | `setStreamId(int streamId)` Sets the identify of stream.
    `void` | `setStreamStartTime(long startTime, java.util.concurrent.TimeUnit timeUnit)` Sets the start time of stream.

    - ### Methods inherited from class com.aliyun.svideosdk.common.struct.effect.EffectBase

      `copy, getPath, getResId, getSource, getViewId, readString, setPath, setResId, setSource, setViewId, toString`

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

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

- - ### Field Detail

    - #### streamId

          protected int streamId

    - #### streamStartTime

          protected long streamStartTime

    - #### streamDuration

          protected long streamDuration

    - #### duration

          protected long duration

  - ### Constructor Detail

    - #### TrackAudioStream

          public TrackAudioStream()

  - ### Method Detail

    - #### getStreamId

          public int getStreamId()

      Get the identify of stream.
      Returns:
        identify

    - #### setStreamId

          public void setStreamId(int streamId)

      Sets the identify of stream. It's not recommend to use.
      Parameters:
        `streamId` -

    - #### getStreamStartTime

          public long getStreamStartTime()

      Get the start time of stream. Unit : Milliseconds
      Returns:
        startTime

    - #### getStreamStartTime

          public long getStreamStartTime(java.util.concurrent.TimeUnit unit)

      Get the start time of stream.
      Parameters:
        `unit` - TimeUnit
      Returns:
        startTime

    - #### getStreamEndTime

          public long getStreamEndTime()

      Get the end time of stream. Unit : Milliseconds
      Returns:
        endTime

    - #### getStreamEndTime

          public long getStreamEndTime(java.util.concurrent.TimeUnit unit)

      Get the end time of stream
      Parameters:
        `unit` - TimeUnit
      Returns:
        endTime

    - #### setStreamStartTime

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

      Sets the start time of stream.
      Parameters:
        `startTime` -
        `timeUnit` - TimeUnit

    - #### getStreamDuration

          public long getStreamDuration()

      Get the duration of stream. Unit : Milliseconds
      Returns:
        endTime

    - #### getStreamDuration

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

      Get the duration of stream
      Returns:
        duration

    - #### setStreamDuration

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

      Sets the duration of stream.
      Parameters:
        `duration` -
        `timeUnit` - TimeUnit

    - #### getDuration

          public long getDuration()

      Get the duration of stream file. Unit : Milliseconds
      Returns:
        endTime

    - #### getDuration

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

      Get the duration of stream file.
      Parameters:
        `timeUnit` - 时间单位
      Returns:
        duration

    - #### getAudioWeight

          public int getAudioWeight()

      Get the mix weight of audio stream
      Returns:
        audioWeight

    - #### getStartTime

          public long getStartTime()

      Get the start time of audio stream in the track， Unit : milliseconds
      Returns:
        startTime

    - #### getStartTime

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

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

    - #### checkIsInvalid

          public boolean checkIsInvalid()

      Overrides:
        `checkIsInvalid` in class `EffectBase`