1. Remove build warnings 64/34364/2 tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common accepted/tizen/common/20150127.100959 accepted/tizen/mobile/20150127.111009 accepted/tizen/tv/20150127.105159 accepted/tizen/wearable/20150127.110233 submit/tizen/20150127.022156 submit/tizen/20150224.154403
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 26 Jan 2015 08:12:23 +0000 (17:12 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Mon, 26 Jan 2015 09:01:57 +0000 (18:01 +0900)
2. Fix crash while creating handle

Change-Id: I22442d09519aa6083ae30650265637cf0a48f120
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/libmm-camcorder.spec
sounds/camera_resource [new file with mode: 0644]
sounds/recorder_resource [new file with mode: 0644]
src/include/mm_camcorder_internal.h
src/mm_camcorder_attribute.c
src/mm_camcorder_configure.c
src/mm_camcorder_internal.c

index 4fa8ebf..5e53b92 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.9.0
+Version:    0.9.1
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
@@ -54,8 +54,10 @@ cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
 %post
 /sbin/ldconfig
 
-vconftool set -t int memory/camera/state 0 -i -u 5000
-vconftool set -t int file/camera/shutter_sound_policy 0 -u 5000
+vconftool set -t int memory/camera/state 0 -i -u 5000 -s system::vconf_multimedia
+vconftool set -t int file/camera/shutter_sound_policy 0 -u 5000 -s system::vconf_inhouse
+chsmack -a "device::camera" /usr/share/sounds/mm-camcorder/camera_resource
+chsmack -a "pulseaudio::record" /usr/share/sounds/mm-camcorder/recorder_resource
 
 %postun -p /sbin/ldconfig
 
diff --git a/sounds/camera_resource b/sounds/camera_resource
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/sounds/recorder_resource b/sounds/recorder_resource
new file mode 100644 (file)
index 0000000..e69de29
index d40db30..d5a0908 100644 (file)
@@ -279,68 +279,64 @@ extern "C" {
  *     Functions related with LOCK and WAIT
  */
 #define _MMCAMCORDER_CAST_MTSAFE(handle)                       (((mmf_camcorder_t*)handle)->mtsafe)
+#define _MMCAMCORDER_LOCK_FUNC(mutex)                          pthread_mutex_lock(&mutex)
+#define _MMCAMCORDER_TRYLOCK_FUNC(mutex)                       (!pthread_mutex_trylock(&mutex))
+#define _MMCAMCORDER_UNLOCK_FUNC(mutex)                                pthread_mutex_unlock(&mutex)
 
 #define _MMCAMCORDER_GET_LOCK(handle)                          (_MMCAMCORDER_CAST_MTSAFE(handle).lock)
-#define _MMCAMCORDER_LOCK(handle)                              pthread_mutex_lock(&_MMCAMCORDER_GET_LOCK(handle))
-#define _MMCAMCORDER_TRYLOCK(handle)                           pthread_mutex_trylock(&_MMCAMCORDER_GET_LOCK(handle))
-#define _MMCAMCORDER_UNLOCK(handle)                            pthread_mutex_unlock(&_MMCAMCORDER_GET_LOCK(handle))
-
-#define _MMCAMCORDER_GET_COND(handle)                          (_MMCAMCORDER_CAST_MTSAFE(handle).cond)
-#define _MMCAMCORDER_WAIT(handle)                              pthread_cond_wait(&_MMCAMCORDER_GET_COND(handle), &_MMCAMCORDER_GET_LOCK(handle))
-#define _MMCAMCORDER_TIMED_WAIT(handle, timeval)               pthread_cond_timedwait(&_MMCAMCORDER_GET_COND(handle), &_MMCAMCORDER_GET_LOCK(handle), timeval)
-
-#define _MMCAMCORDER_SIGNAL(handle)                            pthread_cond_signal(&_MMCAMCORDER_GET_COND(handle))
-#define _MMCAMCORDER_BROADCAST(handle)                         pthread_cond_broadcast(&_MMCAMCORDER_GET_COND(handle))
+#define _MMCAMCORDER_LOCK(handle)                              _MMCAMCORDER_LOCK_FUNC(_MMCAMCORDER_GET_LOCK(handle))
+#define _MMCAMCORDER_TRYLOCK(handle)                           _MMCAMCORDER_TRYLOCK_FUNC(_MMCAMCORDER_GET_LOCK(handle))
+#define _MMCAMCORDER_UNLOCK(handle)                            _MMCAMCORDER_UNLOCK_FUNC(_MMCAMCORDER_GET_LOCK(handle))
 
 /* for command */
 #define _MMCAMCORDER_GET_CMD_LOCK(handle)                      (_MMCAMCORDER_CAST_MTSAFE(handle).cmd_lock)
-#define _MMCAMCORDER_LOCK_CMD(handle)                          pthread_mutex_lock(&_MMCAMCORDER_GET_CMD_LOCK(handle))
-#define _MMCAMCORDER_TRYLOCK_CMD(handle)                       pthread_mutex_trylock(&_MMCAMCORDER_GET_CMD_LOCK(handle))
-#define _MMCAMCORDER_UNLOCK_CMD(handle)                                pthread_mutex_unlock(&_MMCAMCORDER_GET_CMD_LOCK(handle))
+#define _MMCAMCORDER_LOCK_CMD(handle)                          _MMCAMCORDER_LOCK_FUNC(_MMCAMCORDER_GET_CMD_LOCK(handle))
+#define _MMCAMCORDER_TRYLOCK_CMD(handle)                       _MMCAMCORDER_TRYLOCK_FUNC(_MMCAMCORDER_GET_CMD_LOCK(handle))
+#define _MMCAMCORDER_UNLOCK_CMD(handle)                                _MMCAMCORDER_UNLOCK_FUNC(_MMCAMCORDER_GET_CMD_LOCK(handle))
 
 /* for ASM */
 #define _MMCAMCORDER_GET_ASM_LOCK(handle)                      (_MMCAMCORDER_CAST_MTSAFE(handle).asm_lock)
-#define _MMCAMCORDER_LOCK_ASM(handle)                          pthread_mutex_lock(&_MMCAMCORDER_GET_ASM_LOCK(handle))
-#define _MMCAMCORDER_TRYLOCK_ASM(handle)                       pthread_mutex_trylock(&_MMCAMCORDER_GET_ASM_LOCK(handle))
-#define _MMCAMCORDER_UNLOCK_ASM(handle)                                pthread_mutex_unlock(&_MMCAMCORDER_GET_ASM_LOCK(handle))
+#define _MMCAMCORDER_LOCK_ASM(handle)                          _MMCAMCORDER_LOCK_FUNC(_MMCAMCORDER_GET_ASM_LOCK(handle))
+#define _MMCAMCORDER_TRYLOCK_ASM(handle)                       _MMCAMCORDER_TRYLOCK_FUNC(_MMCAMCORDER_GET_ASM_LOCK(handle))
+#define _MMCAMCORDER_UNLOCK_ASM(handle)                                _MMCAMCORDER_UNLOCK_FUNC(_MMCAMCORDER_GET_ASM_LOCK(handle))
 
 /* for state change */
 #define _MMCAMCORDER_GET_STATE_LOCK(handle)                    (_MMCAMCORDER_CAST_MTSAFE(handle).state_lock)
-#define _MMCAMCORDER_LOCK_STATE(handle)                                pthread_mutex_lock(&_MMCAMCORDER_GET_STATE_LOCK(handle))
-#define _MMCAMCORDER_TRYLOCK_STATE(handle)                     pthread_mutex_trylock(&_MMCAMCORDER_GET_STATE_LOCK(handle))
-#define _MMCAMCORDER_UNLOCK_STATE(handle)                      pthread_mutex_unlock(&_MMCAMCORDER_GET_STATE_LOCK(handle))
+#define _MMCAMCORDER_LOCK_STATE(handle)                                _MMCAMCORDER_LOCK_FUNC(_MMCAMCORDER_GET_STATE_LOCK(handle))
+#define _MMCAMCORDER_TRYLOCK_STATE(handle)                     _MMCAMCORDER_TRYLOCK_FUNC(_MMCAMCORDER_GET_STATE_LOCK(handle))
+#define _MMCAMCORDER_UNLOCK_STATE(handle)                      _MMCAMCORDER_UNLOCK_FUNC(_MMCAMCORDER_GET_STATE_LOCK(handle))
 
 /* for gstreamer state change */
 #define _MMCAMCORDER_GET_GST_STATE_LOCK(handle)                        (_MMCAMCORDER_CAST_MTSAFE(handle).gst_state_lock)
-#define _MMCAMCORDER_LOCK_GST_STATE(handle)                    pthread_mutex_lock(&_MMCAMCORDER_GET_GST_STATE_LOCK(handle))
-#define _MMCAMCORDER_TRYLOCK_GST_STATE(handle)                 pthread_mutex_trylock(&_MMCAMCORDER_GET_GST_STATE_LOCK(handle))
-#define _MMCAMCORDER_UNLOCK_GST_STATE(handle)                  pthread_mutex_unlock(&_MMCAMCORDER_GET_GST_STATE_LOCK(handle))
+#define _MMCAMCORDER_LOCK_GST_STATE(handle)                    _MMCAMCORDER_LOCK_FUNC(_MMCAMCORDER_GET_GST_STATE_LOCK(handle))
+#define _MMCAMCORDER_TRYLOCK_GST_STATE(handle)                 _MMCAMCORDER_TRYLOCK_FUNC(_MMCAMCORDER_GET_GST_STATE_LOCK(handle))
+#define _MMCAMCORDER_UNLOCK_GST_STATE(handle)                  _MMCAMCORDER_UNLOCK_FUNC(_MMCAMCORDER_GET_GST_STATE_LOCK(handle))
 
 #define _MMCAMCORDER_GET_GST_ENCODE_STATE_LOCK(handle)         (_MMCAMCORDER_CAST_MTSAFE(handle).gst_encode_state_lock)
-#define _MMCAMCORDER_LOCK_GST_ENCODE_STATE(handle)             pthread_mutex_lock(&_MMCAMCORDER_GET_GST_ENCODE_STATE_LOCK(handle))
-#define _MMCAMCORDER_TRYLOCK_GST_ENCODE_STATE(handle)          pthread_mutex_trylock(&_MMCAMCORDER_GET_GST_ENCODE_STATE_LOCK(handle))
-#define _MMCAMCORDER_UNLOCK_GST_ENCODE_STATE(handle)           pthread_mutex_unlock(&_MMCAMCORDER_GET_GST_ENCODE_STATE_LOCK(handle))
+#define _MMCAMCORDER_LOCK_GST_ENCODE_STATE(handle)             _MMCAMCORDER_LOCK_FUNC(_MMCAMCORDER_GET_GST_ENCODE_STATE_LOCK(handle))
+#define _MMCAMCORDER_TRYLOCK_GST_ENCODE_STATE(handle)          _MMCAMCORDER_TRYLOCK_FUNC(_MMCAMCORDER_GET_GST_ENCODE_STATE_LOCK(handle))
+#define _MMCAMCORDER_UNLOCK_GST_ENCODE_STATE(handle)           _MMCAMCORDER_UNLOCK_FUNC(_MMCAMCORDER_GET_GST_ENCODE_STATE_LOCK(handle))
 
 /* for setting/calling callback */
 #define _MMCAMCORDER_GET_MESSAGE_CALLBACK_LOCK(handle)      (_MMCAMCORDER_CAST_MTSAFE(handle).message_cb_lock)
-#define _MMCAMCORDER_LOCK_MESSAGE_CALLBACK(handle)          pthread_mutex_lock(&_MMCAMCORDER_GET_MESSAGE_CALLBACK_LOCK(handle))
-#define _MMCAMCORDER_TRYLOCK_MESSAGE_CALLBACK(handle)       pthread_mutex_trylock(&_MMCAMCORDER_GET_MESSAGE_CALLBACK_LOCK(handle))
-#define _MMCAMCORDER_UNLOCK_MESSAGE_CALLBACK(handle)        pthread_mutex_unlock(&_MMCAMCORDER_GET_MESSAGE_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_LOCK_MESSAGE_CALLBACK(handle)          _MMCAMCORDER_LOCK_FUNC(_MMCAMCORDER_GET_MESSAGE_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_TRYLOCK_MESSAGE_CALLBACK(handle)       _MMCAMCORDER_TRYLOCK_FUNC(_MMCAMCORDER_GET_MESSAGE_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_UNLOCK_MESSAGE_CALLBACK(handle)        _MMCAMCORDER_UNLOCK_FUNC(_MMCAMCORDER_GET_MESSAGE_CALLBACK_LOCK(handle))
 
 #define _MMCAMCORDER_GET_VCAPTURE_CALLBACK_LOCK(handle)     (_MMCAMCORDER_CAST_MTSAFE(handle).vcapture_cb_lock)
-#define _MMCAMCORDER_LOCK_VCAPTURE_CALLBACK(handle)         pthread_mutex_lock(&_MMCAMCORDER_GET_VCAPTURE_CALLBACK_LOCK(handle))
-#define _MMCAMCORDER_TRYLOCK_VCAPTURE_CALLBACK(handle)      pthread_mutex_trylock(&_MMCAMCORDER_GET_VCAPTURE_CALLBACK_LOCK(handle))
-#define _MMCAMCORDER_UNLOCK_VCAPTURE_CALLBACK(handle)       pthread_mutex_unlock(&_MMCAMCORDER_GET_VCAPTURE_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_LOCK_VCAPTURE_CALLBACK(handle)         _MMCAMCORDER_LOCK_FUNC(_MMCAMCORDER_GET_VCAPTURE_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_TRYLOCK_VCAPTURE_CALLBACK(handle)      _MMCAMCORDER_TRYLOCK_FUNC(_MMCAMCORDER_GET_VCAPTURE_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_UNLOCK_VCAPTURE_CALLBACK(handle)       _MMCAMCORDER_UNLOCK_FUNC(_MMCAMCORDER_GET_VCAPTURE_CALLBACK_LOCK(handle))
 
 #define _MMCAMCORDER_GET_VSTREAM_CALLBACK_LOCK(handle)      (_MMCAMCORDER_CAST_MTSAFE(handle).vstream_cb_lock)
-#define _MMCAMCORDER_LOCK_VSTREAM_CALLBACK(handle)          pthread_mutex_lock(&_MMCAMCORDER_GET_VSTREAM_CALLBACK_LOCK(handle))
-#define _MMCAMCORDER_TRYLOCK_VSTREAM_CALLBACK(handle)       pthread_mutex_trylock(&_MMCAMCORDER_GET_VSTREAM_CALLBACK_LOCK(handle))
-#define _MMCAMCORDER_UNLOCK_VSTREAM_CALLBACK(handle)        pthread_mutex_unlock(&_MMCAMCORDER_GET_VSTREAM_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_LOCK_VSTREAM_CALLBACK(handle)          _MMCAMCORDER_LOCK_FUNC(_MMCAMCORDER_GET_VSTREAM_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_TRYLOCK_VSTREAM_CALLBACK(handle)       _MMCAMCORDER_TRYLOCK_FUNC(_MMCAMCORDER_GET_VSTREAM_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_UNLOCK_VSTREAM_CALLBACK(handle)        _MMCAMCORDER_UNLOCK_FUNC(_MMCAMCORDER_GET_VSTREAM_CALLBACK_LOCK(handle))
 
 #define _MMCAMCORDER_GET_ASTREAM_CALLBACK_LOCK(handle)      (_MMCAMCORDER_CAST_MTSAFE(handle).astream_cb_lock)
-#define _MMCAMCORDER_LOCK_ASTREAM_CALLBACK(handle)          pthread_mutex_lock(&_MMCAMCORDER_GET_ASTREAM_CALLBACK_LOCK(handle))
-#define _MMCAMCORDER_TRYLOCK_ASTREAM_CALLBACK(handle)       pthread_mutex_trylock(&_MMCAMCORDER_GET_ASTREAM_CALLBACK_LOCK(handle))
-#define _MMCAMCORDER_UNLOCK_ASTREAM_CALLBACK(handle)        pthread_mutex_unlock(&_MMCAMCORDER_GET_ASTREAM_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_LOCK_ASTREAM_CALLBACK(handle)          _MMCAMCORDER_LOCK_FUNC(_MMCAMCORDER_GET_ASTREAM_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_TRYLOCK_ASTREAM_CALLBACK(handle)       _MMCAMCORDER_TRYLOCK_FUNC(_MMCAMCORDER_GET_ASTREAM_CALLBACK_LOCK(handle))
+#define _MMCAMCORDER_UNLOCK_ASTREAM_CALLBACK(handle)        _MMCAMCORDER_UNLOCK_FUNC(_MMCAMCORDER_GET_ASTREAM_CALLBACK_LOCK(handle))
 
 /**
  * Caster of main handle (camcorder)
@@ -532,7 +528,6 @@ typedef struct {
  */
 typedef struct {
        pthread_mutex_t lock;                   /**< Mutex (for general use) */
-       pthread_cond_t cond;                    /**< Condition (for general use) */
        pthread_mutex_t cmd_lock;               /**< Mutex (for command) */
        pthread_mutex_t asm_lock;               /**< Mutex (for ASM) */
        pthread_mutex_t state_lock;             /**< Mutex (for state change) */
@@ -647,7 +642,6 @@ typedef struct mmf_camcorder {
        char *model_name;                                       /**< model name from system info */
        char *software_version;                                 /**< software_version from system info */
        int capture_sound_count;                                /**< count for capture sound */
-       bool stillshot_wide_resolution;                         /**<to set the capture resolution high*/
 
        _MMCamcorderInfoConverting caminfo_convert[CAMINFO_CONVERT_NUM];        /**< converting structure of camera info */
        _MMCamcorderEnumConvert enum_conv[ENUM_CONVERT_NUM];                    /**< enum converting list that is modified by ini info */
index eb601a0..3dec595 100644 (file)
@@ -140,8 +140,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,                   /* Flag */
                        {(void*)MM_CAMCORDER_MODE_VIDEO_CAPTURE},     /* Default value */
                        MM_ATTRS_VALID_TYPE_INT_RANGE,      /* Validity type */
-                       {MM_CAMCORDER_MODE_VIDEO_CAPTURE},    /* Validity val1 (min, *array,...) */
-                       {MM_CAMCORDER_MODE_AUDIO},            /* Validity val2 (max, count, ...) */
+                       {.int_min = MM_CAMCORDER_MODE_VIDEO_CAPTURE},    /* Validity val1 (min, *array,...) */
+                       {.int_max = MM_CAMCORDER_MODE_AUDIO},            /* Validity val2 (max, count, ...) */
                        NULL,                               /* Runtime setting function of the attribute */
                },
                {
@@ -151,8 +151,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)MM_AUDIO_DEVICE_MIC},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {MM_AUDIO_DEVICE_NUM-1},
+                       {.int_min = 0},
+                       {.int_max = (MM_AUDIO_DEVICE_NUM-1)},
                        NULL,
                },
                {
@@ -162,8 +162,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)MM_VIDEO_DEVICE_NUM},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {MM_VIDEO_DEVICE_NONE},
-                       {MM_VIDEO_DEVICE_NUM},
+                       {.int_min = MM_VIDEO_DEVICE_NONE},
+                       {.int_max = MM_VIDEO_DEVICE_NUM},
                        NULL,
                },
                {
@@ -228,8 +228,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)8000},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        NULL,
                },
                {
@@ -251,8 +251,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)2},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {1},
-                       {2},
+                       {.int_min = 1},
+                       {.int_max = 2},
                        NULL,
                },
                {
@@ -262,8 +262,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)1},
                        MM_ATTRS_VALID_TYPE_DOUBLE_RANGE,
