[Release version 0.2.42] Fix Tizen coding rule violation 32/80032/2
authorHaesu Gwon <haesu.gwon@samsung.com>
Thu, 14 Jul 2016 07:11:57 +0000 (16:11 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Thu, 14 Jul 2016 09:39:18 +0000 (18:39 +0900)
Change-Id: Idb391dd904dea4e90b5e1259f747a323af28d4d7
Signed-off-by: Haesu Gwon <haesu.gwon@samsung.com>
legacy/include/legacy_camera.h
legacy/include/legacy_camera_private.h
legacy/src/legacy_camera.c
legacy/src/legacy_camera_internal.c
muse/include/muse_camera.h
muse/include/muse_camera_msg.h
muse/src/muse_camera_dispatcher.c
packaging/mmsvc-camera.spec

index b97d282..0e2b83b 100644 (file)
@@ -41,55 +41,51 @@ extern "C" {
  * @brief Enumeration for the error codes of Camera.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_ERROR_NONE                   = TIZEN_ERROR_NONE,                     /**< Successful */
-    CAMERA_ERROR_INVALID_PARAMETER      = TIZEN_ERROR_INVALID_PARAMETER,        /**< Invalid parameter */
-    CAMERA_ERROR_INVALID_STATE          = CAMERA_ERROR_CLASS | 0x02,            /**< Invalid state */
-    CAMERA_ERROR_OUT_OF_MEMORY          = TIZEN_ERROR_OUT_OF_MEMORY,            /**< Out of memory */
-    CAMERA_ERROR_DEVICE                 = CAMERA_ERROR_CLASS | 0x04,            /**< Device error */
-    CAMERA_ERROR_INVALID_OPERATION      = TIZEN_ERROR_INVALID_OPERATION,        /**< Internal error */
-    CAMERA_ERROR_SOUND_POLICY           = CAMERA_ERROR_CLASS | 0x06,            /**< Blocked by Audio Session Manager (Deprecated since 3.0) */
-    CAMERA_ERROR_SECURITY_RESTRICTED    = CAMERA_ERROR_CLASS | 0x07,            /**< Restricted by security system policy */
-    CAMERA_ERROR_DEVICE_BUSY            = CAMERA_ERROR_CLASS | 0x08,            /**< The device is using another application or working on some operation */
-    CAMERA_ERROR_DEVICE_NOT_FOUND       = CAMERA_ERROR_CLASS | 0x09,            /**< No camera device */
-    CAMERA_ERROR_SOUND_POLICY_BY_CALL   = CAMERA_ERROR_CLASS | 0x0a,            /**< Blocked by Audio Session Manager - CALL (Deprecated since 3.0) */
-    CAMERA_ERROR_SOUND_POLICY_BY_ALARM  = CAMERA_ERROR_CLASS | 0x0b,            /**< Blocked by Audio Session Manager - ALARM (Deprecated since 3.0) */
-    CAMERA_ERROR_ESD                    = CAMERA_ERROR_CLASS | 0x0c,            /**< ESD situation */
-    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) */
+typedef enum {
+       CAMERA_ERROR_NONE                   = TIZEN_ERROR_NONE,                     /**< Successful */
+       CAMERA_ERROR_INVALID_PARAMETER      = TIZEN_ERROR_INVALID_PARAMETER,        /**< Invalid parameter */
+       CAMERA_ERROR_INVALID_STATE          = CAMERA_ERROR_CLASS | 0x02,            /**< Invalid state */
+       CAMERA_ERROR_OUT_OF_MEMORY          = TIZEN_ERROR_OUT_OF_MEMORY,            /**< Out of memory */
+       CAMERA_ERROR_DEVICE                 = CAMERA_ERROR_CLASS | 0x04,            /**< Device error */
+       CAMERA_ERROR_INVALID_OPERATION      = TIZEN_ERROR_INVALID_OPERATION,        /**< Internal error */
+       CAMERA_ERROR_SOUND_POLICY           = CAMERA_ERROR_CLASS | 0x06,            /**< Blocked by Audio Session Manager (Deprecated since 3.0) */
+       CAMERA_ERROR_SECURITY_RESTRICTED    = CAMERA_ERROR_CLASS | 0x07,            /**< Restricted by security system policy */
+       CAMERA_ERROR_DEVICE_BUSY            = CAMERA_ERROR_CLASS | 0x08,            /**< The device is using another application or working on some operation */
+       CAMERA_ERROR_DEVICE_NOT_FOUND       = CAMERA_ERROR_CLASS | 0x09,            /**< No camera device */
+       CAMERA_ERROR_SOUND_POLICY_BY_CALL   = CAMERA_ERROR_CLASS | 0x0a,            /**< Blocked by Audio Session Manager - CALL (Deprecated since 3.0) */
+       CAMERA_ERROR_SOUND_POLICY_BY_ALARM  = CAMERA_ERROR_CLASS | 0x0b,            /**< Blocked by Audio Session Manager - ALARM (Deprecated since 3.0) */
+       CAMERA_ERROR_ESD                    = CAMERA_ERROR_CLASS | 0x0c,            /**< ESD situation */
+       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_e;
 
 /**
  * @brief Enumeration for the camera state.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_STATE_NONE,       /**< Before creating */
-    CAMERA_STATE_CREATED,    /**< Created, but not initialized yet */
-    CAMERA_STATE_PREVIEW,    /**< Preview */
-    CAMERA_STATE_CAPTURING,  /**< While capturing */
-    CAMERA_STATE_CAPTURED    /**< After capturing */
+typedef enum {
+       CAMERA_STATE_NONE,       /**< Before creating */
+       CAMERA_STATE_CREATED,    /**< Created, but not initialized yet */
+       CAMERA_STATE_PREVIEW,    /**< Preview */
+       CAMERA_STATE_CAPTURING,  /**< While capturing */
+       CAMERA_STATE_CAPTURED    /**< After capturing */
 } camera_state_e;
 
 /**
  * @brief Enumeration for the camera device.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_DEVICE_CAMERA0 = 0, /**< Primary camera */
-    CAMERA_DEVICE_CAMERA1      /**< Secondary camera */
+typedef enum {
+       CAMERA_DEVICE_CAMERA0 = 0, /**< Primary camera */
+       CAMERA_DEVICE_CAMERA1      /**< Secondary camera */
 } camera_device_e;
 
 /**
  * @brief Enumeration for the camera pixel format.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
+typedef enum {
        CAMERA_PIXEL_FORMAT_INVALID = -1,   /**< Invalid pixel format */
        CAMERA_PIXEL_FORMAT_NV12,           /**< NV12 pixel format */
        CAMERA_PIXEL_FORMAT_NV12T,          /**< NV12 Tiled pixel format */
@@ -112,8 +108,7 @@ typedef enum
  * @brief Enumeration for the camera display type.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
+typedef enum {
        CAMERA_DISPLAY_TYPE_OVERLAY = 0,        /**< Overlay surface display */
        CAMERA_DISPLAY_TYPE_EVAS,               /**< Evas object surface display */
        CAMERA_DISPLAY_TYPE_NONE,               /**< This disposes off buffers */
@@ -124,8 +119,7 @@ typedef enum
  * @brief Enumeration for the camera policy.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
+typedef enum {
        CAMERA_POLICY_NONE = 0,         /**< None */
        CAMERA_POLICY_SOUND,            /**< Sound policy (Deprecated since 3.0) */
        CAMERA_POLICY_SOUND_BY_CALL,    /**< Sound policy by CALL (Deprecated since 3.0) */
@@ -138,8 +132,7 @@ typedef enum
  * @brief Enumeration for the camera rotation type.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
+typedef enum {
        CAMERA_ROTATION_NONE,   /**< No rotation */
        CAMERA_ROTATION_90,             /**< 90 degree rotation */
        CAMERA_ROTATION_180,    /**< 180 degree rotation */
@@ -151,8 +144,7 @@ typedef enum
  * @brief Enumeration for the camera flip type.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
+typedef enum {
        CAMERA_FLIP_NONE,       /**< No Flip */
        CAMERA_FLIP_HORIZONTAL, /**< Horizontal flip */
        CAMERA_FLIP_VERTICAL,   /**< Vertical flip */
@@ -163,12 +155,11 @@ typedef enum
  * @brief Enumeration for the camera focus state.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_FOCUS_STATE_RELEASED = 0, /**< Focus released */
-    CAMERA_FOCUS_STATE_ONGOING,      /**< Focus in progress */
-    CAMERA_FOCUS_STATE_FOCUSED,      /**< Focus succeeded */
-    CAMERA_FOCUS_STATE_FAILED,       /**< Focus failed */
+typedef enum {
+       CAMERA_FOCUS_STATE_RELEASED = 0, /**< Focus released */
+       CAMERA_FOCUS_STATE_ONGOING,      /**< Focus in progress */
+       CAMERA_FOCUS_STATE_FOCUSED,      /**< Focus succeeded */
+       CAMERA_FOCUS_STATE_FAILED,       /**< Focus failed */
 } camera_focus_state_e;
 
 /**
@@ -193,8 +184,7 @@ typedef enum {
  * @brief The structure type of the image data.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
- typedef struct
-{
+typedef struct {
        unsigned char *data;            /**< The image buffer */
        unsigned int size;              /**< The size of the buffer */
        int width;                      /**< The width of the image */
@@ -208,8 +198,7 @@ typedef enum {
  * @brief The structure type for face detection.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef struct
-{
+typedef struct {
        int id;         /**< The ID of each face */
        int score;      /**< The confidence level for the detection of the face */
        int x;          /**< The x coordinates of the face */
@@ -222,8 +211,7 @@ typedef struct
  * @brief The structure type to preview stream data.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef struct
-{
+typedef struct {
        camera_pixel_format_e format;   /**< The format of the frame pixel */
        int width;                      /**< The width of the frame */
        int height;                     /**< The height of the frame */
@@ -272,7 +260,7 @@ typedef void *camera_display_h;
  * @brief Gets a display handle.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-#define GET_DISPLAY(x) (void*)(x)
+#define GET_DISPLAY(x) (void *)(x)
 
 #endif
 
@@ -289,8 +277,7 @@ typedef void *camera_display_h;
  * @brief Enumeration for the camera display mode.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
+typedef enum {
        CAMERA_DISPLAY_MODE_LETTER_BOX = 0,       /**< Letter box */
        CAMERA_DISPLAY_MODE_ORIGIN_SIZE,          /**< Origin size */
        CAMERA_DISPLAY_MODE_FULL,                 /**< Full screen */
@@ -312,57 +299,55 @@ typedef enum
  * @brief Enumeration for the color tone, which provides the impression of looking through a tinted glass.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_ATTR_EFFECT_NONE = 0,              /**< None */
-    CAMERA_ATTR_EFFECT_MONO,                  /**< Mono */
-    CAMERA_ATTR_EFFECT_SEPIA,                 /**< Sepia */
-    CAMERA_ATTR_EFFECT_NEGATIVE,              /**< Negative */
-    CAMERA_ATTR_EFFECT_BLUE,                  /**< Blue */
-    CAMERA_ATTR_EFFECT_GREEN,                 /**< Green */
-    CAMERA_ATTR_EFFECT_AQUA,                  /**< Aqua */
-    CAMERA_ATTR_EFFECT_VIOLET,                /**< Violet */
-    CAMERA_ATTR_EFFECT_ORANGE,                /**< Orange */
-    CAMERA_ATTR_EFFECT_GRAY,                  /**< Gray */
-    CAMERA_ATTR_EFFECT_RED,                   /**< Red */
-    CAMERA_ATTR_EFFECT_ANTIQUE,               /**< Antique */
-    CAMERA_ATTR_EFFECT_WARM,                  /**< Warm */
-    CAMERA_ATTR_EFFECT_PINK,                  /**< Pink */
-    CAMERA_ATTR_EFFECT_YELLOW,                /**< Yellow */
-    CAMERA_ATTR_EFFECT_PURPLE,                /**< Purple */
-    CAMERA_ATTR_EFFECT_EMBOSS,                /**< Emboss */
-    CAMERA_ATTR_EFFECT_OUTLINE,               /**< Outline */
-    CAMERA_ATTR_EFFECT_SOLARIZATION,          /**< Solarization */
-    CAMERA_ATTR_EFFECT_SKETCH,                /**< Sketch */
-    CAMERA_ATTR_EFFECT_WASHED,                /**< Washed */
-    CAMERA_ATTR_EFFECT_VINTAGE_WARM,          /**< Vintage warm  */
-    CAMERA_ATTR_EFFECT_VINTAGE_COLD,          /**< Vintage cold */
-    CAMERA_ATTR_EFFECT_POSTERIZATION,         /**< Posterization */
-    CAMERA_ATTR_EFFECT_CARTOON,               /**< Cartoon */
-    CAMERA_ATTR_EFFECT_SELECTIVE_RED,         /**< Selective color - Red */
-    CAMERA_ATTR_EFFECT_SELECTIVE_GREEN,       /**< Selective color - Green */
-    CAMERA_ATTR_EFFECT_SELECTIVE_BLUE,        /**< Selective color - Blue */
-    CAMERA_ATTR_EFFECT_SELECTIVE_YELLOW,      /**< Selective color - Yellow */
-    CAMERA_ATTR_EFFECT_SELECTIVE_RED_YELLOW,  /**< Selective color - Red and Yellow */
-    CAMERA_ATTR_EFFECT_OTHER_GRAPHICS,        /**< Other Graphic effects */
+typedef enum {
+       CAMERA_ATTR_EFFECT_NONE = 0,              /**< None */
+       CAMERA_ATTR_EFFECT_MONO,                  /**< Mono */
+       CAMERA_ATTR_EFFECT_SEPIA,                 /**< Sepia */
+       CAMERA_ATTR_EFFECT_NEGATIVE,              /**< Negative */
+       CAMERA_ATTR_EFFECT_BLUE,                  /**< Blue */
+       CAMERA_ATTR_EFFECT_GREEN,                 /**< Green */
+       CAMERA_ATTR_EFFECT_AQUA,                  /**< Aqua */
+       CAMERA_ATTR_EFFECT_VIOLET,                /**< Violet */
+       CAMERA_ATTR_EFFECT_ORANGE,                /**< Orange */
+       CAMERA_ATTR_EFFECT_GRAY,                  /**< Gray */
+       CAMERA_ATTR_EFFECT_RED,                   /**< Red */
+       CAMERA_ATTR_EFFECT_ANTIQUE,               /**< Antique */
+       CAMERA_ATTR_EFFECT_WARM,                  /**< Warm */
+       CAMERA_ATTR_EFFECT_PINK,                  /**< Pink */
+       CAMERA_ATTR_EFFECT_YELLOW,                /**< Yellow */
+       CAMERA_ATTR_EFFECT_PURPLE,                /**< Purple */
+       CAMERA_ATTR_EFFECT_EMBOSS,                /**< Emboss */
+       CAMERA_ATTR_EFFECT_OUTLINE,               /**< Outline */
+       CAMERA_ATTR_EFFECT_SOLARIZATION,          /**< Solarization */
+       CAMERA_ATTR_EFFECT_SKETCH,                /**< Sketch */
+       CAMERA_ATTR_EFFECT_WASHED,                /**< Washed */
+       CAMERA_ATTR_EFFECT_VINTAGE_WARM,          /**< Vintage warm  */
+       CAMERA_ATTR_EFFECT_VINTAGE_COLD,          /**< Vintage cold */
+       CAMERA_ATTR_EFFECT_POSTERIZATION,         /**< Posterization */
+       CAMERA_ATTR_EFFECT_CARTOON,               /**< Cartoon */
+       CAMERA_ATTR_EFFECT_SELECTIVE_RED,         /**< Selective color - Red */
+       CAMERA_ATTR_EFFECT_SELECTIVE_GREEN,       /**< Selective color - Green */
+       CAMERA_ATTR_EFFECT_SELECTIVE_BLUE,        /**< Selective color - Blue */
+       CAMERA_ATTR_EFFECT_SELECTIVE_YELLOW,      /**< Selective color - Yellow */
+       CAMERA_ATTR_EFFECT_SELECTIVE_RED_YELLOW,  /**< Selective color - Red and Yellow */
+       CAMERA_ATTR_EFFECT_OTHER_GRAPHICS,        /**< Other Graphic effects */
 } camera_attr_effect_mode_e;
 
 /**
  * @brief Enumeration for the white balance levels of the camera.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_ATTR_WHITE_BALANCE_NONE = 0,     /**< None */
-    CAMERA_ATTR_WHITE_BALANCE_AUTOMATIC,    /**< Automatic */
-    CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT,     /**< Daylight */
-    CAMERA_ATTR_WHITE_BALANCE_CLOUDY,       /**< Cloudy */
-    CAMERA_ATTR_WHITE_BALANCE_FLUORESCENT,  /**< Fluorescent */
-    CAMERA_ATTR_WHITE_BALANCE_INCANDESCENT, /**< Incandescent */
-    CAMERA_ATTR_WHITE_BALANCE_SHADE,        /**< Shade */
-    CAMERA_ATTR_WHITE_BALANCE_HORIZON,      /**< Horizon */
-    CAMERA_ATTR_WHITE_BALANCE_FLASH,        /**< Flash */
-    CAMERA_ATTR_WHITE_BALANCE_CUSTOM,       /**< Custom */
+typedef enum {
+       CAMERA_ATTR_WHITE_BALANCE_NONE = 0,     /**< None */
+       CAMERA_ATTR_WHITE_BALANCE_AUTOMATIC,    /**< Automatic */
+       CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT,     /**< Daylight */
+       CAMERA_ATTR_WHITE_BALANCE_CLOUDY,       /**< Cloudy */
+       CAMERA_ATTR_WHITE_BALANCE_FLUORESCENT,  /**< Fluorescent */
+       CAMERA_ATTR_WHITE_BALANCE_INCANDESCENT, /**< Incandescent */
+       CAMERA_ATTR_WHITE_BALANCE_SHADE,        /**< Shade */
+       CAMERA_ATTR_WHITE_BALANCE_HORIZON,      /**< Horizon */
+       CAMERA_ATTR_WHITE_BALANCE_FLASH,        /**< Flash */
+       CAMERA_ATTR_WHITE_BALANCE_CUSTOM,       /**< Custom */
 } camera_attr_whitebalance_e;
 
 /**
@@ -370,124 +355,116 @@ typedef enum
  * @details The mode of operation can be in daylight, night, or back-light.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_ATTR_SCENE_MODE_NORMAL = 0,     /**< Normal */
-    CAMERA_ATTR_SCENE_MODE_PORTRAIT,       /**< Portrait */
-    CAMERA_ATTR_SCENE_MODE_LANDSCAPE,      /**< Landscape */
-    CAMERA_ATTR_SCENE_MODE_SPORTS,         /**< Sports */
-    CAMERA_ATTR_SCENE_MODE_PARTY_N_INDOOR, /**< Party & indoor */
-    CAMERA_ATTR_SCENE_MODE_BEACH_N_INDOOR, /**< Beach & indoor */
-    CAMERA_ATTR_SCENE_MODE_SUNSET,         /**< Sunset */
-    CAMERA_ATTR_SCENE_MODE_DUSK_N_DAWN,    /**< Dusk & dawn */
-    CAMERA_ATTR_SCENE_MODE_FALL_COLOR,     /**< Fall */
-    CAMERA_ATTR_SCENE_MODE_NIGHT_SCENE,    /**< Night scene */
-    CAMERA_ATTR_SCENE_MODE_FIREWORK,       /**< Firework */
-    CAMERA_ATTR_SCENE_MODE_TEXT,           /**< Text */
-    CAMERA_ATTR_SCENE_MODE_SHOW_WINDOW,    /**< Show window */
-    CAMERA_ATTR_SCENE_MODE_CANDLE_LIGHT,   /**< Candle light */
-    CAMERA_ATTR_SCENE_MODE_BACKLIGHT,      /**< Backlight */
-    CAMERA_ATTR_SCENE_MODE_AQUA,           /**< Aqua */
+typedef enum {
+       CAMERA_ATTR_SCENE_MODE_NORMAL = 0,     /**< Normal */
+       CAMERA_ATTR_SCENE_MODE_PORTRAIT,       /**< Portrait */
+       CAMERA_ATTR_SCENE_MODE_LANDSCAPE,      /**< Landscape */
+       CAMERA_ATTR_SCENE_MODE_SPORTS,         /**< Sports */
+       CAMERA_ATTR_SCENE_MODE_PARTY_N_INDOOR, /**< Party & indoor */
+       CAMERA_ATTR_SCENE_MODE_BEACH_N_INDOOR, /**< Beach & indoor */
+       CAMERA_ATTR_SCENE_MODE_SUNSET,         /**< Sunset */
+       CAMERA_ATTR_SCENE_MODE_DUSK_N_DAWN,    /**< Dusk & dawn */
+       CAMERA_ATTR_SCENE_MODE_FALL_COLOR,     /**< Fall */
+       CAMERA_ATTR_SCENE_MODE_NIGHT_SCENE,    /**< Night scene */
+       CAMERA_ATTR_SCENE_MODE_FIREWORK,       /**< Firework */
+       CAMERA_ATTR_SCENE_MODE_TEXT,           /**< Text */
+       CAMERA_ATTR_SCENE_MODE_SHOW_WINDOW,    /**< Show window */
+       CAMERA_ATTR_SCENE_MODE_CANDLE_LIGHT,   /**< Candle light */
+       CAMERA_ATTR_SCENE_MODE_BACKLIGHT,      /**< Backlight */
+       CAMERA_ATTR_SCENE_MODE_AQUA,           /**< Aqua */
 } camera_attr_scene_mode_e;
 
 /**
  * @brief Enumeration for the auto focus mode.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_ATTR_AF_NONE = 0,    /**< auto-focus is not set */
-    CAMERA_ATTR_AF_NORMAL,      /**< auto-focus in the normal mode  */
-    CAMERA_ATTR_AF_MACRO,       /**< auto-focus in the macro mode(close distance)  */
-    CAMERA_ATTR_AF_FULL,        /**< auto-focus in the full mode(all range scan, limited by device spec) */
+typedef enum {
+       CAMERA_ATTR_AF_NONE = 0,    /**< auto-focus is not set */
+       CAMERA_ATTR_AF_NORMAL,      /**< auto-focus in the normal mode  */
+       CAMERA_ATTR_AF_MACRO,       /**< auto-focus in the macro mode(close distance)  */
+       CAMERA_ATTR_AF_FULL,        /**< auto-focus in the full mode(all range scan, limited by device spec) */
 } camera_attr_af_mode_e;
 
 /**
  * @brief Enumeration for the ISO levels of the camera.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_ATTR_ISO_AUTO = 0, /**< ISO auto mode */
-    CAMERA_ATTR_ISO_50,       /**< ISO 50 */
-    CAMERA_ATTR_ISO_100,      /**< ISO 100 */
-    CAMERA_ATTR_ISO_200,      /**< ISO 200 */
-    CAMERA_ATTR_ISO_400,      /**< ISO 400 */
-    CAMERA_ATTR_ISO_800,      /**< ISO 800 */
-    CAMERA_ATTR_ISO_1600,     /**< ISO 1600 */
-    CAMERA_ATTR_ISO_3200,     /**< ISO 3200 */
+typedef enum {
+       CAMERA_ATTR_ISO_AUTO = 0, /**< ISO auto mode */
+       CAMERA_ATTR_ISO_50,       /**< ISO 50 */
+       CAMERA_ATTR_ISO_100,      /**< ISO 100 */
+       CAMERA_ATTR_ISO_200,      /**< ISO 200 */
+       CAMERA_ATTR_ISO_400,      /**< ISO 400 */
+       CAMERA_ATTR_ISO_800,      /**< ISO 800 */
+       CAMERA_ATTR_ISO_1600,     /**< ISO 1600 */
+       CAMERA_ATTR_ISO_3200,     /**< ISO 3200 */
 } camera_attr_iso_e;
 
 /**
  * @brief Enumeration for the camera exposure modes.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_ATTR_EXPOSURE_MODE_OFF = 0,   /**< Off */
-    CAMERA_ATTR_EXPOSURE_MODE_ALL,       /**< All mode */
-    CAMERA_ATTR_EXPOSURE_MODE_CENTER,    /**< Center mode */
-    CAMERA_ATTR_EXPOSURE_MODE_SPOT,      /**< Spot mode */
-    CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,    /**< Custom mode */
+typedef enum {
+       CAMERA_ATTR_EXPOSURE_MODE_OFF = 0,   /**< Off */
+       CAMERA_ATTR_EXPOSURE_MODE_ALL,       /**< All mode */
+       CAMERA_ATTR_EXPOSURE_MODE_CENTER,    /**< Center mode */
+       CAMERA_ATTR_EXPOSURE_MODE_SPOT,      /**< Spot mode */
+       CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,    /**< Custom mode */
 } camera_attr_exposure_mode_e;
 
 /**
  * @brief Enumeration for the orientation values of tag.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT = 1,      /**< Row #0 is at the top, Column #0 is to the left */
-    CAMERA_ATTR_TAG_ORIENTATION_TOP_RIGHT = 2,     /**< Row #0 is at the top, Column #0 is to the right (flipped) */
-    CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_RIGHT = 3,  /**< Row #0 is at the bottom, Column #0 is to the right */
-    CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_LEFT = 4,   /**< Row #0 is at the bottom, Column #0 is to the left (flipped) */
-    CAMERA_ATTR_TAG_ORIENTATION_LEFT_TOP = 5,      /**< Row #0 is to the left, Column #0 is at the top (flipped) */
-    CAMERA_ATTR_TAG_ORIENTATION_RIGHT_TOP = 6,     /**< Row #0 is to the right, Column #0 is at the top */
-    CAMERA_ATTR_TAG_ORIENTATION_RIGHT_BOTTOM = 7,  /**< Row #0 is to the right, Column #0 is at the bottom (flipped) */
-    CAMERA_ATTR_TAG_ORIENTATION_LEFT_BOTTOM = 8,   /**< Row #0 is to the left, Column #0 is at the bottom */
+typedef enum {
+       CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT = 1,      /**< Row #0 is at the top, Column #0 is to the left */
+       CAMERA_ATTR_TAG_ORIENTATION_TOP_RIGHT = 2,     /**< Row #0 is at the top, Column #0 is to the right (flipped) */
+       CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_RIGHT = 3,  /**< Row #0 is at the bottom, Column #0 is to the right */
+       CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_LEFT = 4,   /**< Row #0 is at the bottom, Column #0 is to the left (flipped) */
+       CAMERA_ATTR_TAG_ORIENTATION_LEFT_TOP = 5,      /**< Row #0 is to the left, Column #0 is at the top (flipped) */
+       CAMERA_ATTR_TAG_ORIENTATION_RIGHT_TOP = 6,     /**< Row #0 is to the right, Column #0 is at the top */
+       CAMERA_ATTR_TAG_ORIENTATION_RIGHT_BOTTOM = 7,  /**< Row #0 is to the right, Column #0 is at the bottom (flipped) */
+       CAMERA_ATTR_TAG_ORIENTATION_LEFT_BOTTOM = 8,   /**< Row #0 is to the left, Column #0 is at the bottom */
 } camera_attr_tag_orientation_e;
 
 /**
  * @brief Enumeration for the flash mode.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_ATTR_FLASH_MODE_OFF = 0,          /**< Always off */
-    CAMERA_ATTR_FLASH_MODE_ON,               /**< Always splashes */
-    CAMERA_ATTR_FLASH_MODE_AUTO,             /**< Depending on intensity of light, strobe starts to flash */
-    CAMERA_ATTR_FLASH_MODE_REDEYE_REDUCTION, /**< Red eye reduction. Multiple flash before capturing */
-    CAMERA_ATTR_FLASH_MODE_SLOW_SYNC,        /**< Slow sync curtain synchronization */
-    CAMERA_ATTR_FLASH_MODE_FRONT_CURTAIN,    /**< Front curtain synchronization */
-    CAMERA_ATTR_FLASH_MODE_REAR_CURTAIN,     /**< Rear curtain synchronization */
-    CAMERA_ATTR_FLASH_MODE_PERMANENT,        /**< Keep turned on until turning off */
+typedef enum {
+       CAMERA_ATTR_FLASH_MODE_OFF = 0,          /**< Always off */
+       CAMERA_ATTR_FLASH_MODE_ON,               /**< Always splashes */
+       CAMERA_ATTR_FLASH_MODE_AUTO,             /**< Depending on intensity of light, strobe starts to flash */
+       CAMERA_ATTR_FLASH_MODE_REDEYE_REDUCTION, /**< Red eye reduction. Multiple flash before capturing */
+       CAMERA_ATTR_FLASH_MODE_SLOW_SYNC,        /**< Slow sync curtain synchronization */
+       CAMERA_ATTR_FLASH_MODE_FRONT_CURTAIN,    /**< Front curtain synchronization */
+       CAMERA_ATTR_FLASH_MODE_REAR_CURTAIN,     /**< Rear curtain synchronization */
+       CAMERA_ATTR_FLASH_MODE_PERMANENT,        /**< Keep turned on until turning off */
 } camera_attr_flash_mode_e;
 
 /**
  * @brief Enumeration to preview FPS.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    CAMERA_ATTR_FPS_AUTO = 0, /**< AUTO FPS */
-    CAMERA_ATTR_FPS_7 = 7,    /**< 7 FPS */
-    CAMERA_ATTR_FPS_8 = 8,    /**< 8 FPS */
-    CAMERA_ATTR_FPS_15 = 15,  /**< 15 FPS */
-    CAMERA_ATTR_FPS_20 = 20,  /**< 20 FPS */
-    CAMERA_ATTR_FPS_24 = 24,  /**< 24 FPS */
-    CAMERA_ATTR_FPS_25 = 25,  /**< 25 FPS */
-    CAMERA_ATTR_FPS_30 = 30,  /**< 30 FPS */
-    CAMERA_ATTR_FPS_60 = 60,  /**< 60 FPS */
-    CAMERA_ATTR_FPS_90 = 90,  /**< 90 FPS */
-    CAMERA_ATTR_FPS_120 = 120 /**< 120 FPS */
+typedef enum {
+       CAMERA_ATTR_FPS_AUTO = 0, /**< AUTO FPS */
+       CAMERA_ATTR_FPS_7 = 7,    /**< 7 FPS */
+       CAMERA_ATTR_FPS_8 = 8,    /**< 8 FPS */
+       CAMERA_ATTR_FPS_15 = 15,  /**< 15 FPS */
+       CAMERA_ATTR_FPS_20 = 20,  /**< 20 FPS */
+       CAMERA_ATTR_FPS_24 = 24,  /**< 24 FPS */
+       CAMERA_ATTR_FPS_25 = 25,  /**< 25 FPS */
+       CAMERA_ATTR_FPS_30 = 30,  /**< 30 FPS */
+       CAMERA_ATTR_FPS_60 = 60,  /**< 60 FPS */
+       CAMERA_ATTR_FPS_90 = 90,  /**< 90 FPS */
+       CAMERA_ATTR_FPS_120 = 120 /**< 120 FPS */
 } camera_attr_fps_e;
 
 /**
  * @brief Enumeration for the theater mode.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
+typedef enum {
        CAMERA_ATTR_THEATER_MODE_DISABLE = 0, /**< Disable theater mode - External display shows same image as device display */
        CAMERA_ATTR_THEATER_MODE_ENABLE = 2,  /**< Enable theater mode - Preview image is displayed on external display with full screen mode, but preview image is not shown on device display */
        CAMERA_ATTR_THEATER_MODE_CLONE = 1    /**< Clone mode - Preview image is displayed on external display with full screen mode. Also preview image is shown by the UI on device display */
@@ -497,8 +474,7 @@ typedef enum
  * @brief Enumeration for HDR capture mode.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
+typedef enum {
        CAMERA_ATTR_HDR_MODE_DISABLE = 0,  /**< Disable HDR capture */
        CAMERA_ATTR_HDR_MODE_ENABLE,       /**< Enable HDR capture */
        CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL /**< Enable HDR capture and keep original image data */
@@ -544,8 +520,7 @@ typedef enum {
  *      will invoke this callback if you register this callback using camera_set_state_changed_cb().
  * @see        camera_set_state_changed_cb()
  */
-typedef void (*camera_state_changed_cb)(camera_state_e previous, camera_state_e current,
-        bool by_policy, void *user_data);
+typedef void (*camera_state_changed_cb)(camera_state_e previous, camera_state_e current, bool by_policy, void *user_data);
 
 /**
  * @brief Called when the camera is interrupted by policy.
@@ -699,8 +674,7 @@ typedef bool (*camera_supported_capture_resolution_cb)(int width, int height, vo
  * @pre        camera_foreach_supported_capture_format() will invoke this callback.
  * @see        camera_foreach_supported_capture_format()
  */
-typedef bool (*camera_supported_capture_format_cb)(camera_pixel_format_e format,
-        void *user_data);
+typedef bool (*camera_supported_capture_format_cb)(camera_pixel_format_e format, void *user_data);
 
 /**
  * @brief Called once for the pixel format of each supported preview format.
@@ -711,8 +685,7 @@ typedef bool (*camera_supported_capture_format_cb)(camera_pixel_format_e format,
  * @pre        camera_foreach_supported_preview_format() will invoke this callback.
  * @see        camera_foreach_supported_preview_format()
  */
-typedef bool (*camera_supported_preview_format_cb)(camera_pixel_format_e format,
-        void *user_data);
+typedef bool (*camera_supported_preview_format_cb)(camera_pixel_format_e format, void *user_data);
 
 /**
  * @}
@@ -1152,7 +1125,7 @@ int legacy_camera_stop_face_detection(camera_h camera);
  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  *
  */
- bool legacy_camera_is_supported_continuous_capture(camera_h camera);
+bool legacy_camera_is_supported_continuous_capture(camera_h camera);
 
 /**
  * @brief Retrieves all supported camera preview resolutions by invoking the callback function once for each supported camera preview resolution.
@@ -1173,7 +1146,7 @@ int legacy_camera_stop_face_detection(camera_h camera);
  * @see        camera_supported_preview_resolution_cb()
  */
 int legacy_camera_foreach_supported_preview_resolution(camera_h camera,
-        camera_supported_preview_resolution_cb callback, void *user_data);
+       camera_supported_preview_resolution_cb callback, void *user_data);
 
 /**
  * @}
@@ -1397,7 +1370,7 @@ int legacy_camera_get_capture_resolution(camera_h camera, int *width, int *heigh
  * @see        camera_supported_capture_resolution_cb()
  */
 int legacy_camera_foreach_supported_capture_resolution(camera_h camera,
-        camera_supported_capture_resolution_cb callback, void *user_data);
+       camera_supported_capture_resolution_cb callback, void *user_data);
 
 /**
  * @}
@@ -1471,7 +1444,7 @@ int legacy_camera_get_capture_format(camera_h camera, camera_pixel_format_e *for
  * @see        camera_supported_capture_format_cb()
  */
 int legacy_camera_foreach_supported_capture_format(camera_h camera,
-        camera_supported_capture_format_cb callback, void *user_data);
+       camera_supported_capture_format_cb callback, void *user_data);
 
 /**
  * @}
@@ -1555,7 +1528,7 @@ int legacy_camera_get_facing_direction(camera_h camera, camera_facing_direction_
  * @see        camera_supported_preview_format_cb()
  */
 int legacy_camera_foreach_supported_preview_format(camera_h camera,
-        camera_supported_preview_format_cb callback, void *user_data);
+       camera_supported_preview_format_cb callback, void *user_data);
 
 /**
  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
@@ -1720,8 +1693,7 @@ int legacy_camera_unset_media_packet_preview_cb(camera_h camera);
  * @see legacy_camera_unset_state_changed_cb()
  * @see        camera_state_changed_cb()
  */
-int legacy_camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callback,
-        void *user_data);
+int legacy_camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callback, void *user_data);
 
 /**
  * @brief Unregisters the callback function.
@@ -1750,8 +1722,7 @@ int legacy_camera_unset_state_changed_cb(camera_h camera);
  * @see legacy_camera_unset_interrupted_cb()
  * @see        camera_interrupted_cb()
  */
-int legacy_camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback,
-           void *user_data);
+int legacy_camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback, void *user_data);
 
 /**
  * @brief Unregisters the callback function.
@@ -1783,8 +1754,7 @@ int legacy_camera_unset_interrupted_cb(camera_h camera);
  * @see        camera_unset_focus_changed_cb()
  * @see        camera_focus_changed_cb()
  */
-int legacy_camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callback,
-        void *user_data);
+int legacy_camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callback, void *user_data);
 
 /**
  * @brief Unregisters the callback function.
@@ -1866,8 +1836,7 @@ typedef bool (*camera_attr_supported_af_mode_cb)(camera_attr_af_mode_e mode, voi
  * @see        camera_attr_foreach_supported_exposure_mode()
  * @see        #camera_attr_exposure_mode_e
  */
-typedef bool (*camera_attr_supported_exposure_mode_cb)(camera_attr_exposure_mode_e mode,
-        void *user_data);
+typedef bool (*camera_attr_supported_exposure_mode_cb)(camera_attr_exposure_mode_e mode, void *user_data);
 
 /**
  * @brief Called to get each supported ISO mode.
@@ -1890,8 +1859,7 @@ typedef bool (*camera_attr_supported_iso_cb)(camera_attr_iso_e iso, void *user_d
  * @see        camera_attr_foreach_supported_whitebalance()
  * @see        #camera_attr_whitebalance_e
  */
-typedef bool (*camera_attr_supported_whitebalance_cb)(camera_attr_whitebalance_e wb,
-        void *user_data);
+typedef bool (*camera_attr_supported_whitebalance_cb)(camera_attr_whitebalance_e wb, void *user_data);
 
 /**
  * @brief Called to get each supported effect mode.
@@ -1902,8 +1870,7 @@ typedef bool (*camera_attr_supported_whitebalance_cb)(camera_attr_whitebalance_e
  * @pre        camera_attr_foreach_supported_effect() will invoke this callback.
  * @see        camera_attr_foreach_supported_effect()
  */
-typedef bool (*camera_attr_supported_effect_cb)(camera_attr_effect_mode_e effect,
-        void *user_data);
+typedef bool (*camera_attr_supported_effect_cb)(camera_attr_effect_mode_e effect, void *user_data);
 
 /**
  * @brief Called to get each supported scene mode.
@@ -1915,8 +1882,7 @@ typedef bool (*camera_attr_supported_effect_cb)(camera_attr_effect_mode_e effect
  * @see        camera_attr_foreach_supported_scene_mode()
  * @see        #camera_attr_scene_mode_e
  */
-typedef bool (*camera_attr_supported_scene_mode_cb)(camera_attr_scene_mode_e mode,
-        void *user_data);
+typedef bool (*camera_attr_supported_scene_mode_cb)(camera_attr_scene_mode_e mode, void *user_data);
 
 /**
  * @brief Called to get each supported flash mode.
@@ -1927,8 +1893,7 @@ typedef bool (*camera_attr_supported_scene_mode_cb)(camera_attr_scene_mode_e mod
  * @pre        camera_attr_foreach_supported_flash_mode() will invoke this callback.
  * @see        camera_attr_foreach_supported_flash_mode()
  */
-typedef bool (*camera_attr_supported_flash_mode_cb)(camera_attr_flash_mode_e mode,
-        void *user_data);
+typedef bool (*camera_attr_supported_flash_mode_cb)(camera_attr_flash_mode_e mode, void *user_data);
 
 /**
  * @brief Called to get each supported FPS mode.
@@ -2052,8 +2017,7 @@ int legacy_camera_attr_get_preview_fps(camera_h camera, camera_attr_fps_e *fps);
  * @see        camera_attr_get_preview_fps()
  * @see        camera_attr_supported_fps_cb()
  */
-int legacy_camera_attr_foreach_supported_fps(camera_h camera, camera_attr_supported_fps_cb callback,
-        void *user_data);
+int legacy_camera_attr_foreach_supported_fps(camera_h camera, camera_attr_supported_fps_cb callback, void *user_data);
 
 /**
  * @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode.
@@ -2075,8 +2039,8 @@ int legacy_camera_attr_foreach_supported_fps(camera_h camera, camera_attr_suppor
  * @see        camera_attr_get_preview_fps()
  * @see        camera_attr_supported_fps_cb()
  */
-int legacy_camera_attr_foreach_supported_fps_by_resolution(camera_h camera,  int width, int height,
-       camera_attr_supported_fps_cb callback ,void *user_data);
+int legacy_camera_attr_foreach_supported_fps_by_resolution(camera_h camera, int width, int height,
+       camera_attr_supported_fps_cb callbackvoid *user_data);
 
 /**
  * @}
@@ -2272,8 +2236,7 @@ int legacy_camera_attr_clear_af_area(camera_h camera);
  * @see legacy_camera_attr_get_af_mode()
  * @see        camera_attr_supported_af_mode_cb()
  */
-int legacy_camera_attr_foreach_supported_af_mode(camera_h camera,
-        camera_attr_supported_af_mode_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_af_mode(camera_h camera, camera_attr_supported_af_mode_cb callback, void *user_data);
 
 /**
  * @}
@@ -2341,8 +2304,7 @@ int legacy_camera_attr_get_exposure_mode(camera_h camera, camera_attr_exposure_m
  * @see legacy_camera_attr_get_exposure_mode()
  * @see        camera_attr_supported_exposure_mode_cb()
  */
-int legacy_camera_attr_foreach_supported_exposure_mode(camera_h camera,
-        camera_attr_supported_exposure_mode_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_exposure_mode(camera_h camera, camera_attr_supported_exposure_mode_cb callback, void *user_data);
 
 /**
  * @}
@@ -2456,8 +2418,7 @@ int legacy_camera_attr_get_iso(camera_h camera, camera_attr_iso_e *iso);
  * @see legacy_camera_attr_get_iso()
  * @see        camera_attr_supported_iso_cb()
  */
-int legacy_camera_attr_foreach_supported_iso(camera_h camera, camera_attr_supported_iso_cb callback,
-        void *user_data);
+int legacy_camera_attr_foreach_supported_iso(camera_h camera, camera_attr_supported_iso_cb callback, void *user_data);
 
 /**
  * @}
@@ -2525,8 +2486,7 @@ int legacy_camera_attr_get_theater_mode(camera_h camera, camera_attr_theater_mod
  * @see legacy_camera_attr_get_theater_mode()
  * @see        camera_attr_supported_theater_mode_cb()
  */
-int legacy_camera_attr_foreach_supported_theater_mode(camera_h camera,
-        camera_attr_supported_theater_mode_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_theater_mode(camera_h camera, camera_attr_supported_theater_mode_cb callback, void *user_data);
 
 /**
  * @}
@@ -2693,8 +2653,7 @@ int legacy_camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalanc
  * @see legacy_camera_attr_get_whitebalance()
  * @see        camera_attr_supported_whitebalance_cb()
  */
-int legacy_camera_attr_foreach_supported_whitebalance(camera_h camera,
-        camera_attr_supported_whitebalance_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_whitebalance(camera_h camera, camera_attr_supported_whitebalance_cb callback, void *user_data);
 
 /**
  * @}
@@ -2763,8 +2722,7 @@ int legacy_camera_attr_get_effect(camera_h camera, camera_attr_effect_mode_e *ef
  * @see legacy_camera_attr_get_effect()
  * @see        camera_attr_supported_effect_cb()
  */
-int legacy_camera_attr_foreach_supported_effect(camera_h camera,
-        camera_attr_supported_effect_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_effect(camera_h camera, camera_attr_supported_effect_cb callback, void *user_data);
 
 /**
  * @}
@@ -2832,8 +2790,7 @@ int legacy_camera_attr_get_scene_mode(camera_h camera, camera_attr_scene_mode_e
  * @see legacy_camera_attr_get_scene_mode()
  * @see legacy_camera_attr_supported_scene_mode_cb()
  */
-int legacy_camera_attr_foreach_supported_scene_mode(camera_h camera,
-        camera_attr_supported_scene_mode_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_scene_mode(camera_h camera, camera_attr_supported_scene_mode_cb callback, void *user_data);
 
 /**
  * @}
@@ -3012,7 +2969,7 @@ int legacy_camera_attr_remove_geotag(camera_h camera);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/camera
  * @remarks Since 2.4, while setting the flash mode, if the flash was preempted by other APIs,\n
-            then this function returns #CAMERA_ERROR_DEVICE_BUSY error.
+                       then this function returns #CAMERA_ERROR_DEVICE_BUSY error.
  * @param[in] camera The handle to the camera
  * @param[in] mode The flash mode
  * @return @c 0 on success, otherwise a negative error value
@@ -3066,8 +3023,7 @@ int legacy_camera_attr_get_flash_mode(camera_h camera, camera_attr_flash_mode_e
  * @see legacy_camera_attr_get_flash_mode()
  * @see        camera_attr_supported_flash_mode_cb()
  */
-int legacy_camera_attr_foreach_supported_flash_mode(camera_h camera,
-        camera_attr_supported_flash_mode_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_flash_mode(camera_h camera, camera_attr_supported_flash_mode_cb callback, void *user_data);
 
 /**
  * @}
@@ -3147,8 +3103,7 @@ int legacy_camera_attr_get_stream_rotation(camera_h camera , camera_rotation_e *
  * @see legacy_camera_attr_get_stream_rotation()
  * @see legacy_camera_attr_supported_stream_rotation_cb()
  */
-int legacy_camera_attr_foreach_supported_stream_rotation(camera_h camera,
-        camera_attr_supported_stream_rotation_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_stream_rotation(camera_h camera, camera_attr_supported_stream_rotation_cb callback, void *user_data);
 
 /**
  * @}
@@ -3214,8 +3169,7 @@ int legacy_camera_attr_get_stream_flip(camera_h camera , camera_flip_e *flip);
  * @see legacy_camera_attr_get_stream_flip()
  * @see legacy_camera_attr_supported_stream_flip_cb()
  */
-int legacy_camera_attr_foreach_supported_stream_flip(camera_h camera,
-        camera_attr_supported_stream_flip_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_stream_flip(camera_h camera, camera_attr_supported_stream_flip_cb callback, void *user_data);
 
 /**
  * @}
index 0aef5ed..e4bca29 100644 (file)
@@ -42,14 +42,14 @@ typedef enum {
        _CAMERA_EVENT_TYPE_FACE_DETECTION,
        _CAMERA_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR,
        _CAMERA_EVENT_TYPE_NUM
-}_camera_event_e;
+} _camera_event_e;
 
 typedef struct _camera_cb_data {
        int event_type;
        void *handle;
 } camera_cb_data;
 
-typedef struct _camera_s{
+typedef struct _camera_s {
        MMHandleType mm_handle;
 
        void* user_cb[_CAMERA_EVENT_TYPE_NUM];
index b3f3e73..390e181 100644 (file)
@@ -65,7 +65,7 @@ void _camera_remove_cb_message(camera_s *handle)
                        if (!cb_data) {
                                LOGW("cb_data is NULL");
                        } else {
-                               ret = g_idle_remove_by_data (cb_data);
+                               ret = g_idle_remove_by_data(cb_data);
                                LOGW("Remove cb_data[%p]. ret[%d]", cb_data, ret);
 
                                handle->cb_data_list = g_list_remove(handle->cb_data_list, cb_data);
@@ -201,17 +201,15 @@ int __convert_camera_error_code(const char *func, int code)
 
 static gboolean __mm_videostream_callback(MMCamcorderVideoStreamDataType *stream, void *user_data)
 {
-       if (user_data == NULL || stream == NULL) {
+       if (user_data == NULL || stream == NULL)
                return 0;
-       }
 
        camera_s *handle = (camera_s *)user_data;
 
-       if (handle->user_cb[_CAMERA_EVENT_TYPE_PREVIEW]) {
+       if (handle->user_cb[_CAMERA_EVENT_TYPE_PREVIEW])
                ((camera_preview_cb)handle->user_cb[_CAMERA_EVENT_TYPE_PREVIEW])(stream, handle->user_data[_CAMERA_EVENT_TYPE_PREVIEW]);
-       } else if (handle->user_cb[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW]) {
+       else if (handle->user_cb[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW])
                ((camera_preview_cb)handle->user_cb[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW])(stream, handle->user_data[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW]);
-       }
 
        return 1;
 }
@@ -219,9 +217,8 @@ static gboolean __mm_videostream_callback(MMCamcorderVideoStreamDataType *stream
 
 static gboolean __mm_capture_callback(MMCamcorderCaptureDataType *frame, MMCamcorderCaptureDataType *thumbnail, void *user_data)
 {
-       if (user_data == NULL || frame == NULL) {
+       if (user_data == NULL || frame == NULL)
                return 0;
-       }
 
        camera_s *handle = (camera_s *)user_data;
        int ret = MM_ERROR_NONE;
@@ -245,8 +242,8 @@ static gboolean __mm_capture_callback(MMCamcorderCaptureDataType *frame, MMCamco
                        image.format = frame->format;
 
                        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                                         "captured-exif-raw-data", &exif, &exif_size,
-                                                         NULL);
+                               "captured-exif-raw-data", &exif, &exif_size,
+                               NULL);
                        if (ret == MM_ERROR_NONE) {
                                image.exif = exif;
                                image.exif_size = exif_size;
@@ -262,8 +259,8 @@ static gboolean __mm_capture_callback(MMCamcorderCaptureDataType *frame, MMCamco
                }
 
                ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                                 "captured-screennail", &scrnl, &scrnl_size,
-                                                 NULL);
+                       "captured-screennail", &scrnl, &scrnl_size,
+                       NULL);
                if (ret == MM_ERROR_NONE && scrnl) {
                        postview.data = scrnl->data;
                        postview.size = scrnl->length;
@@ -278,18 +275,16 @@ static gboolean __mm_capture_callback(MMCamcorderCaptureDataType *frame, MMCamco
                }
 
                ((camera_capturing_cb)handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE])(&image,
-                                                                                  scrnl ? &postview : NULL,
-                                                                                  thumbnail ? &thumb : NULL,
-                                                                                  handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE]);
+                       scrnl ? &postview : NULL,
+                       thumbnail ? &thumb : NULL,
+                       handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE]);
        }
 
        /* update captured state */
        if (handle->capture_count == 1 && handle->hdr_keep_mode) {
-               if (handle->current_capture_count == 2) {
+               if (handle->current_capture_count == 2)
                        handle->is_capture_completed = true;
-               }
-       } else if (handle->capture_count == handle->current_capture_count ||
-                  handle->is_continuous_shot_break) {
+       } else if (handle->capture_count == handle->current_capture_count || handle->is_continuous_shot_break) {
                handle->is_capture_completed = true;
        }
 
@@ -334,9 +329,8 @@ static camera_state_e __camera_state_convert(MMCamcorderStateType mm_state)
 
 static int __mm_camera_message_callback(int message, void *param, void *user_data)
 {
-       if (user_data == NULL || param == NULL) {
+       if (user_data == NULL || param == NULL)
                return 0;
-       }
 
        int i = 0;
        int camera_error = 0;
@@ -346,9 +340,8 @@ static int __mm_camera_message_callback(int message, void *param, void *user_dat
        camera_policy_e policy = CAMERA_POLICY_NONE;
        MMCamFaceDetectInfo *cam_fd_info = NULL;
 
-       if (handle->relay_message_callback) {
+       if (handle->relay_message_callback)
                handle->relay_message_callback(message, param, handle->relay_user_data);
-       }
 
        switch (message) {
        case MM_MESSAGE_CAMCORDER_STATE_CHANGED:
@@ -359,7 +352,7 @@ static int __mm_camera_message_callback(int message, void *param, void *user_dat
                    (m->state.previous < MM_CAMCORDER_STATE_NONE ||
                     m->state.previous > MM_CAMCORDER_STATE_PAUSED ||
                     m->state.code != 0)) {
-                       LOGI( "Invalid state changed message");
+                       LOGI("Invalid state changed message");
                        break;
                }
 
@@ -388,17 +381,15 @@ static int __mm_camera_message_callback(int message, void *param, void *user_dat
                        LOGW("CAMERA_POLICY_RESOURCE_CONFLICT");
                }
 
-               if (policy != CAMERA_POLICY_NONE &&
-                       handle->state == CAMERA_STATE_CAPTURING) {
+               if (policy != CAMERA_POLICY_NONE && handle->state == CAMERA_STATE_CAPTURING) {
                        handle->state = CAMERA_STATE_CAPTURED;
                        if (handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE]) {
                                ((camera_state_changed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE])(CAMERA_STATE_CAPTURING,
                                        handle->state, policy, handle->user_data[_CAMERA_EVENT_TYPE_STATE_CHANGE]);
                        }
 
-                       if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]) {
+                       if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])
                                ((camera_capture_completed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])(handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]);
-                       }
                }
 
                previous_state = handle->state;
@@ -410,8 +401,7 @@ static int __mm_camera_message_callback(int message, void *param, void *user_dat
                }
 
                /* should change intermediate state MM_CAMCORDER_STATE_READY is not valid in capi , change to NULL state */
-               if (policy != CAMERA_POLICY_NONE &&
-                   m->state.current == MM_CAMCORDER_STATE_NULL) {
+               if (policy != CAMERA_POLICY_NONE && m->state.current == MM_CAMCORDER_STATE_NULL) {
                        if (handle->user_cb[_CAMERA_EVENT_TYPE_INTERRUPTED]) {
                                ((camera_interrupted_cb)handle->user_cb[_CAMERA_EVENT_TYPE_INTERRUPTED])(policy,
                                        previous_state, handle->state, handle->user_data[_CAMERA_EVENT_TYPE_INTERRUPTED]);
@@ -420,41 +410,39 @@ static int __mm_camera_message_callback(int message, void *param, void *user_dat
                        }
                }
                break;
-       case MM_MESSAGE_CAMCORDER_FOCUS_CHANGED :
+       case MM_MESSAGE_CAMCORDER_FOCUS_CHANGED:
                if (handle->user_cb[_CAMERA_EVENT_TYPE_FOCUS_CHANGE]) {
                        ((camera_focus_changed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_FOCUS_CHANGE])(m->code,
-                                                                                                   handle->user_data[_CAMERA_EVENT_TYPE_FOCUS_CHANGE]);
+                               handle->user_data[_CAMERA_EVENT_TYPE_FOCUS_CHANGE]);
                }
                break;
        case MM_MESSAGE_CAMCORDER_CAPTURED:
                handle->current_capture_complete_count = m->code;
                if (handle->state == CAMERA_STATE_CAPTURING &&
-                       (handle->capture_count == 1 ||
-                               m->code == handle->capture_count ||
-                               handle->is_continuous_shot_break)) {
+                       (handle->capture_count == 1 || m->code == handle->capture_count || handle->is_continuous_shot_break)) {
                        /* pseudo state change */
                        previous_state = handle->state;
                        handle->state = CAMERA_STATE_CAPTURED;
-                       if (previous_state != handle->state &&
-                           handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE]) {
+
+                       if (previous_state != handle->state && handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE]) {
                                ((camera_state_changed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE])(previous_state,
-                                                                                                           handle->state,
-                                                                                                           0,
-                                                                                                           handle->user_data[_CAMERA_EVENT_TYPE_STATE_CHANGE]);
+                                       handle->state,
+                                       0,
+                                       handle->user_data[_CAMERA_EVENT_TYPE_STATE_CHANGE]);
                        }
-                       if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]) {
+
+                       if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])
                                ((camera_capture_completed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])(handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]);
-                       }
                }
                break;
        case MM_MESSAGE_CAMCORDER_VIDEO_SNAPSHOT_CAPTURED:
-               if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]) {
+               if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])
                        ((camera_capture_completed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])(handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]);
-               }
+
                break;
        case MM_MESSAGE_CAMCORDER_ERROR:
                switch (m->code) {
-               case MM_ERROR_CAMCORDER_DEVICE :
+               case MM_ERROR_CAMCORDER_DEVICE:
                case MM_ERROR_CAMCORDER_DEVICE_TIMEOUT:
                case MM_ERROR_CAMCORDER_DEVICE_WRONG_JPEG:
                        camera_error = CAMERA_ERROR_DEVICE;
@@ -482,7 +470,7 @@ static int __mm_camera_message_callback(int message, void *param, void *user_dat
                case MM_ERROR_CAMCORDER_DEVICE_REG_TROUBLE:
                        camera_error = CAMERA_ERROR_ESD;
                        break;
-               default :
+               default:
                        camera_error = CAMERA_ERROR_INVALID_OPERATION;
                        break;
                }
@@ -492,8 +480,8 @@ static int __mm_camera_message_callback(int message, void *param, void *user_dat
 
                if (camera_error != 0 && handle->user_cb[_CAMERA_EVENT_TYPE_ERROR]) {
                        ((camera_error_cb)handle->user_cb[_CAMERA_EVENT_TYPE_ERROR])(camera_error,
-                                                                                    handle->state,
-                                                                                    handle->user_data[_CAMERA_EVENT_TYPE_ERROR]);
+                               handle->state,
+                               handle->user_data[_CAMERA_EVENT_TYPE_ERROR]);
                }
 
                break;
@@ -521,8 +509,8 @@ static int __mm_camera_message_callback(int message, void *param, void *user_dat
 
                        if (handle->user_cb[_CAMERA_EVENT_TYPE_FACE_DETECTION]) {
                                ((camera_face_detected_cb)handle->user_cb[_CAMERA_EVENT_TYPE_FACE_DETECTION])(faces,
-                                                                                                             handle->num_of_faces,
-                                                                                                             handle->user_data[_CAMERA_EVENT_TYPE_FACE_DETECTION]);
+                                       handle->num_of_faces,
+                                       handle->user_data[_CAMERA_EVENT_TYPE_FACE_DETECTION]);
                        }
                } else {
                        handle->num_of_faces = 0;
@@ -553,17 +541,15 @@ static int __capture_completed_event_cb(void *data)
                previous_state = handle->state;
                handle->state = CAMERA_STATE_CAPTURED;
 
-               if (previous_state != handle->state &&
-                   handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE]) {
+               if (previous_state != handle->state && handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE]) {
                        ((camera_state_changed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE])(previous_state,
-                                                                                                   handle->state,
-                                                                                                   0,
-                                                                                                   handle->user_data[_CAMERA_EVENT_TYPE_STATE_CHANGE]);
+                               handle->state,
+                               0,
+                               handle->user_data[_CAMERA_EVENT_TYPE_STATE_CHANGE]);
                }
 
