VideoWriter

class VideoWriter constructor(videoSettings: MiSnapSettings.Camera.VideoRecord, outputPath: String)

Deprecated

Use CameraView/MiSnapView video recording capabilities instead

A one time use class for saving videos.

Throws Exception if there was an error while instantiating.

NOTE: if using this class for low level video recording capabilities, it is necessary to customize the MiSnapSettings.Camera.VideoRecord to match the desired video resolution in the correct orientation by using the MiSnapSettings.Camera.VideoRecord.videoResolution property.

Constructors

Link copied to clipboard
constructor(videoSettings: MiSnapSettings.Camera.VideoRecord, outputPath: String)

Functions

Link copied to clipboard
fun release()

Releases all the video encoding resources allocated. This is automatically called when the stream is finished, and so does not need to be called manually unless disposing of the instance without writing any video.

Link copied to clipboard
fun writeVideo(endOfStream: Boolean)

Triggers a poll of the inputSurface to save any new frames to the video.

Properties

Link copied to clipboard

The input surface that is polled for video frame data.

Link copied to clipboard
@get:JvmName(name = "hasStreamFinished")
var streamFinished: Boolean

Flag for if the video stream has finished, subsequent attempts to write to a finished video will do nothing.