From a6af52cc25a1f1407f30f04e3119ff3ef15dde3f Mon Sep 17 00:00:00 2001 From: Tim-Philipp Müller Date: Thu, 22 Jun 2006 12:17:13 +0000 Subject: gst/id3demux/id3v2frames.c: Set image type from APIC frame as "image-type" field of GST_TAG_IMAGE buffer caps (#344605). Original commit message from CVS: * gst/id3demux/id3v2frames.c: (parse_picture_frame): Set image type from APIC frame as "image-type" field of GST_TAG_IMAGE buffer caps (#344605). --- ChangeLog | 6 ++++++ common | 2 +- gst/id3demux/id3v2frames.c | 12 +++++++++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94c8e2de..2992f00f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-06-22 Tim-Philipp Müller + + * gst/id3demux/id3v2frames.c: (parse_picture_frame): + Set image type from APIC frame as "image-type" field + of GST_TAG_IMAGE buffer caps (#344605). + 2006-06-20 Tim-Philipp Müller * ext/flac/Makefile.am: diff --git a/common b/common index bbfa0146..123195d3 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit bbfa0146961f4ca61ddbca7b42360b5741a6354b +Subproject commit 123195d3bbcc0b6e1cf867d3a180685f8766a0be diff --git a/gst/id3demux/id3v2frames.c b/gst/id3demux/id3v2frames.c index 949bbbf0..b2e3353b 100644 --- a/gst/id3demux/id3v2frames.c +++ b/gst/id3demux/id3v2frames.c @@ -495,9 +495,15 @@ parse_picture_frame (ID3TagsWorking * work) } if (image && image_caps) { - /* FIXME: use an enum here, declare in -base/gst-libs/gst/tag/? */ - /* gst_structure_set (gst_caps_get_structure (image_caps, 0), - "id3-picture-type", G_TYPE_INT, (gint) pic_type, NULL); */ + /* FIXME: remove #ifdef once we depend on -base >= 0.10.9 */ +#ifdef GST_TYPE_TAG_IMAGE_TYPE + if (pic_type > 0x14) + pic_type = GST_TAG_IMAGE_TYPE_UNDEFINED; + gst_structure_set (gst_caps_get_structure (image_caps, 0), + "image-type", GST_TYPE_TAG_IMAGE_TYPE, + (GstTagImageType) pic_type, NULL); +#endif + gst_buffer_set_caps (image, image_caps); gst_caps_unref (image_caps); if (pic_type == 0x01 || pic_type == 0x02) { -- cgit