com.aliyun.svideosdk.common.struct.effect

## Class EffectBase

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

- Direct Known Subclasses:
    EffectFilter, EffectImage, EffectPaster, EffectSticker, EffectStream, TrackAudioStream, TrackEffectMV, TrackEffectWaterMark

      public class EffectBase
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Source` | `mSource`
    `protected int` | `resId`
    `protected int` | `viewId`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EffectBase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkIsInvalid()` Checks the data is invalid
    `void` | `copy(EffectBase base)`
    `java.lang.String` | `getPath()` Deprecated. 使用 `getSource()`替代
    `int` | `getResId()` 获取资源id
    `Source` | `getSource()` 获取资源
    `int` | `getViewId()` 获取效果id
    `protected java.lang.String` | `readString(java.lang.String path)`
    `void` | `setPath(java.lang.String path)` Deprecated. 使用 `setSource(Source)`替代
    `void` | `setResId(int id)` Deprecated.
    `void` | `setSource(Source source)` 设置资源
    `void` | `setViewId(int id)` 设置效果id
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### resId

          protected int resId

    - #### mSource

          protected Source mSource

    - #### viewId

          protected int viewId

  - ### Constructor Detail

    - #### EffectBase

          public EffectBase()

  - ### Method Detail

    - #### getResId

          public int getResId()

      获取资源id
      Returns:
        资源id 资源唯一标识符,主要用于录制模块的资源id获取

    - #### setResId

          @Deprecated
          public void setResId(int id)

      Deprecated.

    - #### getViewId

          public int getViewId()

      获取效果id
      Returns:
        效果id，效果的唯一标识符，主要用于编辑模块的效果id获取

    - #### setViewId

          public void setViewId(int id)

      设置效果id
      Parameters:
        `id` - 效果唯一标识符，不建议用户自己调用该接口

    - #### getPath

          @Deprecated
          public java.lang.String getPath()

      Deprecated. 使用 `getSource()`替代
      获取资源文件路径
      Returns:
        资源文件路径

    - #### setPath

          @Deprecated
          public void setPath(java.lang.String path)

      Deprecated. 使用 `setSource(Source)`替代
      设置资源文件路径
      Parameters:
        `path` -

    - #### getSource

          public Source getSource()

      获取资源
      Returns:
        资源

    - #### setSource

          public void setSource(Source source)

      设置资源
      Parameters:
        `source` - 资源

    - #### readString

          protected java.lang.String readString(java.lang.String path)

    - #### copy

          public void copy(EffectBase base)

    - #### checkIsInvalid

          public boolean checkIsInvalid()

      Checks the data is invalid
      Returns:
        true invalid, false valid

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`