-
public class VideoCapture
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public @interfaceVideoCapture.VideoCaptureErrorDescribes the error that occurred during video capture operations.
This is a parameter sent to the error callback functions set in listeners such as .
See message parameter in onError callback or log for more details.
public interfaceVideoCapture.OnVideoCaptureCallbackListener containing callbacks for video file I/O events.
public classVideoCapture.OutputFileResultsInfo about the saved video file.
public final classVideoCapture.OutputFileOptionsOptions for saving newly captured video.
this class is used to configure save location and other options. Save location can beeither a File, MediaStore. The metadata will bestored with the saved video.
-
Field Summary
Fields Modifier and Type Field Description public final static intERROR_UNKNOWNpublic final static intERROR_ENCODERpublic final static intERROR_MUXERpublic final static intERROR_RECORDING_IN_PROGRESSpublic final static intERROR_FILE_IOpublic final static intERROR_INVALID_CAMERApublic final static intERROR_RECORDING_TOO_SHORTpublic final AtomicBooleanmIsFirstVideoKeyFrameWritepublic final AtomicBooleanmIsFirstAudioSampleWrite
-
Method Summary
Modifier and Type Method Description booleanisRecording()voidstartRecording(@NonNull() VideoCapture.OutputFileOptions outputFileOptions, @NonNull() VideoCapture.OnVideoCaptureCallback callback)Starts recording video, which continues until stopRecording iscalled. voidstopRecording()Stops recording video, this must be called after iscalled. voidrelease()-
-
Method Detail
-
isRecording
boolean isRecording()
-
startRecording
@RequiresPermission(value = Manifest.permission.RECORD_AUDIO) void startRecording(@NonNull() VideoCapture.OutputFileOptions outputFileOptions, @NonNull() VideoCapture.OnVideoCaptureCallback callback)
Starts recording video, which continues until stopRecording iscalled.
StartRecording() is asynchronous. User needs to check if any error occurs by setting the onError.
- Parameters:
outputFileOptions- Location to save the video capturecallback- Callback for when the recorded video saving completion or failure.
-
stopRecording
void stopRecording()
Stops recording video, this must be called after iscalled.
stopRecording() is asynchronous API. User need to check if or onError be calledbefore startRecording.
-
release
void release()
-
-
-
-