-                       {0},
-                       {10.0},
+                       {.double_min = 0.0},
+                       {.double_max = 10.0},
                        _mmcamcorder_commit_audio_volume,
                },
                {
@@ -273,8 +273,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)MM_AUDIOROUTE_USE_EXTERNAL_SETTING},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {MM_AUDIOROUTE_USE_EXTERNAL_SETTING},
-                       {MM_AUDIOROUTE_CAPTURE_STEREOMIC_ONLY},
+                       {.int_min = MM_AUDIOROUTE_USE_EXTERNAL_SETTING},
+                       {.int_max = MM_AUDIOROUTE_CAPTURE_STEREOMIC_ONLY},
                        _mmcamcorder_commit_audio_input_route,
                },
                {
@@ -295,8 +295,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)1},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_filter,
                },
                {
@@ -306,8 +306,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_filter,
                },
                {
@@ -339,8 +339,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_filter,
                },
                {
@@ -350,8 +350,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_filter,
                },
                //20
@@ -362,8 +362,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_filter,
                },
                {
@@ -384,8 +384,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)1},
                        MM_ATTRS_VALID_TYPE_DOUBLE_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.double_min = 0.0},
+                       {.double_max = _MMCAMCORDER_MAX_INT},
                        _mmcamcorder_commit_camera_recording_motion_rate,
                },
                {
@@ -428,8 +428,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)10},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_camera_zoom,
                },
                {
@@ -439,8 +439,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_camera_zoom,
                },
                {
@@ -484,8 +484,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_camera_capture_mode,
                },
                {
@@ -550,8 +550,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)FALSE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {1},
+                       {.int_min = 0},
+                       {.int_max = 1},
                        NULL,
                },
                {
@@ -561,8 +561,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)FALSE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {1},
+                       {.int_min = 0},
+                       {.int_max = 1},
                        NULL,
                },
                {
@@ -572,8 +572,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        NULL,
                },
                // 40
