diff options
author | Jeongmo Yang <jm80.yang@samsung.com> | 2015-09-16 12:38:28 +0900 |
---|---|---|
committer | Jeongmo Yang <jm80.yang@samsung.com> | 2015-09-16 12:38:28 +0900 |
commit | a5daf0904bcbd691414d41285c05bb58e53ad69b (patch) | |
tree | cccf57eebde1c7c93f8e036b085a0511bc9967cf | |
parent | 2d4de5cb7175e3991f0cb0d80a9a4c6e3fe9d28a (diff) | |
download | camera-a5daf0904bcbd691414d41285c05bb58e53ad69b.tar.gz camera-a5daf0904bcbd691414d41285c05bb58e53ad69b.tar.bz2 camera-a5daf0904bcbd691414d41285c05bb58e53ad69b.zip |
Set pid for sound focussubmit/tizen/20150917.064134submit/tizen/20150917.021316accepted/tizen/wearable/20150918.024702accepted/tizen/tv/20150918.024647accepted/tizen/mobile/20150918.024627
Change-Id: I64f7af3dd83f798670d7c5d720e4ea2da11274a5
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rwxr-xr-x | packaging/capi-media-camera.spec | 2 | ||||
-rw-r--r-- | src/camera.c | 1 | ||||
-rw-r--r-- | src/camera_internal.c | 20 |
3 files changed, 17 insertions, 6 deletions
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); |