Replace string to define statement like another attributes. 45/161345/5 accepted/tizen/unified/20171130.063456 submit/tizen/20171130.010258
authorHaesu Gwon <haesu.gwon@samsung.com>
Thu, 23 Nov 2017 02:50:12 +0000 (11:50 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Wed, 29 Nov 2017 05:47:58 +0000 (05:47 +0000)
[Version] 0.10.146
[Profile] Common
[Issue Type] Update
[Dependency module] N/A

Change-Id: I238cfafa5eca3c6d9af66a28a88328fc06694325
Signed-off-by: Haesu Gwon <haesu.gwon@samsung.com>
packaging/libmm-camcorder.spec
src/include/mm_camcorder.h
src/mm_camcorder_internal.c
src/mm_camcorder_sound.c
src/mm_camcorder_stillshot.c

index 2d1a192..5dd99a7 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.145
+Version:    0.10.146
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 845a4fd..1c82836 100644 (file)
@@ -1202,6 +1202,11 @@ extern "C" {
 #define MMCAM_RECOMMEND_CAMERA_HEIGHT           "recommend-camera-height"
 
 /**
+ * Enable to play capture sound
+ */
+#define MMCAM_CAPTURE_SOUND_ENABLE              "capture-sound-enable"
+
+/**
  * Flip of video input stream.
  * @see                MMFlipType (in mm_types.h)
  */
index fe6ca19..b4b31b2 100644 (file)
@@ -360,7 +360,7 @@ int _mmcamcorder_create(MMHandleType *handle, MMCamPreset *info)
                                MMCAM_SUPPORT_MEDIA_PACKET_PREVIEW_CB, hcamcorder->support_media_packet_preview_cb,
                                MMCAM_CAMERA_FPS, fps_info.int_array.def,
                                MMCAM_DISPLAY_FLIP, camera_default_flip,
-                               "capture-sound-enable", play_capture_sound,
+                               MMCAM_CAPTURE_SOUND_ENABLE, play_capture_sound,
                                NULL);
                        if (err_attr_name) {
                                _mmcam_dbg_err("Set %s FAILED.", err_attr_name);
@@ -1642,7 +1642,7 @@ int _mmcamcorder_capture_start(MMHandleType handle)
        _MMCAMCORDER_UNLOCK_CMD(hcamcorder);
 
        /* Init break continuous shot attr */
-       if (mm_camcorder_set_attributes(handle, NULL, "capture-break-cont-shot", 0, NULL) != MM_ERROR_NONE)
+       if (mm_camcorder_set_attributes(handle, NULL, MMCAM_CAPTURE_BREAK_CONTINUOUS_SHOT, 0, NULL) != MM_ERROR_NONE)
                _mmcam_dbg_warn("capture-break-cont-shot set 0 failed");
 
        return MM_ERROR_NONE;
index 961670c..cc899d9 100644 (file)
@@ -63,7 +63,7 @@ gboolean _mmcamcorder_sound_init(MMHandleType handle)
 
        /* check sound play enable */
        mm_camcorder_get_attributes((MMHandleType)hcamcorder, NULL,
-               "capture-sound-enable", &sound_enable,
+               MMCAM_CAPTURE_SOUND_ENABLE, &sound_enable,
                NULL);
        _mmcam_dbg_log("Capture sound enable %d", sound_enable);
        if (!sound_enable) {
@@ -102,7 +102,7 @@ gboolean _mmcamcorder_sound_play(MMHandleType handle, const char *sample_name, g
 
        /* check sound play enable */
        mm_camcorder_get_attributes((MMHandleType)hcamcorder, NULL,
-               "capture-sound-enable", &sound_enable,
+               MMCAM_CAPTURE_SOUND_ENABLE, &sound_enable,
                NULL);
        _mmcam_dbg_log("Capture sound enable %d", sound_enable);
        if (!sound_enable) {
@@ -188,7 +188,7 @@ int _mmcamcorder_sound_solo_play(MMHandleType handle, const char *sample_name, g
 
        /* check sound play enable */
        mm_camcorder_get_attributes((MMHandleType)hcamcorder, NULL,
-               "capture-sound-enable", &sound_enable,
+               MMCAM_CAPTURE_SOUND_ENABLE, &sound_enable,
                NULL);
        _mmcam_dbg_log("Capture sound enable %d", sound_enable);
        if (!sound_enable) {
index 1b718bf..9214742 100644 (file)
@@ -1202,7 +1202,9 @@ static void __mmcamcorder_image_capture_cb(GstElement *element, GstSample *sampl
 
        /* check capture state */
        if (info->type == _MMCamcorder_MULTI_SHOT && info->capture_send_count > 0)
-               mm_camcorder_get_attributes((MMHandleType)hcamcorder, NULL, "capture-break-cont-shot", &stop_cont_shot, NULL);
+               mm_camcorder_get_attributes((MMHandleType)hcamcorder, NULL,
+                       MMCAM_CAPTURE_BREAK_CONTINUOUS_SHOT, &stop_cont_shot,
+                       NULL);
 
        if (!info->capturing || stop_cont_shot) {
                _mmcam_dbg_warn("stop command[%d] or not capturing state[%d]. skip this...", stop_cont_shot, info->capturing);