com.aliyun.svideosdk.mixrecorder

## Interface AliyunIMixComposer

-     public interface AliyunIMixComposer

  An interface that defines video tracks. Multiple video streams can be added to a video track.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `cancel()` Cancels the composition process.
    `AliyunMixTrack` | `createTrack(AliyunMixTrackLayoutParam layoutParam)` Creates a video track.
    `int` | `pause()` Pauses the composition process.
    `int` | `release()` Releases resources.
    `int` | `resume()` Resumes the composition process.
    `int` | `setBackgroundColor(int color)` Set the background color Added in v3.19.0
    `int` | `setBackgroundImage(Bitmap bitmap, int displayMode)` Set the background image with bitmap Added in v3.19.0
    `int` | `setOutputParam(AliyunMixOutputParam param)` Sets output parameters.
    `int` | `start(AliyunMixCallback callback)` Starts the composition process.

- - ### Method Detail

    - #### createTrack

          AliyunMixTrack createTrack(AliyunMixTrackLayoutParam layoutParam)

      Creates a video track.
      Parameters:
        `layoutParam` - The layout parameter. This parameter indicates the screen areas that display the video streams on the track. For more information, see `AliyunMixTrackLayoutParam`.
      Returns:
        A video track object.
      See Also:
        `AliyunMixTrackLayoutParam`

    - #### setOutputParam

          int setOutputParam(AliyunMixOutputParam param)

      Sets output parameters. This method must be invoked before `start(AliyunMixCallback)`. Otherwise, the composition process cannot be started.
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful or an error code if the invocation fails.
      See Also:
        `AliyunMixOutputParam`

    - #### start

          int start(AliyunMixCallback callback)

      Starts the composition process.
      Parameters:
        `callback` - The callback.
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful or an error code if the invocation fails.

    - #### pause

          int pause()

      Pauses the composition process.
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful or an error code if the invocation fails.

    - #### resume

          int resume()

      Resumes the composition process.
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful or an error code if the invocation fails.

    - #### cancel

          int cancel()

      Cancels the composition process.
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful or an error code if the invocation fails.

    - #### release

          int release()

      Releases resources.
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful or an error code if the invocation fails.

    - #### setBackgroundColor

          int setBackgroundColor(int color)

      Set the background color Added in v3.19.0
      Parameters:
        `color` -
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful or an error code if the invocation fails.

    - #### setBackgroundImage

          int setBackgroundImage(Bitmap bitmap,
                                 int displayMode)

      Set the background image with bitmap Added in v3.19.0
      Parameters:
        `bitmap` -
        `displayMode` - 0：crop 1：fill 2：exact fit
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful or an error code if the invocation fails.