summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>2014-12-02 10:55:14 (GMT)
committerJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>2014-12-03 14:08:19 (GMT)
commitf0be21988c9b0a4d165d386f8062a4bf2f5b095b (patch)
tree932c32cc203851222e63b7adac4be53d73e8b6b4 /server
parent561e2cae46730cdbadf485dfa7ab449e60524bae (diff)
downloadlibmedia-thumbnail-f0be21988c9b0a4d165d386f8062a4bf2f5b095b.zip
libmedia-thumbnail-f0be21988c9b0a4d165d386f8062a4bf2f5b095b.tar.gz
libmedia-thumbnail-f0be21988c9b0a4d165d386f8062a4bf2f5b095b.tar.bz2
Librarie gdk-pixbuf is used to create thumbnail instead of Ecore-evas Bug-Tizen: TC-1694 Change-Id: Ib8facf8ec8d2d82ffaf5138a3b7e09ee5853b7b5 Signed-off-by: Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
Diffstat (limited to 'server')
-rwxr-xr-xserver/thumb-server-internal.c8
-rwxr-xr-xserver/thumb-server.c19
2 files changed, 11 insertions, 16 deletions
diff --git a/server/thumb-server-internal.c b/server/thumb-server-internal.c
index cc65652..6de74ad 100755
--- a/server/thumb-server-internal.c
+++ b/server/thumb-server-internal.c
@@ -25,7 +25,6 @@
#include <dirent.h>
#include <stdio.h>
#include <string.h>
-#include <Ecore_Evas.h>
#include <vconf.h>
#ifdef LOG_TAG
@@ -65,9 +64,8 @@ void _thumb_daemon_finish_jobs()
thumb_dbg("sqlite3 handle is alive. So disconnect to sqlite3");
}
- /* Shutdown ecore-evas */
- ecore_evas_shutdown();
-
+ g_main_loop_quit(g_thumb_server_mainloop);
+
return;
}
@@ -404,7 +402,7 @@ gboolean _thumb_server_read_socket(GIOChannel *src,
if(recv_msg.msg_type == THUMB_REQUEST_KILL_SERVER) {
thumb_warn("Shutting down...");
- ecore_main_loop_quit();
+ g_main_loop_quit(g_thumb_server_mainloop);
}
return TRUE;
diff --git a/server/thumb-server.c b/server/thumb-server.c
index bed8711..ca5fd48 100755
--- a/server/thumb-server.c
+++ b/server/thumb-server.c
@@ -30,8 +30,6 @@
#include <vconf.h>
//#include <signal.h>
//#include <glib-unix.h>
-#include <Ecore.h>
-#include <Ecore_Evas.h>
#ifdef LOG_TAG
@@ -49,7 +47,7 @@ static void _media_thumb_signal_handler(void *user_data)
thumb_dbg("Singal Hander for HEYNOTI \"power_off_start\"");
if (g_thumb_server_mainloop)
- ecore_main_loop_quit();
+ g_main_loop_quit(g_thumb_server_mainloop);
else
exit(1);
@@ -98,7 +96,7 @@ int main()
return -1;
}
- context = g_main_context_default ();
+ g_thumb_server_mainloop = g_main_loop_new(context, FALSE);
/* Create new channel to watch udp socket */
channel = g_io_channel_unix_new(sockfd);
@@ -108,10 +106,10 @@ int main()
g_source_set_callback(source, (GSourceFunc)_thumb_server_read_socket, NULL, NULL);
g_source_attach(source, 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);
+ 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);
/* Would be used when glib 2.32 is installed
GSource *sig_handler_src = NULL;
@@ -119,14 +117,13 @@ int main()
g_source_set_callback(sig_handler_src, (GSourceFunc)_media_thumb_signal_handler, NULL, NULL);
g_source_attach(sig_handler_src, context);
*/
- ecore_evas_init();
thumb_dbg("************************************");
thumb_dbg("*** Thumbnail server is running ***");
thumb_dbg("************************************");
- ecore_main_loop_begin();
-
+ g_main_loop_run(g_thumb_server_mainloop);
+
thumb_dbg("Thumbnail server is shutting down...");
g_io_channel_shutdown(channel, FALSE, NULL);