Remove unused code 55/49155/1
authorHaejeong, Kim <backto.kim@samsung.com>
Wed, 7 Oct 2015 09:34:15 +0000 (18:34 +0900)
committerHaejeong, Kim <backto.kim@samsung.com>
Wed, 7 Oct 2015 09:34:41 +0000 (18:34 +0900)
Change-Id: Id292607c1f4f7bb66fb3a30e7d0a7e6e1c4fdd0b

include/DcmDebugUtils.h
include/DcmTypes.h
libdcm-face/dcm-face-debug.h
libdcm-face/dcm-face_mediavision.c
libdcm-face/dcm-face_priv.h
libdcm-face/include/dcm-face.h
libdcm-util/dcm_image_codec.cpp
libdcm-util/include/dcm_image_codec.h
libdcm-util/include/dcm_image_debug_utils.h
packaging/dcm-service.spec
src/DcmScanSvc.cpp

index 5d337f3085746b0f02715b0af5e931b1347a282d..3cfe0a1bab419b1938e73223b83e3309b3f220f8 100755 (executable)
 #undef LOG_TAG
 #endif
 
-#define _USE_DLOG_
 #define LOG_TAG "DCM_SVC"
 
-/* anci c color type */
-#define FONT_COLOR_RESET    "\033[0m"
-#define FONT_COLOR_RED      "\033[31m"
-#define FONT_COLOR_GREEN    "\033[32m"
-#define FONT_COLOR_YELLOW   "\033[33m"
-#define FONT_COLOR_BLUE     "\033[34m"
-#define FONT_COLOR_PURPLE   "\033[35m"
-#define FONT_COLOR_CYAN     "\033[36m"
-#define FONT_COLOR_GRAY     "\033[37m"
-
-/*#undef _USE_DLOG_ */
-#ifdef _USE_DLOG_
+#define FONT_COLOR_RESET               "\033[0m"
+#define FONT_COLOR_RED                 "\033[31m"
+#define FONT_COLOR_GREEN               "\033[32m"
+#define FONT_COLOR_YELLOW              "\033[33m"
+#define FONT_COLOR_BLUE                "\033[34m"
+#define FONT_COLOR_PURPLE              "\033[35m"
+#define FONT_COLOR_CYAN                "\033[36m"
+#define FONT_COLOR_GRAY                "\033[37m"
+
 #define dcm_debug(fmt, arg...) do { \
                LOGD(FONT_COLOR_CYAN""fmt""FONT_COLOR_RESET, ##arg); \
        } while (0)
                                return (val); \
                        } \
                } while (0)
-#else
-#define dcm_debug(fmt, arg...)
-#define dcm_info(fmt, arg...)
-#define dcm_warn(fmt, arg...)
-#define dcm_error(fmt, arg...)
-
-#define dcm_sec_debug(fmt, arg...)
-#define dcm_sec_info(fmt, arg...)
-#define dcm_sec_warn(fmt, arg...)
-#define dcm_sec_error(fmt, arg...)
-
-#endif
 
-#define DCM_CHECK_VAL(expr, val)               dcm_retvm_if(!(expr), val,   "Invalid parameter, return ERROR code!")
-#define DCM_CHECK_NULL(expr)                   dcm_retvm_if(!(expr), NULL,  "Invalid parameter, return NULL!")
+#define DCM_CHECK_VAL(expr, val)               dcm_retvm_if(!(expr), val, "Invalid parameter, return ERROR code!")
+#define DCM_CHECK_NULL(expr)                   dcm_retvm_if(!(expr), NULL, "Invalid parameter, return NULL!")
 #define DCM_CHECK_FALSE(expr)                  dcm_retvm_if(!(expr), FALSE, "Invalid parameter, return FALSE!")
-#define DCM_CHECK(expr)                                dcm_retm_if (!(expr),        "Invalid parameter, return!")
+#define DCM_CHECK(expr)                                dcm_retm_if (!(expr), "Invalid parameter, return!")
 
 #define DCM_SAFE_FREE(ptr) { if(ptr) {free(ptr); ptr = NULL;} }
 
