Class CameraDevice


  • public class CameraDevice
    extends java.lang.Object
    This class controls the camera equipped to the Moverio. The control function performs connection with the camera, setting of properties, camera image capture control, and similar functions.
    Since:
    1.0.0
    • Method Detail

      • setPreviewSurface

        public int setPreviewSurface​(android.view.Surface surface)
        By registering an instance of the Surface for displaying a preview of the camera image, the camera image can be displayed on the Surface. An instance of Surface can only be registered before CameraDevice#startCapture is executed. If an instance of Surface or SurfaceHolder has already been registered, or after CameraDevice#startCapture has been executed, it will return an error. The instance will be released when either CameraManager#close or CameraManager#release is executed.
        Returns:
        0: success, -1: fail
        Since:
        1.2.0
      • setCaptureDataCallback

        public int setCaptureDataCallback​(CaptureDataCallback callback)
        By registering an instance of CaptureDataCallback2, the capture data can be received in byte array format. An instance of CaptureDataCallback can only be registered before CameraDevice#startCapture is executed. If an instance of CaptureDataCallback or CaptureDataCallback2 has already been registered, or after startCapture has been executed, it will return an error. The instance will be released when either close or release is executed.
        Returns:
        0: success, -1: fail
        Since:
        1.2.0
      • setCaptureDataCallback

        public int setCaptureDataCallback​(CaptureDataCallback2 callback)
        By registering an instance of CaptureDataCallback2, the capture data can be received in ByteBuffer format. An instance of CaptureDataCallback2 can only be registered before CameraDevice#startCapture is executed. If an instance of CaptureDataCallback or CaptureDataCallback2 has already been registered, or after CameraDevice#startCapture has been executed, it will return an error. The instance will be released when either CameraManager#close or CameraManager#release is executed.
        Returns:
        0: success, -1: fail
        Since:
        1.2.0
      • startCapture

        public int startCapture()
        Starts camera image capturing.
        Returns:
        0: success, -1: fail
        Since:
        1.0.0
      • stopCapture

        public void stopCapture()
        Stops camera image capturing.
        Since:
        1.0.0
      • setProperty

        public int setProperty​(CameraProperty property)
        Sets the camera properties.
        Parameters:
        property - Camera properties
        Returns:
        0: success, -1: fail
        Since:
        1.0.0
      • getProperty

        public CameraProperty getProperty()
        Gets the camera properties.
        Returns:
        CameraProperty instance: success, null: fail
        Since:
        1.0.0
      • startPreview

        public int startPreview()
        Starts preview display.
        Returns:
        0: success, -1: fail
        Since:
        1.0.0
      • stopPreview

        public void stopPreview()
        Stops preview display.
        Since:
        1.0.0
      • takePicture

        public int takePicture​(java.io.File file)
        Captures still images.
        Parameters:
        file - File class instance indicating the save destination of still images
        Returns:
        0: success, -1: fail
        Since:
        1.0.0
      • startRecord

        public int startRecord​(java.io.File file)
        Starts video recording.
        Parameters:
        file - File class instance indicating the save destination of video images
        Returns:
        0: success, -1: fail
        Since:
        1.0.0
      • stopRecord

        public void stopRecord()
        Stops video recording.
        Since:
        1.0.0