Apply Tizen coding rule for static function 85/255385/1
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 18 Mar 2021 02:06:07 +0000 (11:06 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 18 Mar 2021 02:06:32 +0000 (11:06 +0900)
[Version] 0.4.47
[Issue Type] Coding rule

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

index dd7d149..556dd5f 100644 (file)
@@ -1,7 +1,7 @@
 Name:       capi-media-camera
 Summary:    A Camera API
-Version:    0.4.46
-Release:    1
+Version:    0.4.47
+Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
index 19cb7a2..1d8d6bd 100644 (file)
@@ -43,18 +43,20 @@ static GMutex g_cam_idle_event_lock;
 /* log level */
 int g_mmcam_log_level = CAMERA_LOG_LEVEL_INFO;
 
-static bool _camera_import_tbm_fd(tbm_bufmgr bufmgr, int fd, tbm_bo *bo, tbm_bo_handle *bo_handle);
-static void _camera_release_imported_bo(tbm_bo *bo);
-static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_data_s *stream,
+static bool __camera_import_tbm_fd(tbm_bufmgr bufmgr, int fd, tbm_bo *bo, tbm_bo_handle *bo_handle);
+static void __camera_release_imported_bo(tbm_bo *bo);
+
+static int __camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_data_s *stream,
        camera_media_packet_data *mp_data, media_packet_h *packet);
