VideoCapture

public final class VideoCapture
extends UseCase

java.lang.Object
   ↳ androidx.camera.core.UseCase
     ↳ androidx.camera.video.VideoCapture<T extends androidx.camera.video.VideoOutput>


A use case that provides camera stream suitable for video application.

VideoCapture is used to create a camera stream suitable for a video application such as recording a high-quality video to a file. The camera stream is used by the extended classes of VideoOutput. withOutput(VideoOutput) can be used to create a VideoCapture instance associated with the given VideoOutput. Take Recorder as an example,

VideoCapture<Recorder> videoCapture
                 = VideoCapture.withOutput(new Recorder.Builder().build());
 
Then getOutput() can retrieve the Recorder instance.

Summary

Public methods

T getOutput()

Gets the VideoOutput associated with this VideoCapture.

String toString()
static <T extends VideoOutput> VideoCapture<T> withOutput(T videoOutput)

Create a VideoCapture associated with the given VideoOutput.

Inherited methods

Public methods

getOutput

public T getOutput ()

Gets the VideoOutput associated with this VideoCapture.

Returns
T the value provided to withOutput(VideoOutput) used to create this VideoCapture.

toString

public String toString ()