sourceFrom

fun sourceFrom(context: Context, file: File, rotationDegrees: Int = Int.MIN_VALUE, facingFront: Boolean = true, horizontalFieldOfView: Float = DEFAULT_FIELD_OF_VIEW.width, verticalFieldOfView: Float = DEFAULT_FIELD_OF_VIEW.height, options: Set<ImageProcessor.Input.Option> = emptySet()): Source<ImageProcessor>

Creates a video file based Source for ImageProcessor. The returned Source attempts to read and play video as soon as ImageProcessor is attached to it. When ImageProcessor is de-attached, the Source stops the video and releases all resources associated with it.

The rotationDegrees, facingFront, horizontalFieldOfView, verticalFieldOfView and options parameters are optional and can be used to override the defaults when the defaults do not match the provided video file content.

Note: this is intended to be used only for testing purposes, full set of image processing features is supported only when using live camera input Source.