Camera2ApiManager

Created by pedro on 4/03/17.

Class for use surfaceEncoder to buffer encoder. Advantage = you can use all resolutions. Disadvantages = you cant control fps of the stream, because you cant know when the inputSurface was renderer.

Note: you can use opengl for surfaceEncoder to buffer encoder on devices 21 < API 16: https://github.com/google/grafika

Constructors

Link copied to clipboard
constructor(context: Context)

Types

Link copied to clipboard
interface ImageCallback

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var zoom: Float
Link copied to clipboard

Functions

Link copied to clipboard
fun addImageListener(width: Int, height: Int, format: Int, maxImages: Int, autoClose: Boolean, listener: Camera2ApiManager.ImageCallback)
Link copied to clipboard
fun closeCamera(resetSurface: Boolean = true)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun enableFaceDetection(faceDetectorCallback: FaceDetectorCallback?): Boolean
Link copied to clipboard
Link copied to clipboard
fun getCameraIdForFacing(facing: CameraHelper.Facing, cameraManager: CameraManager = this.cameraManager): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onClosed(p0: CameraDevice)
Link copied to clipboard
open override fun onDisconnected(cameraDevice: CameraDevice)
Link copied to clipboard
open override fun onError(cameraDevice: CameraDevice, i: Int)
Link copied to clipboard
open override fun onOpened(cameraDevice: CameraDevice)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun openCameraFacing(selectedCameraFacing: CameraHelper.Facing)

Select camera facing

Link copied to clipboard
Link copied to clipboard
fun openCameraId(cameraId: String)
Link copied to clipboard
Link copied to clipboard
fun prepareCamera(surface: Surface?, fps: Int)
fun prepareCamera(surfaceTexture: SurfaceTexture, width: Int, height: Int, fps: Int)
fun prepareCamera(surfaceTexture: SurfaceTexture, width: Int, height: Int, fps: Int, facing: CameraHelper.Facing)
fun prepareCamera(surfaceTexture: SurfaceTexture, width: Int, height: Int, fps: Int, cameraId: String)
Link copied to clipboard
Link copied to clipboard
fun reOpenCamera(cameraId: String)
Link copied to clipboard
fun setCameraCallbacks(cameraCallbacks: CameraCallbacks?)
Link copied to clipboard
fun setCameraId(cameraId: String)
Link copied to clipboard
fun setFocusDistance(distance: Float)
Link copied to clipboard
fun setOpticalZoom(level: Float)
Link copied to clipboard
fun setZoom(event: MotionEvent, delta: Float = 0.1f)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard