[gstreamer-bugs] [Bug 486659] metadata parser for image files
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Tue Oct 16 04:19:21 PDT 2007
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=486659
GStreamer | gst-plugins-bad | Ver: HEAD CVS
------- Comment #7 from Edgard Lima 2007-10-16 11:19 UTC -------
1. Use helper libraries to create tag lists from metadachunk
* lets think just about the design, no matter if it is ext or gst
GstTagList *gst_tag_list_from_exifimage_chunk(const GstBuffer * buffer);
GstTagList *gst_tag_list_from_iptc_chunk(const GstBuffer * buffer);
GstTagList *gst_tag_list_from_xmp_chunk(const GstBuffer * buffer);
GstBuffer *gst_exifimage_chunk_from_tag_list(GstTagList *tag_list);
GstBuffer *gst_iptc_chunk_from_tag_list(GstTagList *tag_list);
GstBuffer *gst_xmp_chunk_from_tag_list(GstTagList *tag_list);
1.1 those helper libraries would be called by decoders
(tag_list_from_metadata_chunk) and sent as a message. On the other side,
Encoders recive tag messsages and write it as chunks inside the file been
converted to (metadata_chunk_from_tag_list)
1.1.1- Advantages
i - autoplugable
ii- there is only one central code (library) for all file formats. The only
thing the file format has to do is to find the metadata chunk inside it.
1.1.2- Disadvanges
i - The encoder doesn't have any idea about what kind of netadata it is so it
will have to write duplicate information to all the metadata chunks exif, iptc,
xmp and future ones.
1.1.3- Open issues
i- Applications would need some extra Gst-Interface to encoders if it want to
decide to write exif and/or iptc and/or xmp
examples:
----------- ----------- ------------
| v4l2src | -> | jpegenc | -> | filesink |
----------- ----------- ------------
The application could send metadata (as any other element in pipepilene). The
end file will be a file with 3 metadata chunks (exif, iptc, xmp) with
duplicated info
>From the application point of view, there is no problem because the metadata is
merged. Unless the application has 4 sidebars, one for general tags, one for
iptc tags and one for xmp tags. In this case the application can't identify
which metadata is from exif, iptc, and so on.
----------- ----------- ---------- ------------
| filesrc | -> | jpegdec | -> | pngenc | -> | filesink |
----------- ----------- ---------- ------------
The same problem, the application doesn't have control of what metadata will be
created
----------- ----------- ---------------
| filesrc | -> | jpegdec | -> | xvimagesink |
----------- ----------- ---------------
The same problem, if the application wants to show tags separately it can't
(lets just think of an app like Eye of Gnome for example) !!!
So, to solve these limitations
i- app can't know what kind of metadata it is
ii - encoders don't know what kind of metadata to write
I propose the following changes to GstTagList
1- A tag list has one id, name and description, i.e. GST_TAG_CATEGORY_EXIF,
"Exif" and "Exif metadata for images"
1.1 - Ids starting from some value, for example 4000 are reserved for
application specific
1.2 - there is a GST_TAG_CATEGORY_GENERAL
2- A tag values can contains not only unique values, like INT, STRING and so,
but can also be of type GROUP
2.1- GROUP tags has a name, and description i.e. "Rights" "Information
regarding the legal restrictions" and also a list of other tags
With such a thing, the Application could show metadata all together or make it
friendly like this:
Exif
Camera
Make
Model
XResolution
YResolution
Image Data
Orientation
DateTime
Compression
MakerNote
Object Distance
Time Zone
XMP
Basic
Advisory
BaseURL
CreateDate
CreatorTool
Rights
Certificate
Marked
Owner
UsageTerms
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=486659.
More information about the Gstreamer-bugs
mailing list