AVI loader



I have written a GdkPixbuf loader for AVI files.
Attached is a patch, and a tarball.

- Jørgen Fogh

? aviloader.diff
Index: gdk-pixbuf/Makefile.am
===================================================================
RCS file: /cvs/gnome/gtk+/gdk-pixbuf/Makefile.am,v
retrieving revision 1.138
diff --unified -r1.138 Makefile.am
--- gdk-pixbuf/Makefile.am	20 Jun 2004 05:11:57 -0000	1.138
+++ gdk-pixbuf/Makefile.am	29 Jun 2004 18:08:04 -0000
@@ -47,6 +47,14 @@
 module_libs = libgdk_pixbuf-$(GTK_API_VERSION).la $(GDK_PIXBUF_DEP_LIBS)
 
 #
+# The AVI plugin.
+#
+libpixbufloader_avi_la_SOURCES = io-avi.c io-avi-animation.c io-avi-animation.h
+libpixbufloader_avi_la_LDFLAGS = -avoid-version -module $(no_undefined)
+libpixbufloader_avi_la_LIBADD = $(module_libs)
+libpixbufloader_static_avi_la_SOURCES = io-avi.c
+
+#
 # The PNG plugin.
 #
 libpixbufloader_png_la_SOURCES = io-png.c
@@ -158,6 +166,9 @@
 libpixbufloader_pcx_la_LDFLAGS = -avoid-version -module $(no_undefined)
 libpixbufloader_pcx_la_LIBADD = $(module_libs)
 
+AVI_LIB = libpixbufloader-avi.la
+STATIC_AVI_LIB = libpixbufloader-static-avi.la
+
 if HAVE_PNG
 PNG_LIB = libpixbufloader-png.la
 STATIC_PNG_LIB = libpixbufloader-static-png.la
@@ -209,6 +220,7 @@
 if BUILD_DYNAMIC_MODULES
 
 loader_LTLIBRARIES = 	\
+	$(AVI_LIB)	\
 	$(PNG_LIB)	\
 	$(JPEG_LIB)	\
 	$(GIF_LIB)	\
@@ -231,6 +243,7 @@
 loader_LTLIBRARIES = 
 
 noinst_LTLIBRARIES =		\
+	$(STATIC_AVI_LIB)	\
 	$(STATIC_PNG_LIB)	\
 	$(STATIC_JPEG_LIB)	\
 	$(STATIC_GIF_LIB)	\
@@ -415,6 +428,7 @@
 	pixbufloader_jpeg.def			\
 	pixbufloader_ras.def			\
 	pixbufloader_gif.def			\
+	pixbufloader_avi.def			\
 	pixbufloader_png.def			\
 	pixbufloader_tiff.def			\
 	pixbufloader_wbmp.def			\
Index: gdk-pixbuf/gdk-pixbuf-io.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk-pixbuf/gdk-pixbuf-io.c,v
retrieving revision 1.94
diff --unified -r1.94 gdk-pixbuf-io.c
--- gdk-pixbuf/gdk-pixbuf-io.c	5 Jun 2004 05:16:18 -0000	1.94
+++ gdk-pixbuf/gdk-pixbuf-io.c	29 Jun 2004 18:08:08 -0000
@@ -438,6 +438,7 @@
   extern void MODULE_ENTRY (type, fill_info)   (GdkPixbufFormat *info);   \
   extern void MODULE_ENTRY (type, fill_vtable) (GdkPixbufModule *module)
 
+module (avi);
 module (png);
 module (bmp);
 module (wbmp);
@@ -466,6 +467,13 @@
                 /* Ugly hack so we can use else if unconditionally below ;-) */
         }
         
+#ifdef INCLUDE_avi
+	else if (strcmp (image_module->module_name, "avi") == 0) {
+                fill_info = MODULE_ENTRY (avi, fill_info);
+                fill_vtable = MODULE_ENTRY (avi, fill_vtable);
+	}
+#endif
+
 #ifdef INCLUDE_png	
 	else if (strcmp (image_module->module_name, "png") == 0) {
                 fill_info = MODULE_ENTRY (png, fill_info);
@@ -585,9 +593,9 @@
 gdk_pixbuf_io_init ()
 {
 	gchar *included_formats[] = { 
-		"ani", "png", "bmp", "wbmp", "gif", 
-		"ico", "jpeg", "pnm", "ras", "tiff", 
-		"xpm", "xbm", "tga", "pcx",
+		"ani", "avi", "png", "bmp", "wbmp",
+		"gif", "ico", "jpeg", "pnm", "ras",
+		"tiff", "xpm", "xbm", "tga", "pcx",
 		NULL
 	};
 	gchar **name;

Attachment: aviloader.tar.bz2
Description: application/bzip



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]