@@ -584,8 +584,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        NULL,
                },
                {
@@ -595,8 +595,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)95},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_image_encoder_quality,
                },
                {
@@ -639,8 +639,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)1},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_capture_count,
                },
                {
@@ -650,8 +650,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        NULL,
                },
                {
@@ -661,8 +661,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)FALSE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {1},
+                       {.int_min = 0},
+                       {.int_max = 1},
                        _mmcamcorder_commit_capture_break_cont_shot,
                },
                {
@@ -706,8 +706,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        _mmcamcorder_commit_display_rect,
                },
                {
@@ -717,8 +717,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        _mmcamcorder_commit_display_rect,
                },
                {
@@ -728,8 +728,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        _mmcamcorder_commit_display_rect,
                },
                {
@@ -739,8 +739,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        _mmcamcorder_commit_display_rect,
                },
                {
@@ -750,8 +750,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        NULL,
                },
                {
@@ -761,8 +761,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        NULL,
                },
                {
@@ -772,8 +772,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        NULL,
                },
                {
@@ -783,8 +783,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        NULL,
                },
                {
@@ -794,8 +794,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)MM_DISPLAY_ROTATION_NONE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {MM_DISPLAY_ROTATION_NONE},
-                       {MM_DISPLAY_ROTATION_270},
+                       {.int_min = MM_DISPLAY_ROTATION_NONE},
+                       {.int_max = MM_DISPLAY_ROTATION_270},
                        _mmcamcorder_commit_display_rotation,
                },
                { // 60
@@ -816,8 +816,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {MM_DISPLAY_SCALE_DEFAULT},
-                       {MM_DISPLAY_SCALE_TRIPLE_LENGTH},
+                       {.int_min = MM_DISPLAY_SCALE_DEFAULT},
+                       {.int_max = MM_DISPLAY_SCALE_TRIPLE_LENGTH},
                        _mmcamcorder_commit_display_scale,
                },
                {
@@ -827,8 +827,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {MM_DISPLAY_METHOD_LETTER_BOX},
-                       {MM_DISPLAY_METHOD_CUSTOM_ROI},
+                       {.int_min = MM_DISPLAY_METHOD_LETTER_BOX},
+                       {.int_max = MM_DISPLAY_METHOD_CUSTOM_ROI},
                        _mmcamcorder_commit_display_geometry_method,
                },
                {
@@ -849,8 +849,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        NULL,
                },
                {
@@ -860,8 +860,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        NULL,
                },
                {
@@ -871,8 +871,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {1},
+                       {.int_min = 0},
+                       {.int_max = 1},
                        NULL,
                },
                {
@@ -916,8 +916,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_DOUBLE_RANGE,
-                       {-360},
-                       {360},
+                       {.double_min = -360.0},
+                       {.double_max = 360.0},
                        NULL,
                },
                {
@@ -927,8 +927,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_DOUBLE_RANGE,
-                       {-360},
-                       {360},
+                       {.double_min = -360.0},
+                       {.double_max = 360.0},
                        NULL,
                },
                {
@@ -938,8 +938,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_DOUBLE_RANGE,
-                       {-999999},
-                       {999999},
+                       {.double_min = -999999.0},
+                       {.double_max = 999999.0},
                        NULL,
                },
                {
@@ -949,8 +949,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_strobe,
                },
                {
@@ -960,8 +960,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_strobe,
                },
                {
@@ -993,8 +993,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_detect,
                },
                {
@@ -1004,8 +1004,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_detect,
                },
                {
@@ -1015,8 +1015,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {-1},
+                       {.int_min = 0},
+                       {.int_max = -1},
                        _mmcamcorder_commit_detect,
                },
                //80
