com.aliyun.svideosdk.recorder

## Interface AliyunIRecorder

-     public interface AliyunIRecorder

  An interface for video recording.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `addImage(EffectImage effctImage)` Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
    `int` | `addPaster(EffectPaster effectPaster)` Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
    `int` | `addPaster(EffectPaster effectPaster, float sx, float sy, float sw, float sh, float rotation, boolean flip)` Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
    `int` | `applyAnimationFilter(EffectFilter effectFilter)` Applies an animated filter.
    `int` | `applyBackgroundMusic(EffectStream effectStream)` Added in v3.27.0 Sets the background music during recording.
    `int` | `applyFilter(EffectFilter effectFilter)` Applies a filter.
    `void` | `cancelRecording()` Cancels recording.
    `void` | `destroy()` Deprecated. in v3.27.0, use `release()` instead.
    `int` | `finishRecording()` Stops recording and starts the composition process.
    `Uri` | `finishRecordingForEdit()` Stops recording and saves information about recorded clips into a JSON file.
    `AliyunLogInfo` | `getAliyunLogInfo()` Gets log information.
    `int` | `getBeautyLevel()` Gets the beauty level.
    `int` | `getCameraCount()` Gets the number of cameras.
    `AliyunIClipManager` | `getClipManager()` Gets the clip manager.
    `float` | `getCurrentExposureCompensationRatio()` Gets the current exposure level.
    `AliyunIRecordPasterManager` | `getPasterManager()` Get sticker manager interface
    `java.util.List<Camera.Size>` | `getSupportedPictureSize()` Gets the picture sizes supported by the camera.
    `java.util.SortedSet<Size>` | `getSupportedPictureSizes()`
    `void` | `needFaceTrackInternal(boolean need)` Sets whether to enable facial recognition.
    `void` | `release()` Releases resources.
    `void` | `removeAnimationFilter(EffectFilter effctFilter)` Removes an animated filter.
    `int` | `removeBackgroundMusic()` remove the background music.
    `int` | `removeFilter()` Added in v3.27.0 Remove a filter.
    `void` | `removeImage(EffectImage effctImage)` Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
    `void` | `removePaster(EffectPaster effectPaster)` Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
    `int` | `resizePreviewSize(int width, int height)` Sets the size of the surface view.
    `void` | `setBeautyLevel(int level)` Sets the beauty level.
    `void` | `setBeautyStatus(boolean on)` Deprecated. in v3.27.0, use`setBeautyLevel(int)` instead.
    `void` | `setCamera(CameraType camera)` Sets the camera during preview.
    `void` | `setCameraCaptureDataMode(int captureDataMode)` Sets the data capture method during preview.
    `void` | `setCameraParam(CameraParam cameraParam)` Sets camera parameters during preview.
    `void` | `setDisplayView(SurfaceView displayView)` Sets the `SurfaceView` during preview.
    `int` | `setEffectView(float xRatio, float yRatio, float widthRatio, float heightRatio, EffectBase effectBase)` Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
    `int` | `setExposureCompensationRatio(float value)` Sets the exposure level.
    `void` | `setFaceDetectRotation(int rotation)` Sets the rotation angle of the gyro sensor when performing facial recognition.
    `int` | `setFaces(float[][] faces)` Sets the coordinate points to define faces.
    `void` | `setFaceTrackInternalMaxFaceCount(int maxFaceCount)` Sets the maximum number of faces that can be recognized at the same time.
    `int` | `setFaceTrackInternalModelPath(java.lang.String path)` Sets the path to facial recognition models.
    `void` | `setFocus(float xRatio, float yRatio)` Sets the focus point.
    `void` | `setFocus(Point point)` Deprecated.
    `void` | `setFocusMode(int mode)` Sets the focus mode.
    `int` | `setGop(int gop)` Deprecated. in v3.27.0, use`setMediaInfo(MediaInfo)` instead.
    `void` | `setIsAutoClearClipVideos(boolean isAutoClear)`
    `boolean` | `setLight(FlashType flashType)` Sets the flash mode.
    `void` | `setMediaInfo(MediaInfo mediaInfo)` Sets the media information during recording.
    `void` | `setMusic(java.lang.String path, long startTimeMills, long durationMills)` Deprecated. in v3.27.0, use`applyBackgroundMusic(EffectStream)` instead.
    `void` | `setMute(boolean isMute)` Sets whether to mute the recording.
    `void` | `setOnAudioCallback(OnAudioCallBack callback)` Sets the callback that outputs audio data in 44.1 kHz 16-bit mono PCM format.
    `void` | `setOnChoosePictureSizeCallBack(OnChoosePictureSizeCallback callback)` Sets the callback that outputs the image resolution.
    `void` | `setOnEncoderInfoCallback(OnEncoderInfoCallback callback)` Modified in v3.27.0 : setEncoderInfoCallback -> setOnEncoderInfoCallback Sets the callback that outputs encoder parameters.
    `void` | `setOnFaceDetectInfoListener(OnFaceDetectInfoListener listener)` Sets the callback that outputs facial recognition data.
    `void` | `setOnFrameCallback(OnFrameCallback callback)` Sets the callback that outputs frame data.
    `void` | `setOnRecordCallback(OnRecordCallback callback)` Modified in v3.27.0 : setRecordCallback -> setOnRecordCallback Sets the recording callback.
    `void` | `setOnTextureIdCallback(OnTextureIdCallback callback)` Sets the callback that outputs the texture on every frame.
    `int` | `setOutputPath(java.lang.String path)` Sets the output path.
    `int` | `setPictureSize(Camera.Size size)` Sets the picture size.
    `int` | `setPictureSize(Size size)` Sets the picture size.
    `void` | `setRate(float rate)` Sets the recording speed.
    `void` | `setRecordRotation(int rotation)` Sets the rotation angle of the gyro sensor during recording.
    `void` | `setRotation(int rotation)` Sets the rotation angle of the gyro sensor.
    `void` | `setShutterSound(boolean bNeedShutterSound)` Sets whether to turn on the shutter sound.
    `void` | `setTakePicturePreview(boolean bPreviewAfterPicture)` Sets whether to start preview after taking a picture.
    `int` | `setVideoBitrate(int bitrate)` Deprecated. in v3.27.0, use`setMediaInfo(MediaInfo)` instead.
    `int` | `setVideoFlipH(boolean flip)`
    `void` | `setVideoQuality(VideoQuality quality)` Deprecated. in v3.27.0, use`setMediaInfo(MediaInfo)` instead.
    `int` | `setZoom(float rate)` Sets the zoom level.
    `int` | `startPreview()` Starts preview.
    `int` | `startPreviewAfterTakePicture()` Use this method to start preview after taking a picture.
    `int` | `startRecording()` Starts recording.
    `void` | `stopPreview()` Stops preview.
    `int` | `stopRecording()` Stops recording.
    `int` | `switchCamera()` Switches cameras.
    `FlashType` | `switchLight()` Switches flash modes.
    `void` | `takePhoto(boolean needBitmap)` Deprecated. in v3.27.0, use`takeSnapshot(boolean, OnPictureCallback)` instead. This is an asynchronous method. Call `RecordCallback.onPictureBack(Bitmap)` or `RecordCallback.onPictureDataBack(byte[])` to return the picture.
    `void` | `takePicture(boolean needBitmap)` Deprecated. in v3.27.0, use`takePicture(boolean, OnPictureCallback)` instead. This is an asynchronous method. Call `RecordCallback.onPictureBack(Bitmap)` or `RecordCallback.onPictureDataBack(byte[])` to return the picture.
    `void` | `takePicture(boolean needBitmap, OnPictureCallback pictureCallback)` Added in v3.27.0 Takes a picture that captures no effects.
    `void` | `takeSnapshot(boolean needBitmap, OnPictureCallback pictureCallback)` Added in v3.27.0 Takes a picture that captures all effects.
    `int` | `updateAnimationFilter(EffectFilter effectFilter)` update an animated filter.
    `java.lang.String` | `version()` Gets the SDK version.

