OnVideoSavedCallback
public
interface
OnVideoSavedCallback
androidx.camera.view.video.OnVideoSavedCallback |
Listener containing callbacks for video file I/O events.
Summary
Constants | |
---|---|
int |
ERROR_ENCODER
An error occurred with encoder state, either when trying to change state or when an unexpected state change occurred. |
int |
ERROR_FILE_IO
An error indicating the file saving operations. |
int |
ERROR_INVALID_CAMERA
An error indicating this VideoCapture is not bound to a camera. |
int |
ERROR_MUXER
An error with muxer state such as during creation or when stopping. |
int |
ERROR_RECORDING_IN_PROGRESS
An error indicating start recording was called when video recording is still in progress. |
int |
ERROR_UNKNOWN
An unknown error occurred. |
Public methods | |
---|---|
abstract
void
|
onError(int videoCaptureError, String message, Throwable cause)
Called when an error occurs while attempting to save the video. |
abstract
void
|
onVideoSaved(OutputFileResults outputFileResults)
Called when the video has been successfully saved. |
Constants
ERROR_ENCODER
public static final int ERROR_ENCODER
An error occurred with encoder state, either when trying to change state or when an unexpected state change occurred.
Constant Value: 1 (0x00000001)
ERROR_FILE_IO
public static final int ERROR_FILE_IO
An error indicating the file saving operations.
Constant Value: 4 (0x00000004)
ERROR_INVALID_CAMERA
public static final int ERROR_INVALID_CAMERA
An error indicating this VideoCapture is not bound to a camera.
Constant Value: 5 (0x00000005)
ERROR_MUXER
public static final int ERROR_MUXER
An error with muxer state such as during creation or when stopping.
Constant Value: 2 (0x00000002)
ERROR_RECORDING_IN_PROGRESS
public static final int ERROR_RECORDING_IN_PROGRESS
An error indicating start recording was called when video recording is still in progress.
Constant Value: 3 (0x00000003)
ERROR_UNKNOWN
public static final int ERROR_UNKNOWN
An unknown error occurred.
See message parameter in onError callback or log for more details.
Constant Value: 0 (0x00000000)
Public methods
onError
public abstract void onError (int videoCaptureError, String message, Throwable cause)
Called when an error occurs while attempting to save the video.
Parameters | |
---|---|
videoCaptureError |
int |
message |
String |
cause |
Throwable |
onVideoSaved
public abstract void onVideoSaved (OutputFileResults outputFileResults)
Called when the video has been successfully saved.
Parameters | |
---|---|
outputFileResults |
OutputFileResults |