index d371c11f00d84269372cb32fd05da33dfe1a496d..04a6dc77a8f362abbb8d91c5e57cb59af52d5dff 100755 (executable)
@@ -22,9 +22,9 @@
 #include <unistd.h>
 
 /*
 * Definitions defined here can be used by all threads
 * If a definition can only be used in a specific thread, then this definition should be defined in that thread, not here.
 */
+ * Definitions defined here can be used by all threads
+ * If a definition can only be used in a specific thread, then this definition should be defined in that thread, not here.
+ */
 
 #define DCM_MAX_PATH_SIZE 4096
 #define DCM_IPC_MSG_MAX_SIZE 4096
index 5c0886c3cdcbe9ebf7af94e265436983489c5ee3..637076cf83aab54571b290a738eec6a6d7976af0 100755 (executable)
 #undef LOG_TAG
 #endif
 
-#define _USE_DLOG_
 #define LOG_TAG "DCM_FACE"
 
-/* anci c color type */
-#define FONT_COLOR_RESET    "\033[0m"
-#define FONT_COLOR_RED      "\033[31m"
-#define FONT_COLOR_GREEN    "\033[32m"
-#define FONT_COLOR_YELLOW   "\033[33m"
-#define FONT_COLOR_BLUE     "\033[34m"
-#define FONT_COLOR_PURPLE   "\033[35m"
-#define FONT_COLOR_CYAN     "\033[36m "
-#define FONT_COLOR_GRAY     "\033[37m"
-
-/*#undef _USE_DLOG_ */
-#ifdef _USE_DLOG_
+#define FONT_COLOR_RESET               "\033[0m"
+#define FONT_COLOR_RED                 "\033[31m"
+#define FONT_COLOR_GREEN               "\033[32m"
+#define FONT_COLOR_YELLOW              "\033[33m"
+#define FONT_COLOR_BLUE                "\033[34m"
+#define FONT_COLOR_PURPLE              "\033[35m"
+#define FONT_COLOR_CYAN                "\033[36m"
+#define FONT_COLOR_GRAY                "\033[37m"
+
 #define dcm_debug(fmt, arg...) do { \
                LOGD(FONT_COLOR_CYAN""fmt""FONT_COLOR_RESET, ##arg); \
        } while (0)
                                return (val); \
                        } \
                } while (0)
-#else
-#define dcm_debug(fmt, arg...)
-#define dcm_info(fmt, arg...)
-#define dcm_warn(fmt, arg...)
-#define dcm_error(fmt, arg...)
-
-#define dcm_sec_debug(fmt, arg...)
-#define dcm_sec_info(fmt, arg...)
-#define dcm_sec_warn(fmt, arg...)
-#define dcm_sec_error(fmt, arg...)
-#endif
 
 
 #endif /*__FACE_DEBUG_H__ */
index dcab375de544602f7e2e960ea9b3110c4cb2a96f..60a16d2da52179f4b4a1a70644f95725eb408037 100755 (executable)
@@ -109,7 +109,7 @@ void __face_detected_cb(mv_source_h source, mv_engine_config_h cfg, mv_rectangle
                _data->face_rect[i].y = faces_locations[i].point.y;
                _data->face_rect[i].w = faces_locations[i].width;
                _data->face_rect[i].h = faces_locations[i].height;
-               _data->face_rect[i].orientation = 0;  /* set to default orientation */
+               _data->face_rect[i].orientation = 0;    /* set to default orientation */
        }
 
        _data->count = number_of_faces;
index a1abf7183e06cafe246cc2b079a28fdbc9ed35c0..4dd6a23a4728067aaaf1ff8bae8f553b856cd865 100755 (executable)
@@ -32,7 +32,7 @@
 #define FACE_IMAGE_MAGIC               (0x1a2b3c4d)
 #define FACE_INVALID_MAGIC             (0xDEADBEAF)
 