-               if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]) {
+               if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])
                        ((camera_capture_completed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])(handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]);
-               }
        }
 
        return false;
@@ -571,7 +557,7 @@ static int __capture_completed_event_cb(void *data)
 
 int legacy_camera_create(camera_device_e device, camera_h* camera)
 {
-       if (camera == NULL){
+       if (camera == NULL) {
                LOGE("INVALID_PARAMETER(0x%08x)", CAMERA_ERROR_INVALID_PARAMETER);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
@@ -583,11 +569,11 @@ int legacy_camera_create(camera_device_e device, camera_h* camera)
        camera_s *handle = NULL;
        char *error = NULL;
 
-       LOGW("device name = [%d]",device);
+       LOGW("device name = [%d]", device);
 
        info.videodev_type = device;
 
-       handle = (camera_s*)malloc( sizeof(camera_s) );
+       handle = (camera_s *)malloc(sizeof(camera_s));
        if (handle == NULL) {
                LOGE("malloc fail");
                return CAMERA_ERROR_OUT_OF_MEMORY;
@@ -598,17 +584,17 @@ int legacy_camera_create(camera_device_e device, camera_h* camera)
        ret = mm_camcorder_create(&handle->mm_handle, &info);
        if (ret != MM_ERROR_NONE) {
                free(handle);
-               return __convert_camera_error_code(__func__,ret);
+               return __convert_camera_error_code(__func__, ret);
        }
 
        preview_format = MM_PIXEL_FORMAT_YUYV;
        rotation = MM_DISPLAY_ROTATION_NONE;
        ret = mm_camcorder_get_attributes(handle->mm_handle, &error,
-                                         MMCAM_RECOMMEND_PREVIEW_FORMAT_FOR_CAPTURE, &preview_format,
-                                         MMCAM_RECOMMEND_DISPLAY_ROTATION, &rotation,
-                                         MMCAM_CAPTURE_WIDTH, &handle->capture_width,
-                                         MMCAM_CAPTURE_HEIGHT, &handle->capture_height,
-                                         NULL);
+               MMCAM_RECOMMEND_PREVIEW_FORMAT_FOR_CAPTURE, &preview_format,
+               MMCAM_RECOMMEND_DISPLAY_ROTATION, &rotation,
+               MMCAM_CAPTURE_WIDTH, &handle->capture_width,
+               MMCAM_CAPTURE_HEIGHT, &handle->capture_height,
+               NULL);
        if (ret != MM_ERROR_NONE) {
                LOGE("mm_camcorder_get_attributes fail(%x)", ret);
                if (error) {
@@ -623,14 +609,14 @@ int legacy_camera_create(camera_device_e device, camera_h* camera)
        }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, &error,
-                                         MMCAM_MODE, MM_CAMCORDER_MODE_VIDEO_CAPTURE,
-                                         MMCAM_CAMERA_FORMAT, preview_format,
-                                         MMCAM_IMAGE_ENCODER, MM_IMAGE_CODEC_JPEG,
-                                         MMCAM_CAPTURE_FORMAT, MM_PIXEL_FORMAT_ENCODED,
-                                         MMCAM_DISPLAY_SURFACE, MM_DISPLAY_SURFACE_NULL,
-                                         MMCAM_DISPLAY_ROTATION, rotation,
-                                         MMCAM_CAPTURE_COUNT, 1,
-                                         NULL);
+               MMCAM_MODE, MM_CAMCORDER_MODE_VIDEO_CAPTURE,
+               MMCAM_CAMERA_FORMAT, preview_format,
+               MMCAM_IMAGE_ENCODER, MM_IMAGE_CODEC_JPEG,
+               MMCAM_CAPTURE_FORMAT, MM_PIXEL_FORMAT_ENCODED,
+               MMCAM_DISPLAY_SURFACE, MM_DISPLAY_SURFACE_NULL,
+               MMCAM_DISPLAY_ROTATION, rotation,
+               MMCAM_CAPTURE_COUNT, 1,
+               NULL);
 
        handle->display_type = CAMERA_DISPLAY_TYPE_NONE;
 
@@ -662,8 +648,8 @@ int legacy_camera_create(camera_device_e device, camera_h* camera)
        g_mutex_init(&handle->idle_cb_lock);
 
        mm_camcorder_set_message_callback(handle->mm_handle,
-                                         __mm_camera_message_callback,
-                                         (void*)handle);
+               __mm_camera_message_callback,
+               (void *)handle);
 
        *camera = (camera_h)handle;
 
@@ -727,8 +713,8 @@ int legacy_camera_start_preview(camera_h camera)
 
        /* for receving MM_MESSAGE_CAMCORDER_CAPTURED evnet must be seted capture callback */
        mm_camcorder_set_video_capture_callback(handle->mm_handle,
-                                               (mm_camcorder_video_capture_callback)__mm_capture_callback,
-                                               (void *)handle);
+               (mm_camcorder_video_capture_callback)__mm_capture_callback,
+               (void *)handle);
 
        mm_camcorder_get_state(handle->mm_handle, &mm_state);
        if (mm_state != MM_CAMCORDER_STATE_READY) {
@@ -798,16 +784,16 @@ int legacy_camera_start_capture(camera_h camera, camera_capturing_cb capturing_c
 
        if (handle->capture_resolution_modified) {
                mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                           MMCAM_CAPTURE_WIDTH, handle->capture_width,
-                                           MMCAM_CAPTURE_HEIGHT, handle->capture_height,
-                                           NULL);
+                       MMCAM_CAPTURE_WIDTH, handle->capture_width,
+                       MMCAM_CAPTURE_HEIGHT, handle->capture_height,
+                       NULL);
 
                handle->capture_resolution_modified = false;
        }
 
        mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                   MMCAM_CAPTURE_COUNT, 1,