@@ -1038,8 +1038,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)FALSE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {1},
+                       {.int_min = 0},
+                       {.int_max = 1},
                        NULL,
                },
                {
@@ -1049,8 +1049,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        _mmcamcorder_commit_camera_af_touch_area,
                },
                {
@@ -1060,8 +1060,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        _mmcamcorder_commit_camera_af_touch_area,
                },
                {
@@ -1071,8 +1071,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        _mmcamcorder_commit_camera_af_touch_area,
                },
                {
@@ -1082,8 +1082,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {_MMCAMCORDER_MAX_INT},
+                       {.int_min = 0},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
                        _mmcamcorder_commit_camera_af_touch_area,
                },
                {
@@ -1093,8 +1093,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)0},
                        MM_ATTRS_VALID_TYPE_DOUBLE_RANGE,
-                       {0},
-                       {1000},
+                       {.double_min = 0.0},
+                       {.double_max = 1000.0},
                        _mmcamcorder_commit_camera_capture_mode,
                },
                {
@@ -1104,8 +1104,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)MM_PIXEL_FORMAT_YUYV},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {MM_PIXEL_FORMAT_NV12},
-                       {(MM_PIXEL_FORMAT_NUM-1)},
+                       {.int_min = MM_PIXEL_FORMAT_NV12},
+                       {.int_max = (MM_PIXEL_FORMAT_NUM-1)},
                        NULL,
                },
                {
@@ -1115,8 +1115,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)MM_PIXEL_FORMAT_NV12},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {MM_PIXEL_FORMAT_NV12},
-                       {(MM_PIXEL_FORMAT_NUM-1)},
+                       {.int_min = MM_PIXEL_FORMAT_NV12},
+                       {.int_max = (MM_PIXEL_FORMAT_NUM-1)},
                        NULL,
                },
                {
@@ -1126,8 +1126,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)FALSE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {1},
+                       {.int_min = 0},
+                       {.int_max = 1},
                        NULL,
                },
                // 90
