camera_devstatus_t

The status of the camera.

Synopsis:

#include <camera/camera_api.h>
 
typedef enum {
      CAMERA_STATUS_UNKNOWN = 0   
      CAMERA_STATUS_DISCONNECTED   
      CAMERA_STATUS_CONNECTED   
      CAMERA_STATUS_POWERDOWN   
      CAMERA_STATUS_PHOTOVF   
      CAMERA_STATUS_VIDEOVF   
      CAMERA_STATUS_MM_ERROR   
      CAMERA_STATUS_FILESIZE_ERROR   
      CAMERA_STATUS_NOSPACE_ERROR   
      CAMERA_STATUS_CAPTURE_ABORTED   
      CAMERA_STATUS_FILESIZE_WARNING   
      CAMERA_STATUS_FOCUS_CHANGE   
      CAMERA_STATUS_RESOURCENOTAVAIL      
} camera_devstatus_t;

Data:

CAMERA_STATUS_UNKNOWN
Indicates that the status of the camera is not known.
CAMERA_STATUS_DISCONNECTED
Indicates that no user is connected to the camera.
CAMERA_STATUS_CONNECTED
Indicates that a user is connected to the camera but the camera is in idle state.
CAMERA_STATUS_POWERDOWN
Indicates that camera is not powered.

This is typical when the device is going into a standby state.

CAMERA_STATUS_PHOTOVF
Indicates that photo viewfinder has started.
CAMERA_STATUS_VIDEOVF
Indicates that video viewfinder has started.
CAMERA_STATUS_MM_ERROR
Indicates that recording has stopped due to a memory error or multimedia framework error (used by the video encoder).

The error is received from the encoding graph.

CAMERA_STATUS_FILESIZE_ERROR
Indicates that a file has exceeded the maximum size.

Recordings will stop with this error when the size is getting too close to the limit.

CAMERA_STATUS_NOSPACE_ERROR
Indicates the recording has stopped because there is no more disk space available.
CAMERA_STATUS_CAPTURE_ABORTED
Indicates that the capture of a still image failed and was aborted.
CAMERA_STATUS_FILESIZE_WARNING
Indicates that the user-configurable time-remaining threshold has been exceeded while recording video.

The default is 60 seconds, but you can change the time-remaining threshold using the camera_set_video_filesize_warning() function.

CAMERA_STATUS_FOCUS_CHANGE
Indicates that focus changed on the camera.
CAMERA_STATUS_RESOURCENOTAVAIL
Indicates that a warning that the camera is about to free up resources due to a power-down or arbitration event (resources needed elsewhere).

You should release camera resources, such as stopping recordings, stopping viewfinders, and releasing buffers. This event happens when the device is about to enter standby mode or a higher-priority process needs access to resources that are shared with the camera service.

Library:

libcamapi

Description:

The values are returned in callback functions that you register. The purpose of the callback functions is to provide notifications about changes in the state to the camera service. For example, the changes to the state of the camera service can include:

  • Whether the viewfinder was started.
  • Whether recording was stopped.