-                                   NULL);
+               MMCAM_CAPTURE_COUNT, 1,
+               NULL);
 
        handle->capture_count = 1;
        handle->is_continuous_shot_break = false;
@@ -850,11 +836,10 @@ bool legacy_camera_is_supported_continuous_capture(camera_h camera)
                return false;
        }
 
-       if (info.int_range.max > 1) {
+       if (info.int_range.max > 1)
                return true;
-       } else {
+       else
                return false;
-       }
 }
 
 
@@ -890,9 +875,9 @@ int legacy_camera_start_continuous_capture(camera_h camera, int count, int inter
        supported_zsl = FALSE;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAPTURE_COUNT, count,
-                                         MMCAM_CAPTURE_INTERVAL, interval,
-                                         NULL);
+               MMCAM_CAPTURE_COUNT, count,
+               MMCAM_CAPTURE_INTERVAL, interval,
+               NULL);
        if (ret != MM_ERROR_NONE) {
                LOGE("error set continuous shot attribute 0x%x", ret);
                return __convert_camera_error_code(__func__, ret);
@@ -914,8 +899,8 @@ int legacy_camera_start_continuous_capture(camera_h camera, int count, int inter
        handle->is_capture_completed = false;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_SUPPORT_ZSL_CAPTURE, &supported_zsl,
-                                         NULL);
+               MMCAM_SUPPORT_ZSL_CAPTURE, &supported_zsl,
+               NULL);
        if (ret != MM_ERROR_NONE) {
                LOGE("(%x) error get continuous shot attribute", ret);
        }