@@ -1193,8 +1193,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)TRUE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {0},
-                       {1},
+                       {.int_min = 0},
+                       {.int_max = 1},
                        _mmcamcorder_commit_capture_sound_enable,
                },
                {
@@ -1204,8 +1204,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)MM_DISPLAY_ROTATION_270},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {MM_DISPLAY_ROTATION_NONE},
-                       {MM_DISPLAY_ROTATION_270},
+                       {.int_min = MM_DISPLAY_ROTATION_NONE},
+                       {.int_max = MM_DISPLAY_ROTATION_270},
                        NULL,
                },
                {
@@ -1249,8 +1249,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)FALSE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {FALSE},
-                       {TRUE},
+                       {.int_min = FALSE},
+                       {.int_max = TRUE},
                        _mmcamcorder_commit_audio_disable,
                },
                {
@@ -1304,8 +1304,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)TRUE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {FALSE},
-                       {TRUE},
+                       {.int_min = FALSE},
+                       {.int_max = TRUE},
                        _mmcamcorder_commit_display_evas_do_scaling,
                },
                {
@@ -1315,8 +1315,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)MM_CAMCORDER_CAMERA_FACING_DIRECTION_REAR},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {MM_CAMCORDER_CAMERA_FACING_DIRECTION_REAR},
-                       {MM_CAMCORDER_CAMERA_FACING_DIRECTION_FRONT},
+                       {.int_min = MM_CAMCORDER_CAMERA_FACING_DIRECTION_REAR},
+                       {.int_max = MM_CAMCORDER_CAMERA_FACING_DIRECTION_FRONT},
                        NULL,
                },
                {
@@ -1326,8 +1326,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)MM_FLIP_NONE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {MM_FLIP_NONE},
-                       {MM_FLIP_BOTH},
+                       {.int_min = MM_FLIP_NONE},
+                       {.int_max = MM_FLIP_BOTH},
                        _mmcamcorder_commit_display_flip,
                },
                {
@@ -1348,8 +1348,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)MM_CAMCORDER_TAG_VIDEO_ORT_NONE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {MM_CAMCORDER_TAG_VIDEO_ORT_NONE},
-                       {MM_CAMCORDER_TAG_VIDEO_ORT_270},
+                       {.int_min = MM_CAMCORDER_TAG_VIDEO_ORT_NONE},
+                       {.int_max = MM_CAMCORDER_TAG_VIDEO_ORT_270},
                        NULL,
                },
                //110
