FileDescriptorOutputOptions.Builder

public static final class FileDescriptorOutputOptions.Builder
extends Object

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


The builder of the FileDescriptorOutputOptions object.

Summary

Public constructors

Builder(ParcelFileDescriptor fileDescriptor)

Creates a builder of the FileDescriptorOutputOptions with a file descriptor.

Public methods

FileDescriptorOutputOptions build()

Builds the FileDescriptorOutputOptions instance.

FileDescriptorOutputOptions.Builder setFileSizeLimit(long fileSizeLimitBytes)

Sets the limit for the file length in bytes.

Inherited methods

Public constructors

Builder

public Builder (ParcelFileDescriptor fileDescriptor)

Creates a builder of the FileDescriptorOutputOptions with a file descriptor.

Parameters
fileDescriptor ParcelFileDescriptor: the file descriptor to use as the output destination.

Public methods

build

public FileDescriptorOutputOptions build ()

Builds the FileDescriptorOutputOptions instance.

Returns
FileDescriptorOutputOptions

setFileSizeLimit

public FileDescriptorOutputOptions.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
FileDescriptorOutputOptions.Builder