From: Haesu Gwon Date: Thu, 23 Nov 2017 02:50:12 +0000 (+0900) Subject: Replace string to define statement like another attributes. X-Git-Tag: submit/tizen/20171130.010258^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08fa613bfb5a38a393e5a17ce63b024fc775a113;p=platform%2Fcore%2Fmultimedia%2Flibmm-camcorder.git Replace string to define statement like another attributes. [Version] 0.10.146 [Profile] Common [Issue Type] Update [Dependency module] N/A Change-Id: I238cfafa5eca3c6d9af66a28a88328fc06694325 Signed-off-by: Haesu Gwon --- diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index 2d1a192..5dd99a7 100644 --- a/packaging/libmm-camcorder.spec +++ b/packaging/libmm-camcorder.spec @@ -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 diff --git a/src/include/mm_camcorder.h b/src/include/mm_camcorder.h index 845a4fd..1c82836 100644 --- a/src/include/mm_camcorder.h +++ b/src/include/mm_camcorder.h @@ -1201,6 +1201,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) diff --git a/src/mm_camcorder_internal.c b/src/mm_camcorder_internal.c index fe6ca19..b4b31b2 100644 --- a/src/mm_camcorder_internal.c +++ b/src/mm_camcorder_internal.c @@ -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; diff --git a/src/mm_camcorder_sound.c b/src/mm_camcorder_sound.c index 961670c..cc899d9 100644 --- a/src/mm_camcorder_sound.c +++ b/src/mm_camcorder_sound.c @@ -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) { diff --git a/src/mm_camcorder_stillshot.c b/src/mm_camcorder_stillshot.c index 1b718bf..9214742 100644 --- a/src/mm_camcorder_stillshot.c +++ b/src/mm_camcorder_stillshot.c @@ -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);