com.aliyun.svideosdk.common.struct.common

## Class AliyunVideoClip

- java.lang.Object
- - com.aliyun.svideosdk.common.struct.common.AliyunClip
  - - com.aliyun.svideosdk.common.struct.common.AliyunVideoClip

-     public class AliyunVideoClip
      extends AliyunClip

  A class that defines the video clips that are used in editing. Use `AliyunVideoClip.Builder` to create objects of this class. When using `AliyunIImport` to import videos, video clips must be created and added to `AliyunIImport`.

- - ### Nested Class Summary

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

  - ### Field Summary

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

      `mClipHeight, mClipWidth`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getDuration()` Gets the display duration of the clip.
    `long` | `getEndTime()` Gets the end time of a video clip.
    `int` | `getRotation()` Gets the rotation angle of a video clip.
    `long` | `getStartTime()` Gets the start time of a video clip.
    `int` | `getVideoHeight()` Get the video's height.
    `int` | `getVideoWidth()` Get the video's width.
    `void` | `setDuration(long durationMills)` Sets the display duration of the image.
    `void` | `setEndTime(long endTime)` Sets the end time of a video clip.
    `void` | `setRotation(int rotation)` Sets the rotation angle of a video clip.
    `void` | `setStartTime(long startTime)` Sets the start time of a video clip.

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

      `getClipHeight, getClipWidth, getDisplayMode, getId, getMediaType, getSource, getTransition, setDisplayMode, setId, setMediaType, setSource, setTransition`

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

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

- - ### Method Detail

    - #### getStartTime

          public long getStartTime()

      Gets the start time of a video clip. The start time must be earlier than the end time of the video clip.
      Returns:
        source

    - #### setStartTime

          public void setStartTime(long startTime)

      Sets the start time of a video clip.
      Parameters:
        `startTime` - The start time. Unit: milliseconds.

    - #### getEndTime

          public long getEndTime()

      Gets the end time of a video clip. The end time must be no later than the end time of the video clip.
      Returns:
        source

    - #### setEndTime

          public void setEndTime(long endTime)

      Sets the end time of a video clip.
      Parameters:
        `endTime` - The end time. Unit: milliseconds.

    - #### getRotation

          public int getRotation()

      Gets the rotation angle of a video clip.
      Returns:
        source

    - #### setRotation

          public void setRotation(int rotation)

      Sets the rotation angle of a video clip.
      Parameters:
        `rotation` - Unit: degrees

    - #### getVideoWidth

          public int getVideoWidth()

      Get the video's width. Call after com.aliyun.svideosdk.common.struct.common.AliyunVideoClip.Builder#build()
      Returns:
        mVideoWidth

    - #### getVideoHeight

          public int getVideoHeight()

      Get the video's height. Call after com.aliyun.svideosdk.common.struct.common.AliyunVideoClip.Builder#build()
      Returns:
        mVideoHeigth

    - #### getDuration

          public long getDuration()

      Gets the display duration of the clip.
      Returns:
        The display duration of the clip.

    - #### setDuration

          public void setDuration(long durationMills)

      Sets the display duration of the image.
      Parameters:
        `durationMills` - Unit: milliseconds.