From cf6afdbe7ad9e2458c2602efe13049e6b6ba1f9a Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Mon, 29 Oct 2007 21:52:44 +0000 Subject: Patch from Filippo Giunchedi * src/itdb_artwork.c: add I420 unpacker * src/itdb_device.c: iPod classic full screen photo format is I420 * src/itdb_device.h: add I420 format * src/ithumb-writer.c: add stub for an I420 packer git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1746 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- src/ithumb-writer.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/ithumb-writer.c') diff --git a/src/ithumb-writer.c b/src/ithumb-writer.c index 2c925a8..5763634 100644 --- a/src/ithumb-writer.c +++ b/src/ithumb-writer.c @@ -297,6 +297,15 @@ pack_rec_RGB_555 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info, return deranged_pixels; } +static guchar * +pack_I420 (GdkPixbuf *orig_pixbuf, const Itdb_ArtworkFormat *img_info, + gint horizontal_padding, gint vertical_padding, + guint32 *thumb_size) +{ + // FIXME do something + g_return_val_if_fail (img_info, NULL); + return NULL; +} /* pack_UYVY() is adapted from imgconvert.c from the GPixPod project * (www.gpixpod.org) */ @@ -702,6 +711,13 @@ ithumb_writer_write_thumbnail (iThumbWriter *writer, thumb->vertical_padding, &thumb->size); break; + case THUMB_FORMAT_I420_BE: + case THUMB_FORMAT_I420_LE: + pixels = pack_I420 (pixbuf, writer->img_info, + thumb->horizontal_padding, + thumb->vertical_padding, + &thumb->size); + break; } -- cgit