-static int _camera_media_packet_data_create(int ret_fd, int *tfd, int num_buffer_fd, tbm_bo bo,
+static int __camera_media_packet_data_create(int ret_fd, int *tfd, int num_buffer_fd, tbm_bo bo,
        tbm_bo *buffer_bo, tbm_bo data_bo, camera_media_packet_data **mp_data);
-static void _camera_media_packet_data_release(camera_media_packet_data *mp_data, camera_cb_info_s *cb_info);
-static gboolean _camera_allocate_preview_buffer(camera_h camera);
-static void _camera_release_preview_buffer(camera_h camera);
+static void __camera_media_packet_data_release(camera_media_packet_data *mp_data, camera_cb_info_s *cb_info);
+
+static gboolean __camera_allocate_preview_buffer(camera_h camera);
+static void __camera_release_preview_buffer(camera_h camera);
 
 
-static gboolean _camera_allocate_preview_buffer(camera_h camera)
+static gboolean __camera_allocate_preview_buffer(camera_h camera)
 {
        int i = 0;
        int ret = CAMERA_ERROR_NONE;
@@ -129,12 +131,12 @@ static gboolean _camera_allocate_preview_buffer(camera_h camera)
        return TRUE;
 
 _ALLOCATE_PREVIEW_BUFFER_FAILED:
-       _camera_release_preview_buffer(camera);
+       __camera_release_preview_buffer(camera);
        return FALSE;
 }
 
 
-static void _camera_release_preview_buffer(camera_h camera)
+static void __camera_release_preview_buffer(camera_h camera)
 {
        int i = 0;
        camera_cli_s *pc = (camera_cli_s *)camera;
@@ -296,14 +298,14 @@ static void __camera_event_handler_preview(camera_cb_info_s *cb_info, char *recv
 
        if (num_buffer_fd == 0 && tfd[1] >= 0) {
                /* import tbm data_bo and get virtual address */
-               if (!_camera_import_tbm_fd(cb_info->bufmgr, tfd[1], &data_bo, &data_bo_handle)) {
+               if (!__camera_import_tbm_fd(cb_info->bufmgr, tfd[1], &data_bo, &data_bo_handle)) {
                        CAM_LOG_ERROR("failed to import data fd %d", tfd[1]);
                        goto _PREVIEW_CB_HANDLER_DONE;
                }
        }
 
        /* import tbm bo and get virtual address */
-       if (!_camera_import_tbm_fd(cb_info->bufmgr, tfd[0], &bo, &bo_handle)) {
+       if (!__camera_import_tbm_fd(cb_info->bufmgr, tfd[0], &bo, &bo_handle)) {
                CAM_LOG_ERROR("failed to import fd %d", tfd[0]);
                goto _PREVIEW_CB_HANDLER_DONE;
        }
@@ -315,7 +317,7 @@ static void __camera_event_handler_preview(camera_cb_info_s *cb_info, char *recv
 
        for (i = 0 ; i < num_buffer_fd ; i++) {
                /* import buffer bo and get virtual address */
-               if (!_camera_import_tbm_fd(cb_info->bufmgr, tfd[i + 1], &buffer_bo[i], &buffer_bo_handle[i])) {
+               if (!__camera_import_tbm_fd(cb_info->bufmgr, tfd[i + 1], &buffer_bo[i], &buffer_bo_handle[i])) {
                        CAM_LOG_ERROR("failed to import buffer fd %d", tfd[i + 1]);
                        goto _PREVIEW_CB_HANDLER_DONE;
                }
@@ -330,13 +332,13 @@ static void __camera_event_handler_preview(camera_cb_info_s *cb_info, char *recv
        }
 
        if (CHECK_PREVIEW_CB(cb_info, PREVIEW_CB_TYPE_EVAS)) {
-               ret = _camera_media_packet_data_create(ret_fd, tfd, num_buffer_fd, bo, buffer_bo, data_bo, &mp_data);
+               ret = __camera_media_packet_data_create(ret_fd, tfd, num_buffer_fd, bo, buffer_bo, data_bo, &mp_data);
 
                if (ret == CAMERA_ERROR_NONE) {
-                       ret = _camera_media_packet_create(cb_info, stream, mp_data, &pkt_evas);
+                       ret = __camera_media_packet_create(cb_info, stream, mp_data, &pkt_evas);
                        if (ret != CAMERA_ERROR_NONE) {
                                CAM_LOG_ERROR("create pkt for evas failed");
-                               _camera_media_packet_data_release(mp_data, cb_info);
+                               __camera_media_packet_data_release(mp_data, cb_info);
                                mp_data = NULL;
                        }
                }
@@ -344,16 +346,16 @@ static void __camera_event_handler_preview(camera_cb_info_s *cb_info, char *recv
 
        /* call media packet callback */
        if (cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW]) {
-               ret = _camera_media_packet_data_create(ret_fd, tfd, num_buffer_fd, bo, buffer_bo, data_bo, &mp_data);
+               ret = __camera_media_packet_data_create(ret_fd, tfd, num_buffer_fd, bo, buffer_bo, data_bo, &mp_data);
 
                if (ret == CAMERA_ERROR_NONE) {
-                       ret = _camera_media_packet_create(cb_info, stream, mp_data, &pkt);
+                       ret = __camera_media_packet_create(cb_info, stream, mp_data, &pkt);
 
                        if (ret == CAMERA_ERROR_NONE) {
                                ((camera_media_packet_preview_cb)cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW])(pkt,
                                        cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW]);
                        } else {
-                               _camera_media_packet_data_release(mp_data, cb_info);
+                               __camera_media_packet_data_release(mp_data, cb_info);
                                mp_data = NULL;
                        }
                }
@@ -378,11 +380,11 @@ _PREVIEW_CB_HANDLER_DONE:
        if (mp_data == NULL) {
                /* release imported bo */
                for (i = 0 ; i < num_buffer_fd && i < BUFFER_MAX_PLANE_NUM ; i++)
-                       _camera_release_imported_bo(&buffer_bo[i]);
+                       __camera_release_imported_bo(&buffer_bo[i]);
 
                /* unmap and unref tbm bo */
-               _camera_release_imported_bo(&data_bo);
-               _camera_release_imported_bo(&bo);
+               __camera_release_imported_bo(&data_bo);
+               __camera_release_imported_bo(&bo);
 
                /* close imported fd */
                for (i = 0 ; i < MUSE_NUM_FD ; i++) {
@@ -448,7 +450,7 @@ static void __camera_event_handler_capture(camera_cb_info_s *cb_info, char *recv
        }
 
        /* import tbm bo and get virtual address */
-       if (!_camera_import_tbm_fd(cb_info->bufmgr, tfd[tfd_index], &bo_main, &bo_main_handle)) {
+       if (!__camera_import_tbm_fd(cb_info->bufmgr, tfd[tfd_index], &bo_main, &bo_main_handle)) {
                CAM_LOG_ERROR("failed to import fd [%d] for main", tfd[tfd_index]);
                goto _CAPTURE_CB_HANDLER_DONE;
        }
@@ -469,7 +471,7 @@ static void __camera_event_handler_capture(camera_cb_info_s *cb_info, char *recv
        if (capture_fd_post >= 0) {
                /* import tbm bo and get virtual address */
                tfd_index++;
-               if (_camera_import_tbm_fd(cb_info->bufmgr, tfd[tfd_index], &bo_post, &bo_post_handle)) {
+               if (__camera_import_tbm_fd(cb_info->bufmgr, tfd[tfd_index], &bo_post, &bo_post_handle)) {
                        buf_pos = (unsigned char *)bo_post_handle.ptr;
                        rPostview = (camera_image_data_s *)buf_pos;
                        CAM_LOG_INFO("rPostview->size : %d", rPostview->size);
@@ -482,7 +484,7 @@ static void __camera_event_handler_capture(camera_cb_info_s *cb_info, char *recv
        if (capture_fd_thumb >= 0) {
                /* import tbm bo and get virtual address */
                tfd_index++;
-               if (_camera_import_tbm_fd(cb_info->bufmgr, tfd[tfd_index], &bo_thumb, &bo_thumb_handle)) {
+               if (__camera_import_tbm_fd(cb_info->bufmgr, tfd[tfd_index], &bo_thumb, &bo_thumb_handle)) {
                        buf_pos = (unsigned char *)bo_thumb_handle.ptr;
                        rThumbnail = (camera_image_data_s *)buf_pos;
                        CAM_LOG_INFO("rThumbnail->size : %d", rThumbnail->size);
@@ -498,17 +500,17 @@ static void __camera_event_handler_capture(camera_cb_info_s *cb_info, char *recv
 _CAPTURE_CB_HANDLER_DONE:
        /* return buffer */
        if (capture_fd_main >= 0) {
-               _camera_release_imported_bo(&bo_main);
+               __camera_release_imported_bo(&bo_main);
                _camera_msg_return_buffer(capture_fd_main, cb_info);
        }
 
        if (capture_fd_post >= 0) {
-               _camera_release_imported_bo(&bo_post);
+               __camera_release_imported_bo(&bo_post);
                _camera_msg_return_buffer(capture_fd_post, cb_info);
        }
 
        if (capture_fd_thumb >= 0) {
-               _camera_release_imported_bo(&bo_thumb);
+               __camera_release_imported_bo(&bo_thumb);
                _camera_msg_return_buffer(capture_fd_thumb, cb_info);
        }
 
@@ -549,7 +551,7 @@ static void __camera_event_handler_face_detection(camera_cb_info_s *cb_info, cha
                CAM_LOG_INFO("FACE_DETECTION - count %d, fd %d", count, tfd[0]);
 
                if (tfd[0] >= 0) {
-                       if (_camera_import_tbm_fd(cb_info->bufmgr, tfd[0], &bo, &bo_handle)) {
+                       if (__camera_import_tbm_fd(cb_info->bufmgr, tfd[0], &bo, &bo_handle)) {
                                /* set face info */
                                faces = bo_handle.ptr;
                        }
@@ -562,7 +564,7 @@ static void __camera_event_handler_face_detection(camera_cb_info_s *cb_info, cha
                        count, cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION]);
 
                /* release bo */
-               _camera_release_imported_bo(&bo);
+               __camera_release_imported_bo(&bo);
        } else {
                CAM_LOG_WARNING("skip face detection message [count %d, fd %d, cb %p]",
                        count, tfd[0], cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION]);
@@ -575,7 +577,7 @@ static void __camera_event_handler_face_detection(camera_cb_info_s *cb_info, cha
 }
 
 
-static bool _camera_import_tbm_fd(tbm_bufmgr bufmgr, int fd, tbm_bo *bo, tbm_bo_handle *bo_handle)
+static bool __camera_import_tbm_fd(tbm_bufmgr bufmgr, int fd, tbm_bo *bo, tbm_bo_handle *bo_handle)
 {
        tbm_bo tmp_bo = NULL;
        tbm_bo_handle tmp_bo_handle = {NULL, };
@@ -611,7 +613,7 @@ static bool _camera_import_tbm_fd(tbm_bufmgr bufmgr, int fd, tbm_bo *bo, tbm_bo_
        return true;
 }
 
-static void _camera_release_imported_bo(tbm_bo *bo)
+static void __camera_release_imported_bo(tbm_bo *bo)
 {
        if (!bo || !(*bo)) {
                CAM_LOG_DEBUG("NULL bo");
@@ -624,7 +626,7 @@ static void _camera_release_imported_bo(tbm_bo *bo)
        return;
 }
 
-static int _camera_client_wait_for_cb_return(muse_camera_api_e api, camera_cb_info_s *cb_info, int time_out)
+static int __camera_client_wait_for_cb_return(muse_camera_api_e api, camera_cb_info_s *cb_info, int time_out)
 {
        int ret = CAMERA_ERROR_NONE;
        gint64 end_time;
@@ -708,7 +710,7 @@ void _camera_msg_send(int api, int *fds, camera_cb_info_s *cb_info,
                        *ret = CAMERA_ERROR_INVALID_OPERATION;
        } else {
                if (ret)
-                       *ret = _camera_client_wait_for_cb_return(api, cb_info, timeout);
+                       *ret = __camera_client_wait_for_cb_return(api, cb_info, timeout);
        }
 
        __camera_update_api_waiting(cb_info, api, -1);
@@ -787,7 +789,7 @@ void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
                        *ret = CAMERA_ERROR_INVALID_OPERATION;
        } else {
                if (ret)
-                       *ret = _camera_client_wait_for_cb_return(api, cb_info, timeout);
+                       *ret = __camera_client_wait_for_cb_return(api, cb_info, timeout);
        }
 
        __camera_update_api_waiting(cb_info, api, -1);
@@ -842,7 +844,7 @@ void _camera_msg_send_param2_int(int api, camera_cb_info_s *cb_info,
 
                func_ret = CAMERA_ERROR_INVALID_OPERATION;
        } else {
-               func_ret = _camera_client_wait_for_cb_return(api, cb_info, timeout);
+               func_ret = __camera_client_wait_for_cb_return(api, cb_info, timeout);
        }
 
        __camera_update_api_waiting(cb_info, api, -1);
@@ -992,7 +994,7 @@ int _camera_get_media_packet_mimetype(int in_format, media_format_mimetype_e *mi
 }
 
 
-static int _camera_media_packet_data_create(int ret_fd, int *tfd, int num_buffer_fd, tbm_bo bo,
+static int __camera_media_packet_data_create(int ret_fd, int *tfd, int num_buffer_fd, tbm_bo bo,
        tbm_bo *buffer_bo, tbm_bo data_bo, camera_media_packet_data **mp_data)
 {
        int i = 0;
@@ -1048,7 +1050,7 @@ static int _camera_media_packet_data_create(int ret_fd, int *tfd, int num_buffer
        return ret;
 }
 
-static void _camera_media_packet_data_release(camera_media_packet_data *mp_data, camera_cb_info_s *cb_info)
+static void __camera_media_packet_data_release(camera_media_packet_data *mp_data, camera_cb_info_s *cb_info)
 {
        int i = 0;
 
@@ -1076,13 +1078,13 @@ static void _camera_media_packet_data_release(camera_media_packet_data *mp_data,
                close(mp_data->fd);
                mp_data->fd = -1;
 
-               _camera_release_imported_bo(&mp_data->bo);
+               __camera_release_imported_bo(&mp_data->bo);
 
                if (mp_data->data_bo && mp_data->data_fd >= 0) {
                        close(mp_data->data_fd);
                        mp_data->data_fd = -1;
                }
-               _camera_release_imported_bo(&mp_data->data_bo);
+               __camera_release_imported_bo(&mp_data->data_bo);
 
                /* return buffer */
                _camera_msg_return_buffer(mp_data->ret_fd, cb_info);
@@ -1093,7 +1095,7 @@ static void _camera_media_packet_data_release(camera_media_packet_data *mp_data,
        return;
 }
 
-static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_data_s *stream,
+static int __camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_data_s *stream,
        camera_media_packet_data *mp_data, media_packet_h *packet)
 {
        media_packet_h pkt = NULL;
@@ -1262,7 +1264,7 @@ static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_
                if (ret != MEDIA_PACKET_ERROR_NONE) {
                        CAM_LOG_ERROR("media_packet_set_extra failed");
 
-                       _camera_media_packet_data_release(mp_data, cb_info);
+                       __camera_media_packet_data_release(mp_data, cb_info);
 
                        media_packet_destroy(pkt);
                } else {
@@ -1299,7 +1301,7 @@ int _camera_media_packet_finalize(media_packet_h pkt, int error_code, void *user
 
        g_mutex_lock(&cb_info->mp_data_mutex);
 
-       _camera_media_packet_data_release(mp_data, cb_info);
+       __camera_media_packet_data_release(mp_data, cb_info);
        mp_data = NULL;
 
        g_mutex_unlock(&cb_info->mp_data_mutex);
@@ -1316,7 +1318,7 @@ int _camera_media_packet_finalize(media_packet_h pkt, int error_code, void *user
        return MEDIA_PACKET_FINALIZE;
 }
 
-static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, muse_camera_event_e event, int *tfd)
+static void __camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, muse_camera_event_e event, int *tfd)
 {
        int param1 = 0;
        int param2 = 0;
@@ -1513,7 +1515,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
        return;
 }
 
-static gboolean _camera_idle_event_callback(gpointer data)
+static gboolean __camera_idle_event_callback(gpointer data)
 {
        camera_cb_info_s *cb_info = NULL;
        camera_idle_event_s *cam_idle_event = (camera_idle_event_s *)data;
@@ -1540,7 +1542,7 @@ static gboolean _camera_idle_event_callback(gpointer data)
        g_mutex_unlock(&g_cam_idle_event_lock);
 
        /* user callback */
-       _camera_client_user_callback(cb_info, cam_idle_event->recv_msg, cam_idle_event->event, cam_idle_event->tfd);
+       __camera_client_user_callback(cb_info, cam_idle_event->recv_msg, cam_idle_event->event, cam_idle_event->tfd);
 
 IDLE_EVENT_CALLBACK_DONE:
        /* release event */
@@ -1550,7 +1552,7 @@ IDLE_EVENT_CALLBACK_DONE:
        return FALSE;
 }
 
-static gpointer _camera_msg_handler_func(gpointer data)
+static gpointer __camera_msg_handler_func(gpointer data)
 {
        int api = 0;
        int type = 0;
@@ -1619,7 +1621,7 @@ static gpointer _camera_msg_handler_func(gpointer data)
                } else if (api == MUSE_CAMERA_CB_EVENT) {
                        switch (cam_msg->event_class) {
                        case MUSE_CAMERA_EVENT_CLASS_THREAD_SUB:
-                               _camera_client_user_callback(cb_info, cam_msg->recv_msg, cam_msg->event, cam_msg->tfd);
+                               __camera_client_user_callback(cb_info, cam_msg->recv_msg, cam_msg->event, cam_msg->tfd);
                                break;
                        case MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN:
                                cam_idle_event = g_new0(camera_idle_event_s, 1);
@@ -1642,7 +1644,7 @@ static gpointer _camera_msg_handler_func(gpointer data)
                                g_mutex_unlock(&g_cam_idle_event_lock);
 
                                g_idle_add_full(G_PRIORITY_DEFAULT,
-                                       (GSourceFunc)_camera_idle_event_callback,
+                                       (GSourceFunc)__camera_idle_event_callback,
                                        (gpointer)cam_idle_event,
                                        NULL);
                                break;
@@ -1680,7 +1682,7 @@ static gpointer _camera_msg_handler_func(gpointer data)
 }
 
 
-static void _camera_deactivate_idle_event_all(camera_cb_info_s *cb_info)
+static void __camera_deactivate_idle_event_all(camera_cb_info_s *cb_info)
 {
        camera_idle_event_s *cam_idle_event = NULL;
        GList *list = NULL;
@@ -1909,7 +1911,7 @@ static void __camera_process_msg(camera_cb_info_s *cb_info, char *msg, int *tfd)
 }
 
 
-static gpointer _camera_msg_recv_func(gpointer data)
+static gpointer __camera_msg_recv_func(gpointer data)
 {
        int i = 0;
        int recv_length = 0;
@@ -2015,7 +2017,7 @@ static bool __create_msg_handler_thread(camera_msg_handler_info_s *handler_info,
        g_atomic_int_set(&handler_info->running, 1);
 
        handler_info->thread = g_thread_try_new(thread_name,
-               _camera_msg_handler_func, (gpointer)handler_info, NULL);
+               __camera_msg_handler_func, (gpointer)handler_info, NULL);
        if (handler_info->thread == NULL) {
                CAM_LOG_ERROR("t:%d thread failed", type);
 
@@ -2070,7 +2072,7 @@ static void __destroy_msg_handler_thread(camera_msg_handler_info_s *handler_info
 }
 
 
-static camera_cb_info_s *_camera_client_callback_new(gint sockfd)
+static camera_cb_info_s *__camera_client_callback_new(gint sockfd)
 {
        camera_cb_info_s *cb_info = NULL;
        gint i = 0;
@@ -2123,7 +2125,7 @@ static camera_cb_info_s *_camera_client_callback_new(gint sockfd)
        /* message receive thread */
        g_atomic_int_set(&cb_info->msg_recv_running, 1);
        cb_info->msg_recv_thread = g_thread_try_new("camera_msg_recv",
-               _camera_msg_recv_func, (gpointer)cb_info, NULL);
+               __camera_msg_recv_func, (gpointer)cb_info, NULL);
        if (cb_info->msg_recv_thread == NULL) {
                CAM_LOG_ERROR("message receive thread creation failed");
                goto ErrorExit;
@@ -2162,7 +2164,7 @@ ErrorExit:
 //LCOV_EXCL_STOP
 }
 
-static void _camera_client_callback_destroy(camera_cb_info_s *cb_info)
+static void __camera_client_callback_destroy(camera_cb_info_s *cb_info)
 {
        int i = 0;
 
@@ -2418,7 +2420,7 @@ int _camera_create_private(camera_device_e device, bool is_network, camera_h *ca
                goto ErrorExit;
        }
 
-       pc->cb_info = _camera_client_callback_new(sock_fd);
+       pc->cb_info = __camera_client_callback_new(sock_fd);
        if (pc->cb_info == NULL) {
                CAM_LOG_ERROR("cb_info alloc failed");
                ret = CAMERA_ERROR_OUT_OF_MEMORY;
@@ -2429,7 +2431,7 @@ int _camera_create_private(camera_device_e device, bool is_network, camera_h *ca
 
        CAM_LOG_INFO("cb info : %d", pc->cb_info->fd);
 
-       ret = _camera_client_wait_for_cb_return(api, pc->cb_info, CAMERA_CB_TIMEOUT);
+       ret = __camera_client_wait_for_cb_return(api, pc->cb_info, CAMERA_CB_TIMEOUT);
 
        pc->cb_info->api_waiting[MUSE_CAMERA_API_CREATE] = 0;
 
@@ -2488,13 +2490,13 @@ ErrorExit:
 
                        /* pc->cb_info->fd should be closed,
                           because g_thread_join for msg_recv_thread is not returned
-                          in _camera_client_callback_destroy. */
+                          in __camera_client_callback_destroy. */
                        if (temp_fd > -1) {
                                pc->cb_info->fd = -1;
                                muse_client_close(temp_fd);
                        }
 
-                       _camera_client_callback_destroy(pc->cb_info);
+                       __camera_client_callback_destroy(pc->cb_info);
                        pc->cb_info = NULL;
                }
                g_free(pc);
@@ -2563,8 +2565,8 @@ int camera_destroy(camera_h camera)
                CAM_LOG_WARNING("server disconnected. release resource without send message.");
 
        if (ret == CAMERA_ERROR_NONE) {
-               _camera_deactivate_idle_event_all(pc->cb_info);
-               _camera_client_callback_destroy(pc->cb_info);
+               __camera_deactivate_idle_event_all(pc->cb_info);
+               __camera_client_callback_destroy(pc->cb_info);
                pc->cb_info = NULL;
 
                g_free(pc);
@@ -2605,7 +2607,7 @@ int camera_start_preview(camera_h camera)
        }
 
        if (current_state == CAMERA_STATE_CREATED && pc->cb_info->user_buffer_supported) {
-               if (!_camera_allocate_preview_buffer(camera))
+               if (!__camera_allocate_preview_buffer(camera))
                        return CAMERA_ERROR_INVALID_OPERATION;
 
                _camera_msg_send(api, pc->cb_info->fds, pc->cb_info, &ret, CAMERA_CB_NO_TIMEOUT);
@@ -2661,7 +2663,7 @@ int camera_stop_preview(camera_h camera)
 
        if (ret == CAMERA_ERROR_NONE) {
                if (pc->cb_info->user_buffer_supported)
-                       _camera_release_preview_buffer(camera);
+                       __camera_release_preview_buffer(camera);
        } else if (current_state == CAMERA_STATE_PREVIEW) {
                CAM_LOG_WARNING("restart evas rendering");
                _camera_start_evas_rendering(camera);
@@ -4910,7 +4912,7 @@ int camera_attr_set_geotag(camera_h camera, double latitude, double longitude, d
                CAM_LOG_ERROR("message send failed");
                ret = CAMERA_ERROR_INVALID_OPERATION;
        } else {
-               ret = _camera_client_wait_for_cb_return(api, pc->cb_info, CAMERA_CB_TIMEOUT);
+               ret = __camera_client_wait_for_cb_return(api, pc->cb_info, CAMERA_CB_TIMEOUT);
        }
 
        __camera_update_api_waiting(pc->cb_info, api, -1);
@@ -6548,7 +6550,7 @@ int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, i
                CAM_LOG_ERROR("message send failed");
                ret = CAMERA_ERROR_INVALID_OPERATION;
        } else {
-               ret = _camera_client_wait_for_cb_return(api, pc->cb_info, CAMERA_CB_TIMEOUT);
+               ret = __camera_client_wait_for_cb_return(api, pc->cb_info, CAMERA_CB_TIMEOUT);
        }
 
        __camera_update_api_waiting(pc->cb_info, api, -1);