@@ -927,17 +912,17 @@ int legacy_camera_start_continuous_capture(camera_h camera, int count, int inter
                int capture_height;
 
                mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                           MMCAM_CAMERA_WIDTH, &preview_width,
-                                           MMCAM_CAMERA_HEIGHT, &preview_height,
-                                           MMCAM_CAPTURE_WIDTH, &capture_width,
-                                           MMCAM_CAPTURE_HEIGHT, &capture_height,
-                                           NULL);
+                       MMCAM_CAMERA_WIDTH, &preview_width,
+                       MMCAM_CAMERA_HEIGHT, &preview_height,
+                       MMCAM_CAPTURE_WIDTH, &capture_width,
+                       MMCAM_CAPTURE_HEIGHT, &capture_height,
+                       NULL);
 
                if (preview_width != capture_width || preview_height != capture_height) {
                        mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                                   MMCAM_CAPTURE_WIDTH, preview_width,
-                                                   MMCAM_CAPTURE_HEIGHT, preview_height,
-                                                   NULL);
+                               MMCAM_CAPTURE_WIDTH, preview_width,
+                               MMCAM_CAPTURE_HEIGHT, preview_height,
+                               NULL);
 
                        handle->capture_resolution_modified = true;
                }
@@ -949,7 +934,7 @@ int legacy_camera_start_continuous_capture(camera_h camera, int count, int inter
        handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE] = (void *)user_data;
 
        ret = mm_camcorder_capture_start(handle->mm_handle);
-       if(ret != MM_ERROR_NONE ){
+       if (ret != MM_ERROR_NONE) {
                LOGE("mm_camcorder_capture_start failed 0x%x", ret);
                handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE] = NULL;
                handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE] = NULL;
@@ -985,14 +970,13 @@ int legacy_camera_stop_continuous_capture(camera_h camera)
        }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         "capture-break-cont-shot", 1,
-                                         NULL);
+               "capture-break-cont-shot", 1,
+               NULL);
        if (ret == MM_ERROR_NONE) {
                handle->is_continuous_shot_break = true;
 
-               if (handle->current_capture_count > 0) {
+               if (handle->current_capture_count > 0)
                        handle->is_capture_completed = true;
-               }
 
                g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, __capture_completed_event_cb, handle, NULL);
        }
@@ -1047,8 +1031,8 @@ bool legacy_camera_is_supported_zero_shutter_lag(camera_h camera)
        }
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_SUPPORT_ZSL_CAPTURE, &supported_zsl,
-                                         NULL);
+               MMCAM_SUPPORT_ZSL_CAPTURE, &supported_zsl,
+               NULL);
        set_last_result(__convert_camera_error_code(__func__, ret));
        if (ret != MM_ERROR_NONE) {
                LOGE("MMCAM_SUPPORT_ZSL_CAPTURE get failed");
@@ -1073,8 +1057,8 @@ bool legacy_camera_is_supported_media_packet_preview_cb(camera_h camera)
        }
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_SUPPORT_MEDIA_PACKET_PREVIEW_CB, &supported,
-                                         NULL);
+               MMCAM_SUPPORT_MEDIA_PACKET_PREVIEW_CB, &supported,
+               NULL);
        set_last_result(__convert_camera_error_code(__func__, ret));
        if (ret != MM_ERROR_NONE) {
                LOGE("MMCAM_SUPPORT_MEDIA_PACKET_PREVIEW_CB get failed");
@@ -1098,8 +1082,8 @@ int legacy_camera_get_device_count(camera_h camera, int *device_count)
        }
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_DEVICE_COUNT, device_count,
-                                         NULL);
+               MMCAM_CAMERA_DEVICE_COUNT, device_count,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1128,15 +1112,15 @@ int legacy_camera_start_face_detection(camera_h camera, camera_face_detected_cb
        }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DETECT_MODE, MM_CAMCORDER_DETECT_MODE_ON,
-                                         NULL);
+               MMCAM_DETECT_MODE, MM_CAMCORDER_DETECT_MODE_ON,
+               NULL);
        if (ret == MM_ERROR_NONE) {
                handle->user_cb[_CAMERA_EVENT_TYPE_FACE_DETECTION] = (void *)callback;
                handle->user_data[_CAMERA_EVENT_TYPE_FACE_DETECTION] = (void *)user_data;
                handle->num_of_faces = 0;
        }
 
-       return __convert_camera_error_code(__func__,ret);
+       return __convert_camera_error_code(__func__, ret);
 }
 
 
@@ -1156,15 +1140,15 @@ int legacy_camera_stop_face_detection(camera_h camera)
        }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DETECT_MODE, MM_CAMCORDER_DETECT_MODE_OFF,
-                                         NULL);
+               MMCAM_DETECT_MODE, MM_CAMCORDER_DETECT_MODE_OFF,
+               NULL);
        if (ret == MM_ERROR_NONE) {
                handle->user_cb[_CAMERA_EVENT_TYPE_FACE_DETECTION] = NULL;
                handle->user_data[_CAMERA_EVENT_TYPE_FACE_DETECTION] = NULL;
                handle->num_of_faces = 0;
        }
 
-       return __convert_camera_error_code(__func__,ret);
+       return __convert_camera_error_code(__func__, ret);
 }
 
 
@@ -1183,8 +1167,8 @@ int legacy_camera_get_state(camera_h camera, camera_state_e *state)
        capi_state = __camera_state_convert(mmstate);
 
        if ((handle->state == CAMERA_STATE_CAPTURED || handle->is_capture_completed) &&
-            (handle->current_capture_count > 0 || handle->is_capture_completed) &&
-           mmstate == MM_CAMCORDER_STATE_CAPTURING) {
+               (handle->current_capture_count > 0 || handle->is_capture_completed) &&
+               mmstate == MM_CAMCORDER_STATE_CAPTURING) {
                capi_state = CAMERA_STATE_CAPTURED;
        }
 
@@ -1221,8 +1205,8 @@ int legacy_camera_start_focusing(camera_h camera, bool continuous)
                LOGD("apply cached focus mode %d", handle->cached_focus_mode);
 
                mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                           MMCAM_CAMERA_AF_SCAN_RANGE, handle->cached_focus_mode,
-                                           NULL);
+                       MMCAM_CAMERA_AF_SCAN_RANGE, handle->cached_focus_mode,
+                       NULL);
 
                handle->cached_focus_mode = -1;
        }
@@ -1231,9 +1215,9 @@ int legacy_camera_start_focusing(camera_h camera, bool continuous)
                return __camera_start_continuous_focusing(camera);
        } else {
                mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                           MMCAM_CAMERA_FOCUS_MODE, handle->focus_area_valid ? \
-                                                                    MM_CAMCORDER_FOCUS_MODE_TOUCH_AUTO : MM_CAMCORDER_FOCUS_MODE_AUTO,
-                                           NULL);
+                       MMCAM_CAMERA_FOCUS_MODE, handle->focus_area_valid ? \
+                       MM_CAMCORDER_FOCUS_MODE_TOUCH_AUTO : MM_CAMCORDER_FOCUS_MODE_AUTO,
+                       NULL);
 
                return __convert_camera_error_code(__func__, mm_camcorder_start_focusing(((camera_s *)camera)->mm_handle));
        }
@@ -1253,15 +1237,15 @@ int __camera_start_continuous_focusing(camera_h camera)
 
        handle->on_continuous_focusing = true;
        mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                   MMCAM_CAMERA_FOCUS_MODE, &mode,
-                                   NULL);
+               MMCAM_CAMERA_FOCUS_MODE, &mode,
+               NULL);
 
        if (mode == MM_CAMCORDER_FOCUS_MODE_CONTINUOUS) {
                ret = mm_camcorder_start_focusing(handle->mm_handle);
        } else {
                ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                                 MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_CONTINUOUS,
-                                                 NULL);
+                       MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_CONTINUOUS,
+                       NULL);
        }
 
        return __convert_camera_error_code(__func__, ret);
@@ -1346,8 +1330,8 @@ int legacy_camera_set_display(camera_h camera, camera_display_type_e type, camer
                        }
 
                        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                                         MMCAM_DISPLAY_SOCKET_PATH, socket_path, strlen(socket_path),
-                                                         NULL);
+                               MMCAM_DISPLAY_SOCKET_PATH, socket_path, strlen(socket_path),
+                               NULL);
                } else if (type != CAMERA_DISPLAY_TYPE_NONE) {
                        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
                                MMCAM_DISPLAY_HANDLE, set_handle, sizeof(void *),
@@ -1361,7 +1345,7 @@ int legacy_camera_set_display(camera_h camera, camera_display_type_e type, camer
 
 int legacy_camera_set_preview_resolution(camera_h camera, int width, int height)
 {
-       if( camera == NULL){
+       if (camera == NULL) {
                LOGE("INVALID_PARAMETER(0x%08x)", CAMERA_ERROR_INVALID_PARAMETER);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
@@ -1378,18 +1362,17 @@ int legacy_camera_set_preview_resolution(camera_h camera, int width, int height)
        int i = 0;
 
        mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                   MMCAM_CAMERA_FPS, &mm_fps,
-                                   NULL);
+               MMCAM_CAMERA_FPS, &mm_fps,
+               NULL);
 
        ret = mm_camcorder_get_fps_list_by_resolution(handle->mm_handle, width, height, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (info.int_array.array[i] == mm_fps) {
+               if (info.int_array.array[i] == mm_fps)
                        break;
-               }
+
                if (i == info.int_array.count - 1) {
                        LOGE("Not supported resolution: Current set Resolution's FPS is not supported in wanted resolution.");
                        return CAMERA_ERROR_NOT_SUPPORTED;
@@ -1397,9 +1380,9 @@ int legacy_camera_set_preview_resolution(camera_h camera, int width, int height)
        }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_WIDTH, width,
-                                         MMCAM_CAMERA_HEIGHT, height,
-                                         NULL);
+               MMCAM_CAMERA_WIDTH, width,
+               MMCAM_CAMERA_HEIGHT, height,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1421,9 +1404,9 @@ int legacy_camera_set_capture_resolution(camera_h camera, int width, int height)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAPTURE_WIDTH, width,
-                                         MMCAM_CAPTURE_HEIGHT, height,
-                                         NULL);
+               MMCAM_CAPTURE_WIDTH, width,
+               MMCAM_CAPTURE_HEIGHT, height,
+               NULL);
        if (ret == MM_ERROR_NONE) {
                handle->capture_width = width;
                handle->capture_height = height;
@@ -1450,8 +1433,8 @@ int legacy_camera_set_capture_format(camera_h camera, camera_pixel_format_e form
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAPTURE_FORMAT, format,
-                                         NULL);
+               MMCAM_CAPTURE_FORMAT, format,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1479,17 +1462,16 @@ int legacy_camera_set_preview_format(camera_h camera, camera_pixel_format_e form
                MMCamAttrsInfo supported_format;
                ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_FORMAT , &supported_format);
                for (i = 0 ; i < supported_format.int_array.count ; i++) {
-                       if (supported_format.int_array.array[i] == MM_PIXEL_FORMAT_ITLV_JPEG_UYVY) {
+                       if (supported_format.int_array.array[i] == MM_PIXEL_FORMAT_ITLV_JPEG_UYVY)
                                supported_ITLV_UYVY = true;
-                       }
                }
                ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                                 MMCAM_CAMERA_FORMAT, supported_ITLV_UYVY ? MM_PIXEL_FORMAT_ITLV_JPEG_UYVY : MM_PIXEL_FORMAT_UYVY,
-                                                 NULL);
+                       MMCAM_CAMERA_FORMAT, supported_ITLV_UYVY ? MM_PIXEL_FORMAT_ITLV_JPEG_UYVY : MM_PIXEL_FORMAT_UYVY,
+                       NULL);
        } else {
                ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                                 MMCAM_CAMERA_FORMAT, format,
-                                                 NULL);
+                       MMCAM_CAMERA_FORMAT, format,
+                       NULL);
        }
 
        return __convert_camera_error_code(__func__, ret);
@@ -1507,9 +1489,9 @@ int legacy_camera_get_preview_resolution(camera_h camera, int *width, int *heigh
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_WIDTH, width,
-                                         MMCAM_CAMERA_HEIGHT, height,
-                                         NULL);
+               MMCAM_CAMERA_WIDTH, width,
+               MMCAM_CAMERA_HEIGHT, height,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1531,8 +1513,8 @@ int legacy_camera_set_display_rotation(camera_h camera, camera_rotation_e rotati
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_ROTATION, rotation,
-                                         NULL);
+               MMCAM_DISPLAY_ROTATION, rotation,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1549,8 +1531,8 @@ int legacy_camera_get_display_rotation(camera_h camera, camera_rotation_e *rotat
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_ROTATION, rotation,
-                                         NULL);
+               MMCAM_DISPLAY_ROTATION, rotation,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1572,8 +1554,8 @@ int legacy_camera_set_display_flip(camera_h camera, camera_flip_e flip)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_FLIP, flip,
-                                         NULL);
+               MMCAM_DISPLAY_FLIP, flip,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1590,8 +1572,8 @@ int legacy_camera_get_display_flip(camera_h camera, camera_flip_e *flip)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_FLIP, flip,
-                                         NULL);
+               MMCAM_DISPLAY_FLIP, flip,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1608,8 +1590,8 @@ int legacy_camera_set_display_visible(camera_h camera, bool visible)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_VISIBLE, visible,
-                                         NULL);
+               MMCAM_DISPLAY_VISIBLE, visible,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1627,12 +1609,11 @@ int legacy_camera_is_display_visible(camera_h camera, bool* visible)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_VISIBLE, &result,
-                                         NULL);
+               MMCAM_DISPLAY_VISIBLE, &result,
+               NULL);
 
-       if (ret == MM_ERROR_NONE) {
+       if (ret == MM_ERROR_NONE)
                *visible = result;
-       }
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1654,8 +1635,8 @@ int legacy_camera_set_display_mode(camera_h camera, camera_display_mode_e mode)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_GEOMETRY_METHOD, mode,
-                                         NULL);
+               MMCAM_DISPLAY_GEOMETRY_METHOD, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1672,8 +1653,8 @@ int legacy_camera_get_display_mode(camera_h camera, camera_display_mode_e *mode)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_GEOMETRY_METHOD, mode,
-                                         NULL);
+               MMCAM_DISPLAY_GEOMETRY_METHOD, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1706,8 +1687,8 @@ int legacy_camera_get_capture_format(camera_h camera, camera_pixel_format_e *for
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAPTURE_FORMAT, format,
-                                         NULL);
+               MMCAM_CAPTURE_FORMAT, format,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1724,12 +1705,11 @@ int legacy_camera_get_preview_format(camera_h camera, camera_pixel_format_e *for
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_FORMAT, format,
-                                         NULL);
+               MMCAM_CAMERA_FORMAT, format,
+               NULL);
 
-       if ((MMPixelFormatType)*format == MM_PIXEL_FORMAT_ITLV_JPEG_UYVY) {
+       if ((MMPixelFormatType)*format == MM_PIXEL_FORMAT_ITLV_JPEG_UYVY)
                *format = CAMERA_PIXEL_FORMAT_UYVY;
-       }
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1745,8 +1725,8 @@ int legacy_camera_get_facing_direction(camera_h camera, camera_facing_direction_
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_FACING_DIRECTION, facing_direction,
-                                         NULL);
+               MMCAM_CAMERA_FACING_DIRECTION, facing_direction,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -1763,8 +1743,8 @@ int legacy_camera_set_preview_cb(camera_h camera, camera_preview_cb callback, vo
        handle->user_data[_CAMERA_EVENT_TYPE_PREVIEW] = (void *)user_data;
 
        mm_camcorder_set_video_stream_callback(handle->mm_handle,
-                                              (mm_camcorder_video_stream_callback)__mm_videostream_callback,
-                                              (void *)handle);
+               (mm_camcorder_video_stream_callback)__mm_videostream_callback,
+               (void *)handle);
 
        return CAMERA_ERROR_NONE;
 }
@@ -1781,8 +1761,8 @@ int legacy_camera_unset_preview_cb(camera_h camera)
 
        if (handle->user_cb[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW] == NULL) {
                mm_camcorder_set_video_stream_callback(handle->mm_handle,
-                                                      (mm_camcorder_video_stream_callback)NULL,
-                                                      (void *)NULL);
+                       (mm_camcorder_video_stream_callback)NULL,
+                       (void *)NULL);
        }
 
        handle->user_cb[_CAMERA_EVENT_TYPE_PREVIEW] = (void *)NULL;
@@ -1814,8 +1794,8 @@ int legacy_camera_set_media_packet_preview_cb(camera_h camera, camera_preview_cb
        handle->user_data[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW] = (void *)user_data;
 
        mm_camcorder_set_video_stream_callback(handle->mm_handle,
-                                              (mm_camcorder_video_stream_callback)__mm_videostream_callback,
-                                              (void *)handle);
+               (mm_camcorder_video_stream_callback)__mm_videostream_callback,
+               (void *)handle);
 
        return CAMERA_ERROR_NONE;
 }
@@ -1837,8 +1817,8 @@ int legacy_camera_unset_media_packet_preview_cb(camera_h camera)
 
        if (handle->user_cb[_CAMERA_EVENT_TYPE_PREVIEW] == NULL) {
                mm_camcorder_set_video_stream_callback(handle->mm_handle,
-                                                      (mm_camcorder_video_stream_callback)NULL,
-                                                      (void *)NULL);
+                       (mm_camcorder_video_stream_callback)NULL,
+                       (void *)NULL);
        }
 
        handle->user_cb[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW] = (void *)NULL;
@@ -2024,14 +2004,12 @@ int legacy_camera_foreach_supported_preview_resolution(camera_h camera, camera_s
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_WIDTH, &preview_width);
        ret |= mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_HEIGHT, &preview_height);
