The attached patch add some debug logging info to ethumb emotion plugin.

-- 
João Paulo Rechi Vita
ProFUSION embedded systems
jprv...@profusion.mobi
Index: ethumb/src/plugins/emotion/emotion.c
===================================================================
--- ethumb/src/plugins/emotion/emotion.c	(revision 43615)
+++ ethumb/src/plugins/emotion/emotion.c	(working copy)
@@ -15,6 +15,12 @@
 #include <Edje_Edit.h>
 #include <Emotion.h>
 
+static int _log_dom = -1;
+#define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__)
+#define INF(...) EINA_LOG_DOM_INFO(_log_dom, __VA_ARGS__)
+#define WRN(...) EINA_LOG_DOM_WARN(_log_dom, __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR(_log_dom, __VA_ARGS__)
+
 struct _emotion_plugin
 {
    unsigned int fps;
@@ -40,6 +46,7 @@
    ratio = emotion_object_ratio_get(_plugin->video);
    ethumb_calculate_aspect_from_ratio(e, ratio, &w, &h);
    ethumb_calculate_fill_from_ratio(e, ratio, &fx, &fy, &fw, &fh);
+   DBG("size: w=%d, h=%d fill: x=%d, y=%d, w=%d, h=%d", w, h, fx, fy, fw, fh);
 
    _plugin->w = w;
    _plugin->h = h;
@@ -187,6 +194,8 @@
    if (p < _plugin->pi)
      return EINA_TRUE;
 
+   DBG("saving static thumbnail at position=%f (intended=%f)", p, _plugin->pi);
+
    ethumb_image_save(e);
 
    evas_object_smart_callback_del(_plugin->video, "frame_resize",
@@ -350,6 +359,8 @@
 	_generate_thumb,
      };
 
+   _log_dom = eina_log_domain_register("ethumb_emotion", EINA_COLOR_GREEN);
+
    return &plugin;
 }
 
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to