From: Jeongmo Yang Date: Wed, 16 Sep 2015 03:38:28 +0000 (+0900) Subject: Set pid for sound focus X-Git-Tag: accepted/tizen/mobile/20150918.024627^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5daf0904bcbd691414d41285c05bb58e53ad69b;p=platform%2Fcore%2Fapi%2Fcamera.git Set pid for sound focus Change-Id: I64f7af3dd83f798670d7c5d720e4ea2da11274a5 Signed-off-by: Jeongmo Yang --- diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec index a725884..e62d300 100755 --- a/packaging/capi-media-camera.spec +++ b/packaging/capi-media-camera.spec @@ -3,7 +3,7 @@ Name: capi-media-camera Summary: A Camera library in Tizen C API -Version: 0.2.6 +Version: 0.2.7 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/camera.c b/src/camera.c index 030c075..309d44d 100644 --- a/src/camera.c +++ b/src/camera.c @@ -803,6 +803,7 @@ int camera_create(camera_device_e device, camera_h* camera) MMCAM_DISPLAY_SURFACE, MM_DISPLAY_SURFACE_NULL, MMCAM_DISPLAY_ROTATION, rotation, MMCAM_CAPTURE_COUNT, 1, + MMCAM_PID_FOR_SOUND_FOCUS, getpid(), NULL); handle->display_type = CAMERA_DISPLAY_TYPE_NONE; diff --git a/src/camera_internal.c b/src/camera_internal.c index 92fbd5e..1a6565d 100644 --- a/src/camera_internal.c +++ b/src/camera_internal.c @@ -178,14 +178,24 @@ int camera_get_video_caps(camera_h camera, char **caps) int camera_set_shm_socket_path_for_mused(camera_h camera, char *socket_path) { - int ret; + int ret = MM_ERROR_NONE; camera_s *handle = (camera_s *)camera; - LOGE("var : %s", socket_path); - mm_camcorder_set_attributes(handle->mm_handle, NULL, - MMCAM_DISPLAY_SHM_SOCKET_PATH, socket_path, strlen(socket_path), - NULL); + if (camera == NULL) { + LOGE("NULL handle"); + return CAMERA_ERROR_INVALID_PARAMETER; + } + if (socket_path == NULL) { + LOGE("NULL pointer for socket_path"); + return CAMERA_ERROR_INVALID_PARAMETER; + } + + LOGD("var : %s", socket_path); + + ret = mm_camcorder_set_attributes(handle->mm_handle, NULL, + MMCAM_DISPLAY_SHM_SOCKET_PATH, socket_path, strlen(socket_path), + NULL); if (ret != MM_ERROR_NONE) { LOGE("error set shm socket path attribute 0x%x", ret); return __convert_camera_error_code(__func__, ret);