summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2016-08-25 18:27:55 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2016-08-26 15:03:38 +0900
commit6cdbee63b5d633e5b6b7623c8d5191d35b0dc205 (patch)
tree28fdb997f670715a46bacb62f020838e151acc03
parent51649f382ee361004dd4493d0fffb23451b100ef (diff)
downloadcamera-6cdbee63b5d633e5b6b7623c8d5191d35b0dc205.tar.gz
camera-6cdbee63b5d633e5b6b7623c8d5191d35b0dc205.tar.bz2
camera-6cdbee63b5d633e5b6b7623c8d5191d35b0dc205.zip
Change-Id: Ib9a82bab0f4b7acc1abba22f122069a3f72a1b90 Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r--include/camera.h139
-rw-r--r--include/camera_private.h1
-rw-r--r--packaging/capi-media-camera.spec2
-rw-r--r--src/camera.c198
-rw-r--r--test/camera_test.c88
5 files changed, 341 insertions, 87 deletions
diff --git a/include/camera.h b/include/camera.h
index 713581a..ecff8a7 100644
--- a/include/camera.h
+++ b/include/camera.h
@@ -58,6 +58,7 @@ typedef enum {
CAMERA_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< The access to the resources can not be granted*/
CAMERA_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< The feature is not supported */
CAMERA_ERROR_RESOURCE_CONFLICT = CAMERA_ERROR_CLASS | 0x0d, /**< Blocked by resource conflict (Since 3.0) */
+ CAMERA_ERROR_SERVICE_DISCONNECTED = CAMERA_ERROR_CLASS | 0x0e, /**< Socket connection lost (Since 3.0) */
} camera_error_e;
/**
@@ -761,6 +762,7 @@ int camera_create(camera_device_e device, camera_h *camera);
* @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @post If it succeeds, the camera attributes and settings will be reset.
*
@@ -805,6 +807,7 @@ int camera_destroy(camera_h camera);
* @retval #CAMERA_ERROR_DEVICE_NOT_FOUND No camera device
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_CAPTURED.\n
* You must set the display handle. \n
* If needed, modify preview FPS(camera_attr_set_preview_fps()),
@@ -841,6 +844,7 @@ int camera_start_preview(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
* @post The camera state will be #CAMERA_STATE_CREATED.
* @see camera_start_preview()
@@ -871,6 +875,7 @@ int camera_stop_preview(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW. \n
* If needed, modify capture resolution(camera_set_capture_resolution()),
* capture format(camera_set_capture_format()), or image quality(camera_attr_set_image_quality()).
@@ -914,6 +919,7 @@ int camera_start_capture(camera_h camera, camera_capturing_cb capturing_cb, came
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post If it succeeds the camera state will be #CAMERA_STATE_CAPTURED.
*
* @see camera_start_preview()
@@ -938,6 +944,7 @@ int camera_start_continuous_capture(camera_h camera, int count, int interval, ca
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
*
* @see camera_start_continuous_capture()
@@ -955,6 +962,7 @@ int camera_stop_continuous_capture(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_create()
* @see camera_start_preview()
* @see camera_stop_preview()
@@ -978,6 +986,7 @@ int camera_get_state(camera_h camera, camera_state_e *state);
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
* @post The camera focus state will be #CAMERA_FOCUS_STATE_ONGOING.
*
@@ -1001,6 +1010,7 @@ int camera_start_focusing(camera_h camera, bool continuous);
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
*
* @see camera_start_focusing()
@@ -1024,6 +1034,7 @@ int camera_cancel_focusing(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
*
* @see camera_start_preview()
@@ -1047,6 +1058,7 @@ int camera_set_display(camera_h camera, camera_display_type_e type, camera_displ
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
*
* @see camera_start_preview()
@@ -1067,6 +1079,7 @@ int camera_set_preview_resolution(camera_h camera, int width, int height);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_preview_resolution()
* @see camera_foreach_supported_preview_resolution()
*/
@@ -1085,6 +1098,7 @@ int camera_get_preview_resolution(camera_h camera, int *width, int *height);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_preview_resolution()
* @see camera_foreach_supported_preview_resolution()
*/
@@ -1111,6 +1125,7 @@ int camera_get_recommended_preview_resolution(camera_h camera, int *width, int *
* @retval #CAMERA_ERROR_INVALID_OPERATION Not supported this feature
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be #CAMERA_STATE_PREVIEW.
*
* @see camera_stop_face_detection()
@@ -1131,6 +1146,7 @@ int camera_start_face_detection(camera_h camera, camera_face_detected_cb callbac
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre This should be called after face detection is started.
*
* @see camera_start_face_detection()
@@ -1174,6 +1190,7 @@ bool camera_is_supported_continuous_capture(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_supported_preview_resolution_cb() repeatedly to retrieve each supported preview resolution.
*
* @see camera_set_preview_resolution()
@@ -1208,6 +1225,7 @@ int camera_foreach_supported_preview_resolution(camera_h camera, camera_supporte
* @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_start_preview()
* @see camera_get_display_rotation()
*/
@@ -1225,6 +1243,7 @@ int camera_set_display_rotation(camera_h camera, camera_rotation_e rotation);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_display_rotation()
*/
int camera_get_display_rotation(camera_h camera, camera_rotation_e *rotation);
@@ -1245,6 +1264,7 @@ int camera_get_display_rotation(camera_h camera, camera_rotation_e *rotation);
* @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_get_display_flip()
*/
int camera_set_display_flip(camera_h camera, camera_flip_e flip);
@@ -1261,6 +1281,7 @@ int camera_set_display_flip(camera_h camera, camera_flip_e flip);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_display_flip()
*/
int camera_get_display_flip(camera_h camera, camera_flip_e *flip);
@@ -1280,6 +1301,7 @@ int camera_get_display_flip(camera_h camera, camera_flip_e *flip);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_is_display_visible()
*/
int camera_set_display_visible(camera_h camera, bool visible);
@@ -1297,6 +1319,7 @@ int camera_set_display_visible(camera_h camera, bool visible);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_display_visible()
*/
int camera_is_display_visible(camera_h camera, bool *visible);
@@ -1314,6 +1337,7 @@ int camera_is_display_visible(camera_h camera, bool *visible);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_get_display_mode()
*/
int camera_set_display_mode(camera_h camera, camera_display_mode_e mode);
@@ -1331,6 +1355,7 @@ int camera_set_display_mode(camera_h camera, camera_display_mode_e mode);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_display_mode()
*/
int camera_get_display_mode(camera_h camera, camera_display_mode_e *mode);
@@ -1347,6 +1372,7 @@ int camera_get_display_mode(camera_h camera, camera_display_mode_e *mode);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
* @see camera_get_display_reuse_hint()
* @see camera_change_device()
@@ -1363,6 +1389,7 @@ int camera_set_display_reuse_hint(camera_h camera, bool hint);
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_get_display_reuse_hint()
* @see camera_change_device()
*/
@@ -1382,6 +1409,7 @@ int camera_get_display_reuse_hint(camera_h camera, bool *hint);
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_start_capture()
* @see camera_get_capture_resolution()
@@ -1400,6 +1428,7 @@ int camera_set_capture_resolution(camera_h camera, int width, int height);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_capture_resolution()
* @see camera_foreach_supported_capture_resolution()
*/
@@ -1426,6 +1455,7 @@ int camera_get_capture_resolution(camera_h camera, int *width, int *height);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_supported_capture_resolution_cb() repeatedly to retrieve each supported capture resolution.
* @see camera_set_capture_resolution()
* @see camera_get_capture_resolution()
@@ -1455,6 +1485,7 @@ int camera_foreach_supported_capture_resolution(camera_h camera, camera_supporte
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_start_capture()
* @see camera_get_capture_format()
@@ -1473,6 +1504,7 @@ int camera_set_capture_format(camera_h camera, camera_pixel_format_e format);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_capture_format()
* @see camera_foreach_supported_capture_format()
*/
@@ -1499,6 +1531,7 @@ int camera_get_capture_format(camera_h camera, camera_pixel_format_e *format);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_supported_capture_format_cb() repeatedly to retrieve each supported capture format.
* @see camera_set_capture_format()
* @see camera_get_capture_format()
@@ -1527,6 +1560,7 @@ int camera_foreach_supported_capture_format(camera_h camera, camera_supported_ca
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @see camera_start_preview()
* @see camera_get_preview_format()
@@ -1544,6 +1578,7 @@ int camera_set_preview_format(camera_h camera, camera_pixel_format_e format);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_preview_format()
* @see camera_foreach_supported_preview_format()
*/
@@ -1559,6 +1594,7 @@ int camera_get_preview_format(camera_h camera, camera_pixel_format_e *format);
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
*/
int camera_get_facing_direction(camera_h camera, camera_facing_direction_e *facing_direction);
@@ -1597,6 +1633,7 @@ int camera_get_flash_state(camera_device_e device, camera_flash_state_e *state);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_supported_preview_format_cb() repeatedly to retrieve each supported preview format.
* @see camera_set_preview_format()
* @see camera_get_preview_format()
@@ -1632,7 +1669,6 @@ bool camera_is_supported_face_detection(camera_h camera);
* @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
- *
*/
bool camera_is_supported_zero_shutter_lag(camera_h camera);
@@ -1648,7 +1684,7 @@ bool camera_is_supported_zero_shutter_lag(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
- *
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
*/
int camera_get_device_count(camera_h camera, int *device_count);
@@ -1696,6 +1732,7 @@ bool camera_is_supported_media_packet_preview_cb(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera's state must be set to #CAMERA_STATE_CREATED.
* @see camera_start_preview()
* @see camera_unset_preview_cb()
@@ -1712,6 +1749,7 @@ int camera_set_preview_cb(camera_h camera, camera_preview_cb callback, void *use
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_preview_cb()
*/
int camera_unset_preview_cb(camera_h camera);
@@ -1734,6 +1772,7 @@ int camera_unset_preview_cb(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera's state should be #CAMERA_STATE_CREATED.
* @see camera_start_preview()
* @see camera_unset_media_packet_preview_cb()
@@ -1750,6 +1789,7 @@ int camera_set_media_packet_preview_cb(camera_h camera, camera_media_packet_prev
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_media_packet_preview_cb()
*/
int camera_unset_media_packet_preview_cb(camera_h camera);
@@ -1765,6 +1805,7 @@ int camera_unset_media_packet_preview_cb(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function will invoke camera_state_changed_cb() when the camera state changes.
* @see camera_unset_state_changed_cb()
* @see camera_state_changed_cb()
@@ -1780,6 +1821,7 @@ int camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callbac
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_state_changed_cb()
*/
int camera_unset_state_changed_cb(camera_h camera);
@@ -1795,6 +1837,7 @@ int camera_unset_state_changed_cb(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_unset_interrupted_cb()
* @see camera_interrupted_cb()
*/
@@ -1810,6 +1853,7 @@ int camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback,
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_interrupted_cb()
*/
int camera_unset_interrupted_cb(camera_h camera);
@@ -1825,6 +1869,7 @@ int camera_unset_interrupted_cb(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function will invoke camera_focus_changed_cb() when the auto-focus state changes.
* @see camera_start_focusing()
* @see camera_cancel_focusing()
@@ -1842,6 +1887,7 @@ int camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callbac
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_focus_changed_cb()
*/
int camera_unset_focus_changed_cb(camera_h camera);
@@ -1863,6 +1909,7 @@ int camera_unset_focus_changed_cb(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function will invoke camera_error_cb() when an asynchronous operation error occurs.
* @see camera_unset_error_cb()
@@ -1879,6 +1926,7 @@ int camera_set_error_cb(camera_h camera, camera_error_cb callback, void *user_da
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_error_cb()
*/
int camera_unset_error_cb(camera_h camera);
@@ -2049,6 +2097,7 @@ typedef bool (*camera_attr_supported_ptz_type_cb)(camera_attr_ptz_type_e type, v
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_start_preview()
* @see camera_attr_get_preview_fps()
* @see camera_attr_foreach_supported_fps()
@@ -2065,6 +2114,7 @@ int camera_attr_set_preview_fps(camera_h camera, camera_attr_fps_e fps);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_preview_fps()
* @see camera_attr_foreach_supported_fps()
*/
@@ -2090,6 +2140,7 @@ int camera_attr_get_preview_fps(camera_h camera, camera_attr_fps_e *fps);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode.
* @see camera_attr_set_preview_fps()
* @see camera_attr_get_preview_fps()
@@ -2112,6 +2163,7 @@ int camera_attr_foreach_supported_fps(camera_h camera, camera_attr_supported_fps
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode.
* @see camera_attr_set_preview_fps()
* @see camera_attr_get_preview_fps()
@@ -2142,6 +2194,7 @@ int camera_attr_foreach_supported_fps_by_resolution(camera_h camera, int width,
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_start_preview()
* @see camera_attr_get_image_quality()
@@ -2158,6 +2211,7 @@ int camera_attr_set_image_quality(camera_h camera, int quality);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_image_quality()
*/
int camera_attr_get_image_quality(camera_h camera, int *quality);
@@ -2172,6 +2226,7 @@ int camera_attr_get_image_quality(camera_h camera, int *quality);
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_encoded_preview_bitrate()
*/
int camera_attr_get_encoded_preview_bitrate(camera_h camera, int *bitrate);
@@ -2186,6 +2241,7 @@ int camera_attr_get_encoded_preview_bitrate(camera_h camera, int *bitrate);
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_encoded_preview_bitrate()
*/
int camera_attr_set_encoded_preview_bitrate(camera_h camera, int bitrate);
@@ -2200,6 +2256,7 @@ int camera_attr_set_encoded_preview_bitrate(camera_h camera, int bitrate);
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_encoded_preview_gop_interval()
*/
int camera_attr_get_encoded_preview_gop_interval(camera_h camera, int *interval);
@@ -2214,6 +2271,7 @@ int camera_attr_get_encoded_preview_gop_interval(camera_h camera, int *interval)
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_encoded_preview_gop_interval()
*/
int camera_attr_set_encoded_preview_gop_interval(camera_h camera, int interval);
@@ -2231,6 +2289,7 @@ int camera_attr_set_encoded_preview_gop_interval(camera_h camera, int interval);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_zoom()
* @see camera_attr_get_zoom_range()
*/
@@ -2246,6 +2305,7 @@ int camera_attr_set_zoom(camera_h camera, int zoom);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_zoom()
* @see camera_attr_get_zoom_range()
*/
@@ -2263,6 +2323,7 @@ int camera_attr_get_zoom(camera_h camera, int *zoom);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_zoom()
* @see camera_attr_get_zoom()
*/
@@ -2281,6 +2342,7 @@ int camera_attr_get_zoom_range(camera_h camera, int *min, int *max);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_af_mode()
* @see camera_attr_foreach_supported_af_mode()
* @see #camera_attr_af_mode_e
@@ -2299,6 +2361,7 @@ int camera_attr_set_af_mode(camera_h camera, camera_attr_af_mode_e mode);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_af_mode()
* @see camera_attr_set_af_mode()
* @see #camera_attr_af_mode_e
@@ -2321,6 +2384,7 @@ int camera_attr_get_af_mode(camera_h camera, camera_attr_af_mode_e *mode);
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_af_mode()
* @see camera_attr_clear_af_area()
*/
@@ -2339,6 +2403,7 @@ int camera_attr_set_af_area(camera_h camera, int x, int y);
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_af_mode()
* @see camera_attr_set_af_area()
*/
@@ -2364,6 +2429,7 @@ int camera_attr_clear_af_area(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_af_mode_cb() to get all the supported auto focus modes.
* @see camera_attr_set_af_mode()
* @see camera_attr_get_af_mode()
@@ -2392,6 +2458,7 @@ int camera_attr_foreach_supported_af_mode(camera_h camera, camera_attr_supported
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_exposure_mode()
* @see camera_attr_foreach_supported_exposure_mode()
*/
@@ -2407,6 +2474,7 @@ int camera_attr_set_exposure_mode(camera_h camera, camera_attr_exposure_mode_e m
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_exposure_mode()
* @see camera_attr_foreach_supported_exposure_mode()
*/
@@ -2432,6 +2500,7 @@ int camera_attr_get_exposure_mode(camera_h camera, camera_attr_exposure_mode_e *
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_exposure_mode_cb() to get all the supported exposure modes.
* @see camera_attr_set_exposure_mode()
* @see camera_attr_get_exposure_mode()
@@ -2460,6 +2529,7 @@ int camera_attr_foreach_supported_exposure_mode(camera_h camera, camera_attr_sup
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_exposure()
*/
int camera_attr_set_exposure(camera_h camera, int value);
@@ -2474,6 +2544,7 @@ int camera_attr_set_exposure(camera_h camera, int value);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_exposure()
*/
int camera_attr_get_exposure(camera_h camera, int *value);
@@ -2490,6 +2561,7 @@ int camera_attr_get_exposure(camera_h camera, int *value);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_exposure()
*/
int camera_attr_get_exposure_range(camera_h camera, int *min, int *max);
@@ -2506,6 +2578,7 @@ int camera_attr_get_exposure_range(camera_h camera, int *min, int *max);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_iso()
* @see camera_attr_foreach_supported_iso()
*/
@@ -2521,6 +2594,7 @@ int camera_attr_set_iso(camera_h camera, camera_attr_iso_e iso);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_iso()
* @see camera_attr_foreach_supported_iso()
*/
@@ -2546,6 +2620,7 @@ int camera_attr_get_iso(camera_h camera, camera_attr_iso_e *iso);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_iso_cb() to get all the supported ISO levels.
* @see camera_attr_set_iso()
* @see camera_attr_get_iso()
@@ -2575,6 +2650,7 @@ int camera_attr_foreach_supported_iso(camera_h camera, camera_attr_supported_iso
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre This function is valid only when the external display is connected.
* @see camera_attr_get_theater_mode()
*/
@@ -2590,6 +2666,7 @@ int camera_attr_set_theater_mode(camera_h camera, camera_attr_theater_mode_e mod
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_theater_mode()
*/
int camera_attr_get_theater_mode(camera_h camera, camera_attr_theater_mode_e *mode);
@@ -2614,6 +2691,7 @@ int camera_attr_get_theater_mode(camera_h camera, camera_attr_theater_mode_e *mo
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_theater_mode_cb() to get all supported theater modes.
* @see camera_attr_set_theater_mode()
* @see camera_attr_get_theater_mode()
@@ -2645,6 +2723,7 @@ int camera_attr_foreach_supported_theater_mode(camera_h camera, camera_attr_supp
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_brightness()
* @see camera_attr_get_brightness_range()
*/
@@ -2660,6 +2739,7 @@ int camera_attr_set_brightness(camera_h camera, int level);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_brightness()
* @see camera_attr_get_brightness_range()
*/
@@ -2677,6 +2757,7 @@ int camera_attr_get_brightness(camera_h camera, int *level);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_brightness()
* @see camera_attr_get_brightness()
*/
@@ -2694,6 +2775,7 @@ int camera_attr_get_brightness_range(camera_h camera, int *min, int *max);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_contrast()
* @see camera_attr_get_contrast_range()
*/
@@ -2709,6 +2791,7 @@ int camera_attr_set_contrast(camera_h camera, int level);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_contrast()
* @see camera_attr_get_contrast_range()
*/
@@ -2726,6 +2809,7 @@ int camera_attr_get_contrast(camera_h camera, int *level);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_contrast()
* @see camera_attr_get_contrast()
*/
@@ -2743,6 +2827,7 @@ int camera_attr_get_contrast_range(camera_h camera, int *min, int *max);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_whitebalance()
* @see camera_attr_get_whitebalance()
*/
@@ -2758,6 +2843,7 @@ int camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalance_e whi
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_whitebalance()
* @see camera_attr_set_whitebalance()
*/
@@ -2783,6 +2869,7 @@ int camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalance_e *wh
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_whitebalance_cb() to get all the supported white balances.
* @see camera_attr_set_whitebalance()
* @see camera_attr_get_whitebalance()
@@ -2811,6 +2898,7 @@ int camera_attr_foreach_supported_whitebalance(camera_h camera, camera_attr_supp
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_effect()
* @see camera_attr_get_effect()
*/
@@ -2827,6 +2915,7 @@ int camera_attr_set_effect(camera_h camera, camera_attr_effect_mode_e effect);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_effect()
* @see camera_attr_set_effect()
*/
@@ -2852,6 +2941,7 @@ int camera_attr_get_effect(camera_h camera, camera_attr_effect_mode_e *effect);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_effect_cb() to get all the supported effect modes.
* @see camera_attr_set_effect()
* @see camera_attr_get_effect()
@@ -2880,6 +2970,7 @@ int camera_attr_foreach_supported_effect(camera_h camera, camera_attr_supported_
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_scene_mode()
* @see camera_attr_get_scene_mode()
*/
@@ -2895,6 +2986,7 @@ int camera_attr_set_scene_mode(camera_h camera, camera_attr_scene_mode_e mode);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_scene_mode()
* @see camera_attr_set_scene_mode()
*/
@@ -2920,6 +3012,7 @@ int camera_attr_get_scene_mode(camera_h camera, camera_attr_scene_mode_e *mode);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_scene_mode_cb() to get all the supported scene modes.
* @see camera_attr_set_scene_mode()
* @see camera_attr_get_scene_mode()
@@ -2946,6 +3039,7 @@ int camera_attr_foreach_supported_scene_mode(camera_h camera, camera_attr_suppor
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_is_enabled_tag()
*/
int camera_attr_enable_tag(camera_h camera, bool enable);
@@ -2960,6 +3054,7 @@ int camera_attr_enable_tag(camera_h camera, bool enable);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_enable_tag()
*/
int camera_attr_is_enabled_tag(camera_h camera, bool *enabled);
@@ -2974,6 +3069,7 @@ int camera_attr_is_enabled_tag(camera_h camera, bool *enabled);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_tag_image_description()
*/
int camera_attr_set_tag_image_description(camera_h camera, const char *description);
@@ -2989,6 +3085,7 @@ int camera_attr_set_tag_image_description(camera_h camera, const char *descripti
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_tag_image_description()
*/
int camera_attr_get_tag_image_description(camera_h camera, char **description);
@@ -3003,6 +3100,7 @@ int camera_attr_get_tag_image_description(camera_h camera, char **description);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_tag_orientation()
*/
int camera_attr_set_tag_orientation(camera_h camera, camera_attr_tag_orientation_e orientation);
@@ -3017,6 +3115,7 @@ int camera_attr_set_tag_orientation(camera_h camera, camera_attr_tag_orientation
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_tag_orientation()
*/
int camera_attr_get_tag_orientation(camera_h camera, camera_attr_tag_orientation_e *orientation);
@@ -3031,6 +3130,7 @@ int camera_attr_get_tag_orientation(camera_h camera, camera_attr_tag_orientation
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_tag_software()
*/
int camera_attr_set_tag_software(camera_h camera, const char *software);
@@ -3046,6 +3146,7 @@ int camera_attr_set_tag_software(camera_h camera, const char *software);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_tag_software()
*/
int camera_attr_get_tag_software(camera_h camera, char **software);
@@ -3062,6 +3163,7 @@ int camera_attr_get_tag_software(camera_h camera, char **software);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_geotag()
* @see camera_attr_remove_geotag()
*/
@@ -3079,6 +3181,7 @@ int camera_attr_set_geotag(camera_h camera, double latitude, double longitude, d
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_geotag()
* @see camera_attr_remove_geotag()
*/
@@ -3093,6 +3196,7 @@ int camera_attr_get_geotag(camera_h camera, double *latitude, double *longitude,
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_geotag()
* @see camera_attr_get_geotag()
*/
@@ -3112,6 +3216,7 @@ int camera_attr_remove_geotag(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @retval #CAMERA_ERROR_DEVICE_BUSY The flash was preempted by other API
* @see camera_attr_foreach_supported_flash_mode()
* @see camera_attr_get_flash_mode()
@@ -3128,6 +3233,7 @@ int camera_attr_set_flash_mode(camera_h camera, camera_attr_flash_mode_e mode);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_flash_mode()
* @see camera_attr_set_flash_mode()
*/
@@ -3153,6 +3259,7 @@ int camera_attr_get_flash_mode(camera_h camera, camera_attr_flash_mode_e *mode);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_flash_mode_cb() to get all supported flash modes.
* @see camera_attr_set_flash_mode()
* @see camera_attr_get_flash_mode()
@@ -3179,6 +3286,7 @@ int camera_attr_foreach_supported_flash_mode(camera_h camera, camera_attr_suppor
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_display_rotation()
*/
int camera_attr_get_lens_orientation(camera_h camera, int *angle);
@@ -3193,6 +3301,7 @@ int camera_attr_get_lens_orientation(camera_h camera, int *angle);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @see camera_attr_get_stream_rotation()
*/
@@ -3208,6 +3317,7 @@ int camera_attr_set_stream_rotation(camera_h camera, camera_rotation_e rotation)
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @see camera_attr_set_stream_rotation()
*/
@@ -3233,6 +3343,7 @@ int camera_attr_get_stream_rotation(camera_h camera, camera_rotation_e *rotation
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_stream_rotation_cb() to get all supported stream rotation mode.
* @see camera_attr_set_stream_rotation()
* @see camera_attr_get_stream_rotation()
@@ -3259,6 +3370,7 @@ int camera_attr_foreach_supported_stream_rotation(camera_h camera, camera_attr_s
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @see camera_attr_set_stream_rotation()
*/
@@ -3274,6 +3386,7 @@ int camera_attr_set_stream_flip(camera_h camera, camera_flip_e flip);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @see camera_attr_set_stream_rotation()
*/
@@ -3299,6 +3412,7 @@ int camera_attr_get_stream_flip(camera_h camera, camera_flip_e *flip);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_stream_flip_cb() to get all supported stream flip mode.
* @see camera_attr_set_stream_flip()
* @see camera_attr_get_stream_flip()
@@ -3343,6 +3457,7 @@ typedef void (*camera_attr_hdr_progress_cb)(int percent, void *user_data);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_hdr_mode()
* @see camera_attr_set_hdr_capture_progress_cb()
* @see camera_attr_unset_hdr_capture_progress_cb()
@@ -3361,6 +3476,7 @@ int camera_attr_set_hdr_mode(camera_h camera, camera_attr_hdr_mode_e mode);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_hdr_mode()
* @see camera_attr_set_hdr_capture_progress_cb()
* @see camera_attr_unset_hdr_capture_progress_cb()
@@ -3380,6 +3496,7 @@ int camera_attr_get_hdr_mode(camera_h camera, camera_attr_hdr_mode_e *mode);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_hdr_mode()
* @see camera_attr_get_hdr_mode()
* @see camera_attr_unset_hdr_capture_progress_cb()
@@ -3396,6 +3513,7 @@ int camera_attr_set_hdr_capture_progress_cb(camera_h camera, camera_attr_hdr_pro
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_hdr_mode()
* @see camera_attr_get_hdr_mode()
* @see camera_attr_set_hdr_capture_progress_cb()
@@ -3434,6 +3552,7 @@ bool camera_attr_is_supported_hdr_capture(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_is_enabled_anti_shake()
* @see camera_attr_is_supported_anti_shake()
*
@@ -3450,6 +3569,7 @@ int camera_attr_enable_anti_shake(camera_h camera, bool enable);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_enable_anti_shake()
* @see camera_attr_is_supported_anti_shake()
*/
@@ -3485,6 +3605,7 @@ bool camera_attr_is_supported_anti_shake(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_is_enabled_video_stabilization()
* @see camera_attr_is_supported_video_stabilization()
*
@@ -3501,6 +3622,7 @@ int camera_attr_enable_video_stabilization(camera_h camera, bool enable);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_enable_video_stabilization()
* @see camera_attr_is_supported_video_stabilization()
*/
@@ -3534,6 +3656,7 @@ bool camera_attr_is_supported_video_stabilization(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_is_enabled_auto_contrast()
*/
int camera_attr_enable_auto_contrast(camera_h camera, bool enable);
@@ -3548,6 +3671,7 @@ int camera_attr_enable_auto_contrast(camera_h camera, bool enable);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_enable_auto_contrast()
*/
int camera_attr_is_enabled_auto_contrast(camera_h camera, bool *enabled);
@@ -3598,6 +3722,7 @@ bool camera_attr_is_supported_auto_contrast(camera_h camera);
* @retval #CAMERA_ERROR_INVALID_OPERATION Disabling shutter sound is not permitted
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
*/
int camera_attr_disable_shutter_sound(camera_h camera, bool disable);
@@ -3612,6 +3737,7 @@ int camera_attr_disable_shutter_sound(camera_h camera, bool disable);
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_pan()
* @see camera_attr_get_pan_range()
*/
@@ -3627,6 +3753,7 @@ int camera_attr_set_pan(camera_h camera, camera_attr_ptz_move_type_e move_type,
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_pan()
* @see camera_attr_get_pan_range()
*/
@@ -3644,6 +3771,7 @@ int camera_attr_get_pan(camera_h camera, int *pan_step);
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_pan()
* @see camera_attr_get_pan()
*/
@@ -3660,6 +3788,7 @@ int camera_attr_get_pan_range(camera_h camera, int *min, int *max);
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_tilt()
* @see camera_attr_get_tilt_range()
*/
@@ -3675,6 +3804,7 @@ int camera_attr_set_tilt(camera_h camera, camera_attr_ptz_move_type_e move_type,
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_tilt()
* @see camera_attr_get_tilt_range()
*/
@@ -3692,6 +3822,7 @@ int camera_attr_get_tilt(camera_h camera, int *tilt_step);
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_tilt()
* @see camera_attr_get_tilt()
*/
@@ -3707,6 +3838,7 @@ int camera_attr_get_tilt_range(camera_h camera, int *min, int *max);
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_pan()
* @see camera_attr_set_pan()
* @see camera_attr_get_pan_range()
@@ -3737,6 +3869,7 @@ int camera_attr_set_ptz_type(camera_h camera, camera_attr_ptz_type_e ptz_type);
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_ptz_type_cb() to get all supported ptz type.
* @see camera_attr_set_ptz_type()
*/
@@ -3766,6 +3899,7 @@ int camera_attr_foreach_supported_ptz_type(camera_h camera, camera_attr_supporte
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_display_roi_area()
*/
int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, int height);
@@ -3783,6 +3917,7 @@ int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, i
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_display_roi_area()
*/
int camera_attr_get_display_roi_area(camera_h camera, int *x, int *y, int *width, int *height);
diff --git a/include/camera_private.h b/include/camera_private.h
index fa6667a..49a9571 100644
--- a/include/camera_private.h
+++ b/include/camera_private.h
@@ -106,6 +106,7 @@ typedef struct _camera_msg_handler_info_s {
typedef struct _camera_cb_info_s {
gint fd;
+ gboolean is_server_connected;
/* message receive thread */
GThread *msg_recv_thread;
diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec
index 731092b..7e29e5b 100644
--- a/packaging/capi-media-camera.spec
+++ b/packaging/capi-media-camera.spec
@@ -1,6 +1,6 @@
Name: capi-media-camera
Summary: A Camera API
-Version: 0.2.69
+Version: 0.2.70
Release: 0
Group: Multimedia/API
License: Apache-2.0
diff --git a/src/camera.c b/src/camera.c
index 22129d0..6fcde32 100644
--- a/src/camera.c
+++ b/src/camera.c
@@ -281,6 +281,11 @@ static int _camera_client_wait_for_cb_return(muse_camera_api_e api, camera_cb_in
/*LOGD("Enter api : %d", api);*/
+ if (!cb_info->is_server_connected) {
+ LOGE("server is disconnected");
+ return CAMERA_ERROR_SERVICE_DISCONNECTED;
+ }
+
g_mutex_lock(&(cb_info->api_mutex[api]));
if (cb_info->api_activating[api] == 0) {
@@ -321,6 +326,7 @@ static int _camera_client_wait_for_cb_return(muse_camera_api_e api, camera_cb_in
static void _camera_msg_send(int api, camera_cb_info_s *cb_info,
int *ret, int timeout)
{
+ int send_ret = 0;
char *msg = NULL;
if (!cb_info) {
@@ -344,7 +350,10 @@ static void _camera_msg_send(int api, camera_cb_info_s *cb_info,
/*LOGD("send msg %s", msg);*/
- if (muse_core_ipc_send_msg(cb_info->fd, msg) < 0) {
+ if (cb_info->is_server_connected)
+ send_ret = muse_core_ipc_send_msg(cb_info->fd, msg);
+
+ if (send_ret < 0) {
LOGE("msg send failed");
if (ret)
*ret = CAMERA_ERROR_INVALID_OPERATION;
@@ -362,6 +371,7 @@ static void _camera_msg_send(int api, camera_cb_info_s *cb_info,
static void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
int *ret, camera_msg_param *param, int timeout)
{
+ int send_ret = 0;
char *msg = NULL;
if (!cb_info || !param) {
@@ -402,7 +412,10 @@ static void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
/*LOGD("send msg %s", msg);*/
- if (muse_core_ipc_send_msg(cb_info->fd, msg) < 0) {
+ if (cb_info->is_server_connected)
+ send_ret = muse_core_ipc_send_msg(cb_info->fd, msg);
+
+ if (send_ret < 0) {
LOGE("msg send failed");
if (ret)
@@ -1653,6 +1666,52 @@ static void _camera_remove_idle_event_all(camera_cb_info_s *cb_info)
}
+static void __camera_add_msg_to_queue(camera_cb_info_s *cb_info, int api, int event, int event_class, char *msg)
+{
+ camera_message_s *cam_msg = NULL;
+
+ if (!cb_info || !msg) {
+ LOGE("NULL pointer %p %p", cb_info, msg);
+ return;
+ }
+
+ cam_msg = g_new0(camera_message_s, 1);
+ if (!cam_msg) {
+ LOGE("failed to alloc cam_msg for [%s]", msg);
+ return;
+ }
+
+ cam_msg->api = api;
+ cam_msg->event = event;
+ cam_msg->event_class = event_class;
+
+ memcpy(cam_msg->recv_msg, msg, sizeof(cam_msg->recv_msg));
+
+ /*LOGD("add camera message to queue : api %d, event %d, event_class %d", api, event, event_class);*/
+
+ if (event == MUSE_CAMERA_EVENT_TYPE_PREVIEW) {
+ g_mutex_lock(&cb_info->preview_cb_info.mutex);
+ g_queue_push_tail(cb_info->preview_cb_info.queue, (gpointer)cam_msg);
+ g_cond_signal(&cb_info->preview_cb_info.cond);
+ g_mutex_unlock(&cb_info->preview_cb_info.mutex);
+ } else if (event == MUSE_CAMERA_EVENT_TYPE_CAPTURE) {
+ g_mutex_lock(&cb_info->capture_cb_info.mutex);
+ g_queue_push_tail(cb_info->capture_cb_info.queue, (gpointer)cam_msg);
+ g_cond_signal(&cb_info->capture_cb_info.cond);
+ g_mutex_unlock(&cb_info->capture_cb_info.mutex);
+ } else {
+ g_mutex_lock(&cb_info->msg_handler_info.mutex);
+ g_queue_push_tail(cb_info->msg_handler_info.queue, (gpointer)cam_msg);
+ g_cond_signal(&cb_info->msg_handler_info.cond);
+ g_mutex_unlock(&cb_info->msg_handler_info.mutex);
+ }
+
+ cam_msg = NULL;
+
+ return;
+}
+
+
static void *_camera_msg_recv_func(gpointer data)
{
int i = 0;
@@ -1664,6 +1723,7 @@ static void *_camera_msg_recv_func(gpointer data)
int num_token = 0;
int str_pos = 0;
int prev_pos = 0;
+ char *error_msg = NULL;
char *recv_msg = NULL;
char **parse_str = NULL;
camera_cb_info_s *cb_info = (camera_cb_info_s *)data;
@@ -1693,8 +1753,11 @@ static void *_camera_msg_recv_func(gpointer data)
while (g_atomic_int_get(&cb_info->msg_recv_running)) {
ret = muse_core_ipc_recv_msg(cb_info->fd, recv_msg);
- if (ret <= 0)
+ if (ret <= 0) {
+ cb_info->is_server_connected = FALSE;
+ LOGE("receive msg failed - server disconnected");
break;
+ }
recv_msg[ret] = '\0';
@@ -1782,36 +1845,7 @@ static void *_camera_msg_recv_func(gpointer data)
g_cond_signal(&cb_info->api_cond[api]);
g_mutex_unlock(&cb_info->api_mutex[api]);
} else if (api_class == MUSE_CAMERA_API_CLASS_THREAD_SUB || api == MUSE_CAMERA_CB_EVENT) {
- camera_message_s *cam_msg = g_new0(camera_message_s, 1);
- if (cam_msg == NULL) {
- LOGE("failed to alloc cam_msg");
- continue;
- }
-
- cam_msg->api = api;
- cam_msg->event = event;
- cam_msg->event_class = event_class;
-
- memcpy(cam_msg->recv_msg, parse_str[i], sizeof(cam_msg->recv_msg));
-
- /*LOGD("add camera message to queue : api %d, event %d, event_class %d", api, event, event_class);*/
-
- if (event == MUSE_CAMERA_EVENT_TYPE_PREVIEW) {
- g_mutex_lock(&cb_info->preview_cb_info.mutex);
- g_queue_push_tail(cb_info->preview_cb_info.queue, (gpointer)cam_msg);
- g_cond_signal(&cb_info->preview_cb_info.cond);
- g_mutex_unlock(&cb_info->preview_cb_info.mutex);
- } else if (event == MUSE_CAMERA_EVENT_TYPE_CAPTURE) {
- g_mutex_lock(&cb_info->capture_cb_info.mutex);
- g_queue_push_tail(cb_info->capture_cb_info.queue, (gpointer)cam_msg);
- g_cond_signal(&cb_info->capture_cb_info.cond);
- g_mutex_unlock(&cb_info->capture_cb_info.mutex);
- } else {
- g_mutex_lock(&cb_info->msg_handler_info.mutex);
- g_queue_push_tail(cb_info->msg_handler_info.queue, (gpointer)cam_msg);
- g_cond_signal(&cb_info->msg_handler_info.cond);
- g_mutex_unlock(&cb_info->msg_handler_info.mutex);
- }
+ __camera_add_msg_to_queue(cb_info, api, event, event_class, parse_str[i]);
} else {
LOGW("unknown camera api %d, class %d", api, api_class);
}
@@ -1819,7 +1853,30 @@ static void *_camera_msg_recv_func(gpointer data)
}
- LOGD("client cb exit");
+ LOGD("client cb exit - server connected %d", cb_info->is_server_connected);
+
+ if (!cb_info->is_server_connected) {
+ /* send error msg for server disconnection */
+ error_msg = muse_core_msg_json_factory_new(MUSE_CAMERA_CB_EVENT,
+ MUSE_TYPE_INT, "error", CAMERA_ERROR_SERVICE_DISCONNECTED,
+ MUSE_TYPE_INT, "current_state", CAMERA_STATE_NONE,
+ NULL);
+ if (!error_msg) {
+ LOGE("error_msg failed");
+ goto CB_HANDLER_EXIT;
+ }
+
+ __camera_add_msg_to_queue(cb_info,
+ MUSE_CAMERA_CB_EVENT,
+ MUSE_CAMERA_EVENT_TYPE_ERROR,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+ error_msg);
+
+ muse_core_msg_json_factory_free(error_msg);
+ error_msg = NULL;
+
+ LOGE("add error msg for service disconnection done");
+ }
CB_HANDLER_EXIT:
if (parse_str) {
@@ -1982,6 +2039,8 @@ static camera_cb_info_s *_camera_client_callback_new(gint sockfd, bool need_msg_
goto ErrorExit;
}
+ cb_info->is_server_connected = TRUE;
+
return cb_info;
ErrorExit:
@@ -2303,7 +2362,11 @@ int camera_destroy(camera_h camera)
LOGD("Enter");
- _camera_msg_send(api, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
+ if (pc->cb_info->is_server_connected)
+ _camera_msg_send(api, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
+ else
+ LOGW("server disconnected. release resource without send message.");
+
if (ret == CAMERA_ERROR_NONE) {
_camera_remove_idle_event_all(pc->cb_info);
_camera_client_callback_destroy(pc->cb_info);
@@ -2429,7 +2492,10 @@ bool camera_is_supported_continuous_capture(camera_h camera)
_camera_msg_send(api, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ if (ret == CAMERA_ERROR_SERVICE_DISCONNECTED)
+ ret = false;
+
+ LOGD("ret : %d", ret);
return (bool)ret;
}
@@ -2501,7 +2567,10 @@ bool camera_is_supported_face_detection(camera_h camera)
_camera_msg_send(api, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ if (ret == CAMERA_ERROR_SERVICE_DISCONNECTED)
+ ret = false;
+
+ LOGD("ret : %d", ret);
return (bool)ret;
}
@@ -2522,7 +2591,10 @@ bool camera_is_supported_zero_shutter_lag(camera_h camera)
_camera_msg_send(api, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ if (ret == CAMERA_ERROR_SERVICE_DISCONNECTED)
+ ret = false;
+
+ LOGD("ret : %d", ret);
return (bool)ret;
}
@@ -2543,7 +2615,10 @@ bool camera_is_supported_media_packet_preview_cb(camera_h camera)
_camera_msg_send(api, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ if (ret == CAMERA_ERROR_SERVICE_DISCONNECTED)
+ ret = false;
+
+ LOGD("ret : %d", ret);
return (bool)ret;
}
@@ -2818,6 +2893,8 @@ int camera_set_display(camera_h camera, camera_display_type_e type, camera_displ
pc->display_handle = (intptr_t)set_display_handle;
if (type == CAMERA_DISPLAY_TYPE_OVERLAY) {
+ int send_ret = 0;
+
length = sizeof(camera_wl_info_s) / sizeof(int) + \
(sizeof(camera_wl_info_s) % sizeof(int) ? 1 : 0);
@@ -2830,7 +2907,10 @@ int camera_set_display(camera_h camera, camera_display_type_e type, camera_displ
return CAMERA_ERROR_OUT_OF_MEMORY;
}
- if (muse_core_ipc_send_msg(pc->cb_info->fd, msg) < 0) {
+ if (pc->cb_info->is_server_connected)
+ send_ret = muse_core_ipc_send_msg(pc->cb_info->fd, msg);
+
+ if (send_ret < 0) {
LOGE("message send failed");
ret = CAMERA_ERROR_INVALID_OPERATION;
} else {
@@ -4509,6 +4589,7 @@ int camera_attr_set_geotag(camera_h camera, double latitude, double longitude, d
double set_geotag[3] = {latitude, longitude, altitude};
char *msg = NULL;
int length = 0;
+ int send_ret = 0;
if (!pc || !pc->cb_info) {
LOGE("NULL handle");
@@ -4528,7 +4609,10 @@ int camera_attr_set_geotag(camera_h camera, double latitude, double longitude, d
return CAMERA_ERROR_OUT_OF_MEMORY;
}
- if (muse_core_ipc_send_msg(pc->cb_info->fd, msg) < 0) {
+ if (pc->cb_info->is_server_connected)
+ send_ret = muse_core_ipc_send_msg(pc->cb_info->fd, msg);
+
+ if (send_ret < 0) {
LOGE("message send failed");
ret = CAMERA_ERROR_INVALID_OPERATION;
} else {
@@ -5674,7 +5758,10 @@ bool camera_attr_is_supported_hdr_capture(camera_h camera)
_camera_msg_send(api, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ if (ret == CAMERA_ERROR_SERVICE_DISCONNECTED)
+ ret = false;
+
+ LOGD("ret : %d", ret);
return (bool)ret;
}
@@ -5805,9 +5892,12 @@ bool camera_attr_is_supported_anti_shake(camera_h camera)
_camera_msg_send(api, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ if (ret == CAMERA_ERROR_SERVICE_DISCONNECTED)
+ ret = false;
- return ret;
+ LOGD("ret : %d", ret);
+
+ return (bool)ret;
}
@@ -5878,9 +5968,12 @@ bool camera_attr_is_supported_video_stabilization(camera_h camera)
_camera_msg_send(api, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ if (ret == CAMERA_ERROR_SERVICE_DISCONNECTED)
+ ret = false;
- return ret;
+ LOGD("ret : %d", ret);
+
+ return (bool)ret;
}
@@ -5951,9 +6044,12 @@ bool camera_attr_is_supported_auto_contrast(camera_h camera)
_camera_msg_send(api, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
- LOGD("ret : 0x%x", ret);
+ if (ret == CAMERA_ERROR_SERVICE_DISCONNECTED)
+ ret = false;
- return ret;
+ LOGD("ret : %d", ret);
+
+ return (bool)ret;
}
@@ -6207,6 +6303,7 @@ int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, i
int set_display_roi_area[4] = {x, y, width, height};
char *msg = NULL;
int length = 0;
+ int send_ret = 0;
if (!pc || !pc->cb_info) {
LOGE("NULL handle");
@@ -6241,7 +6338,10 @@ int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, i
return CAMERA_ERROR_OUT_OF_MEMORY;
}
- if (muse_core_ipc_send_msg(pc->cb_info->fd, msg) < 0) {
+ if (pc->cb_info->is_server_connected)
+ send_ret = muse_core_ipc_send_msg(pc->cb_info->fd, msg);
+
+ if (send_ret < 0) {
LOGE("message send failed");
ret = CAMERA_ERROR_INVALID_OPERATION;
} else {
diff --git a/test/camera_test.c b/test/camera_test.c
index cd2e446..fd35c00 100644
--- a/test/camera_test.c
+++ b/test/camera_test.c
@@ -425,7 +425,6 @@ static void print_menu();
static gboolean cmd_input(GIOChannel *channel);
static gboolean mode_change(gchar buf);
int camcordertest_set_attr_int(const char* attr_subcategory, int value);
-bool preview_resolution_cb(int width, int height, void *user_data);
static inline void flush_stdin()
@@ -434,17 +433,53 @@ static inline void flush_stdin()
while ((ch = getchar()) != EOF && ch != '\n');
}
-void _camera_state_changed_cb(camera_state_e previous, camera_state_e current, bool by_policy, void *user_data)
+static bool _release_idle_event_callback(void *data)
+{
+ printf("destroy camera handle\n\n");
+
+ camera_destroy(hcamcorder->camera);
+ hcamcorder->camera = NULL;
+ hcamcorder->menu_state = MENU_STATE_INIT;
+ print_menu();
+
+ return 0;
+}
+
+static void _camera_error_cb(int error, camera_state_e current_state, void *user_data)
+{
+ printf("\n\n\tERROR [0x%x], current state %d\n", error, current_state);
+
+ switch (error) {
+ case CAMERA_ERROR_RESOURCE_CONFLICT:
+ printf("\t\t[CAMERA_ERROR_RESOURCE_CONFLICT]\n\n");
+ break;
+ case CAMERA_ERROR_SECURITY_RESTRICTED:
+ printf("\t\t[CAMERA_ERROR_SECURITY_RESTRICTED]\n\n");
+ break;
+ case CAMERA_ERROR_SERVICE_DISCONNECTED:
+ printf("\t\t[CAMERA_ERROR_SERVICE_DISCONNECTED]\n\n");
+ g_idle_add_full(G_PRIORITY_DEFAULT,
+ (GSourceFunc)_release_idle_event_callback,
+ NULL, NULL);
+ break;
+ default:
+ break;
+ }
+
+ return;
+}
+
+static void _camera_state_changed_cb(camera_state_e previous, camera_state_e current, bool by_policy, void *user_data)
{
printf("camera state changed %d -> %d\n", previous, current);
}
-void _camera_interrupted_cb(camera_policy_e policy, camera_state_e previous, camera_state_e current, void *user_data)
+static void _camera_interrupted_cb(camera_policy_e policy, camera_state_e previous, camera_state_e current, void *user_data)
{
printf("camera interrupted callback called %d\n", policy);
}
-bool preview_resolution_cb(int width, int height, void *user_data)
+static bool preview_resolution_cb(int width, int height, void *user_data)
{
resolution_stack *data = (resolution_stack *)user_data;
@@ -463,7 +498,7 @@ bool preview_resolution_cb(int width, int height, void *user_data)
return true;
}
-bool capture_resolution_test_cb(int width, int height, void *user_data)
+static bool capture_resolution_test_cb(int width, int height, void *user_data)
{
resolution_stack *data = (resolution_stack *)user_data;
@@ -482,13 +517,13 @@ bool capture_resolution_test_cb(int width, int height, void *user_data)
return true;
}
-bool af_mode_foreach_cb(camera_attr_iso_e mode, void *user_data)
+static bool af_mode_foreach_cb(camera_attr_iso_e mode, void *user_data)
{
printf("%d.%s\n", mode, af_scan[mode]);
return true;
}
-bool exposure_mode_cb(camera_attr_af_mode_e mode, void *user_data)
+static bool exposure_mode_cb(camera_attr_af_mode_e mode, void *user_data)
{
exposure_stack *data = (exposure_stack *)user_data;
@@ -504,13 +539,13 @@ bool exposure_mode_cb(camera_attr_af_mode_e mode, void *user_data)
return true;
}
-bool iso_mode_cb(camera_attr_iso_e mode, void *user_data)
+static bool iso_mode_cb(camera_attr_iso_e mode, void *user_data)
{
printf("%d.%s\n", mode, iso_mode[mode]);
return true;
}
-bool camera_rotation_cb(camera_rotation_e mode, void *user_data)
+static bool camera_rotation_cb(camera_rotation_e mode, void *user_data)
{
camera_rotation_stack *data = (camera_rotation_stack *)user_data;
@@ -527,37 +562,37 @@ bool camera_rotation_cb(camera_rotation_e mode, void *user_data)
return true;
}
-bool preview_format_cb(camera_pixel_format_e mode, void *user_data)
+static bool preview_format_cb(camera_pixel_format_e mode, void *user_data)
{
printf("%d.%s\n", mode, image_fmt[mode]);
return true;
}
-bool white_balance_cb(camera_attr_whitebalance_e mode, void *user_data)
+static bool white_balance_cb(camera_attr_whitebalance_e mode, void *user_data)
{
printf("%d.%s\n", mode, wb[mode]);
return true;
}
-bool colortone_cb(camera_attr_effect_mode_e mode, void *user_data)
+static bool colortone_cb(camera_attr_effect_mode_e mode, void *user_data)
{
printf("%d.%s\n", mode, ct[mode]);
return true;
}
-bool program_mode_cb(camera_attr_scene_mode_e mode, void *user_data)
+static bool program_mode_cb(camera_attr_scene_mode_e mode, void *user_data)
{
printf("%d.%s\n", mode, program_mode[mode]);
return true;
}
-bool strobe_mode_cb(camera_attr_flash_mode_e mode, void *user_data)
+static bool strobe_mode_cb(camera_attr_flash_mode_e mode, void *user_data)
{
printf("%d.%s\n", mode, strobe_mode[mode]);
return true;
}
-void _face_detected(camera_detected_face_s *faces, int count, void *user_data)
+static void _face_detected(camera_detected_face_s *faces, int count, void *user_data)
{
printf("face detected!!\n");
int i;
@@ -568,24 +603,6 @@ void _face_detected(camera_detected_face_s *faces, int count, void *user_data)
return;
}
-
-void cam_utils_convert_YUYV_to_UYVY(unsigned char *dst, unsigned char *src, gint length)
-{
- int i = 0;
-
- /* memset dst */
- memset(dst, 0x00, length);
- memcpy(dst, src+1, length-1);
-
- for (i = 0 ; i < length ; i++) {
- if (!(i % 2))
- dst[i+1] = src[i];
- }
-
- return;
-}
-
-
static void _file_write(char *path, void *data, int size)
{
FILE *fp = NULL;
@@ -611,7 +628,7 @@ static void _file_write(char *path, void *data, int size)
}
}
-void capturing_cb(camera_image_data_s* image, camera_image_data_s* postview, camera_image_data_s* thumbnail, void *user_data)
+static void capturing_cb(camera_image_data_s* image, camera_image_data_s* postview, camera_image_data_s* thumbnail, void *user_data)
{
char m_filename[CAPTURE_FILENAME_LEN];
@@ -627,7 +644,7 @@ void capturing_cb(camera_image_data_s* image, camera_image_data_s* postview, cam
return;
}
-void capture_completed_cb(void *user_data)
+static void capture_completed_cb(void *user_data)
{
camera_start_preview(hcamcorder->camera);
@@ -1408,6 +1425,7 @@ static gboolean mode_change(gchar buf)
}
}
+ camera_set_error_cb(hcamcorder->camera, _camera_error_cb, NULL);
camera_set_state_changed_cb(hcamcorder->camera, _camera_state_changed_cb, NULL);
camera_set_interrupted_cb(hcamcorder->camera, _camera_interrupted_cb, NULL);
camera_set_display_mode(hcamcorder->camera, CAMERA_DISPLAY_MODE_LETTER_BOX);