Interface CameraController


public interface CameraController
  • Method Details

    • addListener

      void addListener(CameraController.Listener listener)
      Adds a listener that will be notified about camera events.
      Parameters:
      listener - The listener.
    • removeListener

      void removeListener(CameraController.Listener listener)
      Removes the specified camera listener.
      Parameters:
      listener - The listener.
    • addSnapshotListener

      void addSnapshotListener(CameraController.SnapshotListener listener)
      Adds a listener that will be notified when a snapshot is taken.
      Parameters:
      listener - The listener.
    • removeSnapshotListener

      void removeSnapshotListener(CameraController.SnapshotListener listener)
      Removes the specified snapshot listener.
      Parameters:
      listener - The listener.
    • addRecordingListener

      void addRecordingListener(CameraController.RecordingListener listener)
      Adds a listener that will be notified about video recording events.
      Parameters:
      listener - The listener.
    • removeRecordingListener

      void removeRecordingListener(CameraController.RecordingListener listener)
      Removes the specified recording listener.
      Parameters:
      listener - The listener.
    • addFpsListener

      void addFpsListener(CameraController.FpsListener listener)
      Adds a listener that will be notified when FPS changes.
      Parameters:
      listener - The listener.
    • removeFpsListener

      void removeFpsListener(CameraController.FpsListener listener)
      Removes the specified FPS listener.
      Parameters:
      listener - The listener.
    • getParameters

      Returns current parameters used by the camera controller.
      Returns:
      The parameters.
      See Also:
    • setParameters

      void setParameters(CameraController.Parameters parameters)
      Sets the parameters for the camera controller.
      Parameters:
      parameters - The parameters.
      See Also:
    • startPreview

      void startPreview(Surface previewSurface)
      Starts the video preview.
      Parameters:
      previewSurface - The surface where the video will be rendered.
      See Also:
    • startPreview

      void startPreview(Surface previewSurface, int fpsLimit)
      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:
    • startRecording

      void startRecording(VideoConfiguration configuration)
      Starts a video recording session based on the specified configuration.
      Parameters:
      configuration - The configuration for video recording.
      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

      List<Size> getSupportedVideoSizes()
      Returns the list of supported video resolutions for the device.
      Returns:
      The list of resolutions.