com.aliyun.svideosdk.editor

## Interface AliyunIBaseCompose

- All Known Subinterfaces:
    AliyunICompose, AliyunIVodCompose

      public interface AliyunIBaseCompose

  An interface that enables the composition of multimedia data in the background. This allows users to perform other operations during the composition process.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `cancelCompose()` Cancels the composition process.
    `int` | `compose(java.lang.String config, java.lang.String output, AliyunIComposeCallBack callback)` Starts the composition process.
    `int` | `init(Context context)` Initializer.
    `int` | `pauseCompose()` Pauses the composition process.
    `void` | `release()` Releases resources.
    `int` | `resumeCompose()` Resumes the composition process.
    `void` | `setRenderCallback(AliyunIRenderCallback callback)` Setting render callback, only valid call before compose

- - ### Method Detail

    - #### init

          int init(Context context)

      Initializer.
      Parameters:
        `context` - The context.

    - #### compose

          int compose(java.lang.String config,
                      java.lang.String output,
                      AliyunIComposeCallBack callback)

      Starts the composition process.
      Parameters:
        `config` - The path of the project.json file that contains the composition configuration. * Use `AliyunIImport.generateProjectConfigure()` or `AliyunIRecorder.finishRecordingForEdit()` to get the file path. The path remains the same when `AliyunIEditor` is used.
        `output` - The output path.
        `callback` -
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful. `AliyunErrorCode.ERROR_COMPOSE_STATUS_ERROR` if the object is not initialized, the composition is in progress, or the composition is being canceled. `AliyunErrorCode.ERROR_PARAM_INVALID_COMPOSE` if the config parameter is null, the output parameter is null, or an error occurred while parsing the JSON file.

    - #### pauseCompose

          int pauseCompose()

      Pauses the composition process.
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful. `AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED` `AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR` `AliyunErrorCode.ERROR_COMPOSE_STATUS_ERROR` if the status is incorrect.

    - #### resumeCompose

          int resumeCompose()

      Resumes the composition process.
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful. `AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED` `AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_START_ERROR` `AliyunErrorCode.ERROR_COMPOSE_STATUS_ERROR` if the status is incorrect.

    - #### cancelCompose

          int cancelCompose()

      Cancels the composition process.
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful. `AliyunErrorCode.ERROR_COMPOSE_STATUS_ERROR` if the status is incorrect.

    - #### release

          void release()

      Releases resources.

    - #### setRenderCallback

          void setRenderCallback(AliyunIRenderCallback callback)

      Setting render callback, only valid call before compose