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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Mar 24 13:11:55 EET 2009
Author: pvanhoof
Date: 2009-03-24 13:11:53 +0200 (Tue, 24 Mar 2009)
New Revision: 17783

Modified:
   projects/haf/trunk/hildon-thumbnail/ChangeLog
   projects/haf/trunk/hildon-thumbnail/daemon/plugins/gstreamer-video-plugin.c
Log:
2009-03-24  Philip Van Hoof  <pvanhoof at codeminded.be>

        * daemon/plugins/gstreamer-video-plugin.c: Bugfix in error reporting



Modified: projects/haf/trunk/hildon-thumbnail/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-thumbnail/ChangeLog	2009-03-24 10:36:06 UTC (rev 17782)
+++ projects/haf/trunk/hildon-thumbnail/ChangeLog	2009-03-24 11:11:53 UTC (rev 17783)
@@ -1,3 +1,7 @@
+2009-03-24  Philip Van Hoof  <pvanhoof at codeminded.be>
+
+	* daemon/plugins/gstreamer-video-plugin.c: Bugfix in error reporting
+
 2009-03-23  Philip Van Hoof  <pvanhoof at codeminded.be>
 
 	* daemon/plugins/gstreamer-video-plugin.c: Added support for some

Modified: projects/haf/trunk/hildon-thumbnail/daemon/plugins/gstreamer-video-plugin.c
===================================================================
--- projects/haf/trunk/hildon-thumbnail/daemon/plugins/gstreamer-video-plugin.c	2009-03-24 10:36:06 UTC (rev 17782)
+++ projects/haf/trunk/hildon-thumbnail/daemon/plugins/gstreamer-video-plugin.c	2009-03-24 11:11:53 UTC (rev 17783)
@@ -84,6 +84,7 @@
 	gint		audio_samplerate;
 
 	gboolean        bugged;
+	GError         *error;
 } VideoThumbnailer;
 
 
@@ -91,26 +92,16 @@
 gint g_sprintf (gchar *string, gchar const *format, ...);
 #endif
 
-static gboolean
-create_output (HildonThumbnailPluginOutType target, unsigned char *data, guint width, guint height, guint bpp, const gchar *uri, guint mtime, gboolean alpha)
+static void
+create_output (HildonThumbnailPluginOutType target, unsigned char *data, guint width, guint height, guint bpp, const gchar *uri, guint mtime, gboolean alpha, GError **error)
 {
-	GError *error = NULL;
-
 	if (hildon_thumbnail_outplugins_needs_out (target, mtime, uri)) {
 
 		hildon_thumbnail_outplugins_do_out (data, width, height,
 						    width*3, bpp/3, alpha,
 						    target, mtime, uri, 
-						    &error);
-
-		if (error) {
-			g_warning("%s\n", error->message);
-			g_error_free(error);
-			return FALSE;
-		}
+						    error);
 	}
-
-	return TRUE;
 }
 
 static gboolean
@@ -124,7 +115,8 @@
 
 	create_output (thumber->target, data_photo,
 		       thumber->size, thumber->size,
-		       24, thumber->uri, thumber->mtime, FALSE);
+		       24, thumber->uri, thumber->mtime, 
+		       FALSE, &thumber->error);
 
 	if (thumber->condition) {
 		g_mutex_lock (thumber->mutex);
@@ -292,6 +284,7 @@
 	thumber->video_scaler = NULL;
 	thumber->video_filter = NULL;
 	thumber->video_sink   = NULL;
+	thumber->error        = NULL;
 
 	thumber->had_callback = FALSE;
 	thumber->mutex        = g_mutex_new ();
@@ -399,6 +392,10 @@
 
 	cleanup:
 
+	if (thumber->error) {
+		g_propagate_error (error, thumber->error);
+	}
+
 	g_cond_free (thumber->condition);
 	thumber->condition = NULL;
 	g_mutex_free (thumber->mutex);


More information about the maemo-commits mailing list