camera_devstatus_t

The status of the camera device.

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_STATUS_VIDEO_PAUSE   
      CAMERA_STATUS_VIDEO_RESUME   
      CAMERA_STATUS_CAPTURECOMPLETE   
      CAMERA_STATUS_POWERUP   
      CAMERA_STATUS_VIEWFINDER_FREEZE   
      CAMERA_STATUS_VIEWFINDER_UNFREEZE   
      CAMERA_STATUS_LOWLIGHT   
      CAMERA_STATUS_FRAME_DROPPED   
      CAMERA_STATUS_VIEWFINDER_SUSPEND   
      CAMERA_STATUS_VIEWFINDER_UNSUSPEND   
      CAMERA_STATUS_FLASH_LEVEL_CHANGE   
      CAMERA_STATUS_VIDEOLIGHT_LEVEL_CHANGE   
      CAMERA_STATUS_VIDEOLIGHT_CHANGE   
} camera_devstatus_t;

Since:

BlackBerry 10.0.0

Data:

CAMERA_STATUS_UNKNOWN
The status of the camera is not known.
CAMERA_STATUS_DISCONNECTED
No user is connected to the camera.
CAMERA_STATUS_CONNECTED
A user is connected to the camera but the camera is in the idle state.
CAMERA_STATUS_POWERDOWN
The camera is not powered.
This is typical when the device is going into a standby state. The extra uint16_t value can be interpreted as follows:
 Bits 15..8 - Reserved for future use.
 Bits  7..0 - A @camera_powerdownreason_t value indicating the reason.
CAMERA_STATUS_PHOTOVF
The photo viewfinder has started.
CAMERA_STATUS_VIDEOVF
The video viewfinder has started.
CAMERA_STATUS_MM_ERROR
The 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
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
The recording has stopped because there is no more disk space available.
CAMERA_STATUS_CAPTURE_ABORTED
The capture of a still image failed and was aborted.
CAMERA_STATUS_FILESIZE_WARNING
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
The focus changed on the camera.
The extra uint16_t value can be interpreted as follows:
 Bits 15..8 - Reserved for future use.
 Bits  7..0 - A @camera_focusstate_t value indicating the focus state.
You can call the camera_get_focus_state() function to retrieve further details, including the focus region co-ordinates.
CAMERA_STATUS_RESOURCENOTAVAIL
A warning that the camera is about to free resources due to a power-down or arbitration event (resources needed elsewhere).
You should release camera resources by returning buffers, stopping recordings, and stopping viewfinders. 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. The extra uint16_t value can be interpreted as follows:
 Bits 15..8 - Reserved for future use.
 Bits  7..0 - A @camera_powerdownreason_t value indicating the reason.

For more important information related to the triggering of this status event, see Camera resource management and camera_register_resource().

CAMERA_STATUS_VIDEO_PAUSE
Video encoding has been paused.

This pause is due to resources needed for video encoding not being currently available (needed elsewhere). Once resources are available again, CAMERA_STATUS_VIDEO_RESUME status change will be sent. While encoding is in this paused state, there will be a gap in the video file. Your application may choose to stop video encoding when this status event is received.

CAMERA_STATUS_VIDEO_RESUME
Video encoding has resumed again following a pause or has started encoding for the first time.
CAMERA_STATUS_CAPTURECOMPLETE
Still capture has completed and you may now take another picture.

This occurs at the end of a camera_take_photo() or camera_take_burst() cycle, or when camera_stop_burst() is called. This status event is mainly useful when you are capturing photos in non-blocking mode.

CAMERA_STATUS_POWERUP
The camera has been repowered.

This status typically occurs when the device returns from the standby (i.e., CAMERA_STATUS_POWERDOWN) state.

CAMERA_STATUS_VIEWFINDER_FREEZE
For system privacy reasons, the viewfinder has been frozen.

When the viewfinder is frozen, the same frame is continually sent until the CAMERA_STATUS_VIEWFINDER_UNFREEZE status is sent. Currently, only the CAMERA_UNIT_DESKTOP and CAMERA_UNIT_SECONDARY_DESKTOP cameras can be frozen.

CAMERA_STATUS_VIEWFINDER_UNFREEZE
The viewfinder that was previously frozen has resumed the display of frames.

This status can only be received after the CAMERA_STATUS_VIEWFINDER_FREEZE status has been received previously.

CAMERA_STATUS_LOWLIGHT
This indicates that the low-light status has changed.

The least significant bit of the uint16_t value will be 1 when low-light is detected, and 0 when low-light is not detected. All other bits in the uint16_t value are reserved for future use.

Since: BlackBerry 10.1.0

CAMERA_STATUS_FRAME_DROPPED
This indicates that a frame was dropped internally either due to the user taking too long to process a callback frame or due to some internal error.

The uint16_t extra argument contains the least significant bits of the camera_eventkey_t associated with the buffer queue that overflowed.

Since: BlackBerry 10.3.0

CAMERA_STATUS_VIEWFINDER_SUSPEND
For system privacy reasons, the viewfinder has been suspended.

No frames will be delivered while the viewfinder is suspended. Currently, only the CAMERA_UNIT_DESKTOP and CAMERA_UNIT_SECONDARY_DESKTOP cameras may be suspended.

Since: BlackBerry 10.3.0

CAMERA_STATUS_VIEWFINDER_UNSUSPEND
The viewfinder that was previously suspended has resumed the delivery of frames.

This status will only be received after the CAMERA_STATUS_VIEWFINDER_SUSPEND status has been received previously.

Since: BlackBerry 10.3.0

CAMERA_STATUS_FLASH_LEVEL_CHANGE
This indicates that the flash power level has changed from its previous value.

You can call the camera_get_flash_level() function to retrieve additional information.

Since: BlackBerry 10.3.0

CAMERA_STATUS_VIDEOLIGHT_LEVEL_CHANGE
This indicates that the video light power level has changed from its previous value.

You can call the camera_get_videolight_level() function to retrieve additional information.

Since: BlackBerry 10.3.0

CAMERA_STATUS_VIDEOLIGHT_CHANGE
This indicates that the state of the videolight has changed.
The extra uint16_t field in the status event can be interpreted as follows:
 Bits 15..8 - Reserved for future use.
 Bits  7..0 - A @camera_videolightmode_t value indicating the state.

Since: BlackBerry 10.3.0

Library:

libcamapi (For the qcc command, use the -l camapi option to link against this library)

Description:

These values are delivered to your status callback functions or via the camera_get_status_details() function whenever the state of the camera changes.

Some examples of conditions which may trigger a status change include:
  • whether the viewfinder was started
  • whether recording has stopped
  • whether autofocus is searching or has locked
  • whether the camera has powered down
  • whether a capture was aborted due to a fault

Status changes may also convey additional information as a uint16_t value where indicated.

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus