Set pid for sound focus 94/48194/1 accepted/tizen/mobile/20150918.024627 accepted/tizen/tv/20150918.024647 accepted/tizen/wearable/20150918.024702 submit/tizen/20150917.021316 submit/tizen/20150917.064134
authorJeongmo Yang <jm80.yang@samsung.com>
Wed, 16 Sep 2015 03:38:28 +0000 (12:38 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Wed, 16 Sep 2015 03:38:28 +0000 (12:38 +0900)
Change-Id: I64f7af3dd83f798670d7c5d720e4ea2da11274a5
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/capi-media-camera.spec
src/camera.c
src/camera_internal.c

index a725884..e62d300 100755 (executable)
@@ -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
index 030c075..309d44d 100644 (file)
@@ -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;
index 92fbd5e..1a6565d 100644 (file)
@@ -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);