[tumbler] Actually add the new patches
Christoph Wickert
cwickert at fedoraproject.org
Sun Oct 16 10:10:25 UTC 2011
commit 365549944969d904b6238e4522d9c403fcea9747
Author: Christoph Wickert <cwickert at fedoraproject.org>
Date: Sun Oct 16 12:10:19 2011 +0200
Actually add the new patches
tumbler-0.1.22-fix-ownership-race-conditions.patch | 366 ++++++++++++++++++++
tumbler-0.1.22-simplify-the-race-fix.patch | 256 ++++++++++++++
tumbler-0.1.22-start-pipeline.patch | 25 ++
3 files changed, 647 insertions(+), 0 deletions(-)
---
diff --git a/tumbler-0.1.22-fix-ownership-race-conditions.patch b/tumbler-0.1.22-fix-ownership-race-conditions.patch
new file mode 100644
index 0000000..d12fe2e
--- /dev/null
+++ b/tumbler-0.1.22-fix-ownership-race-conditions.patch
@@ -0,0 +1,366 @@
+From 776070012e3d5d2bff5a1b2a9e175ced7122f125 Mon Sep 17 00:00:00 2001
+From: Jannis Pohlmann <jannis at xfce.org>
+Date: Wed, 28 Sep 2011 21:11:57 +0000
+Subject: Fix ownership race conditions when started twice (bug #8001).
+
+It can happen that D-Bus activates tumblerd multiple times if the
+activated instance doesn't bring up the service quickly enough. We need
+to detect this in order to exit duplicate instances gracefully (exit
+code 0). Exiting with an error code breaks clients.
+
+For more information, see the following bugs:
+
+ https://bugzilla.xfce.org/show_bug.cgi?id=8001
+ https://bugs.freedesktop.org/show_bug.cgi?id=41233
+---
+diff --git a/tumblerd/main.c b/tumblerd/main.c
+index f2de4f0..f79049b 100644
+--- a/tumblerd/main.c
++++ b/tumblerd/main.c
+@@ -65,6 +65,7 @@ main (int argc,
+ TumblerService *service;
+ TumblerCacheService *cache_service;
+ GMainLoop *main_loop;
++ gboolean already_running = FALSE;
+ GError *error = NULL;
+ GList *providers;
+ GList *thumbnailers;
+@@ -99,22 +100,6 @@ main (int argc,
+ /* create the lifecycle manager */
+ lifecycle_manager = tumbler_lifecycle_manager_new ();
+
+- /* create the thumbnail cache service */
+- cache_service = tumbler_cache_service_new (connection, lifecycle_manager);
+-
+- /* try to start the service and exit if that fails */
+- if (!tumbler_cache_service_start (cache_service, &error))
+- {
+- g_warning (_("Failed to start the thumbnail cache service: %s"), error->message);
+- g_error_free (error);
+-
+- g_object_unref (cache_service);
+-
+- dbus_g_connection_unref (connection);
+-
+- return EXIT_FAILURE;
+- }
+-
+ /* create the thumbnailer registry */
+ registry = tumbler_registry_new ();
+
+@@ -152,6 +137,15 @@ main (int argc,
+ /* update the URI schemes / MIME types supported information */
+ tumbler_registry_update_supported (registry);
+
++ /* create the thumbnail cache service */
++ cache_service = tumbler_cache_service_new (connection, lifecycle_manager);
++
++ /* create the thumbnailer manager service */
++ manager = tumbler_manager_new (connection, lifecycle_manager, registry);
++
++ /* create the generic thumbnailer service */
++ service = tumbler_service_new (connection, lifecycle_manager, registry);
++
+ /* try to load specialized thumbnailers and exit if that fails */
+ if (!tumbler_registry_load (registry, &error))
+ {
+@@ -159,49 +153,80 @@ main (int argc,
+ error->message);
+ g_error_free (error);
+
+- g_object_unref (registry);
++ g_object_unref (service);
++ g_object_unref (manager);
+ g_object_unref (cache_service);
++ g_object_unref (registry);
+
+ dbus_g_connection_unref (connection);
+
+ return EXIT_FAILURE;
+ }
+
+- /* create the thumbnailer manager service */
+- manager = tumbler_manager_new (connection, lifecycle_manager, registry);
++ /* try to start the service and exit if that fails */
++ if (!tumbler_cache_service_start (cache_service, &error))
++ {
++ if (error->domain == DBUS_GERROR && error->code == DBUS_GERROR_ADDRESS_IN_USE)
++ already_running = TRUE;
++
++ g_warning (_("Failed to start the thumbnail cache service: %s"), error->message);
++ g_error_free (error);
++
++ g_object_unref (service);
++ g_object_unref (manager);
++ g_object_unref (cache_service);
++ g_object_unref (registry);
++
++ dbus_g_connection_unref (connection);
++
++ if (already_running)
++ return EXIT_SUCCESS;
++ else
++ return EXIT_FAILURE;
++ }
+
+ /* try to start the service and exit if that fails */
+ if (!tumbler_manager_start (manager, &error))
+ {
++ if (error->domain == DBUS_GERROR && error->code == DBUS_GERROR_ADDRESS_IN_USE)
++ already_running = TRUE;
++
+ g_warning (_("Failed to start the thumbnailer manager: %s"), error->message);
+ g_error_free (error);
+
++ g_object_unref (service);
+ g_object_unref (manager);
+- g_object_unref (registry);
+ g_object_unref (cache_service);
++ g_object_unref (registry);
+
+ dbus_g_connection_unref (connection);
+
+- return EXIT_FAILURE;
++ if (already_running)
++ return EXIT_SUCCESS;
++ else
++ return EXIT_FAILURE;
+ }
+
+- /* create the generic thumbnailer service */
+- service = tumbler_service_new (connection, lifecycle_manager, registry);
+-
+ /* try to start the service and exit if that fails */
+ if (!tumbler_service_start (service, &error))
+ {
++ if (error->domain == DBUS_GERROR && error->code == DBUS_GERROR_ADDRESS_IN_USE)
++ already_running = TRUE;
++
+ g_warning (_("Failed to start the thumbnailer service: %s"), error->message);
+ g_error_free (error);
+
+ g_object_unref (service);
+ g_object_unref (manager);
+- g_object_unref (registry);
+ g_object_unref (cache_service);
++ g_object_unref (registry);
+
+ dbus_g_connection_unref (connection);
+
+- return EXIT_FAILURE;
++ if (already_running)
++ return EXIT_SUCCESS;
++ else
++ return EXIT_FAILURE;
+ }
+
+ /* create a new main loop */
+@@ -220,8 +245,8 @@ main (int argc,
+ /* shut our services down and release all objects */
+ g_object_unref (service);
+ g_object_unref (manager);
+- g_object_unref (registry);
+ g_object_unref (cache_service);
++ g_object_unref (registry);
+ g_object_unref (lifecycle_manager);
+
+ /* disconnect from the D-Bus session bus */
+diff --git a/tumblerd/tumbler-cache-service.c b/tumblerd/tumbler-cache-service.c
+index f13177c..f6b2dc5 100644
+--- a/tumblerd/tumbler-cache-service.c
++++ b/tumblerd/tumbler-cache-service.c
+@@ -174,6 +174,15 @@ tumbler_cache_service_constructed (GObject *object)
+ service, 1, FALSE, NULL);
+ service->cleanup_pool = g_thread_pool_new (tumbler_cache_service_cleanup_thread,
+ service, 1, FALSE, NULL);
++
++ /* everything's fine, install the cache type D-Bus info */
++ dbus_g_object_type_install_info (G_OBJECT_TYPE (service),
++ &dbus_glib_tumbler_cache_service_object_info);
++
++ /* register the cache instance as a handler of the cache interface */
++ dbus_g_connection_register_g_object (service->connection,
++ "/org/freedesktop/thumbnails/Cache1",
++ G_OBJECT (service));
+ }
+
+
+@@ -400,7 +409,19 @@ tumbler_cache_service_start (TumblerCacheService *service,
+ DBUS_NAME_FLAG_DO_NOT_QUEUE, &dbus_error);
+
+ /* check if that failed */
+- if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
++ if (result == DBUS_REQUEST_NAME_REPLY_EXISTS)
++ {
++ if (error != NULL)
++ {
++ g_set_error (error, DBUS_GERROR, DBUS_GERROR_ADDRESS_IN_USE,
++ _("Another thumbnail cache service is already running"));
++ }
++
++ g_mutex_unlock (service->mutex);
++
++ return FALSE;
++ }
++ else if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+ {
+ /* propagate the D-Bus error */
+ if (dbus_error_is_set (&dbus_error))
+@@ -421,15 +442,6 @@ tumbler_cache_service_start (TumblerCacheService *service,
+ return FALSE;
+ }
+
+- /* everything's fine, install the cache type D-Bus info */
+- dbus_g_object_type_install_info (G_OBJECT_TYPE (service),
+- &dbus_glib_tumbler_cache_service_object_info);
+-
+- /* register the cache instance as a handler of the cache interface */
+- dbus_g_connection_register_g_object (service->connection,
+- "/org/freedesktop/thumbnails/Cache1",
+- G_OBJECT (service));
+-
+ g_mutex_unlock (service->mutex);
+
+ return TRUE;
+diff --git a/tumblerd/tumbler-manager.c b/tumblerd/tumbler-manager.c
+index 73e6778..feb2943 100644
+--- a/tumblerd/tumbler-manager.c
++++ b/tumblerd/tumbler-manager.c
+@@ -63,6 +63,7 @@ typedef struct _ThumbnailerInfo ThumbnailerInfo;
+
+
+
++static void tumbler_manager_constructed (GObject *object);
+ static void tumbler_manager_finalize (GObject *object);
+ static void tumbler_manager_get_property (GObject *object,
+ guint prop_id,
+@@ -158,6 +159,7 @@ tumbler_manager_class_init (TumblerManagerClass *klass)
+ GObjectClass *gobject_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
++ gobject_class->constructed = tumbler_manager_constructed;
+ gobject_class->finalize = tumbler_manager_finalize;
+ gobject_class->get_property = tumbler_manager_get_property;
+ gobject_class->set_property = tumbler_manager_set_property;
+@@ -198,6 +200,25 @@ tumbler_manager_init (TumblerManager *manager)
+
+
+
++
++
++static void
++tumbler_manager_constructed (GObject *object)
++{
++ TumblerManager *manager = TUMBLER_MANAGER (object);
++
++ /* everything's fine, install the manager type D-Bus info */
++ dbus_g_object_type_install_info (G_OBJECT_TYPE (manager),
++ &dbus_glib_tumbler_manager_object_info);
++
++ /* register the manager instance as a handler of the manager interface */
++ dbus_g_connection_register_g_object (manager->connection,
++ "/org/freedesktop/thumbnails/Manager1",
++ G_OBJECT (manager));
++}
++
++
++
+ static void
+ tumbler_manager_finalize (GObject *object)
+ {
+@@ -1838,7 +1859,19 @@ tumbler_manager_start (TumblerManager *manager,
+ DBUS_NAME_FLAG_DO_NOT_QUEUE, &dbus_error);
+
+ /* check if that failed */
+- if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
++ if (result == DBUS_REQUEST_NAME_REPLY_EXISTS)
++ {
++ if (error != NULL)
++ {
++ g_set_error (error, DBUS_GERROR, DBUS_GERROR_ADDRESS_IN_USE,
++ _("Another thumbnail cache service is already running"));
++ }
++
++ g_mutex_unlock (manager->mutex);
++
++ return FALSE;
++ }
++ else if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+ {
+ /* propagate the D-Bus error */
+ if (dbus_error_is_set (&dbus_error))
+@@ -1860,15 +1893,6 @@ tumbler_manager_start (TumblerManager *manager,
+ return FALSE;
+ }
+
+- /* everything's fine, install the manager type D-Bus info */
+- dbus_g_object_type_install_info (G_OBJECT_TYPE (manager),
+- &dbus_glib_tumbler_manager_object_info);
+-
+- /* register the manager instance as a handler of the manager interface */
+- dbus_g_connection_register_g_object (manager->connection,
+- "/org/freedesktop/thumbnails/Manager1",
+- G_OBJECT (manager));
+-
+ g_mutex_unlock (manager->mutex);
+
+ /* load thumbnailers installed into the system permanently */
+diff --git a/tumblerd/tumbler-service.c b/tumblerd/tumbler-service.c
+index 92ab7ac..8214a45 100644
+--- a/tumblerd/tumbler-service.c
++++ b/tumblerd/tumbler-service.c
+@@ -295,6 +295,15 @@ tumbler_service_constructed (GObject *object)
+ scheduler = tumbler_group_scheduler_new ("background");
+ tumbler_service_add_scheduler (service, scheduler);
+ g_object_unref (scheduler);
++
++ /* everything is fine, install the generic thumbnailer D-Bus info */
++ dbus_g_object_type_install_info (G_OBJECT_TYPE (service),
++ &dbus_glib_tumbler_service_object_info);
++
++ /* register the service instance as a handler of this interface */
++ dbus_g_connection_register_g_object (service->connection,
++ THUMBNAILER_PATH,
++ G_OBJECT (service));
+ }
+
+
+@@ -744,7 +753,19 @@ tumbler_service_start (TumblerService *service,
+ DBUS_NAME_FLAG_DO_NOT_QUEUE, &dbus_error);
+
+ /* check if that failed */
+- if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
++ if (result == DBUS_REQUEST_NAME_REPLY_EXISTS)
++ {
++ if (error != NULL)
++ {
++ g_set_error (error, DBUS_GERROR, DBUS_GERROR_ADDRESS_IN_USE,
++ _("Another thumbnail cache service is already running"));
++ }
++
++ g_mutex_unlock (service->mutex);
++
++ return FALSE;
++ }
++ else if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+ {
+ /* propagate the D-Bus error */
+ if (dbus_error_is_set (&dbus_error))
+@@ -765,15 +786,6 @@ tumbler_service_start (TumblerService *service,
+ return FALSE;
+ }
+
+- /* everything is fine, install the generic thumbnailer D-Bus info */
+- dbus_g_object_type_install_info (G_OBJECT_TYPE (service),
+- &dbus_glib_tumbler_service_object_info);
+-
+- /* register the service instance as a handler of this interface */
+- dbus_g_connection_register_g_object (service->connection,
+- THUMBNAILER_PATH,
+- G_OBJECT (service));
+-
+ g_mutex_unlock (service->mutex);
+
+ return TRUE;
+--
+cgit
diff --git a/tumbler-0.1.22-simplify-the-race-fix.patch b/tumbler-0.1.22-simplify-the-race-fix.patch
new file mode 100644
index 0000000..9ce2ef9
--- /dev/null
+++ b/tumbler-0.1.22-simplify-the-race-fix.patch
@@ -0,0 +1,256 @@
+From 72525b63d3fb581e1077c10e4b7be61a171ffd01 Mon Sep 17 00:00:00 2001
+From: Jannis Pohlmann <jannis at xfce.org>
+Date: Wed, 28 Sep 2011 21:30:56 +0000
+Subject: Simplify the race fix. Failed name ownership implies already running.
+
+The only other results dbus_bus_request_name() returns are either not
+possible or imply that the service is already provided by another
+instance, so we don't have to treat DBUS_REQUEST_NAME_REPLY_EXISTS
+special.
+---
+diff --git a/tumblerd/main.c b/tumblerd/main.c
+index f79049b..d8e9876 100644
+--- a/tumblerd/main.c
++++ b/tumblerd/main.c
+@@ -65,7 +65,6 @@ main (int argc,
+ TumblerService *service;
+ TumblerCacheService *cache_service;
+ GMainLoop *main_loop;
+- gboolean already_running = FALSE;
+ GError *error = NULL;
+ GList *providers;
+ GList *thumbnailers;
+@@ -166,9 +165,6 @@ main (int argc,
+ /* try to start the service and exit if that fails */
+ if (!tumbler_cache_service_start (cache_service, &error))
+ {
+- if (error->domain == DBUS_GERROR && error->code == DBUS_GERROR_ADDRESS_IN_USE)
+- already_running = TRUE;
+-
+ g_warning (_("Failed to start the thumbnail cache service: %s"), error->message);
+ g_error_free (error);
+
+@@ -179,18 +175,13 @@ main (int argc,
+
+ dbus_g_connection_unref (connection);
+
+- if (already_running)
+- return EXIT_SUCCESS;
+- else
+- return EXIT_FAILURE;
++ /* service already running, exit gracefully to not break clients */
++ return EXIT_SUCCESS;
+ }
+
+ /* try to start the service and exit if that fails */
+ if (!tumbler_manager_start (manager, &error))
+ {
+- if (error->domain == DBUS_GERROR && error->code == DBUS_GERROR_ADDRESS_IN_USE)
+- already_running = TRUE;
+-
+ g_warning (_("Failed to start the thumbnailer manager: %s"), error->message);
+ g_error_free (error);
+
+@@ -201,18 +192,13 @@ main (int argc,
+
+ dbus_g_connection_unref (connection);
+
+- if (already_running)
+- return EXIT_SUCCESS;
+- else
+- return EXIT_FAILURE;
++ /* service already running, exit gracefully to not break clients */
++ return EXIT_SUCCESS;
+ }
+
+ /* try to start the service and exit if that fails */
+ if (!tumbler_service_start (service, &error))
+ {
+- if (error->domain == DBUS_GERROR && error->code == DBUS_GERROR_ADDRESS_IN_USE)
+- already_running = TRUE;
+-
+ g_warning (_("Failed to start the thumbnailer service: %s"), error->message);
+ g_error_free (error);
+
+@@ -223,10 +209,8 @@ main (int argc,
+
+ dbus_g_connection_unref (connection);
+
+- if (already_running)
+- return EXIT_SUCCESS;
+- else
+- return EXIT_FAILURE;
++ /* service already running, exit gracefully to not break clients */
++ return EXIT_SUCCESS;
+ }
+
+ /* create a new main loop */
+diff --git a/tumblerd/tumbler-cache-service.c b/tumblerd/tumbler-cache-service.c
+index f6b2dc5..d9ecfe6 100644
+--- a/tumblerd/tumbler-cache-service.c
++++ b/tumblerd/tumbler-cache-service.c
+@@ -390,7 +390,6 @@ tumbler_cache_service_start (TumblerCacheService *service,
+ GError **error)
+ {
+ DBusConnection *connection;
+- DBusError dbus_error;
+ gint result;
+
+ g_return_val_if_fail (TUMBLER_IS_CACHE_SERVICE (service), FALSE);
+@@ -398,41 +397,18 @@ tumbler_cache_service_start (TumblerCacheService *service,
+
+ g_mutex_lock (service->mutex);
+
+- /* initialize the D-Bus error */
+- dbus_error_init (&dbus_error);
+-
+ /* get the native D-Bus connection */
+ connection = dbus_g_connection_get_connection (service->connection);
+
+ /* request ownership for the cache interface */
+ result = dbus_bus_request_name (connection, "org.freedesktop.thumbnails.Cache1",
+- DBUS_NAME_FLAG_DO_NOT_QUEUE, &dbus_error);
++ DBUS_NAME_FLAG_DO_NOT_QUEUE, NULL);
+
+ /* check if that failed */
+- if (result == DBUS_REQUEST_NAME_REPLY_EXISTS)
++ if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+ {
+ if (error != NULL)
+ {
+- g_set_error (error, DBUS_GERROR, DBUS_GERROR_ADDRESS_IN_USE,
+- _("Another thumbnail cache service is already running"));
+- }
+-
+- g_mutex_unlock (service->mutex);
+-
+- return FALSE;
+- }
+- else if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+- {
+- /* propagate the D-Bus error */
+- if (dbus_error_is_set (&dbus_error))
+- {
+- if (error != NULL)
+- dbus_set_g_error (error, &dbus_error);
+-
+- dbus_error_free (&dbus_error);
+- }
+- else if (error != NULL)
+- {
+ g_set_error (error, DBUS_GERROR, DBUS_GERROR_FAILED,
+ _("Another thumbnail cache service is already running"));
+ }
+diff --git a/tumblerd/tumbler-manager.c b/tumblerd/tumbler-manager.c
+index feb2943..cb8af5c 100644
+--- a/tumblerd/tumbler-manager.c
++++ b/tumblerd/tumbler-manager.c
+@@ -1840,7 +1840,6 @@ tumbler_manager_start (TumblerManager *manager,
+ GError **error)
+ {
+ DBusConnection *connection;
+- DBusError dbus_error;
+ gint result;
+
+ g_return_val_if_fail (TUMBLER_IS_MANAGER (manager), FALSE);
+@@ -1848,41 +1847,18 @@ tumbler_manager_start (TumblerManager *manager,
+
+ g_mutex_lock (manager->mutex);
+
+- /* initialize the D-Bus error */
+- dbus_error_init (&dbus_error);
+-
+ /* get the native D-Bus connection */
+ connection = dbus_g_connection_get_connection (manager->connection);
+
+ /* request ownership for the manager interface */
+ result = dbus_bus_request_name (connection, "org.freedesktop.thumbnails.Manager1",
+- DBUS_NAME_FLAG_DO_NOT_QUEUE, &dbus_error);
++ DBUS_NAME_FLAG_DO_NOT_QUEUE, NULL);
+
+ /* check if that failed */
+- if (result == DBUS_REQUEST_NAME_REPLY_EXISTS)
++ if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+ {
+ if (error != NULL)
+ {
+- g_set_error (error, DBUS_GERROR, DBUS_GERROR_ADDRESS_IN_USE,
+- _("Another thumbnail cache service is already running"));
+- }
+-
+- g_mutex_unlock (manager->mutex);
+-
+- return FALSE;
+- }
+- else if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+- {
+- /* propagate the D-Bus error */
+- if (dbus_error_is_set (&dbus_error))
+- {
+- if (error != NULL)
+- dbus_set_g_error (error, &dbus_error);
+-
+- dbus_error_free (&dbus_error);
+- }
+- else if (error != NULL)
+- {
+ g_set_error (error, DBUS_GERROR, DBUS_GERROR_FAILED,
+ _("Another thumbnailer manager is already running"));
+ }
+diff --git a/tumblerd/tumbler-service.c b/tumblerd/tumbler-service.c
+index 8214a45..3039df9 100644
+--- a/tumblerd/tumbler-service.c
++++ b/tumblerd/tumbler-service.c
+@@ -735,7 +735,6 @@ tumbler_service_start (TumblerService *service,
+ GError **error)
+ {
+ DBusConnection *connection;
+- DBusError dbus_error;
+ gint result;
+
+ g_return_val_if_fail (TUMBLER_IS_SERVICE (service), FALSE);
+@@ -743,40 +742,18 @@ tumbler_service_start (TumblerService *service,
+
+ g_mutex_lock (service->mutex);
+
+- dbus_error_init (&dbus_error);
+-
+ /* get the native D-Bus connection */
+ connection = dbus_g_connection_get_connection (service->connection);
+
+ /* request ownership for the generic thumbnailer interface */
+ result = dbus_bus_request_name (connection, THUMBNAILER_SERVICE,
+- DBUS_NAME_FLAG_DO_NOT_QUEUE, &dbus_error);
++ DBUS_NAME_FLAG_DO_NOT_QUEUE, NULL);
+
+ /* check if that failed */
+- if (result == DBUS_REQUEST_NAME_REPLY_EXISTS)
++ if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+ {
+ if (error != NULL)
+ {
+- g_set_error (error, DBUS_GERROR, DBUS_GERROR_ADDRESS_IN_USE,
+- _("Another thumbnail cache service is already running"));
+- }
+-
+- g_mutex_unlock (service->mutex);
+-
+- return FALSE;
+- }
+- else if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+- {
+- /* propagate the D-Bus error */
+- if (dbus_error_is_set (&dbus_error))
+- {
+- if (error != NULL)
+- dbus_set_g_error (error, &dbus_error);
+-
+- dbus_error_free (&dbus_error);
+- }
+- else if (error != NULL)
+- {
+ g_set_error (error, DBUS_GERROR, DBUS_GERROR_FAILED,
+ _("Another generic thumbnailer is already running"));
+ }
+--
+cgit
diff --git a/tumbler-0.1.22-start-pipeline.patch b/tumbler-0.1.22-start-pipeline.patch
new file mode 100644
index 0000000..8666d45
--- /dev/null
+++ b/tumbler-0.1.22-start-pipeline.patch
@@ -0,0 +1,25 @@
+From 93ffbc88965dd6c5eaa1aa8589efea5579b44d2a Mon Sep 17 00:00:00 2001
+From: Sam Thursfield <sam.thursfield at codethink.co.uk>
+Date: Mon, 26 Sep 2011 17:58:10 +0100
+Subject: [PATCH 2/2] gst-thumbnailer: Start pipeline so thumbnail is actually generated
+
+---
+ plugins/gst-thumbnailer/gst-helper.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/plugins/gst-thumbnailer/gst-helper.c b/plugins/gst-thumbnailer/gst-helper.c
+index 53e0b91..a7e4dc1 100644
+--- a/plugins/gst-thumbnailer/gst-helper.c
++++ b/plugins/gst-thumbnailer/gst-helper.c
+@@ -154,6 +154,8 @@ gst_helper_convert_buffer_to_pixbuf (GstBuffer *buffer,
+
+ bus = gst_element_get_bus (GST_ELEMENT (pipeline));
+
++ gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
++
+ i = 0;
+ msg = NULL;
+ while (msg == NULL && i < 5)
+--
+1.7.4.1
+
More information about the scm-commits
mailing list