-       if (ret != CAMERA_ERROR_NONE) {
+       if (ret != CAMERA_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < preview_width.int_array.count ; i++) {
-               if (!foreach_cb(preview_width.int_array.array[i], preview_height.int_array.array[i], user_data)) {
+               if (!foreach_cb(preview_width.int_array.array[i], preview_height.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -2053,14 +2031,12 @@ int legacy_camera_foreach_supported_capture_resolution(camera_h camera, camera_s
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAPTURE_WIDTH, &capture_width);
        ret |= mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAPTURE_HEIGHT, &capture_height);
-       if (ret != CAMERA_ERROR_NONE) {
+       if (ret != CAMERA_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < capture_width.int_array.count ; i++) {
-               if (!foreach_cb(capture_width.int_array.array[i], capture_height.int_array.array[i], user_data)) {
+               if (!foreach_cb(capture_width.int_array.array[i], capture_height.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -2080,15 +2056,13 @@ int legacy_camera_foreach_supported_capture_format(camera_h camera, camera_suppo
        MMCamAttrsInfo format;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAPTURE_FORMAT, &format);
-       if (ret != CAMERA_ERROR_NONE) {
+       if (ret != CAMERA_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < format.int_array.count ; i++) {
                if (format.int_array.array[i] != MM_PIXEL_FORMAT_ITLV_JPEG_UYVY) {
-                       if (!foreach_cb(format.int_array.array[i], user_data)) {
+                       if (!foreach_cb(format.int_array.array[i], user_data))
                                break;
-                       }
                }
        }
 
@@ -2109,15 +2083,13 @@ int legacy_camera_foreach_supported_preview_format(camera_h camera, camera_suppo
        MMCamAttrsInfo format;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_FORMAT, &format);
-       if (ret != CAMERA_ERROR_NONE) {
+       if (ret != CAMERA_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < format.int_array.count ; i++) {
                if (format.int_array.array[i] != MM_PIXEL_FORMAT_ITLV_JPEG_UYVY) {
-                       if (!foreach_cb(format.int_array.array[i], user_data)) {
+                       if (!foreach_cb(format.int_array.array[i], user_data))
                                break;
-                       }
                }
        }
 
@@ -2157,9 +2129,8 @@ int legacy_camera_get_recommended_preview_resolution(camera_h camera, int *width
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_RECOMMEND_CAMERA_WIDTH, &width_info);
        ret |= mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_RECOMMEND_CAMERA_HEIGHT, &height_info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        if (width && (unsigned int)width_info.int_array.count > wide) {
                *width = width_info.int_array.array[wide];
@@ -2193,8 +2164,8 @@ int legacy_camera_attr_get_lens_orientation(camera_h camera, int *angle)
        int rotation = MM_DISPLAY_ROTATION_NONE;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_RECOMMEND_DISPLAY_ROTATION, &rotation,
-                                         NULL);
+               MMCAM_RECOMMEND_DISPLAY_ROTATION, &rotation,
+               NULL);
 
        if (ret == MM_ERROR_NONE) {
                switch (rotation) {
@@ -2210,7 +2181,7 @@ int legacy_camera_attr_get_lens_orientation(camera_h camera, int *angle)
                case MM_DISPLAY_ROTATION_270:
                        *angle = 90;
                        break;
-               default :
+               default:
                        *angle = 0;
                        break;
                }
@@ -2236,8 +2207,8 @@ int legacy_camera_attr_set_theater_mode(camera_h camera, camera_attr_theater_mod
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_MODE, mode,
-                                         NULL);
+               MMCAM_DISPLAY_MODE, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2254,8 +2225,8 @@ int legacy_camera_attr_get_theater_mode(camera_h camera, camera_attr_theater_mod
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_MODE, mode,
-                                         NULL);
+               MMCAM_DISPLAY_MODE, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2274,14 +2245,12 @@ int legacy_camera_attr_foreach_supported_theater_mode(camera_h camera, camera_at
        MMCamAttrsInfo info;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_DISPLAY_MODE, &info);
-       if (ret != CAMERA_ERROR_NONE) {
+       if (ret != CAMERA_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (!foreach_cb(info.int_array.array[i], user_data)) {
+               if (!foreach_cb(info.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -2305,13 +2274,13 @@ int legacy_camera_attr_set_preview_fps(camera_h camera, camera_attr_fps_e fps)
 
        if (fps == CAMERA_ATTR_FPS_AUTO) {
                ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                                 MMCAM_CAMERA_FPS_AUTO, true,
-                                                 NULL);
+                       MMCAM_CAMERA_FPS_AUTO, true,
+                       NULL);
        } else {
                ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                                 MMCAM_CAMERA_FPS_AUTO, false,
-                                                 MMCAM_CAMERA_FPS, fps,
-                                                 NULL);
+                       MMCAM_CAMERA_FPS_AUTO, false,
+                       MMCAM_CAMERA_FPS, fps,
+                       NULL);
        }
 
        return __convert_camera_error_code(__func__, ret);
@@ -2334,8 +2303,8 @@ int legacy_camera_attr_set_image_quality(camera_h camera, int quality)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_IMAGE_ENCODER_QUALITY, quality,
-                                         NULL);
+               MMCAM_IMAGE_ENCODER_QUALITY, quality,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2354,15 +2323,14 @@ int legacy_camera_attr_get_preview_fps(camera_h camera, camera_attr_fps_e *fps)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_FPS, &mm_fps,
-                                         MMCAM_CAMERA_FPS_AUTO, &is_auto,
-                                         NULL);
+               MMCAM_CAMERA_FPS, &mm_fps,
+               MMCAM_CAMERA_FPS_AUTO, &is_auto,
+               NULL);
        if (ret == MM_ERROR_NONE) {
-               if (is_auto) {
+               if (is_auto)
                        *fps = CAMERA_ATTR_FPS_AUTO;
-               } else {
+               else
                        *fps = mm_fps;
-               }
        }
 
        return __convert_camera_error_code(__func__, ret);
@@ -2380,8 +2348,8 @@ int legacy_camera_attr_get_image_quality(camera_h camera, int *quality)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_IMAGE_ENCODER_QUALITY, quality,
-                                         NULL);
+               MMCAM_IMAGE_ENCODER_QUALITY, quality,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2403,8 +2371,8 @@ int legacy_camera_attr_set_zoom(camera_h camera, int zoom)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_DIGITAL_ZOOM, zoom,
-                                         NULL);
+               MMCAM_CAMERA_DIGITAL_ZOOM, zoom,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2428,8 +2396,8 @@ int legacy_camera_attr_set_af_mode(camera_h camera, camera_attr_af_mode_e mode)
        bool should_change_focus_mode = false;
 
        mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                   MMCAM_CAMERA_FOCUS_MODE, &focus_mode,
-                                   NULL);
+               MMCAM_CAMERA_FOCUS_MODE, &focus_mode,
+               NULL);
 
        if (focus_mode != MM_CAMCORDER_FOCUS_MODE_TOUCH_AUTO &&
            focus_mode != MM_CAMCORDER_FOCUS_MODE_CONTINUOUS &&
@@ -2449,31 +2417,31 @@ int legacy_camera_attr_set_af_mode(camera_h camera, camera_attr_af_mode_e mode)
 
        if (mode != CAMERA_ATTR_AF_NONE && should_change_focus_mode) {
                mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                           MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_AUTO,
-                                           NULL);
+                       MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_AUTO,
+                       NULL);
        }
 
        switch (mode) {
        case CAMERA_ATTR_AF_NONE:
                ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                                 MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_NONE,
-                                                 MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NONE,
-                                                 NULL);
+                       MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_NONE,
+                       MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NONE,
+                       NULL);
                break;
        case CAMERA_ATTR_AF_NORMAL:
                ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                                 MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NORMAL,
-                                                 NULL);
+                       MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NORMAL,
+                       NULL);
                break;
        case CAMERA_ATTR_AF_MACRO:
                ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                                 MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_MACRO,
-                                                 NULL);
+                       MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_MACRO,
+                       NULL);
                break;
        case CAMERA_ATTR_AF_FULL:
                ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                                 MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_FULL,
-                                                 NULL);
+                       MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_FULL,
+                       NULL);
                break;
        default:
                LOGE("invalid mode %d", mode);
@@ -2507,12 +2475,11 @@ int legacy_camera_attr_set_af_area(camera_h camera, int x, int y)
        }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_AF_TOUCH_X, x,
-                                         MMCAM_CAMERA_AF_TOUCH_Y, y,
-                                         NULL);
-       if (ret == MM_ERROR_NONE) {
+               MMCAM_CAMERA_AF_TOUCH_X, x,
+               MMCAM_CAMERA_AF_TOUCH_Y, y,
+               NULL);
+       if (ret == MM_ERROR_NONE)
                handle->focus_area_valid = true;
-       }
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2545,12 +2512,13 @@ int legacy_camera_attr_set_exposure_mode(camera_h camera, camera_attr_exposure_m
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       int maptable[] = {MM_CAMCORDER_AUTO_EXPOSURE_OFF,       /* CAMERA_ATTR_EXPOSURE_MODE_OFF */
-                         MM_CAMCORDER_AUTO_EXPOSURE_ALL,       /* CAMERA_ATTR_EXPOSURE_MODE_ALL */
-                         MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1,  /* CAMERA_ATTR_EXPOSURE_MODE_CENTER */
-                         MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1,    /* CAMERA_ATTR_EXPOSURE_MODE_SPOT */
-                         MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1,  /* CAMERA_ATTR_EXPOSURE_MODE_CUSTOM */
-                        };
+       int maptable[] = {
+               MM_CAMCORDER_AUTO_EXPOSURE_OFF,       /* CAMERA_ATTR_EXPOSURE_MODE_OFF */
+               MM_CAMCORDER_AUTO_EXPOSURE_ALL,       /* CAMERA_ATTR_EXPOSURE_MODE_ALL */
+               MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1,  /* CAMERA_ATTR_EXPOSURE_MODE_CENTER */
+               MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1,    /* CAMERA_ATTR_EXPOSURE_MODE_SPOT */
+               MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1,  /* CAMERA_ATTR_EXPOSURE_MODE_CUSTOM */
+               };
 
        int ret = MM_ERROR_NONE;
        camera_s *handle = (camera_s *)camera;
@@ -2561,8 +2529,8 @@ int legacy_camera_attr_set_exposure_mode(camera_h camera, camera_attr_exposure_m
        }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_EXPOSURE_MODE, maptable[mode],
-                                         NULL);
+               MMCAM_CAMERA_EXPOSURE_MODE, maptable[mode],
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2579,8 +2547,8 @@ int legacy_camera_attr_set_exposure(camera_h camera, int value)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_EXPOSURE_VALUE, value,
-                                         NULL);
+               MMCAM_CAMERA_EXPOSURE_VALUE, value,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2599,11 +2567,11 @@ int legacy_camera_attr_set_iso(camera_h camera, camera_attr_iso_e iso)
        }
 
        int ret = MM_ERROR_NONE;
-       camera_s *handle = (camera_s*)camera;
+       camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_ISO, iso,
-                                         NULL);
+               MMCAM_CAMERA_ISO, iso,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2620,8 +2588,8 @@ int legacy_camera_attr_set_brightness(camera_h camera, int level)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_FILTER_BRIGHTNESS, level,
-                                         NULL);
+               MMCAM_FILTER_BRIGHTNESS, level,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2638,8 +2606,8 @@ int legacy_camera_attr_set_contrast(camera_h camera, int level)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_FILTER_CONTRAST, level,
-                                         NULL);
+               MMCAM_FILTER_CONTRAST, level,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2661,8 +2629,8 @@ int legacy_camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalanc
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_FILTER_WB, wb,
-                                         NULL);
+               MMCAM_FILTER_WB, wb,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2684,8 +2652,8 @@ int legacy_camera_attr_set_effect(camera_h camera, camera_attr_effect_mode_e eff
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_FILTER_COLOR_TONE, effect,
-                                         NULL);
+               MMCAM_FILTER_COLOR_TONE, effect,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2707,8 +2675,8 @@ int legacy_camera_attr_set_scene_mode(camera_h camera, camera_attr_scene_mode_e
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_FILTER_SCENE_MODE, mode,
-                                         NULL);
+               MMCAM_FILTER_SCENE_MODE, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2725,8 +2693,8 @@ int legacy_camera_attr_enable_tag(camera_h camera, bool enable)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_TAG_ENABLE, enable,
-                                         NULL);
+               MMCAM_TAG_ENABLE, enable,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2808,11 +2776,11 @@ int legacy_camera_attr_set_geotag(camera_h camera, double latitude , double long
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_TAG_GPS_ENABLE, true,
-                                         MMCAM_TAG_LATITUDE, latitude,
-                                         MMCAM_TAG_LONGITUDE, longitude,
-                                         MMCAM_TAG_ALTITUDE, altitude,
-                                         NULL);
+               MMCAM_TAG_GPS_ENABLE, true,
+               MMCAM_TAG_LATITUDE, latitude,
+               MMCAM_TAG_LONGITUDE, longitude,
+               MMCAM_TAG_ALTITUDE, altitude,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2829,8 +2797,8 @@ int legacy_camera_attr_remove_geotag(camera_h camera)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_TAG_GPS_ENABLE, false,
-                                         NULL);
+               MMCAM_TAG_GPS_ENABLE, false,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2852,8 +2820,8 @@ int legacy_camera_attr_set_flash_mode(camera_h camera, camera_attr_flash_mode_e
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_STROBE_MODE, mode,
-                                         NULL);
+               MMCAM_STROBE_MODE, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2870,8 +2838,8 @@ int legacy_camera_attr_get_zoom(camera_h camera, int *zoom)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_DIGITAL_ZOOM, zoom,
-                                         NULL);
+               MMCAM_CAMERA_DIGITAL_ZOOM, zoom,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2912,10 +2880,10 @@ int legacy_camera_attr_get_af_mode(camera_h camera, camera_attr_af_mode_e *mode)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_FOCUS_MODE, &focus_mode,
-                                         MMCAM_CAMERA_AF_SCAN_RANGE, &af_range,
-                                         MMCAM_DETECT_MODE, &detect_mode,
-                                         NULL);
+               MMCAM_CAMERA_FOCUS_MODE, &focus_mode,
+               MMCAM_CAMERA_AF_SCAN_RANGE, &af_range,
+               MMCAM_DETECT_MODE, &detect_mode,
+               NULL);
        if (ret == MM_ERROR_NONE) {
                switch (focus_mode) {
                case MM_CAMCORDER_FOCUS_MODE_NONE:
@@ -2939,7 +2907,7 @@ int legacy_camera_attr_get_af_mode(camera_h camera, camera_attr_af_mode_e *mode)
                        case MM_CAMCORDER_AUTO_FOCUS_FULL:
                                *mode = CAMERA_ATTR_AF_FULL;
                                break;
-                       default :
+                       default:
                                *mode = CAMERA_ATTR_AF_NORMAL;
                                break;
                        }
@@ -2961,27 +2929,27 @@ int legacy_camera_attr_get_exposure_mode(camera_h camera, camera_attr_exposure_m
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       int maptable[] = {CAMERA_ATTR_EXPOSURE_MODE_OFF,        /* MM_CAMCORDER_AUTO_EXPOSURE_OFF */
-                         CAMERA_ATTR_EXPOSURE_MODE_ALL,        /* MM_CAMCORDER_AUTO_EXPOSURE_ALL */
-                         CAMERA_ATTR_EXPOSURE_MODE_CENTER,     /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1 */
-                         CAMERA_ATTR_EXPOSURE_MODE_CENTER,     /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2 */
-                         CAMERA_ATTR_EXPOSURE_MODE_CENTER,     /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3 */
-                         CAMERA_ATTR_EXPOSURE_MODE_SPOT,       /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1 */
-                         CAMERA_ATTR_EXPOSURE_MODE_SPOT,       /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2 */
-                         CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,     /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1 */
-                         CAMERA_ATTR_EXPOSURE_MODE_CUSTOM      /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2 */
-                        };
+       int maptable[] = {
+               CAMERA_ATTR_EXPOSURE_MODE_OFF,        /* MM_CAMCORDER_AUTO_EXPOSURE_OFF */
+               CAMERA_ATTR_EXPOSURE_MODE_ALL,        /* MM_CAMCORDER_AUTO_EXPOSURE_ALL */
+               CAMERA_ATTR_EXPOSURE_MODE_CENTER,     /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1 */
+               CAMERA_ATTR_EXPOSURE_MODE_CENTER,     /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2 */
+               CAMERA_ATTR_EXPOSURE_MODE_CENTER,     /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3 */
+               CAMERA_ATTR_EXPOSURE_MODE_SPOT,       /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1 */
+               CAMERA_ATTR_EXPOSURE_MODE_SPOT,       /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2 */
+               CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,     /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1 */
+               CAMERA_ATTR_EXPOSURE_MODE_CUSTOM      /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2 */
+               };
        int ret = MM_ERROR_NONE;
        int exposure_mode;
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_EXPOSURE_MODE, &exposure_mode,
-                                         NULL);
+               MMCAM_CAMERA_EXPOSURE_MODE, &exposure_mode,
+               NULL);
 
-       if (ret == CAMERA_ERROR_NONE) {
-               *mode = maptable[abs(exposure_mode%9)];
-       }
+       if (ret == CAMERA_ERROR_NONE)
+               *mode = maptable[abs(exposure_mode % 9)];
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -2998,8 +2966,8 @@ int legacy_camera_attr_get_exposure(camera_h camera, int *value)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_EXPOSURE_VALUE, value,
-                                         NULL);
+               MMCAM_CAMERA_EXPOSURE_VALUE, value,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3037,8 +3005,8 @@ int legacy_camera_attr_get_iso(camera_h camera, camera_attr_iso_e *iso)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_ISO, iso,
-                                         NULL);
+               MMCAM_CAMERA_ISO, iso,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3055,8 +3023,8 @@ int legacy_camera_attr_get_brightness(camera_h camera, int *level)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_FILTER_BRIGHTNESS, level,
-                                         NULL);
+               MMCAM_FILTER_BRIGHTNESS, level,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3094,8 +3062,8 @@ int legacy_camera_attr_get_contrast(camera_h camera, int *level)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_FILTER_CONTRAST, level,
-                                         NULL);
+               MMCAM_FILTER_CONTRAST, level,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3133,8 +3101,8 @@ int legacy_camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalanc
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_FILTER_WB, wb,
-                                         NULL);
+               MMCAM_FILTER_WB, wb,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3151,8 +3119,8 @@ int legacy_camera_attr_get_effect(camera_h camera, camera_attr_effect_mode_e *ef
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_FILTER_COLOR_TONE, effect,
-                                         NULL);
+               MMCAM_FILTER_COLOR_TONE, effect,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3169,8 +3137,8 @@ int legacy_camera_attr_get_scene_mode(camera_h camera, camera_attr_scene_mode_e
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_FILTER_SCENE_MODE, mode,
-                                         NULL);
+               MMCAM_FILTER_SCENE_MODE, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3187,8 +3155,8 @@ int legacy_camera_attr_is_enabled_tag(camera_h camera, bool *enable)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_TAG_ENABLE, enable,
-                                         NULL);
+               MMCAM_TAG_ENABLE, enable,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3207,14 +3175,13 @@ int legacy_camera_attr_get_tag_image_description(camera_h camera, char **descrip
        int desc_size;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_TAG_IMAGE_DESCRIPTION, &ndescription, &desc_size,
-                                         NULL);
+               MMCAM_TAG_IMAGE_DESCRIPTION, &ndescription, &desc_size,
+               NULL);
        if (ret == MM_ERROR_NONE) {
-               if (ndescription != NULL) {
+               if (ndescription != NULL)
                        *description = strdup(ndescription);
-               } else {
+               else
                        *description = strdup("");
-               }
        }
 
        return __convert_camera_error_code(__func__, ret);
@@ -3232,8 +3199,8 @@ int legacy_camera_attr_get_tag_orientation(camera_h camera, camera_attr_tag_orie
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_TAG_ORIENTATION, orientation,
-                                         NULL);
+               MMCAM_TAG_ORIENTATION, orientation,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3252,14 +3219,13 @@ int legacy_camera_attr_get_tag_software(camera_h camera, char **software)
        int soft_size;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_TAG_SOFTWARE, &soft, &soft_size,
-                                         NULL);
+               MMCAM_TAG_SOFTWARE, &soft, &soft_size,
+               NULL);
        if (ret == MM_ERROR_NONE) {
-               if (soft != NULL) {
+               if (soft != NULL)
                        *software = strdup(soft);
-               } else {
+               else
                        *software = strdup("");
-               }
        }
 
        return __convert_camera_error_code(__func__, ret);