@@ -1382,8 +1382,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)FALSE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {FALSE},
-                       {TRUE},
+                       {.int_min = FALSE},
+                       {.int_max = TRUE},
                        NULL,
                },
                {
@@ -1393,8 +1393,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)FALSE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {FALSE},
-                       {TRUE},
+                       {.int_min = FALSE},
+                       {.int_max = TRUE},
                        NULL,
                },
                {
@@ -1404,8 +1404,8 @@ _mmcamcorder_alloc_attribute( MMHandleType handle, MMCamPreset *info )
                        MM_ATTRS_FLAG_RW,
                        {(void*)FALSE},
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
-                       {FALSE},
-                       {TRUE},
+                       {.int_min = FALSE},
+                       {.int_max = TRUE},
                        NULL,
                }
        };
index 168ec19..da711da 100644 (file)
@@ -601,7 +601,7 @@ void _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf** configu
 
        /* [General] matching table */
        static conf_info_table conf_main_general_table[] = {
-               { "SyncStateChange", CONFIGURE_VALUE_INT,           {1} },
+               { "SyncStateChange", CONFIGURE_VALUE_INT,           {.value_int = 1} },
                { "GSTInitOption",   CONFIGURE_VALUE_STRING_ARRAY,  {NULL} },
                { "ModelName",       CONFIGURE_VALUE_STRING,        {NULL} },
                { "DisabledAttributes", CONFIGURE_VALUE_STRING_ARRAY,  {NULL} },
@@ -609,15 +609,15 @@ void _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf** configu
 
        /* [VideoInput] matching table */
        static conf_info_table conf_main_video_input_table[] = {
-               { "UseConfCtrl",        CONFIGURE_VALUE_INT,            {1} },
-               { "ConfCtrlFile0",      CONFIGURE_VALUE_STRING,         {0} },
-               { "ConfCtrlFile1",      CONFIGURE_VALUE_STRING,         {0} },
+               { "UseConfCtrl",        CONFIGURE_VALUE_INT,            {.value_int = 1} },
+               { "ConfCtrlFile0",      CONFIGURE_VALUE_STRING,         {NULL} },
+               { "ConfCtrlFile1",      CONFIGURE_VALUE_STRING,         {NULL} },
                { "VideosrcElement",    CONFIGURE_VALUE_ELEMENT,        {&_videosrc_element_default} },
-               { "UseVideoscale",      CONFIGURE_VALUE_INT,            {0} },
+               { "UseVideoscale",      CONFIGURE_VALUE_INT,            {.value_int = 0} },
                { "VideoscaleElement",  CONFIGURE_VALUE_ELEMENT,        {&_videoscale_element_default} },
-               { "UseZeroCopyFormat",  CONFIGURE_VALUE_INT,            {0} },
-               { "DeviceCount",        CONFIGURE_VALUE_INT,            {MM_VIDEO_DEVICE_NUM} },
-               { "SupportMediaPacketPreviewCb",  CONFIGURE_VALUE_INT,  {0} },
+               { "UseZeroCopyFormat",  CONFIGURE_VALUE_INT,            {.value_int = 0} },
+               { "DeviceCount",        CONFIGURE_VALUE_INT,            {.value_int = MM_VIDEO_DEVICE_NUM} },
+               { "SupportMediaPacketPreviewCb",  CONFIGURE_VALUE_INT,  {.value_int = 0} },
        };
 
        /* [AudioInput] matching table */
@@ -635,40 +635,40 @@ void _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf** configu
                { "VideosinkElementEvas",  CONFIGURE_VALUE_ELEMENT,   {&_videosink_element_evas_default} },
                { "VideosinkElementGL",    CONFIGURE_VALUE_ELEMENT,   {&_videosink_element_gl_default} },
                { "VideosinkElementNull",  CONFIGURE_VALUE_ELEMENT,   {&_videosink_element_null_default} },
-               { "UseVideoscale",         CONFIGURE_VALUE_INT,       {0} },
+               { "UseVideoscale",         CONFIGURE_VALUE_INT,       {.value_int = 0} },
                { "VideoscaleElement",     CONFIGURE_VALUE_ELEMENT,   {&_videoscale_element_default} },
                { "VideoconvertElement",   CONFIGURE_VALUE_ELEMENT,   {&_videoconvert_element_default} },
        };
 
        /* [Capture] matching table */
        static conf_info_table conf_main_capture_table[] = {
-               { "UseEncodebin",           CONFIGURE_VALUE_INT,     {0} },
-               { "UseCaptureMode",         CONFIGURE_VALUE_INT,     {0} },
+               { "UseEncodebin",           CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "UseCaptureMode",         CONFIGURE_VALUE_INT,     {.value_int = 0} },
                { "VideoscaleElement",      CONFIGURE_VALUE_ELEMENT, {&_videoscale_element_default} },
-               { "PlayCaptureSound",       CONFIGURE_VALUE_INT,     {1} },
+               { "PlayCaptureSound",       CONFIGURE_VALUE_INT,     {.value_int = 1} },
        };
 
        /* [Record] matching table */
        static conf_info_table conf_main_record_table[] = {
-               { "UseAudioEncoderQueue",   CONFIGURE_VALUE_INT,     {1} },
-               { "UseVideoEncoderQueue",   CONFIGURE_VALUE_INT,     {1} },
-               { "VideoProfile",           CONFIGURE_VALUE_INT,     {0} },
-               { "VideoAutoAudioConvert",  CONFIGURE_VALUE_INT,     {0} },
-               { "VideoAutoAudioResample", CONFIGURE_VALUE_INT,     {0} },
-               { "VideoAutoColorSpace",    CONFIGURE_VALUE_INT,     {0} },
-               { "AudioProfile",           CONFIGURE_VALUE_INT,     {0} },
-               { "AudioAutoAudioConvert",  CONFIGURE_VALUE_INT,     {0} },
-               { "AudioAutoAudioResample", CONFIGURE_VALUE_INT,     {0} },
-               { "AudioAutoColorSpace",    CONFIGURE_VALUE_INT,     {0} },
-               { "ImageProfile",           CONFIGURE_VALUE_INT,     {0} },
-               { "ImageAutoAudioConvert",  CONFIGURE_VALUE_INT,     {0} },
-               { "ImageAutoAudioResample", CONFIGURE_VALUE_INT,     {0} },
-               { "ImageAutoColorSpace",    CONFIGURE_VALUE_INT,     {0} },
+               { "UseAudioEncoderQueue",   CONFIGURE_VALUE_INT,     {.value_int = 1} },
+               { "UseVideoEncoderQueue",   CONFIGURE_VALUE_INT,     {.value_int = 1} },
+               { "VideoProfile",           CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "VideoAutoAudioConvert",  CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "VideoAutoAudioResample", CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "VideoAutoColorSpace",    CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "AudioProfile",           CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "AudioAutoAudioConvert",  CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "AudioAutoAudioResample", CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "AudioAutoColorSpace",    CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "ImageProfile",           CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "ImageAutoAudioConvert",  CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "ImageAutoAudioResample", CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "ImageAutoColorSpace",    CONFIGURE_VALUE_INT,     {.value_int = 0} },
                { "RecordsinkElement",      CONFIGURE_VALUE_ELEMENT, {&_recordsink_element_default} },
-               { "UseNoiseSuppressor",     CONFIGURE_VALUE_INT,     {0} },
-               { "DropVideoFrame",         CONFIGURE_VALUE_INT,     {0} },
-               { "PassFirstVideoFrame",    CONFIGURE_VALUE_INT,     {0} },
-               { "SupportDualStream",      CONFIGURE_VALUE_INT,     {FALSE} },
+               { "UseNoiseSuppressor",     CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "DropVideoFrame",         CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "PassFirstVideoFrame",    CONFIGURE_VALUE_INT,     {.value_int = 0} },
+               { "SupportDualStream",      CONFIGURE_VALUE_INT,     {.value_int = FALSE} },
        };
 
        /* [VideoEncoder] matching table */
