summaryrefslogtreecommitdiffstats
path: root/ext/gdk_pixbuf/gstgdkpixbuf.c
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-07-17 04:28:31 +0000
committerDavid Schleef <ds@schleef.org>2003-07-17 04:28:31 +0000
commitdc0d8186c5b3ab89f4c7a33e3321399cf518d7a7 (patch)
tree4ac8ae911093e846808a54d5e48aadf7ace5dfb9 /ext/gdk_pixbuf/gstgdkpixbuf.c
parentdf7707a51d6e132e4a1f58493a5490e0240a1f9b (diff)
Fix plugin to compile and work with Gtk+-2.0 (works better with 2.2)
Original commit message from CVS: Fix plugin to compile and work with Gtk+-2.0 (works better with 2.2)
Diffstat (limited to 'ext/gdk_pixbuf/gstgdkpixbuf.c')
-rw-r--r--ext/gdk_pixbuf/gstgdkpixbuf.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/ext/gdk_pixbuf/gstgdkpixbuf.c b/ext/gdk_pixbuf/gstgdkpixbuf.c
index e9e12897..eaca7aaa 100644
--- a/ext/gdk_pixbuf/gstgdkpixbuf.c
+++ b/ext/gdk_pixbuf/gstgdkpixbuf.c
@@ -128,6 +128,40 @@ gst_gdk_pixbuf_sink_link (GstPad *pad, GstCaps *caps)
return GST_PAD_LINK_DELAYED;
}
+#if GDK_PIXBUF_MAJOR == 2 && GDK_PIXBUF_MINOR < 2
+/* gdk-pixbuf prior to 2.2 didn't have gdk_pixbuf_get_formats().
+ * These are just the formats that gdk-pixbuf is known to support.
+ * But maybe not -- it may have been compiled without an external
+ * library. */
+static GstCaps *gst_gdk_pixbuf_get_capslist(void)
+{
+ GstCaps *capslist;
+
+ capslist = gst_caps_chain(
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/png", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/jpeg", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/gif", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-icon", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "application/x-navi-animation", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-cmu-raster", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-sun-raster", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-pixmap", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/tiff", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-portable-anymap", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-portable-bitmap", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-portable-graymap", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-portable-pixmap", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/bmp", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-bmp", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-MS-bmp", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/vnd.wap.wbmp", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-bitmap", NULL),
+ GST_CAPS_NEW("gdk_pixbuf_sink", "image/x-tga", NULL),
+ NULL);
+
+ return capslist;
+}
+#else
static GstCaps *gst_gdk_pixbuf_get_capslist(void)
{
GSList *slist;
@@ -157,6 +191,7 @@ static GstCaps *gst_gdk_pixbuf_get_capslist(void)
return capslist;
}
+#endif
static GstCaps *gst_gdk_pixbuf_sink_getcaps(GstPad *pad, GstCaps *caps)
{