@@ -3277,10 +3243,10 @@ int legacy_camera_attr_get_geotag(camera_h camera, double *latitude , double *lo
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_TAG_LATITUDE, latitude,
-                                         MMCAM_TAG_LONGITUDE, longitude,
-                                         MMCAM_TAG_ALTITUDE, altitude,
-                                         NULL);
+               MMCAM_TAG_LATITUDE, latitude,
+               MMCAM_TAG_LONGITUDE, longitude,
+               MMCAM_TAG_ALTITUDE, altitude,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3297,8 +3263,8 @@ int legacy_camera_attr_get_flash_mode(camera_h camera, camera_attr_flash_mode_e
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_STROBE_MODE, mode,
-                                         NULL);
+               MMCAM_STROBE_MODE, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3317,9 +3283,8 @@ int legacy_camera_attr_foreach_supported_af_mode(camera_h camera, camera_attr_su
        MMCamAttrsInfo af_range;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_AF_SCAN_RANGE, &af_range);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < af_range.int_array.count ; i++) {
                if (!foreach_cb(af_range.int_array.array[i], user_data)) {
@@ -3338,33 +3303,32 @@ int legacy_camera_attr_foreach_supported_exposure_mode(camera_h camera, camera_a
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       int maptable[] = {CAMERA_ATTR_EXPOSURE_MODE_OFF,        /* MM_CAMCORDER_AUTO_EXPOSURE_OFF */
-                         CAMERA_ATTR_EXPOSURE_MODE_ALL,        /* MM_CAMCORDER_AUTO_EXPOSURE_ALL */
-                         CAMERA_ATTR_EXPOSURE_MODE_CENTER,     /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1 */
-                         -1,                                   /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2 */
-                         -1,                                   /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3 */
-                         CAMERA_ATTR_EXPOSURE_MODE_SPOT,       /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1 */
-                         -1,                                   /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2 */
-                         CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,     /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1 */
-                         -1                                    /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2 */
-                        };
+       int maptable[] = {
+               CAMERA_ATTR_EXPOSURE_MODE_OFF,        /* MM_CAMCORDER_AUTO_EXPOSURE_OFF */
+               CAMERA_ATTR_EXPOSURE_MODE_ALL,        /* MM_CAMCORDER_AUTO_EXPOSURE_ALL */
+               CAMERA_ATTR_EXPOSURE_MODE_CENTER,     /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1 */
+               -1,                                   /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2 */
+               -1,                                   /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3 */
+               CAMERA_ATTR_EXPOSURE_MODE_SPOT,       /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1 */
+               -1,                                   /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2 */
+               CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,     /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1 */
+               -1                                    /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2 */
+               };
        int i = 0;
        int ret = MM_ERROR_NONE;
        camera_s *handle = (camera_s *)camera;
        MMCamAttrsInfo info;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_EXPOSURE_MODE, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
                if (info.int_array.array[i] >= MM_CAMCORDER_AUTO_EXPOSURE_OFF &&
                    info.int_array.array[i] <= MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2) {
                        if (maptable[info.int_array.array[i]] != -1) {
-                               if (!foreach_cb(maptable[info.int_array.array[i]], user_data)) {
+                               if (!foreach_cb(maptable[info.int_array.array[i]], user_data))
                                        break;
-                               }
                        }
                } else {
                        LOGW("unknown value %d", info.int_array.array[i]);
@@ -3388,14 +3352,12 @@ int legacy_camera_attr_foreach_supported_iso(camera_h camera, camera_attr_suppor
        MMCamAttrsInfo info;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_ISO, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (!foreach_cb(info.int_array.array[i], user_data)) {
+               if (!foreach_cb(info.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -3415,14 +3377,12 @@ int legacy_camera_attr_foreach_supported_whitebalance(camera_h camera, camera_at
        MMCamAttrsInfo info;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_FILTER_WB, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (!foreach_cb(info.int_array.array[i], user_data)) {
+               if (!foreach_cb(info.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -3442,14 +3402,12 @@ int legacy_camera_attr_foreach_supported_effect(camera_h camera, camera_attr_sup
        MMCamAttrsInfo info;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_FILTER_COLOR_TONE, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (!foreach_cb(info.int_array.array[i], user_data)) {
+               if (!foreach_cb(info.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -3469,14 +3427,12 @@ int legacy_camera_attr_foreach_supported_scene_mode(camera_h camera, camera_attr
        MMCamAttrsInfo info;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_FILTER_SCENE_MODE, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (!foreach_cb(info.int_array.array[i], user_data)) {
+               if (!foreach_cb(info.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -3496,14 +3452,12 @@ int legacy_camera_attr_foreach_supported_flash_mode(camera_h camera, camera_attr
        MMCamAttrsInfo info;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_STROBE_MODE, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (!foreach_cb(info.int_array.array[i], user_data)) {
+               if (!foreach_cb(info.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -3525,22 +3479,19 @@ int legacy_camera_attr_foreach_supported_fps(camera_h camera, camera_attr_suppor
        int i = 0;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_WIDTH, &width,
-                                         MMCAM_CAMERA_HEIGHT, &height,
-                                         NULL);
-       if (ret != MM_ERROR_NONE) {
+               MMCAM_CAMERA_WIDTH, &width,
+               MMCAM_CAMERA_HEIGHT, &height,
+               NULL);
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        ret = mm_camcorder_get_fps_list_by_resolution(handle->mm_handle, width, height, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (!foreach_cb(info.int_array.array[i], user_data)) {
+               if (!foreach_cb(info.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -3560,14 +3511,12 @@ int legacy_camera_attr_foreach_supported_fps_by_resolution(camera_h camera, int
        int i = 0;
 
        ret = mm_camcorder_get_fps_list_by_resolution(handle->mm_handle, width, height, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (!foreach_cb(info.int_array.array[i], user_data)) {
+               if (!foreach_cb(info.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -3587,14 +3536,12 @@ int legacy_camera_attr_foreach_supported_stream_flip(camera_h camera, camera_att
        MMCamAttrsInfo info;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_FLIP, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (!foreach_cb(info.int_array.array[i], user_data)) {
+               if (!foreach_cb(info.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -3614,14 +3561,12 @@ int legacy_camera_attr_foreach_supported_stream_rotation(camera_h camera, camera
        MMCamAttrsInfo info;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_ROTATION, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (!foreach_cb(info.int_array.array[i], user_data)) {
+               if (!foreach_cb(info.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -3644,8 +3589,8 @@ int legacy_camera_attr_set_stream_rotation(camera_h camera, camera_rotation_e ro
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_ROTATION, rotation,
-                                         NULL);
+               MMCAM_CAMERA_ROTATION, rotation,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3662,8 +3607,8 @@ int legacy_camera_attr_get_stream_rotation(camera_h camera, camera_rotation_e *r
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_ROTATION, rotation,
-                                         NULL);
+               MMCAM_CAMERA_ROTATION, rotation,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3685,8 +3630,8 @@ int legacy_camera_attr_set_stream_flip(camera_h camera, camera_flip_e flip)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_FLIP, flip,
-                                         NULL);
+               MMCAM_CAMERA_FLIP, flip,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3703,8 +3648,8 @@ int legacy_camera_attr_get_stream_flip(camera_h camera, camera_flip_e *flip)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_FLIP, flip,
-                                         NULL);
+               MMCAM_CAMERA_FLIP, flip,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3745,7 +3690,7 @@ int _camera_get_mm_handle(camera_h camera, MMHandleType *handle)
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       camera_s *camera_handle = (camera_s*)camera;
+       camera_s *camera_handle = (camera_s *)camera;
 
        *handle =  camera_handle->mm_handle;
 
@@ -3755,7 +3700,7 @@ int _camera_get_mm_handle(camera_h camera, MMHandleType *handle)
 
 int _camera_set_relay_mm_message_callback(camera_h camera, MMMessageCallback callback, void *user_data)
 {
-       if( camera == NULL ){
+       if (camera == NULL) {
                LOGE("INVALID_PARAMETER(0x%08x)", CAMERA_ERROR_INVALID_PARAMETER);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
@@ -3789,15 +3734,14 @@ int legacy_camera_attr_set_hdr_mode(camera_h camera, camera_attr_hdr_mode_e mode
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_HDR_CAPTURE, mode,
-                                         NULL);
+               MMCAM_CAMERA_HDR_CAPTURE, mode,
+               NULL);
 
        if (ret == MM_ERROR_NONE) {
-               if (mode == CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL) {
+               if (mode == CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL)
                        handle->hdr_keep_mode = true;
-               } else {
+               else
                        handle->hdr_keep_mode = false;
-               }
        }
 
        return __convert_camera_error_code(__func__, ret);
@@ -3825,8 +3769,8 @@ int legacy_camera_attr_get_hdr_mode(camera_h camera, camera_attr_hdr_mode_e *mod
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_HDR_CAPTURE, mode,
-                                         NULL);
+               MMCAM_CAMERA_HDR_CAPTURE, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3927,13 +3871,12 @@ int legacy_camera_attr_enable_anti_shake(camera_h camera, bool enable)
        int mode = MM_CAMCORDER_AHS_OFF;
        camera_s *handle = (camera_s *)camera;
 
-       if (enable) {
+       if (enable)
                mode = MM_CAMCORDER_AHS_ON;
-       }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_ANTI_HANDSHAKE, mode,
-                                         NULL);
+               MMCAM_CAMERA_ANTI_HANDSHAKE, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3960,8 +3903,8 @@ int legacy_camera_attr_is_enabled_anti_shake(camera_h camera, bool *enabled)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_ANTI_HANDSHAKE, enabled,
-                                         NULL);
+               MMCAM_CAMERA_ANTI_HANDSHAKE, enabled,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -3987,9 +3930,8 @@ bool legacy_camera_attr_is_supported_anti_shake(camera_h camera)
        }
 
        for (i = 0 ; i < ash_info.int_array.count ; i++) {
-               if (ash_info.int_array.array[i] == MM_CAMCORDER_AHS_ON) {
+               if (ash_info.int_array.array[i] == MM_CAMCORDER_AHS_ON)
                        return true;
-               }
        }
 
        return false;
@@ -4010,15 +3952,14 @@ int legacy_camera_attr_enable_video_stabilization(camera_h camera, bool enable)
 
        int ret = MM_ERROR_NONE;
        int mode = MM_CAMCORDER_VIDEO_STABILIZATION_OFF;
-       camera_s *handle = (camera_s*)camera;
+       camera_s *handle = (camera_s *)camera;
 
-       if (enable) {
+       if (enable)
                mode = MM_CAMCORDER_VIDEO_STABILIZATION_ON;
-       }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_VIDEO_STABILIZATION, mode,
-                                         NULL);
+               MMCAM_CAMERA_VIDEO_STABILIZATION, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4046,11 +3987,10 @@ int legacy_camera_attr_is_enabled_video_stabilization(camera_h camera, bool *ena
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_VIDEO_STABILIZATION, &mode,
-                                         NULL);
-       if (ret == MM_ERROR_NONE) {
+               MMCAM_CAMERA_VIDEO_STABILIZATION, &mode,
+               NULL);
+       if (ret == MM_ERROR_NONE)
                *enabled = (mode == MM_CAMCORDER_VIDEO_STABILIZATION_ON);
-       }
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4076,9 +4016,8 @@ bool legacy_camera_attr_is_supported_video_stabilization(camera_h camera)
        }
 
        for (i = 0 ; i < vs_info.int_array.count ; i++) {
-               if (vs_info.int_array.array[i] == MM_CAMCORDER_VIDEO_STABILIZATION_ON) {
+               if (vs_info.int_array.array[i] == MM_CAMCORDER_VIDEO_STABILIZATION_ON)
                        return true;
-               }
        }
 
        return false;
@@ -4101,13 +4040,12 @@ int legacy_camera_attr_enable_auto_contrast(camera_h camera, bool enable)
        int mode = MM_CAMCORDER_WDR_OFF;
        camera_s *handle = (camera_s *)camera;
 
-       if (enable) {
+       if (enable)
                mode = MM_CAMCORDER_WDR_ON;
-       }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_WDR, mode,
-                                         NULL);
+               MMCAM_CAMERA_WDR, mode,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4135,12 +4073,11 @@ int legacy_camera_attr_is_enabled_auto_contrast(camera_h camera, bool *enabled)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_WDR, &mode,
-                                         NULL);
+               MMCAM_CAMERA_WDR, &mode,
+               NULL);
 
-       if (ret == MM_ERROR_NONE) {
+       if (ret == MM_ERROR_NONE)
                *enabled = mode;
-       }
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4166,9 +4103,8 @@ bool legacy_camera_attr_is_supported_auto_contrast(camera_h camera)
        }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (info.int_array.array[i] == MM_CAMCORDER_WDR_ON) {
+               if (info.int_array.array[i] == MM_CAMCORDER_WDR_ON)
                        return true;
-               }
        }
 
        return false;
@@ -4208,8 +4144,8 @@ int legacy_camera_attr_get_encoded_preview_bitrate(camera_h camera, int *bitrate
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_ENCODED_PREVIEW_BITRATE, bitrate,
-                                         NULL);
+               MMCAM_ENCODED_PREVIEW_BITRATE, bitrate,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4231,8 +4167,8 @@ int legacy_camera_attr_set_encoded_preview_bitrate(camera_h camera, int bitrate)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_ENCODED_PREVIEW_BITRATE, bitrate,
-                                         NULL);
+               MMCAM_ENCODED_PREVIEW_BITRATE, bitrate,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4249,8 +4185,8 @@ int legacy_camera_attr_get_encoded_preview_gop_interval(camera_h camera, int *in
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_ENCODED_PREVIEW_GOP_INTERVAL, interval,
-                                         NULL);
+               MMCAM_ENCODED_PREVIEW_GOP_INTERVAL, interval,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4272,8 +4208,8 @@ int legacy_camera_attr_set_encoded_preview_gop_interval(camera_h camera, int int
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_ENCODED_PREVIEW_GOP_INTERVAL, interval,
-                                         NULL);
+               MMCAM_ENCODED_PREVIEW_GOP_INTERVAL, interval,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4298,8 +4234,8 @@ int legacy_camera_attr_set_pan(camera_h camera, int move_type, int pan_step)
 
        if (move_type == CAMERA_ATTR_PTZ_MOVE_RELATIVE) {
                ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         pan_type, &step,
-                                         NULL);
+                       pan_type, &step,
+                       NULL);
 
                if (ret == MM_ERROR_NONE) {
                        step += pan_step;
@@ -4312,8 +4248,8 @@ int legacy_camera_attr_set_pan(camera_h camera, int move_type, int pan_step)
        }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         pan_type, step,
-                                         NULL);
+               pan_type, step,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4336,8 +4272,8 @@ int legacy_camera_attr_get_pan(camera_h camera, int *pan_step)
                pan_type = MMCAM_CAMERA_PAN_ELEC;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         pan_type, pan_step,
-                                         NULL);
+               pan_type, pan_step,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4389,8 +4325,8 @@ int legacy_camera_attr_set_tilt(camera_h camera, int move_type, int tilt_step)
 
        if (move_type == CAMERA_ATTR_PTZ_MOVE_RELATIVE) {
                ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         tilt_type, &step,
-                                         NULL);
+                       tilt_type, &step,
+                       NULL);
 
                if (ret == MM_ERROR_NONE) {
                        step += tilt_step;
@@ -4403,8 +4339,8 @@ int legacy_camera_attr_set_tilt(camera_h camera, int move_type, int tilt_step)
        }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         tilt_type, step,
-                                         NULL);
+               tilt_type, step,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4427,8 +4363,8 @@ int legacy_camera_attr_get_tilt(camera_h camera, int *tilt_step)
                tilt_type = MMCAM_CAMERA_TILT_ELEC;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         tilt_type, tilt_step,
-                                         NULL);
+               tilt_type, tilt_step,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4472,8 +4408,8 @@ int legacy_camera_attr_set_ptz_type(camera_h camera, int ptz_type)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_CAMERA_PTZ_TYPE, ptz_type,
-                                         NULL);
+               MMCAM_CAMERA_PTZ_TYPE, ptz_type,
+               NULL);
 
        if (ret != MM_ERROR_NONE)
                handle->ptz_type = ptz_type;
@@ -4495,14 +4431,12 @@ int legacy_camera_attr_foreach_supported_ptz_type(camera_h camera, camera_attr_s
        MMCamAttrsInfo info;
 
        ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_PTZ_TYPE, &info);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        for (i = 0 ; i < info.int_array.count ; i++) {
-               if (!foreach_cb(info.int_array.array[i], user_data)) {
+               if (!foreach_cb(info.int_array.array[i], user_data))
                        break;
-               }
        }
 
        return CAMERA_ERROR_NONE;
@@ -4521,8 +4455,8 @@ int legacy_camera_attr_set_display_roi_area(camera_h camera, int *display_roi_ar
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_GEOMETRY_METHOD, &current_method,
-                                         NULL);
+               MMCAM_DISPLAY_GEOMETRY_METHOD, &current_method,
+               NULL);
        if (ret != MM_ERROR_NONE) {
                LOGE("INVALID_OPERATION(0x%08x)", CAMERA_ERROR_INVALID_OPERATION);
                return CAMERA_ERROR_INVALID_OPERATION;
@@ -4534,11 +4468,11 @@ int legacy_camera_attr_set_display_roi_area(camera_h camera, int *display_roi_ar
        }
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_RECT_X, display_roi_area[0],
-                                         MMCAM_DISPLAY_RECT_Y, display_roi_area[1],
-                                         MMCAM_DISPLAY_RECT_WIDTH, display_roi_area[2],
-                                         MMCAM_DISPLAY_RECT_HEIGHT, display_roi_area[3],
-                                         NULL);
+               MMCAM_DISPLAY_RECT_X, display_roi_area[0],
+               MMCAM_DISPLAY_RECT_Y, display_roi_area[1],
+               MMCAM_DISPLAY_RECT_WIDTH, display_roi_area[2],
+               MMCAM_DISPLAY_RECT_HEIGHT, display_roi_area[3],
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
@@ -4559,8 +4493,8 @@ int legacy_camera_attr_get_display_roi_area(camera_h camera, int *display_roi_ar
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_GEOMETRY_METHOD, &current_method,
-                                         NULL);
+               MMCAM_DISPLAY_GEOMETRY_METHOD, &current_method,
+               NULL);
        if (ret != MM_ERROR_NONE) {
                LOGE("INVALID_OPERATION(0x%08x)", CAMERA_ERROR_INVALID_OPERATION);
                return CAMERA_ERROR_INVALID_OPERATION;
@@ -4572,11 +4506,11 @@ int legacy_camera_attr_get_display_roi_area(camera_h camera, int *display_roi_ar
        }
 
        ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
-                                         MMCAM_DISPLAY_RECT_X, &x,
-                                         MMCAM_DISPLAY_RECT_Y, &y,
-                                         MMCAM_DISPLAY_RECT_WIDTH, &width,
-                                         MMCAM_DISPLAY_RECT_HEIGHT, &height,
-                                         NULL);
+               MMCAM_DISPLAY_RECT_X, &x,
+               MMCAM_DISPLAY_RECT_Y, &y,
+               MMCAM_DISPLAY_RECT_WIDTH, &width,
+               MMCAM_DISPLAY_RECT_HEIGHT, &height,
+               NULL);
 
        if (ret == MM_ERROR_NONE) {
                LOGD("get roi area : %d,%d,%dx%d", x, y, width, height);
index f05fc67..1fa52d8 100644 (file)
@@ -39,9 +39,8 @@ int legacy_camera_get_video_caps(camera_h camera, char **caps)
        camera_s *handle = (camera_s *)camera;
 
        ret = mm_camcorder_get_video_caps(handle->mm_handle, caps);
-       if (ret != MM_ERROR_NONE) {
+       if (ret != MM_ERROR_NONE)
                return __convert_camera_error_code(__func__, ret);
-       }
 
        return CAMERA_ERROR_NONE;
 }
@@ -59,8 +58,8 @@ int legacy_camera_set_client_pid(camera_h camera, int pid)
        LOGE("pid %d", pid);
 
        ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
-                                         MMCAM_PID_FOR_SOUND_FOCUS, pid,
-                                         NULL);
+               MMCAM_PID_FOR_SOUND_FOCUS, pid,
+               NULL);
 
        return __convert_camera_error_code(__func__, ret);
 }
index 0a40047..a620f13 100644 (file)
@@ -36,152 +36,152 @@ extern "C" {
  * @brief Enumeration for the muse camera apis.
  */
 typedef enum {
-       MUSE_CAMERA_API_CREATE, //0
+       MUSE_CAMERA_API_CREATE, /* 0 */
        MUSE_CAMERA_API_DESTROY,
        MUSE_CAMERA_API_START_PREVIEW,
        MUSE_CAMERA_API_STOP_PREVIEW,
        MUSE_CAMERA_API_START_CAPTURE,
-       MUSE_CAMERA_API_SUPPORT_CONTINUOUS_CAPTURE, //5
+       MUSE_CAMERA_API_SUPPORT_CONTINUOUS_CAPTURE, /* 5 */
        MUSE_CAMERA_API_START_CONTINUOUS_CAPTURE,
        MUSE_CAMERA_API_STOP_CONTINUOUS_CAPTURE,
        MUSE_CAMERA_API_SUPPORT_FACE_DETECTION,
        MUSE_CAMERA_API_SUPPORT_ZERO_SHUTTER_LAG,
-       MUSE_CAMERA_API_SUPPORT_MEDIA_PACKET_PREVIEW_CB, //10
+       MUSE_CAMERA_API_SUPPORT_MEDIA_PACKET_PREVIEW_CB, /* 10 */
        MUSE_CAMERA_API_GET_DEVICE_COUNT,
        MUSE_CAMERA_API_START_FACE_DETECTION,
        MUSE_CAMERA_API_STOP_FACE_DETECTION,
        MUSE_CAMERA_API_GET_STATE,
-       MUSE_CAMERA_API_START_FOCUSING, //15
+       MUSE_CAMERA_API_START_FOCUSING, /* 15 */
        MUSE_CAMERA_API_CANCEL_FOCUSING,
        MUSE_CAMERA_API_SET_DISPLAY,
        MUSE_CAMERA_API_SET_PREVIEW_RESOLUTION,
        MUSE_CAMERA_API_SET_CAPTURE_RESOLUTION,
-       MUSE_CAMERA_API_SET_CAPTURE_FORMAT, //20
+       MUSE_CAMERA_API_SET_CAPTURE_FORMAT, /* 20 */
        MUSE_CAMERA_API_SET_PREVIEW_FORMAT,
        MUSE_CAMERA_API_GET_PREVIEW_RESOLUTION,
        MUSE_CAMERA_API_SET_DISPLAY_ROTATION,
        MUSE_CAMERA_API_GET_DISPLAY_ROTATION,
-       MUSE_CAMERA_API_SET_DISPLAY_FLIP, //25
+       MUSE_CAMERA_API_SET_DISPLAY_FLIP, /* 25 */
        MUSE_CAMERA_API_GET_DISPLAY_FLIP,
        MUSE_CAMERA_API_SET_DISPLAY_VISIBLE,
        MUSE_CAMERA_API_IS_DISPLAY_VISIBLE,
        MUSE_CAMERA_API_SET_DISPLAY_MODE,
-       MUSE_CAMERA_API_GET_DISPLAY_MODE, //30
+       MUSE_CAMERA_API_GET_DISPLAY_MODE, /* 30 */
        MUSE_CAMERA_API_GET_CAPTURE_RESOLUTION,
        MUSE_CAMERA_API_GET_CAPTURE_FORMAT,
        MUSE_CAMERA_API_GET_PREVIEW_FORMAT,
        MUSE_CAMERA_API_GET_FACING_DIRECTION,
-       MUSE_CAMERA_API_GET_FLASH_STATE, //35
+       MUSE_CAMERA_API_GET_FLASH_STATE, /* 35 */
        MUSE_CAMERA_API_SET_PREVIEW_CB,
        MUSE_CAMERA_API_UNSET_PREVIEW_CB,
        MUSE_CAMERA_API_SET_MEDIA_PACKET_PREVIEW_CB,
        MUSE_CAMERA_API_UNSET_MEDIA_PACKET_PREVIEW_CB,
-       MUSE_CAMERA_API_SET_STATE_CHANGED_CB, //40
+       MUSE_CAMERA_API_SET_STATE_CHANGED_CB, /* 40 */
        MUSE_CAMERA_API_UNSET_STATE_CHANGED_CB,
        MUSE_CAMERA_API_SET_INTERRUPTED_CB,
        MUSE_CAMERA_API_UNSET_INTERRUPTED_CB,
        MUSE_CAMERA_API_SET_FOCUS_CHANGED_CB,
-       MUSE_CAMERA_API_UNSET_FOCUS_CHANGED_CB, //45
+       MUSE_CAMERA_API_UNSET_FOCUS_CHANGED_CB, /* 45 */
        MUSE_CAMERA_API_SET_ERROR_CB,
        MUSE_CAMERA_API_UNSET_ERROR_CB,
        MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_PREVIEW_RESOLUTION,
        MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_CAPTURE_RESOLUTION,
-       MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_CAPTURE_FORMAT, //50
+       MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_CAPTURE_FORMAT, /* 50 */
        MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_PREVIEW_FORMAT,
        MUSE_CAMERA_API_GET_RECOMMENDED_PREVIEW_RESOLUTION,
        MUSE_CAMERA_API_ATTR_GET_LENS_ORIENTATION,
        MUSE_CAMERA_API_ATTR_SET_THEATER_MODE,
-       MUSE_CAMERA_API_ATTR_GET_THEATER_MODE, //55
+       MUSE_CAMERA_API_ATTR_GET_THEATER_MODE, /* 55 */
        MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_THEATER_MODE,
        MUSE_CAMERA_API_ATTR_SET_PREVIEW_FPS,
        MUSE_CAMERA_API_ATTR_SET_IMAGE_QUALITY,
        MUSE_CAMERA_API_ATTR_GET_PREVIEW_FPS,
-       MUSE_CAMERA_API_ATTR_GET_IMAGE_QUALITY, //60
+       MUSE_CAMERA_API_ATTR_GET_IMAGE_QUALITY, /* 60 */
        MUSE_CAMERA_API_ATTR_SET_ZOOM,
        MUSE_CAMERA_API_ATTR_SET_AF_MODE,
        MUSE_CAMERA_API_ATTR_SET_AF_AREA,
        MUSE_CAMERA_API_ATTR_CLEAR_AF_AREA,
-       MUSE_CAMERA_API_ATTR_SET_EXPOSURE_MODE, //65
+       MUSE_CAMERA_API_ATTR_SET_EXPOSURE_MODE, /* 65 */
        MUSE_CAMERA_API_ATTR_SET_EXPOSURE,
        MUSE_CAMERA_API_ATTR_SET_ISO,
        MUSE_CAMERA_API_ATTR_SET_BRIGHTNESS,
        MUSE_CAMERA_API_ATTR_SET_CONTRAST,
-       MUSE_CAMERA_API_ATTR_SET_WHITEBALANCE, //70
+       MUSE_CAMERA_API_ATTR_SET_WHITEBALANCE, /* 70 */
        MUSE_CAMERA_API_ATTR_SET_EFFECT,
        MUSE_CAMERA_API_ATTR_SET_SCENE_MODE,
        MUSE_CAMERA_API_ATTR_ENABLE_TAG,
        MUSE_CAMERA_API_ATTR_SET_TAG_IMAGE_DESCRIPTION,
-       MUSE_CAMERA_API_ATTR_SET_TAG_ORIENTATION, //75
+       MUSE_CAMERA_API_ATTR_SET_TAG_ORIENTATION, /* 75 */
        MUSE_CAMERA_API_ATTR_SET_TAG_SOFTWARE,
        MUSE_CAMERA_API_ATTR_SET_GEOTAG,
        MUSE_CAMERA_API_ATTR_REMOVE_GEOTAG,
        MUSE_CAMERA_API_ATTR_SET_FLASH_MODE,
-       MUSE_CAMERA_API_ATTR_GET_ZOOM, //80
+       MUSE_CAMERA_API_ATTR_GET_ZOOM, /* 80 */
        MUSE_CAMERA_API_ATTR_GET_ZOOM_RANGE,
        MUSE_CAMERA_API_ATTR_GET_AF_MODE,
        MUSE_CAMERA_API_ATTR_GET_EXPOSURE_MODE,
        MUSE_CAMERA_API_ATTR_GET_EXPOSURE,
-       MUSE_CAMERA_API_ATTR_GET_EXPOSURE_RANGE, //85
+       MUSE_CAMERA_API_ATTR_GET_EXPOSURE_RANGE, /* 85 */
        MUSE_CAMERA_API_ATTR_GET_ISO,
        MUSE_CAMERA_API_ATTR_GET_BRIGHTNESS,
        MUSE_CAMERA_API_ATTR_GET_BRIGHTNESS_RANGE,
        MUSE_CAMERA_API_ATTR_GET_CONTRAST,
-       MUSE_CAMERA_API_ATTR_GET_CONTRAST_RANGE, //90
+       MUSE_CAMERA_API_ATTR_GET_CONTRAST_RANGE, /* 90 */
        MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE,
        MUSE_CAMERA_API_ATTR_GET_EFFECT,
        MUSE_CAMERA_API_ATTR_GET_SCENE_MODE,
        MUSE_CAMERA_API_ATTR_IS_ENABLED_TAG,
-       MUSE_CAMERA_API_ATTR_GET_TAG_IMAGE_DESCRIPTION, //95
+       MUSE_CAMERA_API_ATTR_GET_TAG_IMAGE_DESCRIPTION, /* 95 */
        MUSE_CAMERA_API_ATTR_GET_TAG_ORIENTATION,
        MUSE_CAMERA_API_ATTR_GET_TAG_SOFTWARE,
        MUSE_CAMERA_API_ATTR_GET_GEOTAG,
        MUSE_CAMERA_API_ATTR_GET_FLASH_MODE,
-       MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_AF_MODE, //100
+       MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_AF_MODE, /* 100 */
        MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_EXPOSURE_MODE,
        MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_ISO,
        MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_WHITEBALANCE,
        MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_EFFECT,
-       MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_SCENE_MODE, //105
+       MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_SCENE_MODE, /* 105 */
        MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_FLASH_MODE,
        MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_FPS,
        MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_FPS_BY_RESOLUTION,
        MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_STREAM_FLIP,
-       MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_STREAM_ROTATION, //110
+       MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_STREAM_ROTATION, /* 110 */
        MUSE_CAMERA_API_ATTR_SET_STREAM_ROTATION,
        MUSE_CAMERA_API_ATTR_GET_STREAM_ROTATION,
        MUSE_CAMERA_API_ATTR_SET_STREAM_FLIP,
        MUSE_CAMERA_API_ATTR_GET_STREAM_FLIP,
-       MUSE_CAMERA_API_ATTR_SET_HDR_MODE, //115
+       MUSE_CAMERA_API_ATTR_SET_HDR_MODE, /* 115 */
        MUSE_CAMERA_API_ATTR_GET_HDR_MODE,
        MUSE_CAMERA_API_ATTR_IS_SUPPORTED_HDR_CAPTURE,
        MUSE_CAMERA_API_ATTR_SET_HDR_CAPTURE_PROGRESS_CB,
        MUSE_CAMERA_API_ATTR_UNSET_HDR_CAPTURE_PROGRESS_CB,
-       MUSE_CAMERA_API_ATTR_ENABLE_ANTI_SHAKE, //120
+       MUSE_CAMERA_API_ATTR_ENABLE_ANTI_SHAKE, /* 120 */
        MUSE_CAMERA_API_ATTR_IS_ENABLED_ANTI_SHAKE,
        MUSE_CAMERA_API_ATTR_IS_SUPPORTED_ANTI_SHAKE,
        MUSE_CAMERA_API_ATTR_ENABLE_VIDEO_STABILIZATION,
        MUSE_CAMERA_API_ATTR_IS_ENABLED_VIDEO_STABILIZATION,
-       MUSE_CAMERA_API_ATTR_IS_SUPPORTED_VIDEO_STABILIZATION, //125
+       MUSE_CAMERA_API_ATTR_IS_SUPPORTED_VIDEO_STABILIZATION, /* 125 */
        MUSE_CAMERA_API_ATTR_ENABLE_AUTO_CONTRAST,
        MUSE_CAMERA_API_ATTR_IS_ENABLED_AUTO_CONTRAST,
        MUSE_CAMERA_API_ATTR_IS_SUPPORTED_AUTO_CONTRAST,
        MUSE_CAMERA_API_ATTR_DISABLE_SHUTTER_SOUND,
-       MUSE_CAMERA_API_ATTR_GET_ENCODED_PREVIEW_BITRATE, //130
+       MUSE_CAMERA_API_ATTR_GET_ENCODED_PREVIEW_BITRATE, /* 130 */
        MUSE_CAMERA_API_ATTR_SET_ENCODED_PREVIEW_BITRATE,
        MUSE_CAMERA_API_ATTR_GET_ENCODED_PREVIEW_GOP_INTERVAL,
        MUSE_CAMERA_API_ATTR_SET_ENCODED_PREVIEW_GOP_INTERVAL,
        MUSE_CAMERA_API_ATTR_SET_PAN,
-       MUSE_CAMERA_API_ATTR_GET_PAN, //135
+       MUSE_CAMERA_API_ATTR_GET_PAN, /* 135 */
        MUSE_CAMERA_API_ATTR_GET_PAN_RANGE,
        MUSE_CAMERA_API_ATTR_SET_TILT,
        MUSE_CAMERA_API_ATTR_GET_TILT,
        MUSE_CAMERA_API_ATTR_GET_TILT_RANGE,
-       MUSE_CAMERA_API_ATTR_SET_PTZ_TYPE, //140
+       MUSE_CAMERA_API_ATTR_SET_PTZ_TYPE, /* 140 */
        MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_PTZ_TYPE,
        MUSE_CAMERA_API_SET_DISPLAY_ROI_AREA,
        MUSE_CAMERA_API_GET_DISPLAY_ROI_AREA,
        MUSE_CAMERA_API_RETURN_BUFFER,
-       MUSE_CAMERA_API_PREVIEW_CB_RETURN, //145
+       MUSE_CAMERA_API_PREVIEW_CB_RETURN, /* 145 */
        MUSE_CAMERA_API_SET_DISPLAY_REUSE_HINT,
        MUSE_CAMERA_API_GET_DISPLAY_REUSE_HINT,
        MUSE_CAMERA_API_MAX
@@ -200,36 +200,36 @@ typedef enum {
  * @brief Enumeration for the muse camera events.
  */
 typedef enum {
-       MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE, //0
+       MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE, /* 0 */
        MUSE_CAMERA_EVENT_TYPE_FOCUS_CHANGE,
        MUSE_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE,
        MUSE_CAMERA_EVENT_TYPE_PREVIEW,
        MUSE_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW,
-       MUSE_CAMERA_EVENT_TYPE_CAPTURE, //5
+       MUSE_CAMERA_EVENT_TYPE_CAPTURE, /* 5 */
        MUSE_CAMERA_EVENT_TYPE_ERROR,
        MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS,
        MUSE_CAMERA_EVENT_TYPE_INTERRUPTED,
        MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION,
-       MUSE_CAMERA_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR, //10
+       MUSE_CAMERA_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR, /* 10 */
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_RESOLUTION,
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_RESOLUTION,
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_FORMAT,
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_FORMAT,
-       MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE, //15
+       MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE, /* 15 */
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_AF_MODE,
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EXPOSURE_MODE,
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_ISO,
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_WHITEBALANCE,
-       MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EFFECT, //20
+       MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EFFECT, /* 20 */
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_SCENE_MODE,
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FLASH_MODE,
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS,
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS_BY_RESOLUTION,
-       MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_FLIP, //25
+       MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_FLIP, /* 25 */
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_ROTATION,
        MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PTZ_TYPE,
-       MUSE_CAMERA_EVENT_TYPE_NUM //28
-}muse_camera_event_e;
+       MUSE_CAMERA_EVENT_TYPE_NUM /* 28 */
+} muse_camera_event_e;
 
 /**
  * @brief Enumeration for the muse camera events class.
@@ -259,7 +259,7 @@ typedef enum {
 /**
  * @brief Definition for the callback event id.
  */
-#define MUSE_CAMERA_CB_EVENT   MUSE_CAMERA_API_MAX + 1 //129
+#define MUSE_CAMERA_CB_EVENT   MUSE_CAMERA_API_MAX + 1 /* 148 */
 
 /**
  * @brief Definition for the max message length.
index 8f30fa5..d285583 100644 (file)
@@ -156,7 +156,7 @@ typedef const char* STRING;
  * @param[out] ret The delivered return value from the module to proxy side.
  */
 #define muse_camera_msg_send(api, fd, cb_info, ret) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                __sndMsg__ = muse_core_msg_json_factory_new(api, 0); \
@@ -167,7 +167,7 @@ typedef const char* STRING;
                } else \
                        ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Send the message from proxy to module via ipc.
@@ -176,7 +176,7 @@ typedef const char* STRING;
  * @param[in] cb_info The callback information, waiting for the ack from the module.
  */
 #define muse_camera_msg_send_no_return(api, fd, cb_info) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                __sndMsg__ = muse_core_msg_json_factory_new(api, 0); \
@@ -185,7 +185,7 @@ typedef const char* STRING;
                        LOGE("sending message failed"); \
                } \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       } while(0)
+       } while (0)
 
 /**
  * @brief Send the message from proxy to module via ipc, waits more period of time for the ack.
@@ -195,10 +195,10 @@ typedef const char* STRING;
  * @param[out] ret The delivered return value from the module to proxy side.
  */
 #define muse_camera_msg_send_longtime(api, fd, cb_info, ret) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api,        0); \
+               __sndMsg__ = muse_core_msg_json_factory_new(api, 0); \
                __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \
                if (__len__ <= 0) { \
                        LOGE("sending message failed"); \
@@ -206,7 +206,7 @@ typedef const char* STRING;
                } else \
                        ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT_LONG); \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Send the message from proxy to module via ipc, adding 1 more parameter.
@@ -218,7 +218,7 @@ typedef const char* STRING;
  * @param[in] param A single parameter to be included in the message.
  */
 #define muse_camera_msg_send1(api, fd, cb_info, ret, type, param) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                type __value__ = (type)param; \
@@ -232,7 +232,7 @@ typedef const char* STRING;
                } else \
                        ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Send the message from proxy to module via ipc, adding 1 more parameter.
@@ -243,7 +243,7 @@ typedef const char* STRING;
  * @param[in] param A single parameter to be included in the message.
  */
 #define muse_camera_msg_send1_no_return(api, fd, cb_info, type, param) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                type __value__ = (type)param; \
@@ -255,7 +255,7 @@ typedef const char* STRING;
                        LOGE("sending message failed"); \
                } \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Send the message from proxy to module via ipc, adding 2 more parameters.
@@ -269,7 +269,7 @@ typedef const char* STRING;
  * @param[in] param2 The 2nd parameter to be included in the message.
  */
 #define muse_camera_msg_send2(api, fd, cb_info, ret, type1, param1, type2, param2) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                type1 __value1__ = (type1)param1; \
@@ -285,7 +285,7 @@ typedef const char* STRING;
                } else \
                        ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Send the message from proxy to module via ipc, adding 3 more parameters.
@@ -301,7 +301,7 @@ typedef const char* STRING;
  * @param[in] param3 The 3rd parameter to be included in the message.
  */
 #define muse_camera_msg_send3(api, fd, cb_info, ret, type1, param1, type2, param2, type3, param3) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                type1 __value1__ = (type1)param1; \
@@ -319,7 +319,7 @@ typedef const char* STRING;
                } else \
                        ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Send the message from proxy to module via ipc, adding an array data.
@@ -332,14 +332,14 @@ typedef const char* STRING;
  * @param[in] datum_size The size of the array.
  */
 #define muse_camera_msg_send_array(api, fd, cb_info, ret, param, length, datum_size) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                int *__value__ = (int *)param; \
                __sndMsg__ = muse_core_msg_json_factory_new(api, \
                                        MUSE_TYPE_ARRAY, #param, \
-                                       datum_size == sizeof(int)? length / sizeof(int) :  \
-                                       length / sizeof(int) + (length % sizeof(int)?1:0), \
+                                       datum_size == sizeof(int) ? length / sizeof(int) :  \
+                                       length / sizeof(int) + (length % sizeof(int) ? 1 : 0), \
                                        __value__, \
                                        0); \
                __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \
@@ -349,7 +349,7 @@ typedef const char* STRING;
                } else \
                        ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Send the message from proxy to module via ipc, adding an array data and value.
@@ -364,7 +364,7 @@ typedef const char* STRING;
  * @param[in] param2 The 2rd parameter to be included in the message.
  */
 #define muse_camera_msg_send_array_and_value(api, fd, cb_info, ret, param, length, datum_size, type, param2) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                int *__value__ = (int *)param; \
@@ -372,8 +372,8 @@ typedef const char* STRING;
                __sndMsg__ = muse_core_msg_json_factory_new(api, \
                                        MUSE_TYPE_##type, #param2, __value2__, \
                                        MUSE_TYPE_ARRAY, #param, \
-                                       datum_size == sizeof(int)? length / sizeof(int) :  \
-                                       length / sizeof(int) + (length % sizeof(int)?1:0), \
+                                       datum_size == sizeof(int) ? length / sizeof(int) :  \
+                                       length / sizeof(int) + (length % sizeof(int) ? 1 : 0), \
                                        __value__, \
                                        0); \
                __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \
@@ -383,7 +383,7 @@ typedef const char* STRING;
                } else \
                        ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Returning the ack message from the server to client side.
@@ -393,7 +393,7 @@ typedef const char* STRING;
  * @param[in] module The module info for the ipc transportation.
  */
 #define muse_camera_msg_return(api, class, ret, module) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                __sndMsg__ = muse_core_msg_json_factory_new(api, \
@@ -406,7 +406,7 @@ typedef const char* STRING;
                        ret = CAMERA_ERROR_INVALID_OPERATION; \
                } \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Returning the ack message from the server to client side.
@@ -418,7 +418,7 @@ typedef const char* STRING;
  * @param[in] param A parameter to be included in the message.
  */
 #define muse_camera_msg_return1(api, class, ret, module, type, param) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                type __value__ = (type)param; \
@@ -433,7 +433,7 @@ typedef const char* STRING;
                        ret = CAMERA_ERROR_INVALID_OPERATION; \
                } \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Returning the ack message from the server to client side, adding 2 parameters.
@@ -447,7 +447,7 @@ typedef const char* STRING;
  * @param[in] param2 The 2nd parameter to be included in the message.
  */
 #define muse_camera_msg_return2(api, class, ret, module, type1, param1, type2, param2) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                type1 __value1__ = (type1)param1; \
@@ -464,7 +464,7 @@ typedef const char* STRING;
                        ret = CAMERA_ERROR_INVALID_OPERATION; \
                } \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Returning the ack message from the server to client side, adding 3 parameters.
@@ -480,7 +480,7 @@ typedef const char* STRING;
  * @param[in] param3 The 3rd parameter to be included in the message.
  */
 #define muse_camera_msg_return3(api, class, ret, module, type1, param1, type2, param2, type3, param3) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                type1 __value1__ = (type1)param1; \
@@ -499,7 +499,7 @@ typedef const char* STRING;
                        ret = CAMERA_ERROR_INVALID_OPERATION; \
                } \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Returning the ack message from the server to client side, adding array parameter.
@@ -512,7 +512,7 @@ typedef const char* STRING;
  * @param[in] datum_size The size of the array.
  */
 #define muse_camera_msg_return_array(api, class, ret, module, param, length, datum_size) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                int __len__; \
                int *__value__ = (int *)param; \
@@ -520,8 +520,8 @@ typedef const char* STRING;
                                MUSE_TYPE_INT, PARAM_API_CLASS, class, \
                                MUSE_TYPE_INT, PARAM_RET, ret, \
                                MUSE_TYPE_ARRAY, #param, \
-                                       datum_size == sizeof(int)? length / sizeof(int) :  \
-                                       length / sizeof(int) + (length % sizeof(int)?1:0), \
+                                       datum_size == sizeof(int) ? length / sizeof(int) :  \
+                                       length / sizeof(int) + (length % sizeof(int) ? 1 : 0), \
                                        __value__, \
                                0); \
                __len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
@@ -530,7 +530,7 @@ typedef const char* STRING;
                        ret = CAMERA_ERROR_INVALID_OPERATION; \
                } \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Returning the event ack message from the server to client side, adding array parameter.
