com.aliyun.svideosdk.common.struct.common

## Class AliyunSnapVideoParam.Builder

- java.lang.Object
- - com.aliyun.svideosdk.common.struct.common.AliyunSnapVideoParam.Builder

- Enclosing class:
    AliyunSnapVideoParam

      public static class AliyunSnapVideoParam.Builder
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Builder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `AliyunSnapVideoParam` | `build()`
    `AliyunSnapVideoParam.Builder` | `setBeautyLevel(int beautyLevel)` Sets the beauty level.
    `AliyunSnapVideoParam.Builder` | `setBeautyStatus(boolean beautyStatus)` Enables or disables beauty mode.
    `AliyunSnapVideoParam.Builder` | `setCameraType(CameraType cameraType)` Gets the camera type.
    `AliyunSnapVideoParam.Builder` | `setCropMode(VideoDisplayMode scaleMode)` Sets the crop mode.
    `AliyunSnapVideoParam.Builder` | `setCropUseGPU(boolean isUseGPU)` Sets whether to use GPU during cropping.
    `AliyunSnapVideoParam.Builder` | `setFilterList(java.lang.String[] filterList)` Sets a list of filter effects.
    `AliyunSnapVideoParam.Builder` | `setFlashType(FlashType flashType)` Sets the flash mode.
    `AliyunSnapVideoParam.Builder` | `setFrameRate(int frameRate)` Sets the frame rate.
    `AliyunSnapVideoParam.Builder` | `setGop(int gop)` Sets the GOP size in frames.
    `AliyunSnapVideoParam.Builder` | `setMaxDuration(int maxDuration)` Sets the maximum recording duration.
    `AliyunSnapVideoParam.Builder` | `setMaxVideoDuration(int duration)` Sets the maximum video duration on the video selection page.
    `AliyunSnapVideoParam.Builder` | `setMinCropDuration(int duration)` Sets the minimum video duration during cropping.
    `AliyunSnapVideoParam.Builder` | `setMinDuration(int minDuration)` Sets the minimum recording duration.
    `AliyunSnapVideoParam.Builder` | `setMinVideoDuration(int duration)` Sets the minimum video duration on the video selection page.
    `AliyunSnapVideoParam.Builder` | `setNeedClip(boolean needClip)` Sets whether to record multiple clips.
    `AliyunSnapVideoParam.Builder` | `setNeedRecord(boolean needClip)` Sets whether to display the Record option on the video selection page.
    `AliyunSnapVideoParam.Builder` | `setRatioMode(int ratioMode)` Sets the aspect ratio.
    `AliyunSnapVideoParam.Builder` | `setRecordMode(int recordMode)` Sets the recording mode.
    `AliyunSnapVideoParam.Builder` | `setResolutionMode(int resolutionMode)` Sets the base for calculating the resolution.
    `AliyunSnapVideoParam.Builder` | `setResulutionMode(int resolutionMode)` Deprecated. Replaced by `setResolutionMode(int)`.
    `AliyunSnapVideoParam.Builder` | `setSortMode(int sortMode)` Sets the filter mode on the media file selection page.
    `AliyunSnapVideoParam.Builder` | `setVideoBitrate(int bitrate)` Sets the bitrate in kbit/s.
    `AliyunSnapVideoParam.Builder` | `setVideoCodec(VideoCodecs codec)` Sets the encoding mode.
    `AliyunSnapVideoParam.Builder` | `setVideoQuality(VideoQuality videoQuality)` Sets the video quality.
    `AliyunSnapVideoParam.Builder` | `setVideQuality(VideoQuality videoQuality)` Deprecated. Replaced by `setVideoQuality(VideoQuality)`.

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

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

