summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS7
-rw-r--r--Makefile.am10
-rw-r--r--configure.ac80
-rw-r--r--data/Makefile.am29
-rw-r--r--data/emotion/checkme2
-rw-r--r--data/ethumb/checkme2
-rw-r--r--data/ethumb/frames/border-0.jpg (renamed from legacy/ethumb/data/frames/images/border-0.jpg)bin542 -> 542 bytes
-rw-r--r--data/ethumb/frames/default.edc (renamed from legacy/ethumb/data/frames/default.edc)0
-rw-r--r--dbus-services/org.enlightenment.Ethumb.service.in (renamed from legacy/ethumb/org.enlightenment.Ethumb.service.in)0
-rw-r--r--doc/main.dox7
-rw-r--r--m4/efl.m413
-rw-r--r--old/ChangeLog.ethumb (renamed from legacy/ethumb/ChangeLog)0
-rw-r--r--old/NEWS.ethumb (renamed from legacy/ethumb/NEWS)0
-rw-r--r--old/README.ethumb (renamed from legacy/ethumb/README)0
-rw-r--r--pc/ethumb.pc.in (renamed from legacy/ethumb/ethumb.pc.in)4
-rw-r--r--pc/ethumb_client.pc.in (renamed from legacy/ethumb/ethumb_client.pc.in)2
-rw-r--r--src/Makefile.am1
-rw-r--r--src/Makefile_Ethumb.am171
-rw-r--r--src/bin/ethumb/ethumb.c (renamed from legacy/ethumb/src/bin/ethumb.c)4
-rw-r--r--src/bin/ethumb/ethumbd.c (renamed from legacy/ethumb/src/bin/ethumbd.c)91
-rw-r--r--src/bin/ethumb/ethumbd_client.c (renamed from legacy/ethumb/src/bin/ethumbd_client.c)6
-rw-r--r--src/bin/ethumb/ethumbd_private.h (renamed from legacy/ethumb/src/bin/ethumbd_private.h)0
-rw-r--r--src/bin/ethumb/ethumbd_slave.c (renamed from legacy/ethumb/src/bin/ethumbd_child.c)34
-rw-r--r--src/lib/edje/edje_edit.c3
-rw-r--r--src/lib/ethumb/Ethumb.h (renamed from legacy/ethumb/src/lib/Ethumb.h)69
-rw-r--r--src/lib/ethumb/Ethumb_Plugin.h (renamed from legacy/ethumb/src/lib/Ethumb_Plugin.h)0
-rw-r--r--src/lib/ethumb/client/Ethumb_Client.h (renamed from legacy/ethumb/src/lib/client/Ethumb_Client.h)1
-rw-r--r--src/lib/ethumb/client/ethumb_client.c (renamed from legacy/ethumb/src/lib/client/ethumb_client.c)57
-rw-r--r--src/lib/ethumb/ethumb.c (renamed from legacy/ethumb/src/lib/ethumb.c)62
-rw-r--r--src/lib/ethumb/ethumb_private.h (renamed from legacy/ethumb/src/lib/ethumb_private.h)0
-rw-r--r--src/lib/ethumb/md5.c (renamed from legacy/ethumb/src/lib/md5.c)0
-rw-r--r--src/lib/ethumb/md5.h (renamed from legacy/ethumb/src/lib/md5.h)0
-rw-r--r--src/modules/ethumb/emotion/emotion.c (renamed from legacy/ethumb/src/plugins/emotion/emotion.c)125
-rw-r--r--src/modules/ethumb/emotion/placeholder.pngbin0 -> 150 bytes
-rw-r--r--src/modules/ethumb/emotion/template.edc (renamed from legacy/ethumb/src/plugins/emotion/template.edc)6
-rw-r--r--src/tests/ethumb/ethumb_dbus.c (renamed from legacy/ethumb/src/tests/ethumb_dbus.c)4
36 files changed, 642 insertions, 148 deletions
diff --git a/AUTHORS b/AUTHORS
index 7ee6c3c..afb94e8 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -257,3 +257,10 @@ Pierre Le Magourou <pierre.lemagourou@openwide.fr>
257Hugo Camboulive <hugo.camboulive@zodiacaerospace.com> 257Hugo Camboulive <hugo.camboulive@zodiacaerospace.com>
258Sohyun Kim <anna1014.kim@samsung.com> 258Sohyun Kim <anna1014.kim@samsung.com>
259Leandro Dorileo <dorileo@profusion.mobi> 259Leandro Dorileo <dorileo@profusion.mobi>
260
261Ethumb
262------
263Rafael Antognolli <antognolli@profusion.mobi>
264Cedric Bail <cedric.bail@free.fr>
265Mikael SANS <sans.mikael@gmail.com>
266Jérôme Pinot <ngc891@gmail.com>
diff --git a/Makefile.am b/Makefile.am
index c0f08f1..f377199 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -62,6 +62,7 @@ old/ChangeLog.eio \
62old/ChangeLog.embryo \ 62old/ChangeLog.embryo \
63old/ChangeLog.emotion \ 63old/ChangeLog.emotion \
64old/ChangeLog.escape \ 64old/ChangeLog.escape \
65old/ChangeLog.ethumb \
65old/ChangeLog.evas \ 66old/ChangeLog.evas \
66old/ChangeLog.evil \ 67old/ChangeLog.evil \
67old/ChangeLog.evil.0 \ 68old/ChangeLog.evil.0 \
@@ -75,6 +76,7 @@ old/NEWS.eio \
75old/NEWS.embryo \ 76old/NEWS.embryo \
76old/NEWS.emotion \ 77old/NEWS.emotion \
77old/NEWS.escape \ 78old/NEWS.escape \
79old/NEWS.ethumb \
78old/NEWS.evas \ 80old/NEWS.evas \
79old/NEWS.evil \ 81old/NEWS.evil \
80old/README.ecore \ 82old/README.ecore \
@@ -89,6 +91,7 @@ old/README.embryo \
89old/README.emotion \ 91old/README.emotion \
90old/README.ephysics \ 92old/README.ephysics \
91old/README.escape \ 93old/README.escape \
94old/README.ethumb \
92old/README.evas \ 95old/README.evas \
93old/README.evil \ 96old/README.evil \
94spec/efl.spec 97spec/efl.spec
@@ -125,7 +128,9 @@ pc/efreet.pc \
125pc/efreet-mime.pc \ 128pc/efreet-mime.pc \
126pc/efreet-trash.pc \ 129pc/efreet-trash.pc \
127pc/edje.pc \ 130pc/edje.pc \
128pc/emotion.pc 131pc/emotion.pc \
132pc/ethumb.pc \
133pc/ethumb_client.pc
129 134
130if BUILD_ENGINE_SOFTWARE_X11 135if BUILD_ENGINE_SOFTWARE_X11
131pkgconfig_DATA += pc/evas-software-x11.pc 136pkgconfig_DATA += pc/evas-software-x11.pc
@@ -216,7 +221,8 @@ endif
216 221
217servicedir = @dbusservicedir@ 222servicedir = @dbusservicedir@
218service_DATA = \ 223service_DATA = \
219dbus-services/org.enlightenment.Efreet.service 224dbus-services/org.enlightenment.Efreet.service \
225dbus-services/org.enlightenment.Ethumb.service
220 226
221 227
222 228
diff --git a/configure.ac b/configure.ac
index 5686564..9035a2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3375,6 +3375,81 @@ EFL_LIB_END([Emotion])
3375#### End of Emotion 3375#### End of Emotion
3376 3376
3377 3377
3378#### Ethumb
3379EFL_LIB_START([Ethumb])
3380
3381### Default values
3382
3383### Additional options to configure
3384
3385### Checks for programs
3386
3387### Checks for libraries
3388EFL_PLATFORM_DEPEND([EINA], [evil])
3389
3390EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eina])
3391EFL_INTERNAL_DEPEND_PKG([ETHUMB], [evas])
3392EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore])
3393EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-evas])
3394EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-file])
3395EFL_INTERNAL_DEPEND_PKG([ETHUMB], [edje])
3396
3397## modules
3398
3399EFL_EVAL_PKGS([ETHUMB])
3400
3401### Checks for header files
3402
3403### Checks for types
3404
3405### Checks for structures
3406
3407### Checks for compiler characteristics
3408
3409### Checks for linker characteristics
3410
3411### Checks for library functions
3412
3413### Check availability
3414
3415EFL_LIB_END([Ethumb])
3416#### End of Ethumb
3417
3418#### Ethumb_Client
3419EFL_LIB_START([Ethumb_Client])
3420
3421### Default values
3422
3423### Additional options to configure
3424
3425### Checks for programs
3426
3427### Checks for libraries
3428EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eina])
3429EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ecore])
3430EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [edbus])
3431EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ethumb])
3432
3433EFL_EVAL_PKGS([ETHUMB_CLIENT])
3434
3435### Checks for header files
3436
3437### Checks for types
3438
3439### Checks for structures
3440
3441### Checks for compiler characteristics
3442
3443### Checks for linker characteristics
3444
3445### Checks for library functions
3446
3447### Check availability
3448
3449EFL_LIB_END([Ethumb_Client])
3450#### End of Ethumb_Client
3451
3452
3378AC_ARG_ENABLE([always-build-examples], 3453AC_ARG_ENABLE([always-build-examples],
3379 [AC_HELP_STRING([--enable-always-build-examples], 3454 [AC_HELP_STRING([--enable-always-build-examples],
3380 [always build examples. @<:@default=disabled@:>@])], 3455 [always build examples. @<:@default=disabled@:>@])],
@@ -3458,7 +3533,10 @@ pc/eeze.pc
3458pc/ephysics.pc 3533pc/ephysics.pc
3459pc/edje.pc 3534pc/edje.pc
3460pc/emotion.pc 3535pc/emotion.pc
3536pc/ethumb.pc
3537pc/ethumb_client.pc
3461dbus-services/org.enlightenment.Efreet.service 3538dbus-services/org.enlightenment.Efreet.service
3539dbus-services/org.enlightenment.Ethumb.service
3462$po_makefile_in 3540$po_makefile_in
3463]) 3541])
3464 3542
@@ -3665,6 +3743,8 @@ echo "Eeze...................: ${efl_lib_optional_eeze} (tizen: ${want_tizen})"
3665echo "EPhysics...............: ${efl_lib_optional_ephysics}" 3743echo "EPhysics...............: ${efl_lib_optional_ephysics}"
3666echo "Edje...................: yes (physics=${efl_lib_optional_ephysics}, multisense=${want_multisense})" 3744echo "Edje...................: yes (physics=${efl_lib_optional_ephysics}, multisense=${want_multisense})"
3667echo "Emotion................: yes (gstreamer=${have_emotion_module_gstreamer} (xoverlay=${have_gst_xoverlay}), xine=${have_emotion_module_xine}, generic=${have_emotion_module_generic}, v4l2=${want_v4l2})" 3745echo "Emotion................: yes (gstreamer=${have_emotion_module_gstreamer} (xoverlay=${have_gst_xoverlay}), xine=${have_emotion_module_xine}, generic=${have_emotion_module_generic}, v4l2=${want_v4l2})"
3746echo "Ethumb.................: yes"
3747echo "Ethumb_Client..........: yes"
3668echo "Tests..................: ${build_tests}" 3748echo "Tests..................: ${build_tests}"
3669 3749
3670echo "Examples...............: make examples" 3750echo "Examples...............: make examples"
diff --git a/data/Makefile.am b/data/Makefile.am
index 5104f31..be0a463 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -60,9 +60,38 @@ edje/vim/snippets/edc.snippets \
60edje/vim/syntax/edc.vim \ 60edje/vim/syntax/edc.vim \
61edje/vim/syntax/embryo.vim 61edje/vim/syntax/embryo.vim
62 62
63# Helper for people using EDJ
64EDJE_CC = EFL_RUN_IN_TREE=1 $(top_builddir)/src/bin/edje/edje_cc
65EDJE_CC_FLAGS_VERBOSE_0 =
66EDJE_CC_FLAGS_VERBOSE_1 = -v
67EDJE_CC_FLAGS = $(EDJE_CC_FLAGS_VERBOSE_$(V))
68
69AM_V_EDJ = $(am__v_EDJ_$(V))
70am__v_EDJ_ = $(am__v_EDJ_$(AM_DEFAULT_VERBOSITY))
71am__v_EDJ_0 = @echo " EDJ " $@;
72
63 73
64######################################################################## 74########################################################################
65# Emotion 75# Emotion
66emotionfilesdir = $(datadir)/emotion 76emotionfilesdir = $(datadir)/emotion
67emotionfiles_DATA = emotion/checkme 77emotionfiles_DATA = emotion/checkme
68EXTRA_DIST += $(emotionfiles_DATA) 78EXTRA_DIST += $(emotionfiles_DATA)
79
80########################################################################
81# Ethumb
82ethumbfilesdir = $(datadir)/ethumb
83ethumbfiles_DATA = ethumb/checkme
84EXTRA_DIST += $(ethumbfiles_DATA)
85
86ethumbframesdir = $(datadir)/ethumb/frames
87ethumbframes_DATA = \
88ethumb/frames/default.edj
89
90ethumb/frames/default.edj: ethumb/frames/default.edc
91 @$(MKDIR_P) ethumb/frames/
92 $(AM_V_EDJ)$(EDJE_CC) $(EDJE_CC_FLAGS) -id $(srcdir)/ethumb/frames/ $< $@
93
94
95EXTRA_DIST += \
96ethumb/frames/default.edc \
97ethumb/frames/border-0.jpg
diff --git a/data/emotion/checkme b/data/emotion/checkme
index e2f46e1..f1e0637 100644
--- a/data/emotion/checkme
+++ b/data/emotion/checkme
@@ -1,2 +1,2 @@
1This is just a test file used to help emotion determine its prefix 1This is just a test file used to help ethumb determine its prefix
2location. 2location.
diff --git a/data/ethumb/checkme b/data/ethumb/checkme
new file mode 100644
index 0000000..987063d
--- /dev/null
+++ b/data/ethumb/checkme
@@ -0,0 +1,2 @@
1This is just a test file used to help evas determine its prefix
2location.
diff --git a/legacy/ethumb/data/frames/images/border-0.jpg b/data/ethumb/frames/border-0.jpg
index ee66879..ee66879 100644
--- a/legacy/ethumb/data/frames/images/border-0.jpg
+++ b/data/ethumb/frames/border-0.jpg
Binary files differ
diff --git a/legacy/ethumb/data/frames/default.edc b/data/ethumb/frames/default.edc
index 5341263..5341263 100644
--- a/legacy/ethumb/data/frames/default.edc
+++ b/data/ethumb/frames/default.edc
diff --git a/legacy/ethumb/org.enlightenment.Ethumb.service.in b/dbus-services/org.enlightenment.Ethumb.service.in
index ece2e03..ece2e03 100644
--- a/legacy/ethumb/org.enlightenment.Ethumb.service.in
+++ b/dbus-services/org.enlightenment.Ethumb.service.in
diff --git a/doc/main.dox b/doc/main.dox
index d20d547..9faf149 100644
--- a/doc/main.dox
+++ b/doc/main.dox
@@ -22,6 +22,7 @@
22 * @li @ref ephysics_main physics simulation integration and visual effects. 22 * @li @ref ephysics_main physics simulation integration and visual effects.
23 * @li @ref edje_main layout and theme library with super powers. 23 * @li @ref edje_main layout and theme library with super powers.
24 * @li @ref emotion_main to play music and videos. 24 * @li @ref emotion_main to play music and videos.
25 * @li @ref ethumb_main to generate thumbnail images of files.
25 * 26 *
26 */ 27 */
27 28
@@ -232,3 +233,9 @@
232 * 233 *
233 * @brief Plays music and videos. 234 * @brief Plays music and videos.
234 */ 235 */
236
237/**
238 * @defgroup Ethumb
239 *
240 * @brief Generates thumbnail images of files.
241 */
diff --git a/m4/efl.m4 b/m4/efl.m4
index a891203..7ed137f 100644
--- a/m4/efl.m4
+++ b/m4/efl.m4
@@ -16,7 +16,18 @@ dnl Adds a pkg-config dependency on another EFL.
16AC_DEFUN([EFL_INTERNAL_DEPEND_PKG], 16AC_DEFUN([EFL_INTERNAL_DEPEND_PKG],
17[dnl 17[dnl
18m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl 18m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
19requirements_pc_[]m4_defn([DOWNEFL])="$2 >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}" 19dnl TODO: we need to fix the package config names for 2.0
20dnl TODO: and make them uniform in scheme.
21depname="$2"
22case "${depname}" in
23 edbus)
24 depname="edbus2"
25 ;;
26 ethumb-client)
27 depname="ethumb_client"
28 ;;
29esac
30requirements_pc_[]m4_defn([DOWNEFL])="${depname} >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}"
20m4_popdef([DOWNEFL])dnl 31m4_popdef([DOWNEFL])dnl
21]) 32])
22 33
diff --git a/legacy/ethumb/ChangeLog b/old/ChangeLog.ethumb
index 2470e87..2470e87 100644
--- a/legacy/ethumb/ChangeLog
+++ b/old/ChangeLog.ethumb
diff --git a/legacy/ethumb/NEWS b/old/NEWS.ethumb
index bf716c6..bf716c6 100644
--- a/legacy/ethumb/NEWS
+++ b/old/NEWS.ethumb
diff --git a/legacy/ethumb/README b/old/README.ethumb
index 3494520..3494520 100644
--- a/legacy/ethumb/README
+++ b/old/README.ethumb
diff --git a/legacy/ethumb/ethumb.pc.in b/pc/ethumb.pc.in
index 233e2ed..b2d935b 100644
--- a/legacy/ethumb/ethumb.pc.in
+++ b/pc/ethumb.pc.in
@@ -2,10 +2,12 @@ prefix=@prefix@
2exec_prefix=@exec_prefix@ 2exec_prefix=@exec_prefix@
3libdir=@libdir@ 3libdir=@libdir@
4includedir=@includedir@ 4includedir=@includedir@
5modules=@libdir@/ethumb/modules
6module_arch=@MODULE_ARCH@
5 7
6Name: ethumb 8Name: ethumb
7Description: Thumbnail Generator Library 9Description: Thumbnail Generator Library
8Requires: @requirement_ethumb@
9Version: @VERSION@ 10Version: @VERSION@
11Requires.private: @requirements_pc_ethumb@
10Libs: -L${libdir} -lethumb 12Libs: -L${libdir} -lethumb
11Cflags: -I${includedir}/ethumb-@VMAJ@ 13Cflags: -I${includedir}/ethumb-@VMAJ@
diff --git a/legacy/ethumb/ethumb_client.pc.in b/pc/ethumb_client.pc.in
index c9eebc6..796cae6 100644
--- a/legacy/ethumb/ethumb_client.pc.in
+++ b/pc/ethumb_client.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
5 5
6Name: ethumb_client 6Name: ethumb_client
7Description: Thumbnail Client Library 7Description: Thumbnail Client Library
8Requires: @requirement_ethumb_client@
9Version: @VERSION@ 8Version: @VERSION@
9Requires.private: @requirements_pc_ethumb_client@
10Libs: -L${libdir} -lethumb_client 10Libs: -L${libdir} -lethumb_client
11Cflags: -I${includedir}/ethumb-@VMAJ@ 11Cflags: -I${includedir}/ethumb-@VMAJ@
diff --git a/src/Makefile.am b/src/Makefile.am
index e22f4c0..5ad8b97 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -43,6 +43,7 @@ include Makefile_Eeze.am
43include Makefile_EPhysics.am 43include Makefile_EPhysics.am
44include Makefile_Edje.am 44include Makefile_Edje.am
45include Makefile_Emotion.am 45include Makefile_Emotion.am
46include Makefile_Ethumb.am
46 47
47.PHONY: benchmark examples 48.PHONY: benchmark examples
48 49
diff --git a/src/Makefile_Ethumb.am b/src/Makefile_Ethumb.am
new file mode 100644
index 0000000..3b0e15d
--- /dev/null
+++ b/src/Makefile_Ethumb.am
@@ -0,0 +1,171 @@
1### Library
2
3lib_LTLIBRARIES += \
4lib/ethumb/libethumb.la \
5lib/ethumb/client/libethumb_client.la
6
7ETHUMB_COMMON_CPPFLAGS = \
8-I$(top_srcdir)/src/lib/eina \
9-I$(top_builddir)/src/lib/eina \
10-I$(top_srcdir)/src/lib/eo \
11-I$(top_builddir)/src/lib/eo \
12-I$(top_srcdir)/src/lib/ecore \
13-I$(top_builddir)/src/lib/ecore \
14-I$(top_srcdir)/src/lib/ecore_evas \
15-I$(top_builddir)/src/lib/ecore_evas \
16-I$(top_srcdir)/src/lib/ecore_file \
17-I$(top_builddir)/src/lib/ecore_file \
18-I$(top_srcdir)/src/lib/evas \
19-I$(top_builddir)/src/lib/evas \
20-I$(top_srcdir)/src/lib/edje \
21-I$(top_builddir)/src/lib/edje \
22-I$(top_srcdir)/src/lib/ethumb \
23-I$(top_builddir)/src/lib/ethumb \
24@EFL_COV_CFLAGS@ \
25@ETHUMB_CFLAGS@ \
26@USE_EVIL_CFLAGS@
27
28ETHUMB_COMMON_LDADD = \
29lib/eina/libeina.la \
30lib/eo/libeo.la \
31lib/ecore/libecore.la \
32lib/ecore_evas/libecore_evas.la \
33lib/ecore_file/libecore_file.la \
34lib/evas/libevas.la \
35lib/edje/libedje.la \
36@EFL_COV_LIBS@ \
37@USE_EVIL_LIBS@
38
39installed_ethumbmainheadersdir = $(includedir)/ethumb-@VMAJ@
40dist_installed_ethumbmainheaders_DATA = \
41lib/ethumb/Ethumb.h \
42lib/ethumb/client/Ethumb_Client.h
43
44# libethumb.la
45lib_ethumb_libethumb_la_SOURCES = \
46lib/ethumb/Ethumb_Plugin.h \
47lib/ethumb/ethumb_private.h \
48lib/ethumb/md5.h \
49lib/ethumb/ethumb.c \
50lib/ethumb/md5.c
51
52ETHUMB_COMMON_LIBADD = $(ETHUMB_COMMON_LDADD) @ETHUMB_LIBS@
53ETHUMB_COMMON_LDADD += @ETHUMB_LDFLAGS@
54ETHUMB_COMMON_USER_LIBADD = $(ETHUMB_COMMON_LIBADD) lib/ethumb/libethumb.la
55ETHUMB_COMMON_USER_LDADD = $(ETHUMB_COMMON_LDADD) lib/ethumb/libethumb.la
56
57lib_ethumb_libethumb_la_CPPFLAGS = \
58$(ETHUMB_COMMON_CPPFLAGS) \
59-DPACKAGE_BIN_DIR=\"$(bindir)\" \
60-DPACKAGE_LIB_DIR=\"$(libdir)\" \
61-DPACKAGE_DATA_DIR=\"$(datadir)/ethumb\" \
62-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\" \
63-DEFL_ETHUMB_BUILD
64
65lib_ethumb_libethumb_la_LIBADD = $(ETHUMB_COMMON_LIBADD)
66lib_ethumb_libethumb_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
67
68
69# libethumb_client.la
70lib_ethumb_client_libethumb_client_la_SOURCES = \
71lib/ethumb/client/ethumb_client.c
72
73lib_ethumb_client_libethumb_client_la_CPPFLAGS = \
74$(ETHUMB_COMMON_CPPFLAGS) \
75-I$(top_srcdir)/src/lib/edbus \
76-I$(top_builddir)/src/lib/edbus \
77-I$(top_srcdir)/src/lib/ethumb/client \
78-I$(top_builddir)/src/lib/ethumb/client \
79-DEFL_ETHUMB_BUILD
80
81lib_ethumb_client_libethumb_client_la_LIBADD = \
82$(ETHUMB_COMMON_USER_LIBADD) \
83lib/edbus/libedbus2.la
84lib_ethumb_client_libethumb_client_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
85
86## Modules
87
88# Emotion
89ethumbmoduleemotiondir = $(libdir)/ethumb/modules/emotion/$(MODULE_ARCH)
90ethumbmoduleemotion_LTLIBRARIES = modules/ethumb/emotion/module.la
91modules_ethumb_emotion_module_la_SOURCES = \
92modules/ethumb/emotion/emotion.c
93modules_ethumb_emotion_module_la_CPPFLAGS = \
94$(ETHUMB_COMMON_CPPFLAGS) \
95-I$(top_srcdir)/src/lib/eet \
96-I$(top_builddir)/src/lib/eet \
97-I$(top_srcdir)/src/lib/emotion \
98-I$(top_builddir)/src/lib/emotion \
99-DPACKAGE_BIN_DIR=\"$(bindir)\" \
100-DPACKAGE_LIB_DIR=\"$(libdir)\" \
101-DPACKAGE_DATA_DIR=\"$(datadir)/ethumb\" \
102-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\"
103
104modules_ethumb_emotion_module_la_LIBADD = \
105$(ETHUMB_COMMON_USER_LIBADD) \
106lib/eet/libeet.la \
107lib/emotion/libemotion.la
108
109modules_ethumb_emotion_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
110modules_ethumb_emotion_module_la_LIBTOOLFLAGS = --tag=disable-static
111
112modules/ethumb/emotion/template.edj: modules/ethumb/emotion/template.edc modules/ethumb/emotion/placeholder.png bin/edje/edje_cc
113 @$(MKDIR_P) modules/ethumb/emotion
114 $(AM_V_EDJ)$(EDJE_CC) $(EDJE_CC_FLAGS) -id $(srcdir)/modules/ethumb/emotion $< $@
115
116ethumbmoduleemotion_DATA = modules/ethumb/emotion/template.edj
117
118EXTRA_DIST += \
119modules/ethumb/emotion/template.edc \
120modules/ethumb/emotion/placeholder.png
121
122
123### Binary
124
125bin_PROGRAMS += \
126bin/ethumb/ethumb \
127bin/ethumb/ethumbd \
128bin/ethumb/ethumbd_client
129
130ethumbinternal_bindir=$(libdir)/ethumb/utils/$(MODULE_ARCH)
131ethumbinternal_bin_PROGRAMS = \
132bin/ethumb/ethumbd_slave
133
134bin_ethumb_ethumb_SOURCES = bin/ethumb/ethumb.c
135bin_ethumb_ethumb_CPPFLAGS = $(ETHUMB_COMMON_CPPFLAGS)
136bin_ethumb_ethumb_LDADD = $(ETHUMB_COMMON_USER_LDADD)
137
138# TODO: review why ethumd (master) links to libethumb! shouldn't
139bin_ethumb_ethumbd_SOURCES = \
140bin/ethumb/ethumbd_private.h \
141bin/ethumb/ethumbd.c
142bin_ethumb_ethumbd_CPPFLAGS = \
143$(ETHUMB_COMMON_CPPFLAGS) \
144-I$(top_srcdir)/src/lib/edbus \
145-I$(top_builddir)/src/lib/edbus \
146-DPACKAGE_BIN_DIR=\"$(bindir)\" \
147-DPACKAGE_LIB_DIR=\"$(libdir)\" \
148-DPACKAGE_DATA_DIR=\"$(datadir)/ethumb\" \
149-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\"
150bin_ethumb_ethumbd_LDADD = \
151$(ETHUMB_COMMON_USER_LDADD) \
152lib/edbus/libedbus2.la
153
154bin_ethumb_ethumbd_client_SOURCES = \
155bin/ethumb/ethumbd_client.c
156bin_ethumb_ethumbd_client_CPPFLAGS = \
157$(ETHUMB_COMMON_CPPFLAGS) \
158-I$(top_srcdir)/src/lib/edbus \
159-I$(top_builddir)/src/lib/edbus \
160-I$(top_srcdir)/src/lib/ethumb/client \
161-I$(top_builddir)/src/lib/ethumb/client
162bin_ethumb_ethumbd_client_LDADD = \
163$(ETHUMB_COMMON_USER_LDADD) \
164lib/ethumb/client/libethumb_client.la \
165lib/edbus/libedbus2.la
166
167bin_ethumb_ethumbd_slave_SOURCES = \
168bin/ethumb/ethumbd_private.h \
169bin/ethumb/ethumbd_slave.c
170bin_ethumb_ethumbd_slave_CPPFLAGS = $(ETHUMB_COMMON_CPPFLAGS)
171bin_ethumb_ethumbd_slave_LDADD = $(ETHUMB_COMMON_USER_LDADD)
diff --git a/legacy/ethumb/src/bin/ethumb.c b/src/bin/ethumb/ethumb.c
index 12750e0..27d50df 100644
--- a/legacy/ethumb/src/bin/ethumb.c
+++ b/src/bin/ethumb/ethumb.c
@@ -43,7 +43,7 @@ struct frame
43}; 43};
44 44
45static unsigned char 45static unsigned char
46_ethumb_getopt_callback_frame_parse(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc __UNUSED__, const char *str, void *data __UNUSED__, Ecore_Getopt_Value *storage) 46_ethumb_getopt_callback_frame_parse(const Ecore_Getopt *parser EINA_UNUSED, const Ecore_Getopt_Desc *desc EINA_UNUSED, const char *str, void *data EINA_UNUSED, Ecore_Getopt_Value *storage)
47{ 47{
48 struct frame *f = (struct frame *)storage->ptrp; 48 struct frame *f = (struct frame *)storage->ptrp;
49 const char *tfile, *tgroup, *tswallow, *base, *sep; 49 const char *tfile, *tgroup, *tswallow, *base, *sep;
@@ -135,7 +135,7 @@ _thumb_report(const char *mode, Ethumb *e)
135} 135}
136 136
137static void 137static void
138_finished_thumb( void *data __UNUSED__, Ethumb *e, Eina_Bool success) 138_finished_thumb( void *data EINA_UNUSED, Ethumb *e, Eina_Bool success)
139{ 139{
140 const char *mode = success ? "GENERATED" : "FAILED"; 140 const char *mode = success ? "GENERATED" : "FAILED";
141 _thumb_report(mode, e); 141 _thumb_report(mode, e);
diff --git a/legacy/ethumb/src/bin/ethumbd.c b/src/bin/ethumb/ethumbd.c
index cebde0f..f0f0d9b 100644
--- a/legacy/ethumb/src/bin/ethumbd.c
+++ b/src/bin/ethumb/ethumbd.c
@@ -57,6 +57,7 @@ static const char _ethumb_dbus_interface[] = "org.enlightenment.Ethumb";
57static const char _ethumb_dbus_objects_interface[] = "org.enlightenment.Ethumb.objects"; 57static const char _ethumb_dbus_objects_interface[] = "org.enlightenment.Ethumb.objects";
58static const char _ethumb_dbus_path[] = "/org/enlightenment/Ethumb"; 58static const char _ethumb_dbus_path[] = "/org/enlightenment/Ethumb";
59 59
60static Eina_Prefix *_pfx = NULL;
60static int _log_domain = -1; 61static int _log_domain = -1;
61 62
62typedef struct _Ethumbd_Setup Ethumbd_Setup; 63typedef struct _Ethumbd_Setup Ethumbd_Setup;
@@ -453,7 +454,7 @@ _ethumbd_slave_alloc_cmd(Ethumbd *ed, int ssize, char *sdata)
453} 454}
454 455
455static Eina_Bool 456static Eina_Bool
456_ethumbd_slave_data_read_cb(void *data, int type __UNUSED__, void *event) 457_ethumbd_slave_data_read_cb(void *data, int type EINA_UNUSED, void *event)
457{ 458{
458 Ethumbd *ed = data; 459 Ethumbd *ed = data;
459 Ecore_Exe_Event_Data *ev = event; 460 Ecore_Exe_Event_Data *ev = event;
@@ -499,7 +500,7 @@ _ethumbd_slave_data_read_cb(void *data, int type __UNUSED__, void *event)
499} 500}
500 501
501static Eina_Bool 502static Eina_Bool
502_ethumbd_slave_del_cb(void *data, int type __UNUSED__, void *event) 503_ethumbd_slave_del_cb(void *data, int type EINA_UNUSED, void *event)
503{ 504{
504 Ethumbd *ed = data; 505 Ethumbd *ed = data;
505 Ecore_Exe_Event_Del *ev = event; 506 Ecore_Exe_Event_Del *ev = event;
@@ -885,7 +886,6 @@ _name_owner_changed_cb(void *context, const char *bus, const char *old_id, const
885{ 886{
886 Ethumbd_Object_Data *odata = context; 887 Ethumbd_Object_Data *odata = context;
887 Ethumbd *ed = odata->ed; 888 Ethumbd *ed = odata->ed;
888 Ethumbd_Queue *q = &ed->queue;
889 889
890 DBG("NameOwnerChanged: name = %s, from = %s, to = %s", bus, old_id, new_id); 890 DBG("NameOwnerChanged: name = %s, from = %s, to = %s", bus, old_id, new_id);
891 if (new_id[0]) 891 if (new_id[0])
@@ -963,7 +963,8 @@ _ethumb_dbus_get_bytearray(EDBus_Message_Iter *iter)
963 if (!edbus_message_iter_fixed_array_get(iter, 'y', &result, 963 if (!edbus_message_iter_fixed_array_get(iter, 'y', &result,
964 &length)) 964 &length))
965 { 965 {
966 ERR("not an byte array element."); 966 ERR("not byte array element. Signature: %s",
967 edbus_message_iter_signature_get(iter));
967 return NULL; 968 return NULL;
968 } 969 }
969 970
@@ -981,7 +982,7 @@ _ethumb_dbus_append_bytearray(EDBus_Message_Iter *parent, EDBus_Message_Iter *ar
981 if (!string) 982 if (!string)
982 string = ""; 983 string = "";
983 984
984 size = strlen(string); 985 size = strlen(string) + 1;
985 for (i = 0; i < size; i++) 986 for (i = 0; i < size; i++)
986 edbus_message_iter_basic_append(array, 'y', string[i]); 987 edbus_message_iter_basic_append(array, 'y', string[i]);
987 edbus_message_iter_container_close(parent, array); 988 edbus_message_iter_container_close(parent, array);
@@ -1012,6 +1013,9 @@ _ethumb_dbus_queue_add_cb(const EDBus_Service_Interface *iface, const EDBus_Mess
1012 1013
1013 if (!file) 1014 if (!file)
1014 { 1015 {
1016 eina_stringshare_del(key);
1017 eina_stringshare_del(thumb);
1018 eina_stringshare_del(thumb_key);
1015 ERR("no filename given."); 1019 ERR("no filename given.");
1016 goto end; 1020 goto end;
1017 } 1021 }
@@ -1019,6 +1023,10 @@ _ethumb_dbus_queue_add_cb(const EDBus_Service_Interface *iface, const EDBus_Mess
1019 odata = edbus_service_object_data_get(iface, ODATA); 1023 odata = edbus_service_object_data_get(iface, ODATA);
1020 if (!odata) 1024 if (!odata)
1021 { 1025 {
1026 eina_stringshare_del(file);
1027 eina_stringshare_del(key);
1028 eina_stringshare_del(thumb);
1029 eina_stringshare_del(thumb_key);
1022 ERR("could not get dbus_object data."); 1030 ERR("could not get dbus_object data.");
1023 goto end; 1031 goto end;
1024 } 1032 }
@@ -1159,7 +1167,7 @@ _ethumb_dbus_delete_cb(const EDBus_Service_Interface *iface, const EDBus_Message
1159} 1167}
1160 1168
1161static int 1169static int
1162_ethumb_dbus_fdo_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1170_ethumb_dbus_fdo_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1163{ 1171{
1164 int fdo; 1172 int fdo;
1165 1173
@@ -1177,7 +1185,7 @@ _ethumb_dbus_fdo_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *var
1177} 1185}
1178 1186
1179static int 1187static int
1180_ethumb_dbus_size_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1188_ethumb_dbus_size_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1181{ 1189{
1182 EDBus_Message_Iter *st; 1190 EDBus_Message_Iter *st;
1183 int w, h; 1191 int w, h;
@@ -1198,7 +1206,7 @@ _ethumb_dbus_size_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *va
1198} 1206}
1199 1207
1200static int 1208static int
1201_ethumb_dbus_format_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1209_ethumb_dbus_format_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1202{ 1210{
1203 int format; 1211 int format;
1204 1212
@@ -1216,7 +1224,7 @@ _ethumb_dbus_format_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *
1216} 1224}
1217 1225
1218static int 1226static int
1219_ethumb_dbus_aspect_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1227_ethumb_dbus_aspect_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1220{ 1228{
1221 int aspect; 1229 int aspect;
1222 1230
@@ -1234,7 +1242,7 @@ _ethumb_dbus_aspect_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *
1234} 1242}
1235 1243
1236static int 1244static int
1237_ethumb_dbus_orientation_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1245_ethumb_dbus_orientation_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1238{ 1246{
1239 int orientation; 1247 int orientation;
1240 1248
@@ -1252,7 +1260,7 @@ _ethumb_dbus_orientation_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_I
1252} 1260}
1253 1261
1254static int 1262static int
1255_ethumb_dbus_crop_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1263_ethumb_dbus_crop_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1256{ 1264{
1257 EDBus_Message_Iter *st; 1265 EDBus_Message_Iter *st;
1258 double x, y; 1266 double x, y;
@@ -1273,7 +1281,7 @@ _ethumb_dbus_crop_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *va
1273} 1281}
1274 1282
1275static int 1283static int
1276_ethumb_dbus_quality_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1284_ethumb_dbus_quality_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1277{ 1285{
1278 int quality; 1286 int quality;
1279 1287
@@ -1292,7 +1300,7 @@ _ethumb_dbus_quality_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter
1292 1300
1293 1301
1294static int 1302static int
1295_ethumb_dbus_compress_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1303_ethumb_dbus_compress_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1296{ 1304{
1297 int compress; 1305 int compress;
1298 1306
@@ -1310,7 +1318,7 @@ _ethumb_dbus_compress_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter
1310} 1318}
1311 1319
1312static int 1320static int
1313_ethumb_dbus_frame_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1321_ethumb_dbus_frame_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1314{ 1322{
1315 EDBus_Message_Iter *_struct, *file_iter, *group_iter, *swallow_iter; 1323 EDBus_Message_Iter *_struct, *file_iter, *group_iter, *swallow_iter;
1316 const char *file, *group, *swallow; 1324 const char *file, *group, *swallow;
@@ -1328,15 +1336,15 @@ _ethumb_dbus_frame_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *v
1328 swallow = _ethumb_dbus_get_bytearray(swallow_iter); 1336 swallow = _ethumb_dbus_get_bytearray(swallow_iter);
1329 DBG("setting frame to \"%s:%s:%s\"", file, group, swallow); 1337 DBG("setting frame to \"%s:%s:%s\"", file, group, swallow);
1330 request->setup.flags.frame = 1; 1338 request->setup.flags.frame = 1;
1331 request->setup.theme_file = eina_stringshare_add(file); 1339 request->setup.theme_file = file;
1332 request->setup.group = eina_stringshare_add(group); 1340 request->setup.group = group;
1333 request->setup.swallow = eina_stringshare_add(swallow); 1341 request->setup.swallow = swallow;
1334 1342
1335 return 1; 1343 return 1;
1336} 1344}
1337 1345
1338static int 1346static int
1339_ethumb_dbus_directory_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1347_ethumb_dbus_directory_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1340{ 1348{
1341 const char *directory; 1349 const char *directory;
1342 EDBus_Message_Iter *array; 1350 EDBus_Message_Iter *array;
@@ -1350,13 +1358,13 @@ _ethumb_dbus_directory_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Ite
1350 directory = _ethumb_dbus_get_bytearray(array); 1358 directory = _ethumb_dbus_get_bytearray(array);
1351 DBG("setting directory to: %s", directory); 1359 DBG("setting directory to: %s", directory);
1352 request->setup.flags.directory = 1; 1360 request->setup.flags.directory = 1;
1353 request->setup.directory = eina_stringshare_add(directory); 1361 request->setup.directory = directory;
1354 1362
1355 return 1; 1363 return 1;
1356} 1364}
1357 1365
1358static int 1366static int
1359_ethumb_dbus_category_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1367_ethumb_dbus_category_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1360{ 1368{
1361 const char *category; 1369 const char *category;
1362 EDBus_Message_Iter *array; 1370 EDBus_Message_Iter *array;
@@ -1370,13 +1378,13 @@ _ethumb_dbus_category_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter
1370 category = _ethumb_dbus_get_bytearray(array); 1378 category = _ethumb_dbus_get_bytearray(array);
1371 DBG("setting category to: %s", category); 1379 DBG("setting category to: %s", category);
1372 request->setup.flags.category = 1; 1380 request->setup.flags.category = 1;
1373 request->setup.category = eina_stringshare_add(category); 1381 request->setup.category = category;
1374 1382
1375 return 1; 1383 return 1;
1376} 1384}
1377 1385
1378static int 1386static int
1379_ethumb_dbus_video_time_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1387_ethumb_dbus_video_time_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1380{ 1388{
1381 double video_time; 1389 double video_time;
1382 1390
@@ -1394,7 +1402,7 @@ _ethumb_dbus_video_time_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_It
1394} 1402}
1395 1403
1396static int 1404static int
1397_ethumb_dbus_video_start_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1405_ethumb_dbus_video_start_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1398{ 1406{
1399 double video_start; 1407 double video_start;
1400 1408
@@ -1412,7 +1420,7 @@ _ethumb_dbus_video_start_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_I
1412} 1420}
1413 1421
1414static int 1422static int
1415_ethumb_dbus_video_interval_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1423_ethumb_dbus_video_interval_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1416{ 1424{
1417 double video_interval; 1425 double video_interval;
1418 1426
@@ -1429,7 +1437,7 @@ _ethumb_dbus_video_interval_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Messag
1429} 1437}
1430 1438
1431static int 1439static int
1432_ethumb_dbus_video_ntimes_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1440_ethumb_dbus_video_ntimes_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1433{ 1441{
1434 unsigned int video_ntimes; 1442 unsigned int video_ntimes;
1435 1443
@@ -1447,7 +1455,7 @@ _ethumb_dbus_video_ntimes_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_
1447} 1455}
1448 1456
1449static int 1457static int
1450_ethumb_dbus_video_fps_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1458_ethumb_dbus_video_fps_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1451{ 1459{
1452 unsigned int video_fps; 1460 unsigned int video_fps;
1453 1461
@@ -1465,7 +1473,7 @@ _ethumb_dbus_video_fps_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Ite
1465} 1473}
1466 1474
1467static int 1475static int
1468_ethumb_dbus_document_page_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1476_ethumb_dbus_document_page_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
1469{ 1477{
1470 unsigned int document_page; 1478 unsigned int document_page;
1471 1479
@@ -1542,7 +1550,6 @@ _ethumb_dbus_ethumb_setup_cb(const EDBus_Service_Interface *iface, const EDBus_M
1542 Ethumbd_Object *eobject; 1550 Ethumbd_Object *eobject;
1543 Ethumbd_Request *request; 1551 Ethumbd_Request *request;
1544 Eina_Bool r = EINA_FALSE; 1552 Eina_Bool r = EINA_FALSE;
1545 int atype;
1546 EDBus_Message_Iter *array; 1553 EDBus_Message_Iter *array;
1547 EDBus_Message_Iter *data; 1554 EDBus_Message_Iter *data;
1548 1555
@@ -1568,7 +1575,7 @@ _ethumb_dbus_ethumb_setup_cb(const EDBus_Service_Interface *iface, const EDBus_M
1568 r = EINA_TRUE; 1575 r = EINA_TRUE;
1569 while (edbus_message_iter_get_and_next(array, 'r', &data) && r) 1576 while (edbus_message_iter_get_and_next(array, 'r', &data) && r)
1570 { 1577 {
1571 if (!_ethumb_dbus_ethumb_setup_parse_element(eobject, data, request)); 1578 if (!_ethumb_dbus_ethumb_setup_parse_element(eobject, data, request))
1572 r = EINA_FALSE; 1579 r = EINA_FALSE;
1573 } 1580 }
1574 1581
@@ -1610,12 +1617,11 @@ static const EDBus_Service_Interface_Desc server_desc = {
1610}; 1617};
1611 1618
1612static void 1619static void
1613_ethumb_dbus_request_name_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending) 1620_ethumb_dbus_request_name_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
1614{ 1621{
1615 EDBus_Service_Interface *iface; 1622 EDBus_Service_Interface *iface;
1616 const char *errname, *errmsg; 1623 const char *errname, *errmsg;
1617 Ethumbd *ed = data; 1624 Ethumbd *ed = data;
1618 int r;
1619 1625
1620 if (edbus_message_error_get(msg, &errname, &errmsg)) 1626 if (edbus_message_error_get(msg, &errname, &errmsg))
1621 { 1627 {
@@ -1654,11 +1660,15 @@ _ethumb_dbus_finish(Ethumbd *ed)
1654static Eina_Bool 1660static Eina_Bool
1655_ethumbd_slave_spawn(Ethumbd_Slave *slave, Ethumbd *ed) 1661_ethumbd_slave_spawn(Ethumbd_Slave *slave, Ethumbd *ed)
1656{ 1662{
1663 char buf[PATH_MAX];
1664
1657 slave->bufcmd = NULL; 1665 slave->bufcmd = NULL;
1658 slave->scmd = 0; 1666 slave->scmd = 0;
1659 1667
1660 slave->exe = ecore_exe_pipe_run( 1668 snprintf(buf, sizeof(buf), "%s/ethumb/utils/"MODULE_ARCH"/ethumbd_slave",
1661 ETHUMB_LIBEXEC_DIR"/ethumbd_slave", 1669 eina_prefix_lib_get(_pfx));
1670
1671 slave->exe = ecore_exe_pipe_run(buf,
1662 ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_WRITE, ed); 1672 ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_WRITE, ed);
1663 if (!slave->exe) 1673 if (!slave->exe)
1664 { 1674 {
@@ -1691,11 +1701,22 @@ main(int argc, char *argv[])
1691 if (_log_domain < 0) 1701 if (_log_domain < 0)
1692 { 1702 {
1693 EINA_LOG_CRIT("could not register log domain 'ethumbd'"); 1703 EINA_LOG_CRIT("could not register log domain 'ethumbd'");
1694 exit_value = -7; 1704 exit_value = -8;
1695 goto finish; 1705 goto finish;
1696 } 1706 }
1697 } 1707 }
1698 1708
1709 _pfx = eina_prefix_new(argv[0], ethumb_init,
1710 "ETHUMB", "ethumb", "checkme",
1711 PACKAGE_BIN_DIR, PACKAGE_LIB_DIR,
1712 PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
1713 if (!_pfx)
1714 {
1715 ERR("Could not get ethumb installation prefix.");
1716 exit_value = -7;
1717 goto finish;
1718 }
1719
1699 ed.data_cb = ecore_event_handler_add(ECORE_EXE_EVENT_DATA, 1720 ed.data_cb = ecore_event_handler_add(ECORE_EXE_EVENT_DATA,
1700 _ethumbd_slave_data_read_cb, &ed); 1721 _ethumbd_slave_data_read_cb, &ed);
1701 ed.del_cb = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, 1722 ed.del_cb = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
@@ -1773,6 +1794,8 @@ main(int argc, char *argv[])
1773 finish: 1794 finish:
1774 if (ed.slave.exe) 1795 if (ed.slave.exe)
1775 ecore_exe_quit(ed.slave.exe); 1796 ecore_exe_quit(ed.slave.exe);
1797
1798 if (_pfx) eina_prefix_free(_pfx);
1776 ethumb_shutdown(); 1799 ethumb_shutdown();
1777 eina_init(); 1800 eina_init();
1778 ecore_shutdown(); 1801 ecore_shutdown();
diff --git a/legacy/ethumb/src/bin/ethumbd_client.c b/src/bin/ethumb/ethumbd_client.c
index 1dcdf11..e81fc2e 100644
--- a/legacy/ethumb/src/bin/ethumbd_client.c
+++ b/src/bin/ethumb/ethumbd_client.c
@@ -60,7 +60,7 @@ struct options
60}; 60};
61 61
62static unsigned char 62static unsigned char
63_ethumb_getopt_callback_frame_parse(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc __UNUSED__, const char *str, void *data __UNUSED__, Ecore_Getopt_Value *storage) 63_ethumb_getopt_callback_frame_parse(const Ecore_Getopt *parser EINA_UNUSED, const Ecore_Getopt_Desc *desc EINA_UNUSED, const char *str, void *data EINA_UNUSED, Ecore_Getopt_Value *storage)
64{ 64{
65 struct frame *f = (struct frame *)storage->ptrp; 65 struct frame *f = (struct frame *)storage->ptrp;
66 const char *tfile, *tgroup, *tswallow, *base, *sep; 66 const char *tfile, *tgroup, *tswallow, *base, *sep;
@@ -151,7 +151,7 @@ _thumb_report(const char *mode, const char *src_path, const char *src_key, const
151} 151}
152 152
153static void 153static void
154_finished_thumb(void *data __UNUSED__, Ethumb_Client *client __UNUSED__, int id __UNUSED__, const char *src_path, const char *src_key, const char *thumb_path, const char *thumb_key, Eina_Bool success) 154_finished_thumb(void *data EINA_UNUSED, Ethumb_Client *client EINA_UNUSED, int id EINA_UNUSED, const char *src_path, const char *src_key, const char *thumb_path, const char *thumb_key, Eina_Bool success)
155{ 155{
156 const char *mode = success ? "GENERATED" : "FAILED"; 156 const char *mode = success ? "GENERATED" : "FAILED";
157 _thumb_report(mode, src_path, src_key, thumb_path, thumb_key); 157 _thumb_report(mode, src_path, src_key, thumb_path, thumb_key);
@@ -159,7 +159,7 @@ _finished_thumb(void *data __UNUSED__, Ethumb_Client *client __UNUSED__, int id
159} 159}
160 160
161static void 161static void
162_exists(void *data, Ethumb_Client *c, __UNUSED__ Ethumb_Exists *thread, Eina_Bool exists) 162_exists(void *data, Ethumb_Client *c, EINA_UNUSED Ethumb_Exists *thread, Eina_Bool exists)
163{ 163{
164 struct options *opts = data; 164 struct options *opts = data;
165 const char *thumb_path, *thumb_key; 165 const char *thumb_path, *thumb_key;
diff --git a/legacy/ethumb/src/bin/ethumbd_private.h b/src/bin/ethumb/ethumbd_private.h
index 688eadd..688eadd 100644
--- a/legacy/ethumb/src/bin/ethumbd_private.h
+++ b/src/bin/ethumb/ethumbd_private.h
diff --git a/legacy/ethumb/src/bin/ethumbd_child.c b/src/bin/ethumb/ethumbd_slave.c
index a11c90c..b1d319a 100644
--- a/legacy/ethumb/src/bin/ethumbd_child.c
+++ b/src/bin/ethumb/ethumbd_slave.c
@@ -126,7 +126,7 @@ _ec_write_safe(int fd, const void *buf, ssize_t size)
126} 126}
127 127
128static int 128static int
129_ec_pipe_str_read(struct _Ethumbd_Child *ec __UNUSED__, char **str) 129_ec_pipe_str_read(struct _Ethumbd_Child *ec EINA_UNUSED, char **str)
130{ 130{
131 int size; 131 int size;
132 int r; 132 int r;
@@ -215,7 +215,7 @@ _ec_op_del(struct _Ethumbd_Child *ec)
215} 215}
216 216
217static void 217static void
218_ec_op_generated_cb(void *data __UNUSED__, Ethumb *e, Eina_Bool success) 218_ec_op_generated_cb(void *data EINA_UNUSED, Ethumb *e, Eina_Bool success)
219{ 219{
220 const char *thumb_path, *thumb_key; 220 const char *thumb_path, *thumb_key;
221 int size_path, size_key, size_cmd; 221 int size_path, size_key, size_cmd;
@@ -291,7 +291,7 @@ _ec_op_generate(struct _Ethumbd_Child *ec)
291} 291}
292 292
293static int 293static int
294_ec_fdo_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 294_ec_fdo_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
295{ 295{
296 int r; 296 int r;
297 int value; 297 int value;
@@ -306,7 +306,7 @@ _ec_fdo_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
306} 306}
307 307
308static int 308static int
309_ec_size_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 309_ec_size_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
310{ 310{
311 int r; 311 int r;
312 int w, h; 312 int w, h;
@@ -328,7 +328,7 @@ _ec_size_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
328} 328}
329 329
330static int 330static int
331_ec_format_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 331_ec_format_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
332{ 332{
333 int r; 333 int r;
334 int value; 334 int value;
@@ -343,7 +343,7 @@ _ec_format_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
343} 343}
344 344
345static int 345static int
346_ec_aspect_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 346_ec_aspect_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
347{ 347{
348 int r; 348 int r;
349 int value; 349 int value;
@@ -358,7 +358,7 @@ _ec_aspect_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
358} 358}
359 359
360static int 360static int
361_ec_orientation_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 361_ec_orientation_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
362{ 362{
363 int r; 363 int r;
364 int value; 364 int value;
@@ -373,7 +373,7 @@ _ec_orientation_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
373} 373}
374 374
375static int 375static int
376_ec_crop_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 376_ec_crop_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
377{ 377{
378 int r; 378 int r;
379 float x, y; 379 float x, y;
@@ -395,7 +395,7 @@ _ec_crop_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
395} 395}
396 396
397static int 397static int
398_ec_quality_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 398_ec_quality_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
399{ 399{
400 int r; 400 int r;
401 int value; 401 int value;
@@ -410,7 +410,7 @@ _ec_quality_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
410} 410}
411 411
412static int 412static int
413_ec_compress_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 413_ec_compress_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
414{ 414{
415 int r; 415 int r;
416 int value; 416 int value;
@@ -488,7 +488,7 @@ _ec_category_set(struct _Ethumbd_Child *ec, Ethumb *e)
488} 488}
489 489
490static int 490static int
491_ec_video_time_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 491_ec_video_time_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
492{ 492{
493 int r; 493 int r;
494 float value; 494 float value;
@@ -503,7 +503,7 @@ _ec_video_time_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
503} 503}
504 504
505static int 505static int
506_ec_video_start_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 506_ec_video_start_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
507{ 507{
508 int r; 508 int r;
509 float value; 509 float value;
@@ -518,7 +518,7 @@ _ec_video_start_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
518} 518}
519 519
520static int 520static int
521_ec_video_interval_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 521_ec_video_interval_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
522{ 522{
523 int r; 523 int r;
524 float value; 524 float value;
@@ -533,7 +533,7 @@ _ec_video_interval_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
533} 533}
534 534
535static int 535static int
536_ec_video_ntimes_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 536_ec_video_ntimes_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
537{ 537{
538 int r; 538 int r;
539 int value; 539 int value;
@@ -548,7 +548,7 @@ _ec_video_ntimes_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
548} 548}
549 549
550static int 550static int
551_ec_video_fps_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 551_ec_video_fps_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
552{ 552{
553 int r; 553 int r;
554 int value; 554 int value;
@@ -563,7 +563,7 @@ _ec_video_fps_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
563} 563}
564 564
565static int 565static int
566_ec_document_page_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e) 566_ec_document_page_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
567{ 567{
568 int r; 568 int r;
569 int value; 569 int value;
@@ -731,7 +731,7 @@ _ec_setup(struct _Ethumbd_Child *ec)
731} 731}
732 732
733int 733int
734main(int argc __UNUSED__, const char *argv[] __UNUSED__) 734main(int argc EINA_UNUSED, const char *argv[] EINA_UNUSED)
735{ 735{
736 struct _Ethumbd_Child *ec; 736 struct _Ethumbd_Child *ec;
737 737
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index dea5466..9361f23 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -4749,7 +4749,8 @@ edje_edit_image_data_add(Evas_Object *obj, const char *name, int id)
4749 if ((unsigned int) id >= ed->file->image_dir->entries_count) return EINA_FALSE; 4749 if ((unsigned int) id >= ed->file->image_dir->entries_count) return EINA_FALSE;
4750 4750
4751 de = ed->file->image_dir->entries + id; 4751 de = ed->file->image_dir->entries + id;
4752 eina_stringshare_replace(&de->entry, name); 4752 _edje_if_string_free(ed, de->entry);
4753 de->entry = eina_stringshare_add(name);
4753 de->source_type = 1; 4754 de->source_type = 1;
4754 de->source_param = 1; 4755 de->source_param = 1;
4755 4756
diff --git a/legacy/ethumb/src/lib/Ethumb.h b/src/lib/ethumb/Ethumb.h
index 12984ac..fd4dff7 100644
--- a/legacy/ethumb/src/lib/Ethumb.h
+++ b/src/lib/ethumb/Ethumb.h
@@ -43,9 +43,74 @@ extern "C" {
43 int micro; 43 int micro;
44 int revision; 44 int revision;
45 } Ethumb_Version; 45 } Ethumb_Version;
46 46
47 EAPI extern Ethumb_Version *ethumb_version; 47 EAPI extern Ethumb_Version *ethumb_version;
48 48
49/**
50 * @page ethumb_main Ethumb
51 *
52 * @date 2009 (created)
53 *
54 * @section toc Table of Contents
55 *
56 * @li @ref ethumb_main_intro
57 * @li @ref ethumb_main_compiling
58 * @li @ref ethumb_main_next_steps
59 *
60 * @section ethumb_main_intro Introduction
61 *
62 * Ethumb will use @ref Evas to generate thumbnail images of given
63 * files. The API allows great customization of the generated files
64 * and also helps compling to FreeDesktop.Org Thumbnail Specification
65 * (http://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html)
66 *
67 * However, thumbnailing can be an expensive process that will impact
68 * your application experience, blocking animations and user
69 * interaction during the generation. Another problem is that one
70 * should try to cache the thumbnails in a place that other
71 * applications can benefit from the file.
72 *
73 * @ref Ethumb_Client exists to solve this. It will communicate with a
74 * server using standard D-Bus protocol. The server will use @ref
75 * Ethumb itself to generate the thumbnail images and cache them using
76 * FreeDesktop.Org standard. It is recommended that most applications
77 * use @ref Ethumb_Client instead of @ref Ethumb directly.
78 *
79 * @section ethumb_main_compiling How to compile
80 *
81 * Ethumb is a library your application links to. The procedure for
82 * this is very simple. Note that usually you want the D-Bus client
83 * library. You simply have to compile your application with the
84 * appropriate compiler flags that the @c pkg-config script
85 * outputs. For example:
86 *
87 * Compiling C or C++ files into object files:
88 *
89 * @verbatim
90 gcc -c -o main.o main.c `pkg-config --cflags ethumb_client`
91 @endverbatim
92 *
93 * Linking object files into a binary executable:
94 *
95 * @verbatim
96 gcc -o my_application main.o `pkg-config --libs ethumb_client`
97 @endverbatim
98 *
99 * See @ref pkgconfig
100 *
101 * @section ethumb_main_next_steps Next Steps
102 *
103 * After you understood what Ethumb is and installed it in your system
104 * you should proceed understanding the programming interface.
105 *
106 * Recommended reading:
107 *
108 * @li @ref Ethumb_Client to generate thumbnails using a server
109 * (recommended).
110 * @li @ref Ethumb to generate thumbnails in the local process.
111 *
112 */
113
49/** 114/**
50 * @defgroup Ethumb Ethumb 115 * @defgroup Ethumb Ethumb
51 * 116 *
diff --git a/legacy/ethumb/src/lib/Ethumb_Plugin.h b/src/lib/ethumb/Ethumb_Plugin.h
index 3eb6f02..3eb6f02 100644
--- a/legacy/ethumb/src/lib/Ethumb_Plugin.h
+++ b/src/lib/ethumb/Ethumb_Plugin.h
diff --git a/legacy/ethumb/src/lib/client/Ethumb_Client.h b/src/lib/ethumb/client/Ethumb_Client.h
index 47fe5ee..3c3f95d 100644
--- a/legacy/ethumb/src/lib/client/Ethumb_Client.h
+++ b/src/lib/ethumb/client/Ethumb_Client.h
@@ -35,6 +35,7 @@ extern "C" {
35 35
36/** 36/**
37 * @defgroup Ethumb_Client Ethumb Client 37 * @defgroup Ethumb_Client Ethumb Client
38 * @ingroup Ethumb
38 * 39 *
39 * @{ 40 * @{
40 */ 41 */
diff --git a/legacy/ethumb/src/lib/client/ethumb_client.c b/src/lib/ethumb/client/ethumb_client.c
index 77dbbd8..7b98366 100644
--- a/legacy/ethumb/src/lib/client/ethumb_client.c
+++ b/src/lib/ethumb/client/ethumb_client.c
@@ -263,7 +263,7 @@ _ethumb_async_delete(void *data)
263} 263}
264 264
265static void 265static void
266_ethumb_client_name_owner_changed(void *context, const char *bus, const char *old_id, const char *new_id) 266_ethumb_client_name_owner_changed(void *context, const char *bus EINA_UNUSED, const char *old_id, const char *new_id)
267{ 267{
268 Ethumb_Client *client = context; 268 Ethumb_Client *client = context;
269 DBG("NameOwnerChanged from=[%s] to=[%s]", old_id, new_id); 269 DBG("NameOwnerChanged from=[%s] to=[%s]", old_id, new_id);
@@ -311,7 +311,7 @@ _ethumb_client_report_connect(Ethumb_Client *client, Eina_Bool success)
311} 311}
312 312
313static void 313static void
314_ethumb_client_new_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending) 314_ethumb_client_new_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
315{ 315{
316 const char *errname, *errmsg; 316 const char *errname, *errmsg;
317 const char *opath; 317 const char *opath;
@@ -350,7 +350,7 @@ _ethumb_client_call_new(Ethumb_Client *client)
350} 350}
351 351
352static void 352static void
353_ethumb_client_exists_heavy(void *data, Ecore_Thread *thread __UNUSED__) 353_ethumb_client_exists_heavy(void *data, Ecore_Thread *thread EINA_UNUSED)
354{ 354{
355 Ethumb_Async_Exists *async = data; 355 Ethumb_Async_Exists *async = data;
356 356
@@ -358,7 +358,7 @@ _ethumb_client_exists_heavy(void *data, Ecore_Thread *thread __UNUSED__)
358} 358}
359 359
360static void 360static void
361_ethumb_client_exists_end(void *data, Ecore_Thread *thread __UNUSED__) 361_ethumb_client_exists_end(void *data, Ecore_Thread *thread EINA_UNUSED)
362{ 362{
363 Ethumb_Async_Exists *async = data; 363 Ethumb_Async_Exists *async = data;
364 Ethumb_Exists *cb; 364 Ethumb_Exists *cb;
@@ -617,7 +617,7 @@ ethumb_client_on_server_die_callback_set(Ethumb_Client *client, Ethumb_Client_Di
617 */ 617 */
618 618
619static void 619static void
620_ethumb_client_ethumb_setup_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending) 620_ethumb_client_ethumb_setup_cb(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
621{ 621{
622 const char *errname, *errmsg; 622 const char *errname, *errmsg;
623 Eina_Bool result = 0; 623 Eina_Bool result = 0;
@@ -643,9 +643,13 @@ _ethumb_client_dbus_get_bytearray(EDBus_Message_Iter *array)
643 const char *result; 643 const char *result;
644 644
645 if (edbus_message_iter_fixed_array_get(array, 'y', &result, &length)) 645 if (edbus_message_iter_fixed_array_get(array, 'y', &result, &length))
646 return eina_stringshare_add(result); 646 return eina_stringshare_add_length(result, length);
647 else 647 else
648 return NULL; 648 {
649 ERR("Not byte array. Signature: %s",
650 edbus_message_iter_signature_get(array));
651 return NULL;
652 }
649} 653}
650 654
651static void 655static void
@@ -658,7 +662,7 @@ _ethumb_client_dbus_append_bytearray(EDBus_Message_Iter *parent, const char *str
658 string = ""; 662 string = "";
659 663
660 array = edbus_message_iter_container_new(parent, 'a', "y"); 664 array = edbus_message_iter_container_new(parent, 'a', "y");
661 size = strlen(string); 665 size = strlen(string) + 1;
662 for (i = 0; i < size; i++) 666 for (i = 0; i < size; i++)
663 edbus_message_iter_basic_append(array, 'y', string[i]); 667 edbus_message_iter_basic_append(array, 'y', string[i]);
664 edbus_message_iter_container_close(parent, array); 668 edbus_message_iter_container_close(parent, array);
@@ -706,7 +710,6 @@ ethumb_client_ethumb_setup(Ethumb_Client *client)
706 Ethumb *e = client->ethumb; 710 Ethumb *e = client->ethumb;
707 int tw, th, format, aspect, orientation, quality, compress; 711 int tw, th, format, aspect, orientation, quality, compress;
708 float cx, cy; 712 float cx, cy;
709 double t;
710 const char *theme_file, *group, *swallow; 713 const char *theme_file, *group, *swallow;
711 const char *directory, *category; 714 const char *directory, *category;
712 double video_time, video_start, video_interval; 715 double video_time, video_start, video_interval;
@@ -755,7 +758,7 @@ ethumb_client_ethumb_setup(Ethumb_Client *client)
755 _setup_iterator_close(array, entry, variant); 758 _setup_iterator_close(array, entry, variant);
756 759
757 variant = _setup_iterator_open(array, &entry, "compress", "i"); 760 variant = _setup_iterator_open(array, &entry, "compress", "i");
758 quality = ethumb_thumb_quality_get(e); 761 compress = ethumb_thumb_quality_get(e);
759 edbus_message_iter_arguments_append(variant, "i", compress); 762 edbus_message_iter_arguments_append(variant, "i", compress);
760 _setup_iterator_close(array, entry, variant); 763 _setup_iterator_close(array, entry, variant);
761 764
@@ -826,8 +829,6 @@ _ethumb_client_generated_cb(void *data, const EDBus_Message *msg)
826 EDBus_Message_Iter *thumb_iter; 829 EDBus_Message_Iter *thumb_iter;
827 EDBus_Message_Iter *thumb_key_iter; 830 EDBus_Message_Iter *thumb_key_iter;
828 Eina_Bool success; 831 Eina_Bool success;
829 const char *thumb = NULL;
830 const char *thumb_key = NULL;
831 int found; 832 int found;
832 struct _ethumb_pending_gen *pending; 833 struct _ethumb_pending_gen *pending;
833 Eina_List *l; 834 Eina_List *l;
@@ -854,14 +855,14 @@ _ethumb_client_generated_cb(void *data, const EDBus_Message *msg)
854 855
855 if (found) 856 if (found)
856 { 857 {
857 thumb = _ethumb_client_dbus_get_bytearray(thumb_iter); 858 const char *thumb = _ethumb_client_dbus_get_bytearray(thumb_iter);
858 thumb_key = _ethumb_client_dbus_get_bytearray(thumb_key_iter); 859 const char *thumb_key = _ethumb_client_dbus_get_bytearray(thumb_key_iter);
859 860
860 client->pending_gen = eina_list_remove_list(client->pending_gen, l); 861 client->pending_gen = eina_list_remove_list(client->pending_gen, l);
861 if (pending->generated_cb) 862 if (pending->generated_cb)
862 pending->generated_cb(pending->data, client, id, 863 pending->generated_cb(pending->data, client, id,
863 pending->file, pending->key, 864 pending->file, pending->key,
864 pending->thumb, pending->thumb_key, 865 thumb, thumb_key,
865 success); 866 success);
866 if (pending->free_data) 867 if (pending->free_data)
867 pending->free_data(pending->data); 868 pending->free_data(pending->data);
@@ -869,12 +870,14 @@ _ethumb_client_generated_cb(void *data, const EDBus_Message *msg)
869 eina_stringshare_del(pending->key); 870 eina_stringshare_del(pending->key);
870 eina_stringshare_del(pending->thumb); 871 eina_stringshare_del(pending->thumb);
871 eina_stringshare_del(pending->thumb_key); 872 eina_stringshare_del(pending->thumb_key);
873 eina_stringshare_del(thumb);
874 eina_stringshare_del(thumb_key);
872 free(pending); 875 free(pending);
873 } 876 }
874} 877}
875 878
876static void 879static void
877_ethumb_client_queue_add_cb(void *data, const EDBus_Message *msg, EDBus_Pending *edbus_pending) 880_ethumb_client_queue_add_cb(void *data, const EDBus_Message *msg, EDBus_Pending *edbus_pending EINA_UNUSED)
878{ 881{
879 const char *errname, *errmsg; 882 const char *errname, *errmsg;
880 int32_t id; 883 int32_t id;
@@ -925,7 +928,7 @@ static int
925_ethumb_client_queue_add(Ethumb_Client *client, const char *file, const char *key, const char *thumb, const char *thumb_key, Ethumb_Client_Generate_Cb generated_cb, const void *data, Eina_Free_Cb free_data) 928_ethumb_client_queue_add(Ethumb_Client *client, const char *file, const char *key, const char *thumb, const char *thumb_key, Ethumb_Client_Generate_Cb generated_cb, const void *data, Eina_Free_Cb free_data)
926{ 929{
927 EDBus_Message *msg; 930 EDBus_Message *msg;
928 EDBus_Message_Iter *main; 931 EDBus_Message_Iter *main_itr;
929 struct _ethumb_pending_add *pending; 932 struct _ethumb_pending_add *pending;
930 933
931 pending = calloc(1, sizeof(*pending)); 934 pending = calloc(1, sizeof(*pending));
@@ -942,12 +945,12 @@ _ethumb_client_queue_add(Ethumb_Client *client, const char *file, const char *ke
942 client->id_count = (client->id_count + 1) % MAX_ID; 945 client->id_count = (client->id_count + 1) % MAX_ID;
943 946
944 msg = edbus_proxy_method_call_new(client->proxy, "queue_add"); 947 msg = edbus_proxy_method_call_new(client->proxy, "queue_add");
945 main = edbus_message_iter_get(msg); 948 main_itr = edbus_message_iter_get(msg);
946 edbus_message_iter_basic_append(main, 'i', pending->id); 949 edbus_message_iter_basic_append(main_itr, 'i', pending->id);
947 _ethumb_client_dbus_append_bytearray(main, file); 950 _ethumb_client_dbus_append_bytearray(main_itr, file);
948 _ethumb_client_dbus_append_bytearray(main, key); 951 _ethumb_client_dbus_append_bytearray(main_itr, key);
949 _ethumb_client_dbus_append_bytearray(main, thumb); 952 _ethumb_client_dbus_append_bytearray(main_itr, thumb);
950 _ethumb_client_dbus_append_bytearray(main, thumb_key); 953 _ethumb_client_dbus_append_bytearray(main_itr, thumb_key);
951 954
952 pending->pending_call = edbus_proxy_send(client->proxy, msg, 955 pending->pending_call = edbus_proxy_send(client->proxy, msg,
953 _ethumb_client_queue_add_cb, 956 _ethumb_client_queue_add_cb,
@@ -959,7 +962,7 @@ _ethumb_client_queue_add(Ethumb_Client *client, const char *file, const char *ke
959} 962}
960 963
961static void 964static void
962_ethumb_client_queue_remove_cb(void *data, const EDBus_Message *msg, EDBus_Pending *edbus_pending) 965_ethumb_client_queue_remove_cb(void *data, const EDBus_Message *msg, EDBus_Pending *edbus_pending EINA_UNUSED)
963{ 966{
964 Eina_Bool success; 967 Eina_Bool success;
965 struct _ethumb_pending_remove *pending = data; 968 struct _ethumb_pending_remove *pending = data;
@@ -2051,7 +2054,7 @@ _ethumb_client_async_free(Ethumb_Client_Async *async)
2051static void 2054static void
2052_ethumb_client_thumb_finish(void *data, 2055_ethumb_client_thumb_finish(void *data,
2053 Ethumb_Client *client, int id, 2056 Ethumb_Client *client, int id,
2054 const char *file __UNUSED__, const char *key __UNUSED__, 2057 const char *file EINA_UNUSED, const char *key EINA_UNUSED,
2055 const char *thumb_path, const char *thumb_key, 2058 const char *thumb_path, const char *thumb_key,
2056 Eina_Bool success) 2059 Eina_Bool success)
2057{ 2060{
@@ -2073,7 +2076,7 @@ _ethumb_client_thumb_finish(void *data,
2073} 2076}
2074 2077
2075static Eina_Bool 2078static Eina_Bool
2076_ethumb_client_thumb_generate_idler(void *data __UNUSED__) 2079_ethumb_client_thumb_generate_idler(void *data EINA_UNUSED)
2077{ 2080{
2078 Ethumb_Client_Async *async; 2081 Ethumb_Client_Async *async;
2079 Eina_List *l1, *l2; 2082 Eina_List *l1, *l2;
@@ -2141,7 +2144,7 @@ _ethumb_client_thumb_exists(void *data, Ethumb_Client *client, Ethumb_Exists *re
2141} 2144}
2142 2145
2143static Eina_Bool 2146static Eina_Bool
2144_ethumb_client_thumb_exists_idler(void *data __UNUSED__) 2147_ethumb_client_thumb_exists_idler(void *data EINA_UNUSED)
2145{ 2148{
2146 Ethumb_Client_Async *async; 2149 Ethumb_Client_Async *async;
2147 Eina_List *l1, *l2; 2150 Eina_List *l1, *l2;
diff --git a/legacy/ethumb/src/lib/ethumb.c b/src/lib/ethumb/ethumb.c
index 28dbb81..65d3b97 100644
--- a/legacy/ethumb/src/lib/ethumb.c
+++ b/src/lib/ethumb/ethumb.c
@@ -31,23 +31,6 @@
31# include <stdlib.h> 31# include <stdlib.h>
32# endif 32# endif
33#endif 33#endif
34#ifdef HAVE_ALLOCA_H
35# include <alloca.h>
36#elif !defined alloca
37# ifdef __GNUC__
38# define alloca __builtin_alloca
39# elif defined _AIX
40# define alloca __alloca
41# elif defined _MSC_VER
42# include <malloc.h>
43# define alloca _alloca
44# elif !defined HAVE_ALLOCA
45# ifdef __cplusplus
46extern "C"
47# endif
48void *alloca (size_t);
49# endif
50#endif
51 34
52#include <stdio.h> 35#include <stdio.h>
53#include <stdlib.h> 36#include <stdlib.h>
@@ -109,9 +92,10 @@ static const int THUMB_SIZE_LARGE = 256;
109 92
110static Eina_Hash *_plugins_ext = NULL; 93static Eina_Hash *_plugins_ext = NULL;
111static Eina_Array *_plugins = NULL; 94static Eina_Array *_plugins = NULL;
95static Eina_Prefix *_pfx = NULL;
112 96
113static Eina_Bool 97static Eina_Bool
114_ethumb_plugin_list_cb(Eina_Module *m, void *data __UNUSED__) 98_ethumb_plugin_list_cb(Eina_Module *m, void *data EINA_UNUSED)
115{ 99{
116 const char *file; 100 const char *file;
117 const char **ext; 101 const char **ext;
@@ -156,10 +140,13 @@ _ethumb_plugin_list_cb(Eina_Module *m, void *data __UNUSED__)
156static void 140static void
157_ethumb_plugins_load(void) 141_ethumb_plugins_load(void)
158{ 142{
143 char buf[PATH_MAX];
144
159 _plugins_ext = eina_hash_string_small_new(NULL); 145 _plugins_ext = eina_hash_string_small_new(NULL);
160 EINA_SAFETY_ON_NULL_RETURN(_plugins_ext); 146 EINA_SAFETY_ON_NULL_RETURN(_plugins_ext);
161 147
162 _plugins = eina_module_list_get(_plugins, PLUGINSDIR, 1, 148 snprintf(buf, sizeof(buf), "%s/ethumb/modules", eina_prefix_lib_get(_pfx));
149 _plugins = eina_module_list_get(_plugins, buf, 1,
163 &_ethumb_plugin_list_cb, NULL); 150 &_ethumb_plugin_list_cb, NULL);
164} 151}
165 152
@@ -192,8 +179,17 @@ ethumb_init(void)
192 if (_log_dom < 0) 179 if (_log_dom < 0)
193 { 180 {
194 EINA_LOG_ERR("Could not register log domain: ethumb"); 181 EINA_LOG_ERR("Could not register log domain: ethumb");
195 eina_shutdown(); 182 goto error_log;
196 return 0; 183 }
184
185 _pfx = eina_prefix_new(NULL, ethumb_init,
186 "ETHUMB", "ethumb", "checkme",
187 PACKAGE_BIN_DIR, PACKAGE_LIB_DIR,
188 PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
189 if (!_pfx)
190 {
191 ERR("Could not get ethumb installation prefix.");
192 goto error_pfx;
197 } 193 }
198 194
199 evas_init(); 195 evas_init();
@@ -210,6 +206,14 @@ ethumb_init(void)
210 206
211 _ethumb_plugins_load(); 207 _ethumb_plugins_load();
212 return ++initcount; 208 return ++initcount;
209
210 error_pfx:
211 eina_log_domain_unregister(_log_dom);
212 _log_dom = -1;
213
214 error_log:
215 eina_shutdown();
216 return 0;
213} 217}
214 218
215EAPI int 219EAPI int
@@ -231,6 +235,8 @@ ethumb_shutdown(void)
231 ecore_shutdown(); 235 ecore_shutdown();
232 ecore_evas_shutdown(); 236 ecore_evas_shutdown();
233 edje_shutdown(); 237 edje_shutdown();
238 eina_prefix_free(_pfx);
239 _pfx = NULL;
234 eina_log_domain_unregister(_log_dom); 240 eina_log_domain_unregister(_log_dom);
235 _log_dom = -1; 241 _log_dom = -1;
236 eina_shutdown(); 242 eina_shutdown();
@@ -1453,6 +1459,7 @@ _ethumb_image_load(Ethumb *e)
1453 1459
1454 if (e->orientation == ETHUMB_THUMB_ORIENT_ORIGINAL) 1460 if (e->orientation == ETHUMB_THUMB_ORIENT_ORIGINAL)
1455 { 1461 {
1462 /* TODO: rewrite to not need libexif just to get this */
1456#ifdef HAVE_LIBEXIF 1463#ifdef HAVE_LIBEXIF
1457 ExifData *exif = exif_data_new_from_file(e->src_path); 1464 ExifData *exif = exif_data_new_from_file(e->src_path);
1458 ExifEntry *entry = NULL; 1465 ExifEntry *entry = NULL;
@@ -1595,7 +1602,7 @@ ethumb_generate(Ethumb *e, Ethumb_Generate_Cb finished_cb, const void *data, Ein
1595 } 1602 }
1596 1603
1597 r = _ethumb_plugin_generate(e); 1604 r = _ethumb_plugin_generate(e);
1598 fprintf(stderr, "ethumb generate: %i: %p\n", r, e->pdata); 1605 DBG("ethumb plugin generate: %i: %p\n", r, e->pdata);
1599 if (r) 1606 if (r)
1600 { 1607 {
1601 return EINA_TRUE; 1608 return EINA_TRUE;
@@ -1603,7 +1610,8 @@ ethumb_generate(Ethumb *e, Ethumb_Generate_Cb finished_cb, const void *data, Ein
1603 1610
1604 if (!_ethumb_image_load(e)) 1611 if (!_ethumb_image_load(e))
1605 { 1612 {
1606 ERR("could not load input image."); 1613 ERR("could not load input image: file=%s, key=%s",
1614 e->src_path, e->src_key);
1607 ethumb_finished_callback_call(e, 0); 1615 ethumb_finished_callback_call(e, 0);
1608 return EINA_FALSE; 1616 return EINA_FALSE;
1609 } 1617 }
@@ -1771,7 +1779,7 @@ ethumb_cmp(const Ethumb *e1, const Ethumb *e2)
1771} 1779}
1772 1780
1773EAPI unsigned int 1781EAPI unsigned int
1774ethumb_length(__UNUSED__ const void *key) 1782ethumb_length(EINA_UNUSED const void *key)
1775{ 1783{
1776 return sizeof (Ethumb); 1784 return sizeof (Ethumb);
1777} 1785}
@@ -1781,8 +1789,8 @@ ethumb_length(__UNUSED__ const void *key)
1781 return e1->Param - e2->Param; 1789 return e1->Param - e2->Param;
1782 1790
1783EAPI int 1791EAPI int
1784ethumb_key_cmp(const void *key1, __UNUSED__ int key1_length, 1792ethumb_key_cmp(const void *key1, EINA_UNUSED int key1_length,
1785 const void *key2, __UNUSED__ int key2_length) 1793 const void *key2, EINA_UNUSED int key2_length)
1786{ 1794{
1787 const Ethumb *e1 = key1; 1795 const Ethumb *e1 = key1;
1788 const Ethumb *e2 = key2; 1796 const Ethumb *e2 = key2;
@@ -1824,7 +1832,7 @@ ethumb_key_cmp(const void *key1, __UNUSED__ int key1_length,
1824#define HASH_PARAM_F(Param) r ^= eina_hash_int32((unsigned int*) &e->Param, 0); 1832#define HASH_PARAM_F(Param) r ^= eina_hash_int32((unsigned int*) &e->Param, 0);
1825 1833
1826EAPI int 1834EAPI int
1827ethumb_hash(const void *key, int key_length __UNUSED__) 1835ethumb_hash(const void *key, int key_length EINA_UNUSED)
1828{ 1836{
1829 const Ethumb *e = key; 1837 const Ethumb *e = key;
1830 int r = 0; 1838 int r = 0;
diff --git a/legacy/ethumb/src/lib/ethumb_private.h b/src/lib/ethumb/ethumb_private.h
index 49e4de9..49e4de9 100644
--- a/legacy/ethumb/src/lib/ethumb_private.h
+++ b/src/lib/ethumb/ethumb_private.h
diff --git a/legacy/ethumb/src/lib/md5.c b/src/lib/ethumb/md5.c
index b62a9ff..b62a9ff 100644
--- a/legacy/ethumb/src/lib/md5.c
+++ b/src/lib/ethumb/md5.c
diff --git a/legacy/ethumb/src/lib/md5.h b/src/lib/ethumb/md5.h
index 348fcd6..348fcd6 100644
--- a/legacy/ethumb/src/lib/md5.h
+++ b/src/lib/ethumb/md5.h
diff --git a/legacy/ethumb/src/plugins/emotion/emotion.c b/src/modules/ethumb/emotion/emotion.c
index 560e661..1275088 100644
--- a/legacy/ethumb/src/plugins/emotion/emotion.c
+++ b/src/modules/ethumb/emotion/emotion.c
@@ -18,6 +18,8 @@
18#include <Edje_Edit.h> 18#include <Edje_Edit.h>
19#include <Emotion.h> 19#include <Emotion.h>
20 20
21static Eina_Prefix *_pfx = NULL;
22static int _init_count = 0;
21static int _log_dom = -1; 23static int _log_dom = -1;
22#define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__) 24#define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__)
23#define INF(...) EINA_LOG_DOM_INFO(_log_dom, __VA_ARGS__) 25#define INF(...) EINA_LOG_DOM_INFO(_log_dom, __VA_ARGS__)
@@ -65,7 +67,7 @@ _resize_movie(struct _emotion_plugin *_plugin)
65} 67}
66 68
67static void 69static void
68_frame_decode_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) 70_frame_decode_cb(void *data, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED)
69{ 71{
70 struct _emotion_plugin *_plugin = data; 72 struct _emotion_plugin *_plugin = data;
71 73
@@ -76,13 +78,13 @@ _frame_decode_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSE
76} 78}
77 79
78static void 80static void
79_frame_resized_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) 81_frame_resized_cb(void *data, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED)
80{ 82{
81 _resize_movie(data); 83 _resize_movie(data);
82} 84}
83 85
84static void 86static void
85_video_stopped_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) 87_video_stopped_cb(void *data, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED)
86{ 88{
87 struct _emotion_plugin *_plugin = data; 89 struct _emotion_plugin *_plugin = data;
88 90
@@ -129,23 +131,24 @@ _setup_thumbnail(struct _emotion_plugin *_plugin)
129 131
130 if (!edje_file_group_exists(thumb_path, "movie/thumb")) 132 if (!edje_file_group_exists(thumb_path, "movie/thumb"))
131 { 133 {
132 fprintf(stderr, "ERROR: no group 'movie/thumb' found.\n"); 134 ERR("no group 'movie/thumb' found in file=%s", thumb_path);
133 goto exit_error; 135 goto exit_error;
134 } 136 }
135 137
136 edje = edje_edit_object_add(evas); 138 edje = edje_edit_object_add(evas);
137 edje_object_file_set(edje, thumb_path, "movie/thumb"); 139 edje_object_file_set(edje, thumb_path, "movie/thumb");
138 if (!edje_object_part_exists(edje, "image")) 140 if (!edje_object_part_exists(edje, "image"))
139 { 141 {
140 fprintf(stderr, "ERROR: no 'image' part found.\n"); 142 ERR("no 'image' part found in file=%s, group=movie/thumb", thumb_path);
141 evas_object_del(edje); 143 evas_object_del(edje);
142 goto exit_error; 144 goto exit_error;
143 } 145 }
144 if (!edje_edit_program_exist(edje, "animate")) 146 if (!edje_edit_program_exist(edje, "animate"))
145 { 147 {
146 fprintf(stderr, "ERROR: no 'animate' program found.\n"); 148 ERR("no 'animate' program found in file=%s, group=movie/thumb",
147 evas_object_del(edje); 149 thumb_path);
148 goto exit_error; 150 evas_object_del(edje);
151 goto exit_error;
149 } 152 }
150 153
151 for (i = 0; i < _plugin->frnum; i++) 154 for (i = 0; i < _plugin->frnum; i++)
@@ -177,23 +180,43 @@ exit_error:
177} 180}
178 181
179static void 182static void
183_finish_thumb_obj(void *data)
184{
185 struct _emotion_plugin *_plugin = data;
186 evas_object_del(_plugin->video);
187 free(_plugin);
188}
189
190static void
180_finish_thumb_generation(struct _emotion_plugin *_plugin, int success) 191_finish_thumb_generation(struct _emotion_plugin *_plugin, int success)
181{ 192{
182 int r = 0; 193 int r = 0;
194
183 evas_object_smart_callback_del(_plugin->video, "frame_resize", 195 evas_object_smart_callback_del(_plugin->video, "frame_resize",
184 _frame_resized_cb); 196 _frame_resized_cb);
185 evas_object_smart_callback_del(_plugin->video, "frame_decode", 197 evas_object_smart_callback_del(_plugin->video, "frame_decode",
186 _frame_decode_cb); 198 _frame_decode_cb);
199 evas_object_smart_callback_del(_plugin->video, "decode_stop",
200 _video_stopped_cb);
201
187 emotion_object_play_set(_plugin->video, 0); 202 emotion_object_play_set(_plugin->video, 0);
188 evas_object_del(_plugin->video); 203
189 if (_plugin->ef) 204 if (_plugin->ef)
190 eet_close(_plugin->ef); 205 {
206 Eet_Error err = eet_close(_plugin->ef);
207 if (err != EET_ERROR_NONE)
208 {
209 ERR("Error writing Eet thumbnail file: %d", err);
210 success = EINA_FALSE;
211 }
212 }
191 213
192 if (success) 214 if (success)
193 r = _setup_thumbnail(_plugin); 215 r = _setup_thumbnail(_plugin);
194 216
195 free(_plugin);
196 ethumb_finished_callback_call(_plugin->e, r); 217 ethumb_finished_callback_call(_plugin->e, r);
218
219 ecore_job_add(_finish_thumb_obj, _plugin);
197} 220}
198 221
199static Eina_Bool 222static Eina_Bool
@@ -298,17 +321,25 @@ _generate_animated_thumb(struct _emotion_plugin *_plugin)
298 char buf[4096]; 321 char buf[4096];
299 Ethumb *e = _plugin->e; 322 Ethumb *e = _plugin->e;
300 323
301 snprintf(buf, sizeof(buf), "%s/data/emotion_template.edj", PLUGINSDIR); 324 snprintf(buf, sizeof(buf),
325 "%s/ethumb/modules/emotion/" MODULE_ARCH "/template.edj",
326 eina_prefix_lib_get(_pfx));
302 ethumb_thumb_path_get(e, &thumb_path, NULL); 327 ethumb_thumb_path_get(e, &thumb_path, NULL);
303 thumb_dir = ecore_file_dir_get(thumb_path); 328 thumb_dir = ecore_file_dir_get(thumb_path);
304 ecore_file_mkpath(thumb_dir); 329 ecore_file_mkpath(thumb_dir);
305 free(thumb_dir); 330 free(thumb_dir);
306 ecore_file_cp(buf, thumb_path); 331 if (!eina_file_copy(buf, thumb_path, 0, NULL, NULL))
332 {
333 ERR("Couldn't copy file '%s' to '%s'", buf, thumb_path);
334 ERR("could not open '%s'", thumb_path);
335 _finish_thumb_generation(_plugin, 0);
336 return;
337 }
307 _plugin->ef = eet_open(thumb_path, EET_FILE_MODE_READ_WRITE); 338 _plugin->ef = eet_open(thumb_path, EET_FILE_MODE_READ_WRITE);
308 if (!_plugin->ef) 339 if (!_plugin->ef)
309 { 340 {
310 fprintf(stderr, "ERROR: could not open '%s'\n", thumb_path); 341 ERR("could not open '%s'", thumb_path);
311 _finish_thumb_generation(_plugin, 0); 342 _finish_thumb_generation(_plugin, 0);
312 } 343 }
313} 344}
314 345
@@ -325,8 +356,7 @@ _thumb_generate(Ethumb *e)
325 r = emotion_object_init(o, NULL); 356 r = emotion_object_init(o, NULL);
326 if (!r) 357 if (!r)
327 { 358 {
328 fprintf(stderr, "ERROR: could not start emotion using gstreamer" 359 ERR("Could not initialize emotion object.");
329 " plugin.\n");
330 evas_object_del(o); 360 evas_object_del(o);
331 ethumb_finished_callback_call(e, 0); 361 ethumb_finished_callback_call(e, 0);
332 free(_plugin); 362 free(_plugin);
@@ -368,7 +398,7 @@ _thumb_generate(Ethumb *e)
368} 398}
369 399
370static void 400static void
371_thumb_cancel(Ethumb *e __UNUSED__, void *data) 401_thumb_cancel(Ethumb *e EINA_UNUSED, void *data)
372{ 402{
373 struct _emotion_plugin *_plugin = data; 403 struct _emotion_plugin *_plugin = data;
374 404
@@ -389,20 +419,65 @@ ethumb_plugin_get(void)
389 _thumb_cancel 419 _thumb_cancel
390 }; 420 };
391 421
392 _log_dom = eina_log_domain_register("ethumb_emotion", EINA_COLOR_GREEN);
393
394 return &plugin; 422 return &plugin;
395} 423}
396 424
397static Eina_Bool 425static Eina_Bool
398_module_init(void) 426_module_init(void)
399{ 427{
428 if (_init_count > 0)
429 {
430 _init_count++;
431 return EINA_TRUE;
432 }
433
434 _log_dom = eina_log_domain_register("ethumb_emotion", EINA_COLOR_GREEN);
435 if (_log_dom < 0)
436 {
437 EINA_LOG_ERR("Could not register log domain: ethumb_emotion");
438 goto error_log;
439 }
440
441 _pfx = eina_prefix_new(NULL, ethumb_init,
442 "ETHUMB", "ethumb", "checkme",
443 PACKAGE_BIN_DIR, PACKAGE_LIB_DIR,
444 PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
445 if (!_pfx)
446 {
447 ERR("Could not get ethumb installation prefix.");
448 goto error_pfx;
449 }
450
451 emotion_init();
452
453 _init_count = 1;
400 return EINA_TRUE; 454 return EINA_TRUE;
455
456 error_pfx:
457 eina_log_domain_unregister(_log_dom);
458 _log_dom = -1;
459
460 error_log:
461 return EINA_FALSE;
401} 462}
402 463
403static void 464static void
404_module_shutdown(void) 465_module_shutdown(void)
405{ 466{
467 if (_init_count <= 0)
468 {
469 EINA_LOG_ERR("Init count not greater than 0 in shutdown.");
470 return;
471 }
472 _init_count--;
473 if (_init_count > 0) return;
474
475 emotion_shutdown();
476
477 eina_prefix_free(_pfx);
478 _pfx = NULL;
479 eina_log_domain_unregister(_log_dom);
480 _log_dom = -1;
406} 481}
407 482
408EINA_MODULE_INIT(_module_init); 483EINA_MODULE_INIT(_module_init);
diff --git a/src/modules/ethumb/emotion/placeholder.png b/src/modules/ethumb/emotion/placeholder.png
new file mode 100644
index 0000000..2c90acd
--- /dev/null
+++ b/src/modules/ethumb/emotion/placeholder.png
Binary files differ
diff --git a/legacy/ethumb/src/plugins/emotion/template.edc b/src/modules/ethumb/emotion/template.edc
index 4a30c3d..050641c 100644
--- a/legacy/ethumb/src/plugins/emotion/template.edc
+++ b/src/modules/ethumb/emotion/template.edc
@@ -3,6 +3,8 @@ collections {
3 group { 3 group {
4 name: "movie/thumb"; 4 name: "movie/thumb";
5 5
6 images.image: "placeholder.png" COMP;
7
6 parts { 8 parts {
7 part { 9 part {
8 name: "image"; 10 name: "image";
@@ -10,8 +12,8 @@ collections {
10 mouse_events: 0; 12 mouse_events: 0;
11 description { 13 description {
12 state: "default" 0.0; 14 state: "default" 0.0;
13 fill.smooth: 0; 15 fill.smooth: 0;
14 image.scale_hint: DYNAMIC; 16 image.normal: "placeholder.png"; /* edje doesn't allow image without files anymore */
15 } 17 }
16 } 18 }
17 } 19 }
diff --git a/legacy/ethumb/src/tests/ethumb_dbus.c b/src/tests/ethumb/ethumb_dbus.c
index d9e2f10..946aa13 100644
--- a/legacy/ethumb/src/tests/ethumb_dbus.c
+++ b/src/tests/ethumb/ethumb_dbus.c
@@ -34,13 +34,13 @@
34#include <Ecore.h> 34#include <Ecore.h>
35 35
36static void 36static void
37_on_server_die_cb(void *data __UNUSED__, Ethumb_Client *client __UNUSED__) 37_on_server_die_cb(void *data EINA_UNUSED, Ethumb_Client *client EINA_UNUSED)
38{ 38{
39 ecore_main_loop_quit(); 39 ecore_main_loop_quit();
40} 40}
41 41
42static void 42static void
43_queue_add_cb(void *data __UNUSED__, Ethumb_Client *client __UNUSED__, int id, const char *file, const char *key __UNUSED__, const char *thumb_path, const char *thumb_key __UNUSED__, Eina_Bool success) 43_queue_add_cb(void *data EINA_UNUSED, Ethumb_Client *client EINA_UNUSED, int id, const char *file, const char *key EINA_UNUSED, const char *thumb_path, const char *thumb_key EINA_UNUSED, Eina_Bool success)
44{ 44{
45 fprintf(stderr, ">>> %hhu file ready: %s; thumb ready: %s; id = %d\n", success, file, thumb_path, id); 45 fprintf(stderr, ">>> %hhu file ready: %s; thumb ready: %s; id = %d\n", success, file, thumb_path, id);
46} 46}