Interface CameraController


  • public interface CameraController
    • Method Detail

      • 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.
      • startPreview

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

        void startPreview​(android.view.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()
      • 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()
      • 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

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