Wed, 21 Dec 2005 18:43:39 +0000
[gaim-migrate @ 14935]
Jason LeBrun wrote to gaim-devel:
"I have found a small quirk in the way gdk_pixbuf_loader works. When you
are using it without signalling, the proper way to use it is to call
gdk_pixbuf_loader_close *before* calling gdk_pixbuf_loader_get_animation
or gdk_pixbuf_loader_get_pixbuf. The call to gdk_pixbuf_loader_close
signals that no more writes will be occuring.
In particular, this affects images that are less than 1k in size. If
gdk_pixbuf_loader_close is not called before _get_animation, the loader
will not return anything unless it has received more than 1k of data
(the file type sniffing buffer size) or it has been closed.
So, the proper order of calls for loaders in the gtk*.c code is:
gdk_pixbuf_loader_new();
gdk_pixbuf_loader_write();
gdk_pixbuf_loader_close();
gdk_pixbuf_loader_get_animation();"
I know we fixed a bug by changing this in one place. I've gone through and updated the rest.
| 12024 | 1 | /** |
|
12050
a7d5a2430722
[gaim-migrate @ 14345]
Mark Doliner <markdoliner@pidgin.im>
parents:
12024
diff
changeset
|
2 | * @file gtkmedia.h Voice and Video UI |
|
a7d5a2430722
[gaim-migrate @ 14345]
Mark Doliner <markdoliner@pidgin.im>
parents:
12024
diff
changeset
|
3 | * @ingroup gtkui |
| 12024 | 4 | * |
| 5 | * gaim | |
| 6 | * | |
| 7 | * Gaim is the legal property of its developers, whose names are too numerous | |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
| 10 | * | |
| 11 | * This program is free software; you can redistribute it and/or modify | |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | */ | |
| 25 | ||
| 26 | #ifndef _GAIM_GTK_MEDIA_H_ | |
| 27 | #define _GAIM_GTK_MEDIA_H_ | |
| 28 | ||
| 29 | #ifdef HAVE_VV | |
| 30 | ||
| 31 | #include "media.h" | |
| 32 | ||
| 33 | /*************************************************************************** | |
| 34 | * @name GTK+ Media API | |
| 35 | ***************************************************************************/ | |
| 36 | /*@{*/ | |
| 37 | ||
| 38 | /** | |
| 39 | * Initializes the GTK+ webcam system. | |
| 40 | */ | |
| 41 | void gaim_gtk_media_init(void); | |
| 42 | /*@}*/ | |
| 43 | ||
| 44 | #endif /* HAVE_VV */ | |
| 45 | ||
| 46 | #endif /* _GAIM_GTK_MEDIA_H_ */ |