@@ -744,11 +744,11 @@ void _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf** configu
                { "FPS",               CONFIGURE_VALUE_INT_ARRAY,      {NULL} },
                { "PictureFormat",     CONFIGURE_VALUE_INT_ARRAY,      {NULL} },
                { "Overlay",           CONFIGURE_VALUE_INT_RANGE,      {NULL} },
-               { "RecommendDisplayRotation", CONFIGURE_VALUE_INT,     {3}    },
-               { "RecommendPreviewFormatCapture", CONFIGURE_VALUE_INT, {MM_PIXEL_FORMAT_YUYV} },
-               { "RecommendPreviewFormatRecord",  CONFIGURE_VALUE_INT, {MM_PIXEL_FORMAT_NV12} },
+               { "RecommendDisplayRotation", CONFIGURE_VALUE_INT,     {.value_int = 3}    },
+               { "RecommendPreviewFormatCapture", CONFIGURE_VALUE_INT, {.value_int = MM_PIXEL_FORMAT_YUYV} },
+               { "RecommendPreviewFormatRecord",  CONFIGURE_VALUE_INT, {.value_int = MM_PIXEL_FORMAT_NV12} },
                { "RecommendPreviewResolution", CONFIGURE_VALUE_INT_PAIR_ARRAY, {NULL} },
-               { "FacingDirection", CONFIGURE_VALUE_INT, {MM_CAMCORDER_CAMERA_FACING_DIRECTION_REAR} },
+               { "FacingDirection", CONFIGURE_VALUE_INT, {.value_int = MM_CAMCORDER_CAMERA_FACING_DIRECTION_REAR} },
        };
 
        /* [Strobe] matching table */
@@ -761,7 +761,7 @@ void _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf** configu
        /* [Effect] matching table */
        static conf_info_table conf_ctrl_effect_table[] = {
                { "Brightness",           CONFIGURE_VALUE_INT_RANGE, {NULL} },
-               { "BrightnessStepDenominator", CONFIGURE_VALUE_INT, {2} },
+               { "BrightnessStepDenominator", CONFIGURE_VALUE_INT, {.value_int = 2} },
                { "Contrast",             CONFIGURE_VALUE_INT_RANGE, {NULL} },
                { "Saturation",           CONFIGURE_VALUE_INT_RANGE, {NULL} },
                { "Sharpness",            CONFIGURE_VALUE_INT_RANGE, {NULL} },
@@ -798,9 +798,9 @@ void _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf** configu
                { "OutputMode",           CONFIGURE_VALUE_INT_ARRAY, {NULL} },
                { "JpegQuality",          CONFIGURE_VALUE_INT_RANGE, {NULL} },
                { "MultishotNumber",      CONFIGURE_VALUE_INT_RANGE, {NULL} },
-               { "SensorEncodedCapture", CONFIGURE_VALUE_INT,       {1} },
+               { "SensorEncodedCapture", CONFIGURE_VALUE_INT,       {.value_int = 1} },
                { "SupportHDR",           CONFIGURE_VALUE_INT_ARRAY, {NULL} },
-               { "SupportZSL",           CONFIGURE_VALUE_INT,       {FALSE} },
+               { "SupportZSL",           CONFIGURE_VALUE_INT,       {.value_int = FALSE} },
        };
 
        /* [Detect] matching table */
