Interface CameraController
public interface CameraController
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
This class is used to store information about an error occurred in the camera controller.static interface
This class can be used to listen for FPS change events.static interface
This class can be used to listen for camera controller events.static class
This class contains the parameters that can be used to configure the camera controller.static interface
This class can be used to listen for recording events.static enum
A reason for stopping video recording.static interface
This class can be used to listen for snapshot events. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFpsListener
(CameraController.FpsListener listener) Adds a listener that will be notified when FPS changes.void
addListener
(CameraController.Listener listener) Adds a listener that will be notified about camera events.void
Adds a listener that will be notified about video recording events.void
Adds a listener that will be notified when a snapshot is taken.int
long
Returns current parameters used by the camera controller.Returns the list of supported video resolutions for the device.boolean
void
Removes the specified FPS listener.void
removeListener
(CameraController.Listener listener) Removes the specified camera listener.void
Removes the specified recording listener.void
Removes the specified snapshot listener.void
setParameters
(CameraController.Parameters parameters) Sets the parameters for the camera controller.void
startPreview
(Surface previewSurface) Starts the video preview.void
startPreview
(Surface previewSurface, int fpsLimit) Starts the video preview.void
startRecording
(VideoConfiguration configuration) Starts a video recording session based on the specified configuration.void
Stops the video preview.void
Stops current video recording session.void
Creates a new snapshot (image) and a new associated library item.
-
Method Details
-
getParameters
CameraController.Parameters getParameters()Returns current parameters used by the camera controller.- Returns:
- The parameters.
- See Also:
-
startPreview
Starts the video preview.- Parameters:
previewSurface
- The surface where the video will be rendered.- See Also:
-
startPreview
Starts the video preview.- Parameters:
previewSurface
- The surface where the video will be rendered.fpsLimit
- The maximum number of frames rendered to the surface per second (must be positive).- See Also:
-
stopPreview
void stopPreview()Stops the video preview.- See Also:
-
stopRecording
void stopRecording()Stops current video recording session.- See Also:
-
isRecording
boolean isRecording()- Returns:
- True if a recording session is in progress, false otherwise.
- See Also:
-
getCurrentFragmentDuration
int getCurrentFragmentDuration()- Returns:
- Current duration of the fragment being recorded or 0 if recording is stopped.
-
getCurrentFragmentSize
long getCurrentFragmentSize()- Returns:
- Current size in bytes of the fragment being recorded or 0 if recording is stopped.
-
takeSnapshot
void takeSnapshot()Creates a new snapshot (image) and a new associated library item. -
getSupportedVideoSizes
Returns the list of supported video resolutions for the device.- Returns:
- The list of resolutions.