@@ -540,7 +540,7 @@ typedef const char* STRING;
  * @param[in] module The module info for the ipc transportation.
  */
 #define muse_camera_msg_event(api, event, class, module) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                __sndMsg__ = muse_core_msg_json_factory_new(api, \
                                MUSE_TYPE_INT, PARAM_EVENT, event, \
@@ -548,7 +548,7 @@ typedef const char* STRING;
                                0); \
                muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Returning the event ack message from the server to client side, adding array parameter.
@@ -560,7 +560,7 @@ typedef const char* STRING;
  * @param[in] param A parameter to be included in the message.
  */
 #define muse_camera_msg_event1(api, event, class, module, type, param) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                type __value__ = (type)param; \
                __sndMsg__ = muse_core_msg_json_factory_new(api, \
@@ -570,7 +570,7 @@ typedef const char* STRING;
                                0); \
                muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Returning the event ack message from the server to client side, adding array parameter.
@@ -583,7 +583,7 @@ typedef const char* STRING;
  * @param[in] param2 The 2nd parameter to be included in the message.
  */
 #define muse_camera_msg_event2(api, event, class, module, type1, param1, type2, param2) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                type1 __value1__ = (type1)param1; \
                type2 __value2__ = (type2)param2; \
@@ -595,7 +595,7 @@ typedef const char* STRING;
                                0); \
                muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 /**
  * @brief Returning the event ack message from the server to client side, adding array parameter.
@@ -610,7 +610,7 @@ typedef const char* STRING;
  * @param[in] param3 The 3rd parameter to be included in the message.
  */
 #define muse_camera_msg_event3(api, event, class, module, type1, param1, type2, param2, type3, param3) \
-       do    \
+       do {    \
                char *__sndMsg__; \
                type1 __value1__ = (type1)param1; \
                type2 __value2__ = (type2)param2; \
@@ -624,7 +624,7 @@ typedef const char* STRING;
                                0); \
                muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
                muse_core_msg_json_factory_free(__sndMsg__); \
-       }while(0)
+       } while (0)
 
 #ifdef __cplusplus
 }