-#define DCM_SAFE_FREE(src)      { if(src) {free(src); src = NULL;}}
+#define DCM_SAFE_FREE(src)     { if(src) {free(src); src = NULL;}}
 
 typedef struct face_image_s {
        unsigned char *data;
index 1637a720a2ec90ace4d52bf86b623a7f7f3fb541..9797dc3905df20fdec1f3fc02bf4b9e86f83ecd1 100755 (executable)
@@ -79,7 +79,7 @@ int dcm_face_get_prefered_colorspace(dcm_face_h handle, face_image_colorspace_e
  * @retval #FACE_ERROR_INVALID_PARAMTER Invalid parameter
  * @retval #FACE_ERROR_OUT_OF_MEMORY   Out of memory
  * @see dcm_face_create()
 */
+ */
 int dcm_face_set_image_info(dcm_face_h handle, face_image_colorspace_e colorspace, unsigned char *buffer, unsigned int width, unsigned int height, unsigned int size);
 
 /**
index 8309dd6977ee2b0ab37c78e7643d7de27c5553f4..3ae677f168746705c4b5d3ff52491e3dff33e595 100755 (executable)
 #include <dcm_image_debug_utils.h>
 #include <dcm_image_codec.h>
 
-#if 0
-static void _dcm_codec_calc_image_size(int ori_width, int ori_height, int tar_width, int tar_height, int *buf_width, int *buf_height)
-{
-
-    *buf_width = 0;
-    *buf_height = 0;
-
-    if (tar_width <= 0 && tar_height <= 0) {
-        dcm_warn("Invalid input decode size! Set decode size to original size");
-        *buf_width = 0;
-        *buf_height = 0;
-        return;
-    }
-
-    if (ori_width <= tar_width && ori_height <= tar_height) {
-        dcm_debug("Original image size is already smaller. Set docode size to original size");
-        /* Make sure that decode buffer size can be divided by 8 (required by YUV420 decoding) */
-        *buf_width = ori_width - (ori_width) % 8;
-        *buf_height = ori_height - (ori_height) % 8;
-        return;
-    }
-
-    if (ori_width > ori_height) {
-        /* Scale image size based on input width */
-        *buf_width = tar_width;
-        *buf_height = (int) (ori_height * (((double) tar_width) / ((double) ori_width)));
-    } else {
-        /* Scale image size based on input height */
-        *buf_height = tar_height;
-        *buf_width = (int) (ori_width * (((double) tar_height) / ((double) ori_height)));
-    }
-
-    /* Make sure that decode buffer size can be divided by 8 (required by YUV420 decoding) */
-    *buf_width = *buf_width - (*buf_width) % 8;
-    *buf_height = *buf_height - (*buf_height) % 8;
-
-       return;
-}
-#endif
-
 int __dcm_decode_image_with_evas(const char *origin_path,
                                        int dest_width, int dest_height,
                                        dcm_image_info *image_info)
@@ -370,7 +330,7 @@ static int __dcm_decode_image_with_size_orient(const char *file_path, unsigned i
 }
 
 EXPORT_API
