diff options
author | Minje Ahn <minje.ahn@samsung.com> | 2015-08-07 09:40:46 +0900 |
---|---|---|
committer | Minje Ahn <minje.ahn@samsung.com> | 2015-08-07 10:10:15 +0900 |
commit | 7adbb6954d7f05fd02b9cded3741ce6ed2c9226b (patch) | |
tree | 5315a9e75f2283f559b18a8375f093b6eca10a3e /server/thumb-server.c | |
parent | 41f405edc8f31d877615c580ed6eb308d7eaebec (diff) | |
download | libmedia-thumbnail-7adbb6954d7f05fd02b9cded3741ce6ed2c9226b.tar.gz libmedia-thumbnail-7adbb6954d7f05fd02b9cded3741ce6ed2c9226b.tar.bz2 libmedia-thumbnail-7adbb6954d7f05fd02b9cded3741ce6ed2c9226b.zip |
Patch below:submit/tizen/20150807.043057accepted/tizen/wearable/20150807.073442accepted/tizen/tv/20150807.073433accepted/tizen/mobile/20150807.073414
Separate CMakeFiles for apply fPIE option
Remove unused code
Remove thumb_type
Modify jpeg thumbnail creation logic when exif thumbnail is smaller than request thumbnail size
Add scale down logic when request huge size image
Fix bugs, memory leaks
Remove unused parameters in function
Change thumb path creation API position
Remove thumbnail folder creation API
Rename some functions
Change-Id: I0e13d393dd524b61bcf44722c33b6f270649b732
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'server/thumb-server.c')
-rwxr-xr-x | server/thumb-server.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/server/thumb-server.c b/server/thumb-server.c index b64a3d6..3a9a113 100755 --- a/server/thumb-server.c +++ b/server/thumb-server.c @@ -25,7 +25,6 @@ #include "media-thumb-util.h" #include "thumb-server-internal.h" #include <pthread.h> -#include <heynoti.h> #include <vconf.h> #ifdef LOG_TAG @@ -33,10 +32,10 @@ #endif #define LOG_TAG "MEDIA_THUMBNAIL_SERVER" -#define POWEROFF_NOTI_NAME "power_off_start" /*poeroff noti from system-server*/ extern GMainLoop *g_thumb_server_mainloop; +#if 0 static void _media_thumb_signal_handler(void *user_data) { thumb_dbg("Singal Hander for HEYNOTI \"power_off_start\""); @@ -48,32 +47,17 @@ static void _media_thumb_signal_handler(void *user_data) return; } +#endif int main(void) { int sockfd = -1; + int err = 0; GSource *source = NULL; GIOChannel *channel = NULL; GMainContext *context = NULL; - /*heynoti for power off*/ - int err = 0; - int heynoti_id = heynoti_init(); - - if (heynoti_id < 0) { - thumb_err("heynoti_init failed"); - } else { - err = heynoti_subscribe(heynoti_id, POWEROFF_NOTI_NAME, _media_thumb_signal_handler, NULL); - if (err < 0) { - thumb_err("heynoti_attach_handler failed: %d", err); - } else { - err = heynoti_attach_handler(heynoti_id); - if (err < 0) - thumb_err("heynoti_attach_handler failed: %d", err); - } - } - /* Set VCONFKEY_SYSMAN_MMC_FORMAT callback to get noti for SD card format */ err = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_FORMAT, (vconf_callback_fn) _thumb_daemon_vconf_cb, NULL); if (err == -1) @@ -91,6 +75,7 @@ int main(void) } g_thumb_server_mainloop = g_main_loop_new(context, FALSE); + context = g_main_loop_get_context(g_thumb_server_mainloop); /* Create new channel to watch udp socket */ channel = g_io_channel_unix_new(sockfd); @@ -100,10 +85,10 @@ int main(void) g_source_set_callback(source, (GSourceFunc)_thumb_server_read_socket, NULL, NULL); g_source_attach(source, context); - GSource *source_init = NULL; - source_init = g_idle_source_new (); - g_source_set_callback (source_init, _thumb_daemon_start_jobs, NULL, NULL); - g_source_attach (source_init, context); + GSource *source_evas_init = NULL; + source_evas_init = g_idle_source_new (); + g_source_set_callback (source_evas_init, _thumb_daemon_start_jobs, NULL, NULL); + g_source_attach (source_evas_init, context); /* Would be used when glib 2.32 is installed GSource *sig_handler_src = NULL; @@ -121,6 +106,7 @@ int main(void) g_io_channel_shutdown(channel, FALSE, NULL); g_io_channel_unref(channel); _thumb_daemon_finish_jobs(); + g_main_loop_unref(g_thumb_server_mainloop); return 0; } |