index 8e61bd4..caf412a 100644 (file)
@@ -48,10 +48,10 @@ void _camera_dispatcher_callback_supported_theater_mode(int param1, void *user_d
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_af_mode(int param1, void *user_data)
@@ -61,10 +61,10 @@ void _camera_dispatcher_callback_supported_af_mode(int param1, void *user_data)
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_AF_MODE,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_AF_MODE,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_exposure_mode(int param1, void *user_data)
@@ -74,10 +74,10 @@ void _camera_dispatcher_callback_supported_exposure_mode(int param1, void *user_
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EXPOSURE_MODE,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EXPOSURE_MODE,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_iso_mode(int param1, void *user_data)
@@ -87,10 +87,10 @@ void _camera_dispatcher_callback_supported_iso_mode(int param1, void *user_data)
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_ISO,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_ISO,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_whitebalance(int param1, void *user_data)
@@ -100,10 +100,10 @@ void _camera_dispatcher_callback_supported_whitebalance(int param1, void *user_d
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_WHITEBALANCE,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_WHITEBALANCE,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_effect(int param1, void *user_data)
@@ -113,10 +113,10 @@ void _camera_dispatcher_callback_supported_effect(int param1, void *user_data)
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EFFECT,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EFFECT,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_scene_mode(int param1, void *user_data)
@@ -126,10 +126,10 @@ void _camera_dispatcher_callback_supported_scene_mode(int param1, void *user_dat
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_SCENE_MODE,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_SCENE_MODE,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_flash_mode(int param1, void *user_data)
@@ -139,10 +139,10 @@ void _camera_dispatcher_callback_supported_flash_mode(int param1, void *user_dat
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FLASH_MODE,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FLASH_MODE,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 int _camera_dispatcher_callback_supported_flash_mode2(int param1, void *user_data)
@@ -166,10 +166,10 @@ void _camera_dispatcher_callback_supported_fps(int param1, void *user_data)
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_fps_by_resolution(int param1, void *user_data)
@@ -179,10 +179,10 @@ void _camera_dispatcher_callback_supported_fps_by_resolution(int param1, void *u
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS_BY_RESOLUTION,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS_BY_RESOLUTION,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_stream_flip(int param1, void *user_data)
@@ -192,10 +192,10 @@ void _camera_dispatcher_callback_supported_stream_flip(int param1, void *user_da
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_FLIP,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_FLIP,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_stream_rotation(int param1, void *user_data)
@@ -205,10 +205,10 @@ void _camera_dispatcher_callback_supported_stream_rotation(int param1, void *use
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_ROTATION,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_ROTATION,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_capture_format(int param1, void *user_data)
@@ -218,10 +218,10 @@ void _camera_dispatcher_callback_supported_capture_format(int param1, void *user
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_FORMAT,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_FORMAT,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_preview_format(int param1, void *user_data)
@@ -231,10 +231,10 @@ void _camera_dispatcher_callback_supported_preview_format(int param1, void *user
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_FORMAT,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_FORMAT,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 void _camera_dispatcher_callback_supported_preview_resolution(int param1, int param2, void *user_data)
@@ -244,11 +244,11 @@ void _camera_dispatcher_callback_supported_preview_resolution(int param1, int pa
        LOGD("Enter!! param1 : %d, param2 : %d", param1, param2);
 
        muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_RESOLUTION,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1,
-                              INT, param2);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_RESOLUTION,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1,
+               INT, param2);
 }
 
 void _camera_dispatcher_callback_supported_capture_resolution(int param1, int param2, void *user_data)
@@ -258,11 +258,11 @@ void _camera_dispatcher_callback_supported_capture_resolution(int param1, int pa
        LOGD("Enter!! param1 : %d, param2 : %d", param1, param2);
 
        muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_RESOLUTION,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1,
-                              INT, param2);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_RESOLUTION,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1,
+               INT, param2);
 }
 
 void _camera_dispatcher_callback_supported_ptz_type(int param1, void *user_data)
@@ -272,10 +272,10 @@ void _camera_dispatcher_callback_supported_ptz_type(int param1, void *user_data)
        LOGD("Enter!! param : %d", param1);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PTZ_TYPE,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, param1);
+               MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PTZ_TYPE,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, param1);
 }
 
 static int _camera_remove_export_data(muse_module_h module, int key, int remove_all)
@@ -412,7 +412,7 @@ void _camera_dispatcher_capturing_cb(camera_image_data_s* image, camera_image_da
                        tbm_bo_unmap(bo_main);
 
                        tbm_key_main = tbm_bo_export(bo_main);
-                       if(tbm_key_main == 0) {
+                       if (tbm_key_main == 0) {
                                LOGE("Create key_info ERROR!!");
                                goto main_image_error;
                        }
@@ -455,7 +455,7 @@ void _camera_dispatcher_capturing_cb(camera_image_data_s* image, camera_image_da
                        tbm_bo_unmap(bo_post);
 
                        tbm_key_post = tbm_bo_export(bo_post);
-                       if(tbm_key_post == 0) {
+                       if (tbm_key_post == 0) {
                                LOGE("Create key_info ERROR!!");
                                goto postview_image_error;
                        }
@@ -496,7 +496,7 @@ void _camera_dispatcher_capturing_cb(camera_image_data_s* image, camera_image_da
                        tbm_bo_unmap(bo_thumb);
 
                        tbm_key_thumb = tbm_bo_export(bo_thumb);
-                       if(tbm_key_thumb == 0) {
+                       if (tbm_key_thumb == 0) {
                                LOGE("Create key_info ERROR!!");
                                goto thumbnail_image_error;
                        }
@@ -518,12 +518,12 @@ void _camera_dispatcher_capturing_cb(camera_image_data_s* image, camera_image_da
 
        /* send message */
        muse_camera_msg_event3(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_CAPTURE,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-                              module,
-                              INT, tbm_key_main,
-                              INT, tbm_key_post,
-                              INT, tbm_key_thumb);
+               MUSE_CAMERA_EVENT_TYPE_CAPTURE,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               module,
+               INT, tbm_key_main,
+               INT, tbm_key_post,
+               INT, tbm_key_thumb);
 
        return;
 
@@ -571,12 +571,12 @@ void _camera_dispatcher_state_changed_cb(camera_state_e previous, camera_state_e
             previous, current, by_policy);
 
        muse_camera_msg_event3(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-                              module,
-                              INT, previous,
-                              INT, current,
-                              INT, by_policy);
+               MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+               module,
+               INT, previous,
+               INT, current,
+               INT, by_policy);
 
        return;
 }
@@ -588,12 +588,12 @@ void _camera_dispatcher_interrupted_cb(camera_policy_e policy, camera_state_e pr
        LOGD("Enter - policy %d, state previous %d, current %d", policy, previous, current);
 
        muse_camera_msg_event3(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_INTERRUPTED,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-                              module,
-                              INT, policy,
-                              INT, previous,
-                              INT, current);
+               MUSE_CAMERA_EVENT_TYPE_INTERRUPTED,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+               module,
+               INT, policy,
+               INT, previous,
+               INT, current);
 
        return;
 }
@@ -681,7 +681,7 @@ void _camera_dispatcher_preview_cb(MMCamcorderVideoStreamDataType *stream, void
                case MM_CAM_STREAM_DATA_ENCODED:
                        data_size = stream->data.encoded.length_data;
                        break;
-               default :
+               default:
                        LOGW("unknown data type %d", stream->data_type);
                        break;
                }
@@ -724,7 +724,7 @@ void _camera_dispatcher_preview_cb(MMCamcorderVideoStreamDataType *stream, void
                case MM_CAM_STREAM_DATA_ENCODED:
                        memcpy(buf_pos, stream->data.encoded.data, stream->data.encoded.length_data);
                        break;
-               default :
+               default:
                        break;
                }
 
@@ -747,7 +747,7 @@ void _camera_dispatcher_preview_cb(MMCamcorderVideoStreamDataType *stream, void
        }
 
        tbm_key = tbm_bo_export(bo);
-       if(tbm_key == 0) {
+       if (tbm_key == 0) {
                LOGE("Create key_info ERROR!!");
                goto _PREVIEW_CB_ERROR;
        }
@@ -797,7 +797,7 @@ void _camera_dispatcher_preview_cb(MMCamcorderVideoStreamDataType *stream, void
        /*LOGD("wait preview callback return message");*/
 
        if (!CHECK_PREVIEW_CB(muse_camera, PREVIEW_CB_TYPE_EVAS)) {
-               gint64 end_time = g_get_monotonic_time () + G_TIME_SPAN_SECOND;
+               gint64 end_time = g_get_monotonic_time() + G_TIME_SPAN_SECOND;
 
                if (!g_cond_wait_until(&muse_camera->preview_cb_cond, &muse_camera->preview_cb_lock, end_time)) {
                        LOGW("preview callback return message timeout");
@@ -834,9 +834,9 @@ void _camera_dispatcher_capture_completed_cb(void *user_data)
        LOGD("Enter");
 
        muse_camera_msg_event(MUSE_CAMERA_CB_EVENT,
-                             MUSE_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE,
-                             MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-                             module);
+               MUSE_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+               module);
        return;
 }
 
@@ -922,11 +922,11 @@ void _camera_dispatcher_face_detected_cb(camera_detected_face_s *faces, int coun
 
                /* send message */
                muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
-                                      MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION,
-                                      MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-                                      module,
-                                      INT, count,
-                                      INT, tbm_key);
+                       MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION,
+                       MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+                       module,
+                       INT, count,
+                       INT, tbm_key);
        } else {
                LOGW("invalid count for face detection - %d", count);
        }
@@ -941,10 +941,10 @@ void _camera_dispatcher_focus_changed_cb(camera_focus_state_e state, void *user_
        LOGD("Enter - state %d", state);
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_FOCUS_CHANGE,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-                              module,
-                              INT, state);
+               MUSE_CAMERA_EVENT_TYPE_FOCUS_CHANGE,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+               module,
+               INT, state);
 
        return;
 }
@@ -956,11 +956,11 @@ void _camera_dispatcher_error_cb(camera_error_e error, camera_state_e current_st
        LOGD("Enter - error 0x%x, current_state %d", error, current_state);
 
        muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_ERROR,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-                              module,
-                              INT, error,
-                              INT, current_state);
+               MUSE_CAMERA_EVENT_TYPE_ERROR,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+               module,
+               INT, error,
+               INT, current_state);
 
        return;
 }
@@ -972,10 +972,10 @@ void _camera_dispatcher_hdr_progress_cb(int percent, void *user_data)
        LOGD("Enter");
 
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
-                              MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS,
-                              MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-                              module,
-                              INT, percent);
+               MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+               module,
+               INT, percent);
        return;
 }
 
@@ -1182,9 +1182,9 @@ int camera_dispatcher_start_capture(muse_module_h module)
        }
 
        ret = legacy_camera_start_capture(muse_camera->camera_handle,
-                                         (camera_capturing_cb)capturing_cb,
-                                         (camera_capture_completed_cb)completed_cb,
-                                         (void *)module);
+               (camera_capturing_cb)capturing_cb,
+               (camera_capture_completed_cb)completed_cb,
+               (void *)module);
 
        muse_camera_msg_return(api, class, ret, module);
 
@@ -1228,11 +1228,11 @@ int camera_dispatcher_start_continuous_capture(muse_module_h module)
        LOGD("Enter, handle : %p, module : %p", muse_camera, module);
 
        ret = legacy_camera_start_continuous_capture(muse_camera->camera_handle,
-                                                    count,
-                                                    interval,
-                                                    (camera_capturing_cb)_camera_dispatcher_capturing_cb,
-                                                    (camera_capture_completed_cb)_camera_dispatcher_capture_completed_cb,
-                                                    (void *)module);
+               count,
+               interval,
+               (camera_capturing_cb)_camera_dispatcher_capturing_cb,
+               (camera_capture_completed_cb)_camera_dispatcher_capture_completed_cb,
+               (void *)module);
 
        muse_camera_msg_return(api, class, ret, module);
 
@@ -1351,8 +1351,8 @@ int camera_dispatcher_start_face_detection(muse_module_h module)
        LOGD("Enter, handle : 0x%x, module : %d", muse_camera, module);
 
        ret = legacy_camera_start_face_detection(muse_camera->camera_handle,
-                                                (camera_face_detected_cb)_camera_dispatcher_face_detected_cb,
-                                                (void *)module);
+               (camera_face_detected_cb)_camera_dispatcher_face_detected_cb,
+               (void *)module);
 
        muse_camera_msg_return(api, class, ret, module);
 
@@ -1474,8 +1474,8 @@ int camera_dispatcher_set_display(muse_module_h module)
 
                if (type == CAMERA_DISPLAY_TYPE_EVAS) {
                        ret = legacy_camera_set_preview_cb(muse_camera->camera_handle,
-                                                  (camera_preview_cb)_camera_dispatcher_preview_cb,
-                                                  (void *)module);
+                               (camera_preview_cb)_camera_dispatcher_preview_cb,
+                               (void *)module);
 
                        if (ret == CAMERA_ERROR_NONE)
                                SET_PREVIEW_CB_TYPE(muse_camera, PREVIEW_CB_TYPE_EVAS);
@@ -1933,8 +1933,8 @@ int camera_dispatcher_set_preview_cb(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_set_preview_cb(muse_camera->camera_handle,
-                                          (camera_preview_cb)_camera_dispatcher_preview_cb,
-                                          (void *)module);
+               (camera_preview_cb)_camera_dispatcher_preview_cb,
+               (void *)module);
 
        if (ret == CAMERA_ERROR_NONE)
                SET_PREVIEW_CB_TYPE(muse_camera, PREVIEW_CB_TYPE_USER);
@@ -1982,8 +1982,8 @@ int camera_dispatcher_set_media_packet_preview_cb(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_set_media_packet_preview_cb(muse_camera->camera_handle,
-                                                       (camera_preview_cb)_camera_dispatcher_preview_cb,
-                                                       (void *)module);
+               (camera_preview_cb)_camera_dispatcher_preview_cb,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -2024,8 +2024,8 @@ int camera_dispatcher_set_state_changed_cb(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_set_state_changed_cb(muse_camera->camera_handle,
-                                                (camera_state_changed_cb)_camera_dispatcher_state_changed_cb,
-                                                (void *)module);
+               (camera_state_changed_cb)_camera_dispatcher_state_changed_cb,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -2066,8 +2066,8 @@ int camera_dispatcher_set_interrupted_cb(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_set_interrupted_cb(muse_camera->camera_handle,
-                                              (camera_interrupted_cb)_camera_dispatcher_interrupted_cb,
-                                              (void *)module);
+               (camera_interrupted_cb)_camera_dispatcher_interrupted_cb,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -2108,8 +2108,8 @@ int camera_dispatcher_set_focus_changed_cb(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_set_focus_changed_cb(muse_camera->camera_handle,
-                                                (camera_focus_changed_cb)_camera_dispatcher_focus_changed_cb,
-                                                (void *)module);
+               (camera_focus_changed_cb)_camera_dispatcher_focus_changed_cb,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -2150,8 +2150,8 @@ int camera_dispatcher_set_error_cb(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_set_error_cb(muse_camera->camera_handle,
-                                        (camera_error_cb)_camera_dispatcher_error_cb,
-                                        (void *)module);
+               (camera_error_cb)_camera_dispatcher_error_cb,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -2192,8 +2192,8 @@ int camera_dispatcher_foreach_supported_preview_resolution(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_foreach_supported_preview_resolution(muse_camera->camera_handle,
-                                                                (camera_supported_preview_resolution_cb)_camera_dispatcher_callback_supported_preview_resolution,
-                                                                (void *)module);
+               (camera_supported_preview_resolution_cb)_camera_dispatcher_callback_supported_preview_resolution,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -2214,8 +2214,8 @@ int camera_dispatcher_foreach_supported_capture_resolution(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_foreach_supported_capture_resolution(muse_camera->camera_handle,
-                                                                (camera_supported_capture_resolution_cb)_camera_dispatcher_callback_supported_capture_resolution,
-                                                                (void *)module);
+               (camera_supported_capture_resolution_cb)_camera_dispatcher_callback_supported_capture_resolution,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -2236,8 +2236,8 @@ int camera_dispatcher_foreach_supported_capture_format(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_foreach_supported_capture_format(muse_camera->camera_handle,
-                                                            (camera_supported_capture_format_cb)_camera_dispatcher_callback_supported_capture_format,
-                                                            (void *)module);
+               (camera_supported_capture_format_cb)_camera_dispatcher_callback_supported_capture_format,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -2258,8 +2258,8 @@ int camera_dispatcher_foreach_supported_preview_format(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_foreach_supported_preview_format(muse_camera->camera_handle,
-                                                            (camera_supported_preview_format_cb)_camera_dispatcher_callback_supported_preview_format,
-                                                            (void *)module);
+               (camera_supported_preview_format_cb)_camera_dispatcher_callback_supported_preview_format,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -2367,8 +2367,8 @@ int camera_dispatcher_attr_foreach_supported_theater_mode(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_theater_mode(muse_camera->camera_handle,
-                                                               (camera_attr_supported_theater_mode_cb)_camera_dispatcher_callback_supported_theater_mode,
-                                                               (void *)module);
+               (camera_attr_supported_theater_mode_cb)_camera_dispatcher_callback_supported_theater_mode,
+               (void *)module);
 
        muse_camera_msg_return(api, class, ret, module);
 
@@ -2894,9 +2894,9 @@ int camera_dispatcher_attr_set_flash_mode(muse_module_h module)
                ret = legacy_camera_get_device_type(muse_camera->camera_handle, &device_type);
                if (ret == CAMERA_ERROR_NONE) {
                        if (device_type == CAMERA_DEVICE_CAMERA0)
-                               muse_core_client_set_value(module, "flash_state_camera0", set_mode>0?1:0);
+                               muse_core_client_set_value(module, "flash_state_camera0", set_mode > 0 ? 1 : 0);
                        else
-                               muse_core_client_set_value(module, "flash_state_camera1", set_mode>0?1:0);
+                               muse_core_client_set_value(module, "flash_state_camera1", set_mode > 0 ? 1 : 0);
                }
        }
 
@@ -3371,8 +3371,8 @@ int camera_dispatcher_attr_foreach_supported_af_mode(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_af_mode(muse_camera->camera_handle,
-                                                          (camera_attr_supported_af_mode_cb)_camera_dispatcher_callback_supported_af_mode,
-                                                          (void *)module);
+               (camera_attr_supported_af_mode_cb)_camera_dispatcher_callback_supported_af_mode,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -3393,8 +3393,8 @@ int camera_dispatcher_attr_foreach_supported_exposure_mode(muse_module_h module)
        LOGD("handle : 0x%x, api : %d", muse_camera, api);
 
        ret = legacy_camera_attr_foreach_supported_exposure_mode(muse_camera->camera_handle,
-                                                                (camera_attr_supported_exposure_mode_cb)_camera_dispatcher_callback_supported_exposure_mode,
-                                                                (void *)module);
+               (camera_attr_supported_exposure_mode_cb)_camera_dispatcher_callback_supported_exposure_mode,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -3415,8 +3415,8 @@ int camera_dispatcher_attr_foreach_supported_iso(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_iso(muse_camera->camera_handle,
-                                                      (camera_attr_supported_iso_cb)_camera_dispatcher_callback_supported_iso_mode,
-                                                      (void *)module);
+               (camera_attr_supported_iso_cb)_camera_dispatcher_callback_supported_iso_mode,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -3437,8 +3437,8 @@ int camera_dispatcher_attr_foreach_supported_whitebalance(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_whitebalance(muse_camera->camera_handle,
-                                                               (camera_attr_supported_whitebalance_cb)_camera_dispatcher_callback_supported_whitebalance,
-                                                               (void *)module);
+               (camera_attr_supported_whitebalance_cb)_camera_dispatcher_callback_supported_whitebalance,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -3459,8 +3459,8 @@ int camera_dispatcher_attr_foreach_supported_effect(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_effect(muse_camera->camera_handle,
-                                                         (camera_attr_supported_effect_cb)_camera_dispatcher_callback_supported_effect,
-                                                         (void *)module);
+               (camera_attr_supported_effect_cb)_camera_dispatcher_callback_supported_effect,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -3481,8 +3481,8 @@ int camera_dispatcher_attr_foreach_supported_scene_mode(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_scene_mode(muse_camera->camera_handle,
-                                                             (camera_attr_supported_scene_mode_cb)_camera_dispatcher_callback_supported_scene_mode,
-                                                             (void *)module);
+               (camera_attr_supported_scene_mode_cb)_camera_dispatcher_callback_supported_scene_mode,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -3503,8 +3503,8 @@ int camera_dispatcher_attr_foreach_supported_flash_mode(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_flash_mode(muse_camera->camera_handle,
-                                                             (camera_attr_supported_flash_mode_cb)_camera_dispatcher_callback_supported_flash_mode,
-                                                             (void *)module);
+               (camera_attr_supported_flash_mode_cb)_camera_dispatcher_callback_supported_flash_mode,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -3525,8 +3525,8 @@ int camera_dispatcher_attr_foreach_supported_fps(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_fps(muse_camera->camera_handle,
-                                                      (camera_attr_supported_fps_cb)_camera_dispatcher_callback_supported_fps,
-                                                      (void *)module);
+               (camera_attr_supported_fps_cb)_camera_dispatcher_callback_supported_fps,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -3552,9 +3552,9 @@ int camera_dispatcher_attr_foreach_supported_fps_by_resolution(muse_module_h mod
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_fps_by_resolution(muse_camera->camera_handle,
-                                                                    width, height,
-                                                                    (camera_attr_supported_fps_cb)_camera_dispatcher_callback_supported_fps_by_resolution,
-                                                                    (void *)module);
+               width, height,
+               (camera_attr_supported_fps_cb)_camera_dispatcher_callback_supported_fps_by_resolution,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -3575,8 +3575,8 @@ int camera_dispatcher_attr_foreach_supported_stream_flip(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_stream_flip(muse_camera->camera_handle,
-                                                              (camera_attr_supported_stream_flip_cb)_camera_dispatcher_callback_supported_stream_flip,
-                                                              (void *)module);
+               (camera_attr_supported_stream_flip_cb)_camera_dispatcher_callback_supported_stream_flip,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -3597,8 +3597,8 @@ int camera_dispatcher_attr_foreach_supported_stream_rotation(muse_module_h modul
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_stream_rotation(muse_camera->camera_handle,
-                                                                  (camera_attr_supported_stream_rotation_cb)_camera_dispatcher_callback_supported_stream_rotation,
-                                                                  (void *)module);
+               (camera_attr_supported_stream_rotation_cb)_camera_dispatcher_callback_supported_stream_rotation,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -3774,8 +3774,8 @@ int camera_dispatcher_attr_set_hdr_capture_progress_cb(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_set_hdr_capture_progress_cb(muse_camera->camera_handle,
-                                                            (camera_attr_hdr_progress_cb)_camera_dispatcher_hdr_progress_cb,
-                                                            (void *)module);
+               (camera_attr_hdr_progress_cb)_camera_dispatcher_hdr_progress_cb,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
@@ -4287,8 +4287,8 @@ int camera_dispatcher_attr_foreach_supported_ptz_type(muse_module_h module)
        LOGD("handle : %p", muse_camera);
 
        ret = legacy_camera_attr_foreach_supported_ptz_type(muse_camera->camera_handle,
-                                                          (camera_attr_supported_ptz_type_cb)_camera_dispatcher_callback_supported_ptz_type,
-                                                          (void *)module);
+               (camera_attr_supported_ptz_type_cb)_camera_dispatcher_callback_supported_ptz_type,
+               (void *)module);
 
        LOGD("ret : 0x%x", ret);
 
index 618cead..b4892f8 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-camera
 Summary:    A Camera module for muse server
-Version:    0.2.41
+Version:    0.2.42
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0