- - ### Method Detail

    - #### setMediaInfo

          void setMediaInfo(MediaInfo mediaInfo)

      Sets the media information during recording.
      Parameters:
        `mediaInfo` -
      See Also:
        `MediaInfo`

    - #### getClipManager

          AliyunIClipManager getClipManager()

      Gets the clip manager.
      Returns:
        The clip manager.
      See Also:
        `AliyunIClipManager`

    - #### setOutputPath

          int setOutputPath(java.lang.String path)

      Sets the output path.
      Parameters:
        `path` -

    - #### setVideoQuality

          @Deprecated
          void setVideoQuality(VideoQuality quality)

      Deprecated. in v3.27.0, use`setMediaInfo(MediaInfo)` instead.
      Sets the video quality. This setting affects the video bitrate.
      Parameters:
        `quality` - The quality of the video.
      See Also:
        `VideoQuality`

    - #### setGop

          @Deprecated
          int setGop(int gop)

      Deprecated. in v3.27.0, use`setMediaInfo(MediaInfo)` instead.
      Sets the GOP size in frames, that is, the number of frames between two I-frames. In hardware encoders, the GOP is measured in seconds, that is, the time interval between two I-frames. The acutal GOP is calculated by dividing the GOP size in frames by the frame rate and rounding the result down to the nearest integer. For example, if the frame rate is set to 25 FPS and this method sets the GOP size to 125 frames. The acutal GOP is 5 seconds, that is, one I-frame per 5 seconds. If the GOP size in frames is smaller than the frame rate value, the acutal GOP is 1.
      Parameters:
        `gop` - Valid values: [0, 9,000] When this parameter is set to 0, full I-frames may be possible depending on the device type.
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful. `AliyunErrorCode.ERROR_INVALID_ARGUMENTS` if the GOP parameter is invalid.

    - #### setVideoBitrate

          @Deprecated
          int setVideoBitrate(int bitrate)

      Deprecated. in v3.27.0, use`setMediaInfo(MediaInfo)` instead.
      Sets the video bitrate. Valid values: [200, 20,000]. Unit: kbit/s. If the bitrate exceeds the recommended maximum value, the bitrate specified in the input parameter may not take effect in some hardware encoders. For example, for a resolution of 1280 x 720 pixels, a bitrate of 4 Mbit/s should be enough. If the bitrate is set to 10 Mbit/s, the acutal bitrate may still be 4 Mbit/s depending on the encoder.
      Parameters:
        `bitrate` -
      Returns:
        0 if the invocation is successful or an error code if the invocation fails. `AliyunErrorCode.ERROR_INVALID_ARGUMENTS` if the specified bitrate is invalid.

    - #### setCamera

          void setCamera(CameraType camera)

      Sets the camera during preview. This setting only takes effect when the preview is started for the first time. Use `switchCamera()` to switch cameras.
      Parameters:
        `camera` -
      See Also:
        `CameraType.BACK`, `CameraType.FRONT`

    - #### setDisplayView

          void setDisplayView(SurfaceView displayView)

      Sets the `SurfaceView` during preview.
      Parameters:
        `displayView` -

    - #### setCameraCaptureDataMode

          void setCameraCaptureDataMode(int captureDataMode)

      Sets the data capture method during preview.
      Parameters:
        `captureDataMode` -
      See Also:
        `CameraCaptureDataMode`

    - #### startPreview

          int startPreview()

      Starts preview. It is recommended to call this method in `Activity#onResume()`.

    - #### stopPreview

          void stopPreview()

      Stops preview. It is recommended to call this method in `Activity#onPause()`.

    - #### destroy

          @Deprecated
          void destroy()

      Deprecated. in v3.27.0, use `release()` instead.
      Releases resources.

    - #### release

          void release()

      Releases resources.

      Added in v3.27.0

    - #### addPaster

          @Deprecated
          int addPaster(EffectPaster effectPaster)

      Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
      Adds a face sticker. Face stickers are different from other stickers in that `setRotation(int)` must be invoked to add face stickers. For details about calculating the rotation parameter, see the demo. Use this method to add face stickers only. To add other stickers, call `addPaster(EffectPaster, float, float, float, float, float, boolean)`.
      Parameters:
        `effectPaster` -
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.
      See Also:
        `EffectPaster`

    - #### addPaster

          @Deprecated
          int addPaster(EffectPaster effectPaster,
                                    float sx,
                                    float sy,
                                    float sw,
                                    float sh,
                                    float rotation,
                                    boolean flip)

      Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
      Adds a sticker. `setEffectView(float, float, float, float, EffectBase)` and this method can be used to add multiple effects.
      Parameters:
        `effectPaster` -
        `sx` - The x coordinate of the sticker relative to the video resolution.
        `sy` - The x coordinate of the sticker relative to the video resolution.
        `sw` - The width of the sticker relative to the video resolution.
        `sh` - The height of the sticker relative to the video resolution.
        `rotation` - The rotation angle of the sticker.
        `flip` - Whether to flip the sticker.
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.
      See Also:
        `setEffectView(float, float, float, float, EffectBase)`

    - #### removePaster

          @Deprecated
          void removePaster(EffectPaster effectPaster)

      Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
      Removes a sticker.
      Parameters:
        `effectPaster` -

    - #### getPasterManager

          AliyunIRecordPasterManager getPasterManager()

      Get sticker manager interface

      Added in v3.27.0

      See Also:
        `AliyunIRecordPasterManager`

    - #### addImage

          @Deprecated
          int addImage(EffectImage effctImage)

      Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
      Adds a watermark image. To add a text watermark, use bitmap tools to convert texts into images. Use `setEffectView(float, float, float, float, EffectBase)` to adjust the position of the watermark.
      Parameters:
        `effctImage` -
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### removeImage

          @Deprecated
          void removeImage(EffectImage effctImage)

      Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
      Removes a watermark image.
      Parameters:
        `effctImage` -

    - #### applyFilter

          int applyFilter(EffectFilter effectFilter)

      Applies a filter.
      Parameters:
        `effectFilter` - null indicates remove all filters.
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### removeFilter

          int removeFilter()

      Added in v3.27.0 Remove a filter.

      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### applyAnimationFilter

          int applyAnimationFilter(EffectFilter effectFilter)

      Applies an animated filter. Call `EffectBase.setPath(String)` and use the path of the filter as the input parameter. Alternatively, call `EffectFilter.Builder` to create the filter object.
      Parameters:
        `effectFilter` -
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### updateAnimationFilter

          int updateAnimationFilter(EffectFilter effectFilter)

      update an animated filter. Call `EffectBase.setPath(String)` and use the path of the filter as the input parameter. Alternatively, call `EffectFilter.Builder` to create the filter object.
      Parameters:
        `effectFilter` -
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### removeAnimationFilter

          void removeAnimationFilter(EffectFilter effctFilter)

      Removes an animated filter.
      Parameters:
        `effctFilter` -

    - #### getCameraCount

          int getCameraCount()

      Gets the number of cameras.
      Returns:
        The number of cameras.

    - #### setCameraParam

          void setCameraParam(CameraParam cameraParam)

      Sets camera parameters during preview.
      Parameters:
        `cameraParam` -
      See Also:
        `CameraParam`

    - #### switchCamera

          int switchCamera()

      Switches cameras.
      Returns:
        The id of the camera that is currently in use.

    - #### switchLight

          FlashType switchLight()

      Switches flash modes.
      Returns:
        The current flash mode.
      See Also:
        `FlashType.AUTO`, `FlashType.OFF`, `FlashType.ON`

    - #### setLight

          boolean setLight(FlashType flashType)

      Sets the flash mode.
      Parameters:
        `flashType` -
      Returns:
        true if the invocation is successful or false if the invocation fails.

    - #### setZoom

          int setZoom(float rate)

      Sets the zoom level.
      Parameters:
        `rate` -

    - #### setExposureCompensationRatio

          int setExposureCompensationRatio(float value)

      Sets the exposure level.
      Parameters:
        `value` -

    - #### setFocusMode

          void setFocusMode(int mode)

      Sets the focus mode.
      Parameters:
        `mode` -
      See Also:
        `CameraParam.FOCUS_MODE_CONTINUE`, `CameraParam.FOCUS_MODE_AUTO`

    - #### setMusic

          @Deprecated
          void setMusic(java.lang.String path,
                                    long startTimeMills,
                                    long durationMills)

      Deprecated. in v3.27.0, use`applyBackgroundMusic(EffectStream)` instead.
      Sets the background music during recording.
      Parameters:
        `path` - The path of the music file.
        `startTimeMills` - The music start time. Unit: milliseconds.
        `durationMills` - The duration of the music. Unit: milliseconds.

    - #### applyBackgroundMusic

          int applyBackgroundMusic(EffectStream effectStream)

      Added in v3.27.0 Sets the background music during recording.

      Parameters:
        `effectStream` - The music bean

    - #### removeBackgroundMusic

          int removeBackgroundMusic()

      remove the background music.

      Added in v3.27.0

    - #### setRate

          void setRate(float rate)

      Sets the recording speed.
      Parameters:
        `rate` - Valid values: [0.5, 2.0]

    - #### setMute

          void setMute(boolean isMute)

      Sets whether to mute the recording.
      Parameters:
        `isMute` - Whether to mute the recording.

    - #### setFocus

          @Deprecated
          void setFocus(Point point)

      Deprecated.
      Deprecated. Replaced by `setFocus(float xRatio, float yRatio)` Sets the focus point.
      Parameters:
        `point` -

    - #### setFocus

          void setFocus(float xRatio,
                        float yRatio)

      Sets the focus point. This setting only takes effect when the input parameter of `setFocusMode(int)` is set to `CameraParam.FOCUS_MODE_AUTO`.
      Parameters:
        `xRatio` - The x coordinate of the focus point relative to the surface view.
        `yRatio` - The y coordinate of the focus point relative to the surface view.

    - #### getBeautyLevel

          int getBeautyLevel()

      Gets the beauty level.
      Returns:
        The current beauty level.

    - #### setBeautyLevel

          void setBeautyLevel(int level)

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

    - #### setBeautyStatus

          @Deprecated
          void setBeautyStatus(boolean on)

      Deprecated. in v3.27.0, use`setBeautyLevel(int)` instead.
      Enables or disables beauty mode.
      Parameters:
        `on` - A value of true indicates enable beauty mode. A value of false indicates disable beauty mode.

    - #### startRecording

          int startRecording()

      Starts recording.

    - #### stopRecording

          int stopRecording()

      Stops recording.

    - #### finishRecording

          int finishRecording()

      Stops recording and starts the composition process.

    - #### cancelRecording

          void cancelRecording()

      Cancels recording.

    - #### finishRecordingForEdit

          Uri finishRecordingForEdit()

      Stops recording and saves information about recorded clips into a JSON file.
      Returns:
        The URI of the JSON file.

    - #### setEffectView

          @Deprecated
          int setEffectView(float xRatio,
                                        float yRatio,
                                        float widthRatio,
                                        float heightRatio,
                                        EffectBase effectBase)

      Deprecated. in v3.27.0 ，use `getPasterManager()` instead.
      Sets sticker parameters, such as the position and size of the sticker. The size of the sticker must be proportional to the video resolution.
      Parameters:
        `xRatio` - The x coordinate of the sticker relative to the video resolution.
        `yRatio` - The y coordinate of the sticker relative to the video resolution.
        `widthRatio` - The width of the sticker relative to the video resolution.
        `heightRatio` - The height of the sticker relative to the video resolution.
        `effectBase` - The sticker.

    - #### setOnRecordCallback

          void setOnRecordCallback(OnRecordCallback callback)

      Modified in v3.27.0 : setRecordCallback -> setOnRecordCallback Sets the recording callback.
      Parameters:
        `callback` -
      See Also:
        `OnRecordCallback`

    - #### setOnEncoderInfoCallback

          void setOnEncoderInfoCallback(OnEncoderInfoCallback callback)

      Modified in v3.27.0 : setEncoderInfoCallback -> setOnEncoderInfoCallback Sets the callback that outputs encoder parameters.
      Parameters:
        `callback` -
      See Also:
        `OnEncoderInfoCallback`

    - #### setOnFrameCallback

          void setOnFrameCallback(OnFrameCallback callback)

      Sets the callback that outputs frame data.
      Parameters:
        `callback` -
      See Also:
        `OnFrameCallback`

    - #### setOnChoosePictureSizeCallBack

          void setOnChoosePictureSizeCallBack(OnChoosePictureSizeCallback callback)

      Sets the callback that outputs the image resolution.
      Parameters:
        `callback` -

    - #### setOnAudioCallback

          void setOnAudioCallback(OnAudioCallBack callback)

      Sets the callback that outputs audio data in 44.1 kHz 16-bit mono PCM format.
      Parameters:
        `callback` -

    - #### setFaces

          int setFaces(float[][] faces)

      Sets the coordinate points to define faces. Each element of the 2D array indicates the six features of a face.
      Parameters:
        `faces` - Represented by a 2D array of size N*6. point[i][0] => LEFT_EYE_X point[i][1] => LEFT_EYE_Y point[i][2] => RIGHT_EYE_X point[i][3] => RIGHT_EYE_Y point[i][4] => MOUTH_X point[i][5] => MOUTH_Y The above example defines the six features of face i.
      Returns:

    - #### setRotation

          void setRotation(int rotation)

      Sets the rotation angle of the gyro sensor. If the original angle is not one of the following values: 0, 90, 180, and 270, use the following method to determine the rotation angle.

               private int getSensorRotation() {
                    int orientation = orientationDetector.getOrientation();
                    int rotation = 90;
                    if (orientation >= 45 && orientation < 135) {
                        rotation = 180;
                    }
                    if (orientation >= 135 && orientation < 225) {
                        rotation = 270;
                    }
                    if (orientation >= 225 && orientation < 315) {
                        rotation = 0;
                    }
                    if (mCameraType == CameraType.FRONT) {
                        if (rotation != 0) {
                            rotation = 360 - rotation;
                        }
                    }
                    return rotation;
                }

      Parameters:
        `rotation` - Do not use this method to control the angle when performing facial recognition or recording.
      See Also:
        `setFaceDetectRotation(int)`, `setRecordRotation(int)`

    - #### setFaceDetectRotation

          void setFaceDetectRotation(int rotation)

      Sets the rotation angle of the gyro sensor when performing facial recognition. Do not use this method together with setRotation.
      See Also:
        `setRecordRotation(int)`, `setRotation(int)`

    - #### setRecordRotation

          void setRecordRotation(int rotation)

      Sets the rotation angle of the gyro sensor during recording. Do not use this method together with setRotation. Use the following method to determine the rotation angle.

                if (rotation == 90 || rotation == 270) {
                    rotation = (rotation + 90) % 360;
                    if (mAliyunCamera.getCameraInfo().facing == CameraInfo.CAMERA_FACING_BACK) {
                        rotation += 180;
                        rotation %= 360;
                    }
                } else if (rotation == 0 || rotation == 180) {
                    rotation = (rotation + 270) % 360;
                }

      See Also:
        `setRotation(int)`, `setFaceDetectRotation(int)`

    - #### setOnTextureIdCallback

          void setOnTextureIdCallback(OnTextureIdCallback callback)

      Sets the callback that outputs the texture on every frame.
      Parameters:
        `callback` -
      See Also:
        `OnTextureIdCallback`

    - #### setOnFaceDetectInfoListener

          void setOnFaceDetectInfoListener(OnFaceDetectInfoListener listener)

      Sets the callback that outputs facial recognition data. `OnFaceDetectInfoListener.onFaceInfoChange(FaceDetectInfo)` is invoked when changes in facial recognition data are detected.
      Parameters:
        `listener` -

    - #### getCurrentExposureCompensationRatio

          float getCurrentExposureCompensationRatio()

      Gets the current exposure level.
      Returns:
        The current exposure level.

    - #### takePhoto

          @Deprecated
          void takePhoto(boolean needBitmap)

      Deprecated. in v3.27.0, use`takeSnapshot(boolean, OnPictureCallback)` instead. This is an asynchronous method. Call `RecordCallback.onPictureBack(Bitmap)` or `RecordCallback.onPictureDataBack(byte[])` to return the picture.
      Takes a picture that captures all effects.
      Parameters:
        `needBitmap` - Whether to generate a bitmap image.

    - #### takePicture

          @Deprecated
          void takePicture(boolean needBitmap)

      Deprecated. in v3.27.0, use`takePicture(boolean, OnPictureCallback)` instead. This is an asynchronous method. Call `RecordCallback.onPictureBack(Bitmap)` or `RecordCallback.onPictureDataBack(byte[])` to return the picture.
      Takes a picture that captures no effects.
      Parameters:
        `needBitmap` -

    - #### takePicture

          void takePicture(boolean needBitmap,
                           OnPictureCallback pictureCallback)

      Added in v3.27.0 Takes a picture that captures no effects. This is an asynchronous method. Call `OnPictureCallback.onPicture(Bitmap, byte[])` to return the picture.

      Parameters:
        `needBitmap` -

    - #### takeSnapshot

          void takeSnapshot(boolean needBitmap,
                            OnPictureCallback pictureCallback)

      Added in v3.27.0 Takes a picture that captures all effects. This is an asynchronous method. Call `OnPictureCallback.onPicture(Bitmap, byte[])` to return the picture.

      Parameters:
        `needBitmap` - Whether to generate a bitmap image.

    - #### needFaceTrackInternal

          void needFaceTrackInternal(boolean need)

      Sets whether to enable facial recognition.
      Parameters:
        `need` -

    - #### setFaceTrackInternalModelPath

          int setFaceTrackInternalModelPath(java.lang.String path)

      Sets the path to facial recognition models. The path to facial recognition models is required as the input parameter.
      Parameters:
        `path` -
      Returns:
        `AliyunErrorCode.OK` if the invocation is successful. `AliyunErrorCode.ERROR_INVALID_ARGUMENTS` if the invocation fails, the path is invalid, or the model files are damaged.

    - #### setFaceTrackInternalMaxFaceCount

          void setFaceTrackInternalMaxFaceCount(int maxFaceCount)

      Sets the maximum number of faces that can be recognized at the same time. Maximum value: 3.
      Parameters:
        `maxFaceCount` -

    - #### setShutterSound

          void setShutterSound(boolean bNeedShutterSound)

      Sets whether to turn on the shutter sound.
      Parameters:
        `bNeedShutterSound` - true indicates turn on the shutter sound. false indicates turn off the shutter sound. Default value: true.

    - #### setTakePicturePreview

          void setTakePicturePreview(boolean bPreviewAfterPicture)

      Sets whether to start preview after taking a picture.
      Parameters:
        `bPreviewAfterPicture` - true indicates start preview. false indicates load the newly taken picture on the screen. Default value: true.

    - #### version

          java.lang.String version()

      Gets the SDK version.
      Returns:
        The SDK version represented as a string.

    - #### getSupportedPictureSize

          java.util.List<Camera.Size> getSupportedPictureSize()

      Gets the picture sizes supported by the camera.
      Returns:
        The picture sizes represented as a list.

    - #### getSupportedPictureSizes

          java.util.SortedSet<Size> getSupportedPictureSizes()

    - #### setPictureSize

          int setPictureSize(Camera.Size size)

      Sets the picture size.
      Parameters:
        `size` -
      Returns:
        A status code that indicates whether the invocation is successful.

    - #### setPictureSize

          int setPictureSize(Size size)

      Sets the picture size.
      Parameters:
        `size` -
      Returns:
        A status code that indicates whether the invocation is successful.

    - #### getAliyunLogInfo

          AliyunLogInfo getAliyunLogInfo()

      Gets log information.
      Returns:
        The log information.

    - #### startPreviewAfterTakePicture

          int startPreviewAfterTakePicture()

      Use this method to start preview after taking a picture. To set whether to start preview after taking a picture, @see setTakePicturePreview(boolean bNeedPreviewAfterPicture)

    - #### resizePreviewSize

          int resizePreviewSize(int width,
                                int height)

      Sets the size of the surface view.
      Parameters:
        `width` - The width of the surface view.
        `height` - The height of the surface view.
      Returns:

    - #### setVideoFlipH

          int setVideoFlipH(boolean flip)

    - #### setIsAutoClearClipVideos

          void setIsAutoClearClipVideos(boolean isAutoClear)