Fix build error on TV profile 42/88942/1 accepted/tizen/common/20160921.162227 accepted/tizen/ivi/20160922.042626 accepted/tizen/mobile/20160922.042350 accepted/tizen/tv/20160922.042502 accepted/tizen/wearable/20160922.042548 submit/tizen/20160921.041639
authorJeongmo Yang <jm80.yang@samsung.com>
Wed, 21 Sep 2016 07:09:18 +0000 (16:09 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Wed, 21 Sep 2016 07:10:34 +0000 (16:10 +0900)
missed evas renderer supported featuring

[Version] 0.2.75
[Profile] Common
[Issue Type] Build

Change-Id: I5cfb1b3d1cca0e853932a5824546c8b2e79a96d9
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
include/camera.h
packaging/capi-media-camera.spec
src/camera.c

index 9c17aa30e8626a6c52c55dae272088aaa9adb6b2..31f16d08326d67d2413cc21e60cdfbaf8d6e242f 100644 (file)
@@ -1966,7 +1966,7 @@ int camera_get_device_state(camera_device_e device, camera_device_state_e *state
  * @since_tizen 3.0
  * @param[in] callback The callback function to register
  * @param[in] user_data The user data to be passed to the callback function
- * @param[out] cb_id The id of registerd callback
+ * @param[out] cb_id The id of registered callback
  * @return @c 0 on success, otherwise a negative error value
  * @retval #CAMERA_ERROR_NONE Successful
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
@@ -1982,7 +1982,7 @@ int camera_add_device_state_changed_cb(camera_device_state_changed_cb callback,
 /**
  * @brief Unregisters the callback function.
  * @since_tizen 3.0
- * @param[in] cb_id The id of registerd callback
+ * @param[in] cb_id The id of registered callback
  * @return @c 0 on success, otherwise a negative error value
  * @retval #CAMERA_ERROR_NONE Successful
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
index 62af3e8a7fe30a53013d60c744f3125cbd6b40f9..259c444f3d3cb680fcd7c59d49d59866cf32808a 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-camera
 Summary:    A Camera API
-Version:    0.2.74
+Version:    0.2.75
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 567a3be419f0e8d711e422a34b6afe3eefbf1066..f98d43b22d7f6f589a741c912cd754adcd111772 100644 (file)
@@ -1088,7 +1088,9 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
                        camera_stream_data_s *stream = NULL;
                        camera_media_packet_data *mp_data = NULL;
                        media_packet_h pkt = NULL;
+#ifdef TIZEN_FEATURE_EVAS_RENDERER
                        media_packet_h pkt_evas = NULL;
+#endif /* TIZEN_FEATURE_EVAS_RENDERER */
 
                        muse_camera_msg_get(tbm_key, recv_msg);
                        muse_camera_msg_get(num_buffer_key, recv_msg);
@@ -1187,6 +1189,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
                                }
                        }
 
+#ifdef TIZEN_FEATURE_EVAS_RENDERER
                        /* call evas renderer */
                        if (pkt_evas) {
                                g_mutex_lock(&cb_info->evas_mutex);
@@ -1199,6 +1202,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
                                pkt_evas = NULL;
                                g_mutex_unlock(&cb_info->evas_mutex);
                        }
+#endif /* TIZEN_FEATURE_EVAS_RENDERER */
 
                        /* send message for preview callback return */
                        if (!CHECK_PREVIEW_CB(cb_info, PREVIEW_CB_TYPE_EVAS))
@@ -2264,7 +2268,7 @@ int _camera_independent_request(int api, int device_type, const char *key, int *
        int send_ret = 0;
        int sock_fd = -1;
        char *msg = NULL;
-       camera_cli_s *pc = NULL;
+       camera_cb_info_s *cb_info = NULL;
 
        /* create muse connection */
        if (!key || !value) {
@@ -2299,15 +2303,8 @@ int _camera_independent_request(int api, int device_type, const char *key, int *
                goto _REQUEST_EXIT;
        }
 
-       pc = g_new0(camera_cli_s, 1);
-       if (!pc) {
-               LOGE("handle alloc failed");
-               ret = CAMERA_ERROR_OUT_OF_MEMORY;
-               goto _REQUEST_EXIT;
-       }
-
-       pc->cb_info = _camera_client_callback_new(sock_fd, false);
-       if (!pc->cb_info) {
+       cb_info = _camera_client_callback_new(sock_fd, false);
+       if (!cb_info) {
                LOGE("cb_info alloc failed");
                ret = CAMERA_ERROR_OUT_OF_MEMORY;
                goto _REQUEST_EXIT;
@@ -2315,23 +2312,18 @@ int _camera_independent_request(int api, int device_type, const char *key, int *
 
        sock_fd = -1;
 
-       ret = _camera_client_wait_for_cb_return(api, pc->cb_info, CAMERA_CB_TIMEOUT);
+       ret = _camera_client_wait_for_cb_return(api, cb_info, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
-               muse_core_msg_json_deserialize(key, pc->cb_info->recv_msg, NULL, value, NULL, MUSE_TYPE_ANY);
+               muse_core_msg_json_deserialize(key, cb_info->recv_msg, NULL, value, NULL, MUSE_TYPE_ANY);
 
        LOGD("api %d - value %d", api, *value);
 
 _REQUEST_EXIT:
        /* release resources */
-       if (pc) {
-               if (pc->cb_info) {
-                       _camera_client_callback_destroy(pc->cb_info);
-                       pc->cb_info = NULL;
-               }
-
-               g_free(pc);
-               pc = NULL;
+       if (cb_info) {
+               _camera_client_callback_destroy(cb_info);
+               cb_info = NULL;
        }
 
        if (sock_fd > -1) {