CameraFrameOutput
The CameraFrameOutput streams Frames from the Camera synchronously, aka "Frame Processing".
Every Frame must be disposed as soon as possible, see Frame's lifetime contract.
val frameOutput = VisionCamera.createFrameOutput(FrameOutputOptions(pixelFormat = TargetVideoPixelFormat.YUV))
frameOutput.setOnFrameCallback { frame ->
frame.use {
// processing...
}
}Content copied to clipboard
See also
Properties
Link copied to clipboard
The resolution this output is currently streaming at, or null if it is not connected yet.
Link copied to clipboard
The orientation of the content produced by this output.
Link copied to clipboard
The NativeThread the Frame callbacks run on.
Functions
Link copied to clipboard
Same as dispose, to use a CameraOutput with use { }.
Link copied to clipboard
Link copied to clipboard
Sets the callback called when a Frame has been dropped, often because the Frame callback takes longer than a frame interval, or removes it with null.