-int dcm_decode_image_with_size_orient(const char *file_path, unsigned int target_width, unsigned int target_height, 
+int dcm_decode_image_with_size_orient(const char *file_path, unsigned int target_width, unsigned int target_height,
        dcm_image_codec_type_e decode_type, unsigned char **image_buffer, unsigned int *buff_width, unsigned int *buff_height, int *orientation, unsigned int *size)
 {
        int ret = DCM_SUCCESS;
@@ -385,7 +345,7 @@ int dcm_decode_image_with_size_orient(const char *file_path, unsigned int target
 
 EXPORT_API
 int dcm_decode_image_with_evas(const char *file_path, unsigned int target_width, unsigned int target_height,
-        dcm_image_codec_type_e decode_type, unsigned char **image_buffer, unsigned int *buff_width, unsigned int *buff_height, int *orientation, unsigned int *size)
+       dcm_image_codec_type_e decode_type, unsigned char **image_buffer, unsigned int *buff_width, unsigned int *buff_height, int *orientation, unsigned int *size)
 {
        int ret = DCM_SUCCESS;
        dcm_image_info image_info = {0, };
index 37a80c38e690a1c765bd200c3d5eb2ae0c05c907..a8eb0613bf57ee903ec8fcd7c36a5fffe1bedb4e 100755 (executable)
@@ -39,11 +39,11 @@ typedef struct {
 
 
 /* Decoding image with input width and height, if possible (width/height ratio is kept the same as original), and rotate the buffer according to orientation */
-int dcm_decode_image_with_size_orient(const char *file_path, unsigned int target_width, unsigned int target_height, 
-               dcm_image_codec_type_e decode_type, unsigned char **image_buffer, unsigned int *buff_width, unsigned int *buff_height, int *orientation, unsigned int *size);
+int dcm_decode_image_with_size_orient(const char *file_path, unsigned int target_width, unsigned int target_height,
+       dcm_image_codec_type_e decode_type, unsigned char **image_buffer, unsigned int *buff_width, unsigned int *buff_height, int *orientation, unsigned int *size);
 
 int dcm_decode_image_with_evas(const char *file_path, unsigned int target_width, unsigned int target_height,
-        dcm_image_codec_type_e decode_type, unsigned char **image_buffer, unsigned int *buff_width, unsigned int *buff_height, int *orientation, unsigned int *size);
+       dcm_image_codec_type_e decode_type, unsigned char **image_buffer, unsigned int *buff_width, unsigned int *buff_height, int *orientation, unsigned int *size);
 
 #ifdef __cplusplus
 }
index f833d7af2907ff9daa4120f3bb6819686c3c28ae..78f4e4884179c4bf5f7ffa02bc4941b38589592c 100755 (executable)
@@ -25,7 +25,6 @@
 #undef LOG_TAG
 #endif
 
-#define _USE_DLOG_
 #define LOG_TAG "DCM_IMAGE_CODEC"
 
 typedef enum {
@@ -39,18 +38,15 @@ typedef enum {
        DCM_ERROR_UNSUPPORTED_IMAGE_TYPE,
 } DcmErrorType;
 
-/* anci c color type */
-#define FONT_COLOR_RESET    "\033[0m"
-#define FONT_COLOR_RED      "\033[31m"
-#define FONT_COLOR_GREEN    "\033[32m"
-#define FONT_COLOR_YELLOW   "\033[33m"
-#define FONT_COLOR_BLUE     "\033[34m"
-#define FONT_COLOR_PURPLE   "\033[35m"
-#define FONT_COLOR_CYAN     "\033[36m"
-#define FONT_COLOR_GRAY     "\033[37m"
-
-/*#undef _USE_DLOG_ */
-#ifdef _USE_DLOG_
+#define FONT_COLOR_RESET               "\033[0m"
+#define FONT_COLOR_RED                 "\033[31m"
+#define FONT_COLOR_GREEN               "\033[32m"
+#define FONT_COLOR_YELLOW              "\033[33m"
+#define FONT_COLOR_BLUE                "\033[34m"
+#define FONT_COLOR_PURPLE              "\033[35m"
+#define FONT_COLOR_CYAN                "\033[36m"
+#define FONT_COLOR_GRAY                "\033[37m"
+
 #define dcm_debug(fmt, arg...) do { \
                LOGD(FONT_COLOR_CYAN""fmt""FONT_COLOR_RESET, ##arg); \
        } while (0)
@@ -64,7 +60,7 @@ typedef enum {
        } while (0)
 
 #define dcm_error(fmt, arg...) do { \
-               LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET  , ##arg); \
+               LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
        } while (0)
 
 #define dcm_sec_debug(fmt, arg...) do { \
@@ -90,18 +86,7 @@ typedef enum {
 #define dcm_debug_fleave() do { \
                LOGD(FONT_COLOR_RESET"<Leave>"); \
        } while (0)
-#else
-#define dcm_debug(fmt, arg...)
-#define dcm_info(fmt, arg...)
-#define dcm_warn(fmt, arg...)
-#define dcm_error(fmt, arg...)
-
-#define dcm_sec_debug(fmt, arg...)
-#define dcm_sec_info(fmt, arg...)
-#define dcm_sec_warn(fmt, arg...)
-#define dcm_sec_error(fmt, arg...)
 
-#endif
 #define dcm_retm_if(expr, fmt, arg...) do { \
                if(expr) { \
                        dcm_error(fmt, ##arg); \
@@ -128,9 +113,8 @@ typedef enum {
 #define DCM_CHECK_VAL(expr, val)               dcm_retvm_if(!(expr), val , "Invalid parameter, return ERROR code!")
 #define DCM_CHECK_NULL(expr)                   dcm_retvm_if(!(expr), NULL, "Invalid parameter, return NULL!")
 #define DCM_CHECK_FALSE(expr)                  dcm_retvm_if(!(expr), FALSE, "Invalid parameter, return FALSE!")
-#define DCM_CHECK(expr)                                dcm_retm_if (!(expr),        "Invalid parameter, return!")
+#define DCM_CHECK(expr)                                dcm_retm_if (!(expr), "Invalid parameter, return!")
 
 #define DCM_SAFE_FREE(ptr) { if(ptr) {free(ptr); ptr = NULL;} }
 
 #endif /* _DCM_DEBUG_UTILS_H_ */
-
index c41354786b5762344393bda04945ac43bdcd95bd..6589b8108da553a88b57967080ffb8a2b6b99e89 100755 (executable)
@@ -1,5 +1,5 @@
 Name:       dcm-service
-Summary:    Multimedia DCM(Digital Contents Management) Service 
+Summary:    Multimedia DCM(Digital Contents Management) Service
 Version:    0.0.1
 Release:    0
 Group:      Multimedia/Service
index f606515620a543e7348e1f0a2d12007d2dffa9c5..60ce8429fedc0112a210dcb82f03fdb5f0f12153 100755 (executable)
 
 class DcmScanSvc {
 public:
-    GMainLoop *g_scan_thread_mainloop;
-    GMainContext *scan_thread_main_context;
+       GMainLoop *g_scan_thread_mainloop;
+       GMainContext *scan_thread_main_context;
 
-    /* scan all images */
-    GList *scan_all_item_list;
-    unsigned int scan_all_curr_index;
+       /* scan all images */
+       GList *scan_all_item_list;
+       unsigned int scan_all_curr_index;
 
-    /* scan single images */
-    GList *scan_single_item_list;
-    unsigned int scan_single_curr_index;
+       /* scan single images */
+       GList *scan_single_item_list;
+       unsigned int scan_single_curr_index;
 
-    void quitScanThread();
-    int getMmcState(void);
-    int prepareImageList();
+       void quitScanThread();
+       int getMmcState(void);
+       int prepareImageList();
        int prepareImageListByPath(const char *file_path);
-    int clearAllItemList();
-    int clearSingleItemList();
-    int initialize();
-    int finalize();
-    int sendCompletedMsg(const char *msg, DcmIpcPortType port);
-    int getScanStatus(DcmScanItem *scan_item, bool *media_scanned);
-    int runScanProcess(DcmScanItem *scan_item);
-    int ScanAllItems();
-    int ScanSingleItem(const char *file_path);
-    int terminateScanOperations();
-    int receiveMsg(DcmIpcMsg *recv_msg);
+       int clearAllItemList();
+       int clearSingleItemList();
+       int initialize();
+       int finalize();
+       int sendCompletedMsg(const char *msg, DcmIpcPortType port);
+       int getScanStatus(DcmScanItem *scan_item, bool *media_scanned);
+       int runScanProcess(DcmScanItem *scan_item);
+       int ScanAllItems();
+       int ScanSingleItem(const char *file_path);
+       int terminateScanOperations();
+       int receiveMsg(DcmIpcMsg *recv_msg);
 
 };
 
 namespace DcmScanCallback {
-void freeScanItem(void *data);
-gboolean readyScanThreadIdle(gpointer data);
-gboolean readMsg(GIOChannel *src, GIOCondition condition, gpointer data);
+       void freeScanItem(void *data);
+       gboolean readyScanThreadIdle(gpointer data);
+       gboolean readMsg(GIOChannel *src, GIOCondition condition, gpointer data);
 }
 
 void DcmScanSvc::quitScanThread()