public final class

VideoCapture.OutputFileOptions.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.camera.core.VideoCapture.OutputFileOptions.Builder

Overview

Builder class for VideoCapture.OutputFileOptions.

Summary

Constructors
publicBuilder(ContentResolver contentResolver, Uri saveCollection, ContentValues contentValues)

Creates options to write captured video to .

publicBuilder(java.io.File file)

Creates options to write captured video to a java.io.File.

publicBuilder(java.io.FileDescriptor fileDescriptor)

Creates options to write captured video to a java.io.FileDescriptor.

Methods
public VideoCapture.OutputFileOptionsbuild()

Builds VideoCapture.OutputFileOptions.

public VideoCapture.OutputFileOptions.BuildersetMetadata(VideoCapture.Metadata metadata)

Sets the metadata to be stored with the saved video.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(java.io.File file)

Creates options to write captured video to a java.io.File.

Parameters:

file: save location of the video.

public Builder(java.io.FileDescriptor fileDescriptor)

Creates options to write captured video to a java.io.FileDescriptor.

Using a FileDescriptor to record a video is only supported for Android 8.0 or above.

Parameters:

fileDescriptor: to save the video.

public Builder(ContentResolver contentResolver, Uri saveCollection, ContentValues contentValues)

Creates options to write captured video to . Example:


 ContentValues contentValues = new ContentValues();
 contentValues.put(MediaStore.MediaColumns.DISPLAY_NAME, "NEW_VIDEO");
 contentValues.put(MediaStore.MediaColumns.MIME_TYPE, "video/mp4");

 OutputFileOptions options = new OutputFileOptions.Builder(
         getContentResolver(),
         MediaStore.Video.Media.EXTERNAL_CONTENT_URI,
         contentValues).build();

 

Parameters:

contentResolver: to access
saveCollection: The URL of the table to insert into.
contentValues: to be included in the created video file.

Methods

Sets the metadata to be stored with the saved video.

Parameters:

metadata: Metadata to be stored with the saved video.

Builds VideoCapture.OutputFileOptions.