com.aliyun.svideosdk.common.callback.recorder

## Interface OnFrameCallback

-     public interface OnFrameCallback

  An interface that defines callbacks on data capture.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Camera.Size` | `onChoosePreviewSize(java.util.List<Camera.Size> supportedPreviewSizes, Camera.Size preferredPreviewSizeForVideo)` The callback that outputs the selected preview resolution.
    `void` | `onFrameBack(byte[] bytes, int width, int height, Camera.CameraInfo info)` The callback that outputs the frame data captured by camera.
    `void` | `openFailed()` The callback when an error occurred while turning on the camera.

- - ### Method Detail

    - #### onFrameBack

          void onFrameBack(byte[] bytes,
                           int width,
                           int height,
                           Camera.CameraInfo info)

      The callback that outputs the frame data captured by camera.
      Parameters:
        `bytes` - The frame data size.
        `width` - The frame width.
        `height` - The frame height.
        `info` - The camera information.

    - #### onChoosePreviewSize

          Camera.Size onChoosePreviewSize(java.util.List<Camera.Size> supportedPreviewSizes,
                                          Camera.Size preferredPreviewSizeForVideo)

      The callback that outputs the selected preview resolution.
      Parameters:
        `supportedPreviewSizes` - The list of preview resolutions supported by camera.
        `preferredPreviewSizeForVideo` - The recommended preview resolution.
      Returns:
        The selected preview resolution. null indicates that the default resolution selection method is used.

    - #### openFailed

          void openFailed()

      The callback when an error occurred while turning on the camera.