From 8468a02e24fa79adc1b396b56e661a3887dfcb52 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 5 Nov 2003 03:24:54 +0000 Subject: add initial version of gdkpixbuf loader for gtk that is capable of loading AVI and mpeg videos as GdkPixbufAnimation.... Original commit message from CVS: add initial version of gdkpixbuf loader for gtk that is capable of loading AVI and mpeg videos as GdkPixbufAnimation. I'm not sure if such a thing would be useful or too much trouble, so I'll throw it at enough testers to figure it out ;) We might want to disable it by defualt though in the future. (Currently there is not even a configure switch implemented to disable it.) This includes a fix to not use GError in gstgdkpixbuf's typefind function and to only return GST_TYPE_FIND_MINIMUM when doing typefinding via gdk as this breaks quite a bit with the GStreamer loader installed. --- ext/gdk_pixbuf/gstgdkpixbuf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ext/gdk_pixbuf/gstgdkpixbuf.c') diff --git a/ext/gdk_pixbuf/gstgdkpixbuf.c b/ext/gdk_pixbuf/gstgdkpixbuf.c index c5b59038..e3c07ff4 100644 --- a/ext/gdk_pixbuf/gstgdkpixbuf.c +++ b/ext/gdk_pixbuf/gstgdkpixbuf.c @@ -382,7 +382,6 @@ gst_gdk_pixbuf_type_find (GstTypeFind *tf, gpointer ignore) guint8 *data; GdkPixbufLoader *pixbuf_loader; GdkPixbufFormat *format; - GError *error = NULL; data = gst_type_find_peek (tf, 0, GST_GDK_PIXBUF_TYPE_FIND_SIZE); if (data == NULL) return; @@ -392,18 +391,18 @@ gst_gdk_pixbuf_type_find (GstTypeFind *tf, gpointer ignore) pixbuf_loader = gdk_pixbuf_loader_new(); gdk_pixbuf_loader_write (pixbuf_loader, data, GST_GDK_PIXBUF_TYPE_FIND_SIZE, - &error); + NULL); format = gdk_pixbuf_loader_get_format (pixbuf_loader); if (format != NULL) { gchar **mlist = gdk_pixbuf_format_get_mime_types(format); - gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, + gst_type_find_suggest (tf, GST_TYPE_FIND_MINIMUM, gst_caps_new ("gdk_pixbuf_type_find", mlist[0], NULL)); } - gdk_pixbuf_loader_close (pixbuf_loader, &error); + gdk_pixbuf_loader_close (pixbuf_loader, NULL); g_object_unref (G_OBJECT (pixbuf_loader)); } -- cgit