AliyunIExporter

@protocol AliyunIExporter <NSObject>
/****
 Sets a watermark.
 
 @param waterMark The watermark image.
 @return
 ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
 ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
 ALIVC_SVIDEO_EDITOR_FILE_NOT_EXIST if the image file does not exist.
 ALIVC_SVIDEO_EDITOR_VIEW_TYPE_NOT_SUPPORTED if the image type is not supported.
 */
- (int)setWaterMark:(AliyunEffectImage *)waterMark;

/****
 Sets a watermark to the end of the video.
 
 @param waterMark The watermark image.
 @return
 ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
 ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
 ALIVC_SVIDEO_EDITOR_FILE_NOT_EXIST if the image file does not exist.
 ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
 ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION
 */
- (int)setTailWaterMark:(AliyunEffectImage *)waterMark;

/****
 Sets the encoding mode.
 
 Hardware encoding is required in iOS.
 @param encodeMode The encoding mode. See the codecType in AliyunVideoParam.
 */
- (void)setEncodeMode:(AliyunVideoCodecType)encodeMode;

/****
 Sets the video output parameter.
 
 @param videoParam The output parameter.
 */
- (void)setVideoParam:(AliyunVideoParam *)videoParam;

/****
 Sets whether to cancel exporting when the app is set to run in the background.
 
 YES indicates cancel exporting. No indicates pause exporting. Default is NO.
 @param flag
 */
- (void)setCancelExportInResignActive:(BOOL)flag;

/****
 Starts exporting.
 
 @param outputPath The video output path. 
 @return
 ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
 ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
 ALIVC_COMMON_INVALID_PARAM if the parameter setting is incorrect.
 ALIVC_SVIDEO_EDITOR_INIT_FAILED if an error occurred during component initialization.
 ALIVC_FRAMEWORK_AUDIO_PROCESS_CREATE_FAILED
 ALIVC_FRAMEWORK_AUDIO_PROCESS_RE_CREATE
 ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
 */
- (int)startExport:(NSString *)outputPath;

/****
 Pauses exporting.
 
 @return
 ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
 ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
 */
- (int)pauseExport;

/****
 Resumes exporting.
 
 @return
 ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
 ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
 */
- (int)resumeExport;

/****
 Cancels exporting.
 
 @return
 ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
 ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
 */
-(int)cancelExport;

@optional
/****
 Adds a watermark to the end of the video.
 
 @param image The watermark image.
 @return The watermark id or an error code.
 */
- (int)setTailWaterMark:(UIImage *)image frame:(CGRect)frame duration:(CGFloat)duration __deprecated_msg("use setWaterMark:(AliyunEffectImage *)waterMark in AliyunEditor");
@end

Undocumented

  • * Sets a watermark.

    Declaration

    Objective-C

    - (int)setWaterMark:(AliyunEffectImage *)waterMark;

    Parameters

    waterMark

    The watermark image. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the exporter’s state is incorrect. ALIVC_SVIDEO_EDITOR_FILE_NOT_EXIST if the image file does not exist. ALIVC_SVIDEO_EDITOR_VIEW_TYPE_NOT_SUPPORTED if the image type is not supported.

  • * Sets a watermark to the end of the video.

    Declaration

    Objective-C

    - (int)setTailWaterMark:(AliyunEffectImage *)waterMark;

    Parameters

    waterMark

    The watermark image. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the exporter’s state is incorrect. ALIVC_SVIDEO_EDITOR_FILE_NOT_EXIST if the image file does not exist. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION

  • * Sets the encoding mode.

    Hardware encoding is required in iOS.

    Declaration

    Objective-C

    - (void)setEncodeMode:(AliyunVideoCodecType)encodeMode;

    Parameters

    encodeMode

    The encoding mode. See the codecType in AliyunVideoParam.

  • * Sets the video output parameter.

    Declaration

    Objective-C

    - (void)setVideoParam:(AliyunVideoParam *)videoParam;

    Parameters

    videoParam

    The output parameter.

  • * Sets whether to cancel exporting when the app is set to run in the background.

    YES indicates cancel exporting. No indicates pause exporting. Default is NO.

    Declaration

    Objective-C

    - (void)setCancelExportInResignActive:(BOOL)flag;

    Parameters

    flag

  • * Starts exporting.

    Declaration

    Objective-C

    - (int)startExport:(NSString *)outputPath;

    Parameters

    outputPath

    The video output path. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the exporter’s state is incorrect. ALIVC_COMMON_INVALID_PARAM if the parameter setting is incorrect. ALIVC_SVIDEO_EDITOR_INIT_FAILED if an error occurred during component initialization. ALIVC_FRAMEWORK_AUDIO_PROCESS_CREATE_FAILED ALIVC_FRAMEWORK_AUDIO_PROCESS_RE_CREATE ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID

  • * Pauses exporting.

    @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the exporter’s state is incorrect.

    Declaration

    Objective-C

    - (int)pauseExport;
  • * Resumes exporting.

    @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the exporter’s state is incorrect.

    Declaration

    Objective-C

    - (int)resumeExport;
  • * Cancels exporting.

    @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the exporter’s state is incorrect.

    Declaration

    Objective-C

    - (int)cancelExport;
  • Deprecated

    use setWaterMark:(AliyunEffectImage *)waterMark in AliyunEditor

    * Adds a watermark to the end of the video.

    Declaration

    Objective-C

    - (int)setTailWaterMark:(UIImage *)image
                      frame:(CGRect)frame
                   duration:(CGFloat)duration;

    Parameters

    image

    The watermark image.

    Return Value

    The watermark id or an error code.