diff options
author | Ji Yong Min <jiyong.min@samsung.com> | 2015-10-01 19:44:46 +0900 |
---|---|---|
committer | Ji Yong Min <jiyong.min@samsung.com> | 2015-10-02 16:00:45 +0900 |
commit | e787f69ce984b7b225c291ebe81664530a8284c9 (patch) | |
tree | e95404528b0dc5811881cb97b54e95eea7db18d1 /server/thumb-server-internal.c | |
parent | e7bfe2daa994ee3eaacd53673ac5ff078a9399ec (diff) | |
download | libmedia-thumbnail-e787f69ce984b7b225c291ebe81664530a8284c9.tar.gz libmedia-thumbnail-e787f69ce984b7b225c291ebe81664530a8284c9.tar.bz2 libmedia-thumbnail-e787f69ce984b7b225c291ebe81664530a8284c9.zip |
Add thumb-dcm thread to run DCM service, but disabledsubmit/tizen/20151012.020617accepted/tizen/wearable/20151012.040700accepted/tizen/tv/20151012.040649accepted/tizen/mobile/20151012.040632
DCM service will work after change "ENABLE_DCM" to "true" in CMakeLists.txt
Change-Id: Iaa6c854860836452c4c68c76fbc693e53a0311c8
Diffstat (limited to 'server/thumb-server-internal.c')
-rwxr-xr-x | server/thumb-server-internal.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/server/thumb-server-internal.c b/server/thumb-server-internal.c index 5facdee..e9e9530 100755 --- a/server/thumb-server-internal.c +++ b/server/thumb-server-internal.c @@ -37,6 +37,10 @@ #undef LOG_TAG #endif +#ifdef _SUPPORT_DCM +#include "thumb-server-dcm.h" +#endif /* _SUPPORT_DCM */ + #define LOG_TAG "MEDIA_THUMBNAIL_SERVER" #define THUMB_DEFAULT_WIDTH 320 #define THUMB_DEFAULT_HEIGHT 240 @@ -391,12 +395,22 @@ gboolean _thumb_server_read_socket(GIOChannel *src, thumb_dbg("All thumbnails are being extracted now"); __thumb_daemon_all_extract(recv_msg.uid); g_idle_add(_thumb_daemon_process_queue_jobs, NULL); + +#ifdef _SUPPORT_DCM + /* Send msg to dcm thread to scan all images */ + _thumb_server_dcm_send_msg(THUMB_SERVER_DCM_MSG_SCAN_ALL, recv_msg.uid, NULL, THUMB_SERVER_DCM_PORT_DCM_RECV); +#endif /* _SUPPORT_DCM */ } else if(recv_msg.msg_type == THUMB_REQUEST_RAW_DATA) { __thumb_daemon_process_job_raw(&recv_msg, &res_msg); } else if(recv_msg.msg_type == THUMB_REQUEST_KILL_SERVER) { thumb_warn("received KILL msg from thumbnail agent."); } else { _thumb_daemon_process_job(&recv_msg, &res_msg,recv_msg.uid); + +#ifdef _SUPPORT_DCM + /* Send msg to dcm thread to scan a single image */ + _thumb_server_dcm_send_msg(THUMB_SERVER_DCM_MSG_SCAN_SINGLE, recv_msg.uid, (const char *)(recv_msg.org_path), THUMB_SERVER_DCM_PORT_DCM_RECV); +#endif /* _SUPPORT_DCM */ } if(res_msg.msg_type == 0) @@ -438,6 +452,10 @@ gboolean _thumb_server_read_socket(GIOChannel *src, if(recv_msg.msg_type == THUMB_REQUEST_KILL_SERVER) { thumb_warn("Shutting down..."); +#ifdef _SUPPORT_DCM + /* Quit dcm thread main loop */ + _thumb_server_dcm_quit_main_loop(); +#endif g_main_loop_quit(g_thumb_server_mainloop); } |