index 84e9a0e..b6701c3 100644 (file)
@@ -108,8 +108,6 @@ int _mmcamcorder_create(MMHandleType *handle, MMCamPreset *info)
        hcamcorder->capture_in_recording = FALSE;
 
        pthread_mutex_init(&((hcamcorder->mtsafe).lock), NULL);
-       pthread_cond_init(&((hcamcorder->mtsafe).cond), NULL);
-
        pthread_mutex_init(&((hcamcorder->mtsafe).cmd_lock), NULL);
        pthread_mutex_init(&((hcamcorder->mtsafe).asm_lock), NULL);
        pthread_mutex_init(&((hcamcorder->mtsafe).state_lock), NULL);
@@ -166,7 +164,7 @@ int _mmcamcorder_create(MMHandleType *handle, MMCamPreset *info)
        }
 
        if (info->videodev_type != MM_VIDEO_DEVICE_NONE) {
-               _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_main,
+               _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
                                                CONFIGURE_CATEGORY_MAIN_VIDEO_INPUT,
                                                "UseConfCtrl", &UseConfCtrl);
 
@@ -214,42 +212,42 @@ int _mmcamcorder_create(MMHandleType *handle, MMCamPreset *info)
                        }
 
                        /* Get device info, recommend preview fmt and display rotation from INI */
-                       _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_ctrl,
+                       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_ctrl,
                                                        CONFIGURE_CATEGORY_CTRL_CAMERA,
                                                        "RecommendPreviewFormatCapture",
                                                        &rcmd_fmt_capture);
 
-                       _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_ctrl,
+                       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_ctrl,
                                                        CONFIGURE_CATEGORY_CTRL_CAMERA,
                                                        "RecommendPreviewFormatRecord",
                                                        &rcmd_fmt_recording);
 
-                       _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_ctrl,
+                       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_ctrl,
                                                        CONFIGURE_CATEGORY_CTRL_CAMERA,
                                                        "RecommendDisplayRotation",
                                                        &rcmd_dpy_rotation);
 
-                       _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_main,
+                       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
                                                        CONFIGURE_CATEGORY_MAIN_CAPTURE,
                                                        "PlayCaptureSound",
                                                        &play_capture_sound);
 
-                       _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_main,
+                       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
                                                        CONFIGURE_CATEGORY_MAIN_VIDEO_INPUT,
                                                        "DeviceCount",
                                                        &camera_device_count);
 
-                       _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_ctrl,
+                       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_ctrl,
                                                        CONFIGURE_CATEGORY_CTRL_CAMERA,
                                                        "FacingDirection",
                                                        &camera_facing_direction);
 
-                       _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_ctrl,
+                       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_ctrl,
                                                        CONFIGURE_CATEGORY_CTRL_EFFECT,
                                                        "BrightnessStepDenominator",
                                                        &hcamcorder->brightness_step_denominator);
 
-                       _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_ctrl,
+                       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_ctrl,
                                                        CONFIGURE_CATEGORY_CTRL_CAPTURE,
                                                        "SupportZSL",
                                                        &hcamcorder->support_zsl_capture);
@@ -260,13 +258,13 @@ int _mmcamcorder_create(MMHandleType *handle, MMCamPreset *info)
                                       hcamcorder->brightness_step_denominator, hcamcorder->support_zsl_capture);
 
                        /* Get UseZeroCopyFormat value from INI */
-                       _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_main,
+                       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
                                                        CONFIGURE_CATEGORY_MAIN_VIDEO_INPUT,
                                                        "UseZeroCopyFormat",
                                                        &(hcamcorder->use_zero_copy_format));
 
                        /* Get SupportMediaPacketPreviewCb value from INI */
-                       _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_main,
+                       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
                                                        CONFIGURE_CATEGORY_MAIN_VIDEO_INPUT,
                                                        "SupportMediaPacketPreviewCb",
                                                        &(hcamcorder->support_media_packet_preview_cb));
@@ -364,7 +362,6 @@ _ERR_AFTER_ASM_REGISTER:
 _ERR_DEFAULT_VALUE_INIT:
        /* Release lock, cond */
        pthread_mutex_destroy(&((hcamcorder->mtsafe).lock));
-       pthread_cond_destroy(&((hcamcorder->mtsafe).cond));
        pthread_mutex_destroy(&((hcamcorder->mtsafe).cmd_lock));
        pthread_mutex_destroy(&((hcamcorder->mtsafe).asm_lock));
        pthread_mutex_destroy(&((hcamcorder->mtsafe).state_lock));
@@ -525,7 +522,6 @@ int _mmcamcorder_destroy(MMHandleType handle)
 
        /* Release lock, cond */
        pthread_mutex_destroy(&((hcamcorder->mtsafe).lock));
-       pthread_cond_destroy(&((hcamcorder->mtsafe).cond));
        pthread_mutex_destroy(&((hcamcorder->mtsafe).cmd_lock));
        pthread_mutex_destroy(&((hcamcorder->mtsafe).asm_lock));
        pthread_mutex_destroy(&((hcamcorder->mtsafe).state_lock));