[maemo-commits] [maemo-commits] r18371 - in projects/haf/trunk/hildon-thumbnail: . daemon

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu May 14 15:16:32 EEST 2009
Author: pvanhoof
Date: 2009-05-14 15:16:17 +0300 (Thu, 14 May 2009)
New Revision: 18371

Modified:
   projects/haf/trunk/hildon-thumbnail/ChangeLog
   projects/haf/trunk/hildon-thumbnail/config.h.in
   projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.c
   projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer-marshal.list
   projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer.c
Log:
2009-05-14  Philip Van Hoof  <pvanhoof at codeminded.be>

        * config.h.in
        * daemon/thumbnailer.c
        * daemon/thumbnailer-marshal.list
        * daemon/thumbnail-manager.c: Fixes for specialized thumbnailers, making
          the video thumbnailer work



Modified: projects/haf/trunk/hildon-thumbnail/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-thumbnail/ChangeLog	2009-05-14 11:21:56 UTC (rev 18370)
+++ projects/haf/trunk/hildon-thumbnail/ChangeLog	2009-05-14 12:16:17 UTC (rev 18371)
@@ -1,3 +1,11 @@
+2009-05-14  Philip Van Hoof  <pvanhoof at codeminded.be>
+
+	* config.h.in
+	* daemon/thumbnailer.c
+	* daemon/thumbnailer-marshal.list
+	* daemon/thumbnail-manager.c: Fixes for specialized thumbnailers, making
+	  the video thumbnailer work
+
 2009-05-13  Philip Van Hoof  <pvanhoof at codeminded.be>
 
         * daemon/albumart.c: Making thumbnails for downloaded albumart.

Modified: projects/haf/trunk/hildon-thumbnail/config.h.in
===================================================================
--- projects/haf/trunk/hildon-thumbnail/config.h.in	2009-05-14 11:21:56 UTC (rev 18370)
+++ projects/haf/trunk/hildon-thumbnail/config.h.in	2009-05-14 12:16:17 UTC (rev 18371)
@@ -51,10 +51,6 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#undef LT_OBJDIR
-
 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
 #undef NO_MINUS_C_MINUS_O
 

Modified: projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.c
===================================================================
--- projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.c	2009-05-14 11:21:56 UTC (rev 18370)
+++ projects/haf/trunk/hildon-thumbnail/daemon/thumbnail-manager.c	2009-05-14 12:16:17 UTC (rev 18371)
@@ -33,6 +33,7 @@
 #include "manager-glue.h"
 #include "dbus-utils.h"
 #include "thumbnailer.h"
+#include "thumbnailer-marshal.h"
 
 static GFile *homedir, *thumbdir;
 static GFileMonitor *homemon, *thumbmon;
@@ -68,8 +69,9 @@
 
 	g_mutex_lock (priv->mutex);
 	proxy = g_hash_table_lookup (priv->handlers, query);
-	if (proxy)
+	if (proxy) {
 		g_object_ref (proxy);
+	}
 	g_mutex_unlock (priv->mutex);
 
 	g_free (query);
@@ -97,6 +99,16 @@
 						path,
 						SPECIALIZED_INTERFACE);
 
+	dbus_g_proxy_add_signal (mime_proxy, "Ready", 
+				 G_TYPE_STRING,
+				 G_TYPE_INVALID);
+
+	dbus_g_proxy_add_signal (mime_proxy, "Error", 
+				 G_TYPE_STRING, 
+				 G_TYPE_INT,
+				 G_TYPE_STRING,
+				 G_TYPE_INVALID);
+
 	g_free (path);
 
 	g_hash_table_replace (priv->handlers, 
@@ -611,6 +623,13 @@
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
+	dbus_g_object_register_marshaller (thumbnailer_marshal_VOID__STRING_INT_STRING,
+					   G_TYPE_NONE,
+					   G_TYPE_STRING,
+					   G_TYPE_INT,
+					   G_TYPE_STRING,
+					   G_TYPE_INVALID);
+
 	object_class->finalize = thumbnail_manager_finalize;
 	object_class->set_property = thumbnail_manager_set_property;
 	object_class->get_property = thumbnail_manager_get_property;

Modified: projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer-marshal.list
===================================================================
--- projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer-marshal.list	2009-05-14 11:21:56 UTC (rev 18370)
+++ projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer-marshal.list	2009-05-14 12:16:17 UTC (rev 18371)
@@ -1 +1,2 @@
 VOID:UINT,BOXED,INT,STRING
+VOID:STRING,INT,STRING

Modified: projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer.c
===================================================================
--- projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer.c	2009-05-14 11:21:56 UTC (rev 18370)
+++ projects/haf/trunk/hildon-thumbnail/daemon/thumbnailer.c	2009-05-14 12:16:17 UTC (rev 18371)
@@ -646,16 +646,7 @@
 		if (proxy) {
 			guint o;
 
-			dbus_g_proxy_add_signal (proxy, "Ready", 
-						 G_TYPE_STRING,
-						 G_TYPE_INVALID);
 
-			dbus_g_proxy_add_signal (proxy, "Error", 
-						 G_TYPE_STRING, 
-						 G_TYPE_INT,
-						 G_TYPE_STRING,
-						 G_TYPE_INVALID);
-
 			for (o = 0; urlss[o]; o++) {
 				GError *error = NULL;
 				SpecializedInfo info;
@@ -689,13 +680,15 @@
 				g_time_val_add  (&timev, 100000000); /* 100 seconds worth of timeout */
 
 				g_mutex_lock (info.mutex);
+				/* We are a thread, so the mainloop will still be
+				 * be running to receive the error and ready signals */
 				if (!info.had_callback)
 					g_cond_timed_wait (info.condition, info.mutex, &timev);
 				g_mutex_unlock (info.mutex);
 
 				if (!info.had_callback) {
 					g_set_error (&error, DAEMON_ERROR, 0,
-						     "Timeout");
+						     "Timeout for %s", info.uri);
 				}
 
 				if (info.error_msg) {
@@ -730,7 +723,7 @@
 						       0, task->num, failed_urls, 1, 
 						       error->message);
 
-					g_error_free (error);
+					g_clear_error (&error);
 
 					g_strfreev (failed_urls);
 


More information about the maemo-commits mailing list