FileOutputOptions.Builder

public static final class FileOutputOptions.Builder
extends Object

java.lang.Object
   ↳ androidx.camera.video.FileOutputOptions.Builder


The builder of the FileOutputOptions object.

Summary

Public constructors

Builder(File file)

Creates a builder of the FileOutputOptions with a file object.

Public methods

FileOutputOptions build()

Builds the FileOutputOptions instance.

FileOutputOptions.Builder setFileSizeLimit(long fileSizeLimitBytes)

Sets the limit for the file length in bytes.

Inherited methods

Public constructors

Builder

public Builder (File file)

Creates a builder of the FileOutputOptions with a file object.

The file object can be created with a path using the File APIs. The path must be seekable and writable.

Parameters
file File: the file object.

See also:

Public methods

build

public FileOutputOptions build ()

Builds the FileOutputOptions instance.

Returns
FileOutputOptions

setFileSizeLimit

public FileOutputOptions.Builder setFileSizeLimit (long fileSizeLimitBytes)

Sets the limit for the file length in bytes.

When used to generate recording, if the specified file size limit is reached while the recording is being recorded, the recording will be finalized with VideoRecordEvent.Finalize.ERROR_FILE_SIZE_LIMIT_REACHED.

If not set, defaults to OutputOptions.FILE_SIZE_UNLIMITED.

Parameters
fileSizeLimitBytes long

Returns
FileOutputOptions.Builder