Camera

An instance of quick access to the camera is provided, an interface for previewing data is obtained, method of managing the life cycle of the camera is encapsulated, and the monitoring of the camera.

Description of functional types

CameraManager

The main methods of operating the camera

Description of Member Function

CameraManager addPreviewCallbackWithBuffer(PreviewCallback callback)

Add preview data callback

Parameter

Return

Current Object

Exception

None

CameraManager removePreviewCallbackWithBuffer(PreviewCallback callback)

Remove Preview Data Callback

Parameter

Return

Current Object

Exception

None

CameraManager getInstance(int cameraId)

Get camera instance

Parameter

Return

Current Object

Exception

None

CameraManager setDisplayOrientation(int degree)

Set Preview Degree, 0/90/180/270 selectable

Parameter

Return

Current Object

Exception

None

CameraManager setPreviewTexture(SurfaceTexture texture)

Set Preview Texture

Parameter

Return

Current Object

Exception

None

List getSupportedPreviewSizes()

Get the List of Supported Preview Sizes

Parameter

None

Return

Exception

None

void initParameters(int width, int height, int degree, SurfaceTexture surfaceTexture)

Camera Initialization

Parameter

Return

None

Exception

None

void openCamera(Context context)

Open Camera

Parameter

Return

None

Exception

None

void releaseCamera()

Release Camera

Parameter

None

Return

None

Exception

None

void startPreview()

Start Camera Preview

Parameter

None

Return

None

Exception

None

void stopPreview()

Stop Camera Preview

Parameter

None

Return

None

Exception

None

Description of Entities

None

Description of functional types

RgbAndIrCameraManager

The main methods to operate the camera in order to output video stream (combined RGB and IR).

Description of Member Function

void addPreviewCallbackWithBuffer(IRgbAndIrPreviewCallback callback)

Add preview data callback

Parameter

Return

None

Exception

None

void removePreviewCallbackWithBuffer(PreviewCallback callback)

Remove preview data callback

Parameter

Return

None

Exception

None

RgbAndIrCameraManager getInstance()

Get camera instance

Parameter

None

Return

Current object

Exception

None

List getSupportedPreviewSizes(CameraType cameraType)

Get the preview size supported by the camera

Parameter

Return

Exception

None

void initParameters(int width, int height, int degree,SurfaceTexture irSurfaceTexture, SurfaceTexture rgbSurfaceTexture, CameraType cameraType)

Camera Initialization

Parameter

Return

None

Exception

None

void openCamera(Context context,CameraType cameraType)

Open camera

Parameter

Return

None

Exception

None

void releaseCamera(CameraType cameraType)

Release camera

Parameter

Return

None

Exception

None

void startPreview(CameraType cameraType)

Start camera preview

Parameter

Return

None

Exception

None

void stopPreview(CameraType cameraType)

Stop camera preview

Parameter

Return

None

Exception

None

void resetPreviewSize(ScaleManager.Size size,CameraType cameraType)

reset the preview size supported by the camera

Parameter

Return

None

Exception

None

Description of Entities

CameraType

Parameter Description

最終更新