- - ### Constructor Detail

    - #### Builder

          public Builder()

  - ### Method Detail

    - #### setResolutionMode

          public AliyunSnapVideoParam.Builder setResolutionMode(int resolutionMode)

      Sets the base for calculating the resolution. Four bases are supported. The resolution is calculated based on the base and `AliyunSnapVideoParam.setRatioMode(int)`.
      Parameters:
        `resolutionMode` -
      See Also:
        `AliyunSnapVideoParam.RESOLUTION_360P`, `AliyunSnapVideoParam.RESOLUTION_480P`, `AliyunSnapVideoParam.RESOLUTION_540P`, `AliyunSnapVideoParam.RESOLUTION_720P`

    - #### setResulutionMode

          public AliyunSnapVideoParam.Builder setResulutionMode(int resolutionMode)

      Deprecated. Replaced by `setResolutionMode(int)`.
      Parameters:
        `resolutionMode` -

    - #### setRatioMode

          public AliyunSnapVideoParam.Builder setRatioMode(int ratioMode)

      Sets the aspect ratio. The resolution is calculated based on the aspect ratio and `AliyunSnapVideoParam.setResolutionMode(int)`.
      Parameters:
        `ratioMode` -
      See Also:
        `AliyunSnapVideoParam.RATIO_MODE_1_1`, `AliyunSnapVideoParam.RATIO_MODE_3_4`, `AliyunSnapVideoParam.RATIO_MODE_9_16`

    - #### setNeedRecord

          public AliyunSnapVideoParam.Builder setNeedRecord(boolean needClip)

      Sets whether to display the Record option on the video selection page.
      Parameters:
        `needClip` -

    - #### setVideQuality

          public AliyunSnapVideoParam.Builder setVideQuality(VideoQuality videoQuality)

      Deprecated. Replaced by `setVideoQuality(VideoQuality)`.
      Deprecated.
      Parameters:
        `videoQuality` -

    - #### setVideoQuality

          public AliyunSnapVideoParam.Builder setVideoQuality(VideoQuality videoQuality)

      Sets the video quality.
      Parameters:
        `videoQuality` -
      See Also:
        `VideoQuality`

    - #### setGop

          public AliyunSnapVideoParam.Builder setGop(int gop)

      Sets the GOP size in frames.
      Parameters:
        `gop` -

    - #### setVideoBitrate

          public AliyunSnapVideoParam.Builder setVideoBitrate(int bitrate)

      Sets the bitrate in kbit/s.
      Parameters:
        `bitrate` -

    - #### setFrameRate

          public AliyunSnapVideoParam.Builder setFrameRate(int frameRate)

      Sets the frame rate.
      Parameters:
        `frameRate` -

    - #### setCropMode

          public AliyunSnapVideoParam.Builder setCropMode(VideoDisplayMode scaleMode)

      Sets the crop mode.
      Parameters:
        `scaleMode` -
      See Also:
        `VideoDisplayMode`

    - #### setMinVideoDuration

          public AliyunSnapVideoParam.Builder setMinVideoDuration(int duration)

      Sets the minimum video duration on the video selection page.
      Parameters:
        `duration` - Unit: milliseconds.

    - #### setMaxVideoDuration

          public AliyunSnapVideoParam.Builder setMaxVideoDuration(int duration)

      Sets the maximum video duration on the video selection page.
      Parameters:
        `duration` - Unit: milliseconds.

    - #### setRecordMode

          public AliyunSnapVideoParam.Builder setRecordMode(int recordMode)

      Sets the recording mode.
      Parameters:
        `recordMode` -
      See Also:
        `AliyunSnapVideoParam.RECORD_MODE_PRESS`, `AliyunSnapVideoParam.RECORD_MODE_TOUCH`, `AliyunSnapVideoParam.RECORD_MODE_AUTO`

    - #### setMinCropDuration

          public AliyunSnapVideoParam.Builder setMinCropDuration(int duration)

      Sets the minimum video duration during cropping. The durations of cropped video clips must not be shorter than this value.
      Parameters:
        `duration` - Unit: milliseconds.

    - #### setFilterList

          public AliyunSnapVideoParam.Builder setFilterList(java.lang.String[] filterList)

      Sets a list of filter effects.
      Parameters:
        `filterList` -

    - #### setBeautyLevel

          public AliyunSnapVideoParam.Builder setBeautyLevel(int beautyLevel)

      Sets the beauty level.
      Parameters:
        `beautyLevel` - Valid values: [0, 100]. 0 indicates disable beauty mode.

    - #### setBeautyStatus

          public AliyunSnapVideoParam.Builder setBeautyStatus(boolean beautyStatus)

      Enables or disables beauty mode.
      Parameters:
        `beautyStatus` - true indicates enable. false indicates disable.

    - #### setCameraType

          public AliyunSnapVideoParam.Builder setCameraType(CameraType cameraType)

      Gets the camera type.
      Parameters:
        `cameraType` -
      See Also:
        `CameraType`

    - #### setFlashType

          public AliyunSnapVideoParam.Builder setFlashType(FlashType flashType)

      Sets the flash mode.
      Parameters:
        `flashType` -

    - #### setMaxDuration

          public AliyunSnapVideoParam.Builder setMaxDuration(int maxDuration)

      Sets the maximum recording duration.
      Parameters:
        `maxDuration` -

    - #### setMinDuration

          public AliyunSnapVideoParam.Builder setMinDuration(int minDuration)

      Sets the minimum recording duration. Video clips whose durations are shorter than this value are discarded.
      Parameters:
        `minDuration` -

    - #### setNeedClip

          public AliyunSnapVideoParam.Builder setNeedClip(boolean needClip)

      Sets whether to record multiple clips.
      Parameters:
        `needClip` - true indicates record multiple clips. false indicates record one clip only.

    - #### setSortMode

          public AliyunSnapVideoParam.Builder setSortMode(int sortMode)

      Sets the filter mode on the media file selection page. `AliyunSnapVideoParam.SORT_MODE_PHOTO`, `AliyunSnapVideoParam.SORT_MODE_PHOTO`, and `AliyunSnapVideoParam.SORT_MODE_PHOTO`.
      Parameters:
        `sortMode` - `AliyunSnapVideoParam.SORT_MODE_PHOTO`, `AliyunSnapVideoParam.SORT_MODE_PHOTO`, `AliyunSnapVideoParam.SORT_MODE_PHOTO`

    - #### setCropUseGPU

          public AliyunSnapVideoParam.Builder setCropUseGPU(boolean isUseGPU)

      Sets whether to use GPU during cropping.
      Parameters:
        `isUseGPU` - true indicates use GPU. false indicates use CPU.

    - #### setVideoCodec

          public AliyunSnapVideoParam.Builder setVideoCodec(VideoCodecs codec)

      Sets the encoding mode.
      Parameters:
        `codec` - Default is hardware encoding.
      See Also:
        `VideoCodecs`

    - #### build

          public AliyunSnapVideoParam build()