summaryrefslogtreecommitdiffstats
path: root/ext/gdk_pixbuf/gst_loader.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2003-11-25 02:39:01 +0000
committerBenjamin Otte <otte@gnome.org>2003-11-25 02:39:01 +0000
commitdddf7c2b3ed2548029be8fa178794d814fe5ae03 (patch)
tree30e136084c5bdfeac0d81d45b34439968b995169 /ext/gdk_pixbuf/gst_loader.c
parentd8f78ea4a8eff2f5e7b240001d7a1f86c82c9ebb (diff)
more fixes to the pixbuf loader. I can use it for thumbnailing nicely now
Original commit message from CVS: more fixes to the pixbuf loader. I can use it for thumbnailing nicely now
Diffstat (limited to 'ext/gdk_pixbuf/gst_loader.c')
-rw-r--r--ext/gdk_pixbuf/gst_loader.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/ext/gdk_pixbuf/gst_loader.c b/ext/gdk_pixbuf/gst_loader.c
index aad4df2a..7a8af4ff 100644
--- a/ext/gdk_pixbuf/gst_loader.c
+++ b/ext/gdk_pixbuf/gst_loader.c
@@ -179,9 +179,34 @@ gst_loader_load_animation (FILE *f, GError **error)
GST_LOG_OBJECT (ani, "load_animation succeeded");
return GDK_PIXBUF_ANIMATION (ani);
}
+static GdkPixbuf *
+gst_loader_load (FILE *f, GError **error)
+{
+ GdkPixbufAnimation *ani;
+ GdkPixbuf *pixbuf;
+
+ ani = gst_loader_load_animation (f, error);
+ if (ani == NULL)
+ return NULL;
+
+ pixbuf = gdk_pixbuf_animation_get_static_image (ani);
+ if (!pixbuf) {
+ GST_ERROR_OBJECT (ani, "Could not get an image in _pixbuf_load");
+ g_object_unref (ani);
+ g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
+ "Could not get an image from file.");
+ return NULL;
+ }
+
+ g_object_ref (pixbuf);
+ g_object_unref (ani);
+
+ return pixbuf;
+}
void
fill_vtable (GdkPixbufModule *module)
{
+ module->load = gst_loader_load;
module->begin_load = gst_loader_begin_load;
module->load_increment = gst_loader_load_increment;
module->stop_load = gst_loader_stop_load;
@@ -206,8 +231,9 @@ fill_info (GdkPixbufFormat *info)
};
static gchar *mime_types[] = {
- "video/avi", "video/x-avi",
+ "video/avi", "video/x-avi", "video/x-msvideo",
"video/mpeg",
+ "video/quicktime",
NULL
};