After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626651 - [tag] Photography/capture settings tags
[tag] Photography/capture settings tags
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal enhancement
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-11 17:38 UTC by Thiago Sousa Santos
Modified: 2010-08-25 12:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tags: New capture settings tags (4.16 KB, patch)
2010-08-11 17:41 UTC, Thiago Sousa Santos
none Details | Review
tag: More photography tags (5.87 KB, patch)
2010-08-11 19:12 UTC, Thiago Sousa Santos
none Details | Review
tag: 2 more tags (3.60 KB, patch)
2010-08-12 13:27 UTC, Thiago Sousa Santos
none Details | Review
tag: Adds GST_TAG_APPLICATION_DATA (2.43 KB, patch)
2010-08-17 13:24 UTC, Thiago Sousa Santos
none Details | Review
tag: Adds some basic photography tags (4.04 KB, patch)
2010-08-17 13:31 UTC, Thiago Sousa Santos
none Details | Review
tags: More photography related tags (6.08 KB, patch)
2010-08-17 13:32 UTC, Thiago Sousa Santos
none Details | Review
tag: Adds GST_TAG_CAPTURE_FLASH_FIRED/_MODE (2.85 KB, patch)
2010-08-20 18:24 UTC, Thiago Sousa Santos
none Details | Review

Description Thiago Sousa Santos 2010-08-11 17:38:56 UTC
I'll attach some patches to add some photography and capture settings tags that would be useful to have in order to support them in xmp/exif serialization/deserialization.
Comment 1 Thiago Sousa Santos 2010-08-11 17:41:32 UTC
Created attachment 167644 [details] [review]
tags: New capture settings tags

This patch adds the following tags:

GST_TAG_CAPTURE_SHUTTER_SPEED as a fraction (seconds)
GST_TAG_CAPTURE_FOCAL_RATIO as a double
GST_TAG_CAPTURE_FOCAL_LENGTH as a double (mm)
GST_TAG_CAPTURE_DIGITAL_ZOOM_RATIO as a double
GST_TAG_CAPTURE_FLASH_FIRED as a boolean

My only doubt here is about the flash one, if it would be better
to allow an enum like tag to allow setting what type of flash was
used. Like red eye reduction flash, for example. But I don't know
many other flash modes.
Comment 2 Thiago Sousa Santos 2010-08-11 19:12:23 UTC
Created attachment 167650 [details] [review]
tag: More photography tags

More tags:

API: GST_TAG_CAPTURE_EXPOSURE_PROGRAM
API: GST_TAG_CAPTURE_EXPOSURE_MODE
API: GST_TAG_CAPTURE_SCENE_CAPTURE_TYPE
API: GST_TAG_CAPTURE_GAIN_ADJUSTMENT
API: GST_TAG_CAPTURE_WHITE_BALANCE
API: GST_TAG_CAPTURE_CONTRAST
API: GST_TAG_CAPTURE_SATURATION
Comment 3 Thiago Sousa Santos 2010-08-12 13:27:29 UTC
Created attachment 167727 [details] [review]
tag: 2 more tags

Adds an ISO speed tag for photography tagging, and another
one for manufacturer's private data, that is allowed in
exif and set by some digital cameras.

API: GST_TAG_CAPTURE_ISO_SPEED
API: GST_TAG_DEVICE_MANUFACTURER_DATA

https://bugzilla.gnome.org/show_bug.cgi?id=626651
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2010-08-12 13:42:38 UTC
I wonder if we should register most of the imaging/exif specific ones in 
gst-plugins-base/gst-libs/gst/tag/tag.h

GST_TAG_DEVICE_MANUFACTURER_DATA
could become a GST_TAG_APPLICATION_DATA (GST_TAG_CUSTOM_DATA/GST_TAG_PRIVATE_DATA).
It could e.g. be used by ID3 tags and mapped to "PRIV" ("4.27. Private frame", http://www.id3.org/id3v2.4.0-frames).
Comment 5 Thiago Sousa Santos 2010-08-16 18:26:38 UTC
(In reply to comment #4)
> I wonder if we should register most of the imaging/exif specific ones in 
> gst-plugins-base/gst-libs/gst/tag/tag.h

Is there any difference? Advantage?

> 
> GST_TAG_DEVICE_MANUFACTURER_DATA
> could become a GST_TAG_APPLICATION_DATA
> (GST_TAG_CUSTOM_DATA/GST_TAG_PRIVATE_DATA).
> It could e.g. be used by ID3 tags and mapped to "PRIV" ("4.27. Private frame",
> http://www.id3.org/id3v2.4.0-frames).

GST_TAG_APPLICATION_DATA sounds better to me.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2010-08-16 19:13:51 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > I wonder if we should register most of the imaging/exif specific ones in 
> > gst-plugins-base/gst-libs/gst/tag/tag.h
> 
> Is there any difference? Advantage?

The idea is to have very generic tags in core only. Tags that are more specific (and especially media specific) are in base.
Comment 7 Arun Raghavan 2010-08-17 11:51:33 UTC
Review of attachment 167644 [details] [review]:

::: gst/gsttaglist.c
@@ +379,3 @@
+  gst_tag_register (GST_TAG_CAPTURE_FLASH_FIRED, GST_TAG_FLAG_META,
+      G_TYPE_BOOLEAN, _("capture flash fired"),
+      _("If the flash was fired when capturing an image"), NULL);

http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif/flash.html seems to suggest that the flash firing could be more complex. I'll try to find some media that has more complex settings, but here's one to start with: http://farm4.static.flickr.com/3165/2600398503_3387890d40_o_d.jpg
Comment 8 Arun Raghavan 2010-08-17 11:51:40 UTC
Review of attachment 167650 [details] [review]:

::: gst/gsttaglist.h
@@ +1074,3 @@
+ *   "portrait-mode" - closeup, leaving background out of focus
+ *   "landscape-mode" - landscape photos, background in focus
+ *

Bit of a nitpick, but I'd go with 'normal' instead of 'normal-program', 'landscape' instead of 'landscape-mode', etc. apperture/shutter-priority should remain as is, though.

@@ +1128,3 @@
+ *   "auto"
+ *   "manual"
+ *

I believe cameras generally provide more white balance modes. My Canon Powershot S5IS provides these: "auto", "daylight", "cloudy", "tungsten", "fluorescent", "fluorescent h" (I've no idea what that is), "flash", "manual".
Comment 9 Thiago Sousa Santos 2010-08-17 13:24:07 UTC
Created attachment 168071 [details] [review]
tag: Adds GST_TAG_APPLICATION_DATA

Updated patch. This is a single tag that should go into core, as we
have _APPLICATION_NAME there as well.
Comment 10 Thiago Sousa Santos 2010-08-17 13:31:35 UTC
Created attachment 168074 [details] [review]
tag: Adds some basic photography tags

These are the basic photography tags. And this patch is for -base.

GST_TAG_CAPTURE_SHUTTER_SPEED
GST_TAG_CAPTURE_FOCAL_RATIO
GST_TAG_CAPTURE_FOCAL_LENGTH
GST_TAG_CAPTURE_DIGITAL_ZOOM_RATIO
GST_TAG_CAPTURE_ISO_SPEED
Comment 11 Thiago Sousa Santos 2010-08-17 13:32:54 UTC
Created attachment 168076 [details] [review]
tags: More photography related tags

Those are the more tricky ones, as they are enum-like.
Updated with Arun's comments and this is also for -base.

GST_TAG_CAPTURE_EXPOSURE_PROGRAM
GST_TAG_CAPTURE_EXPOSURE_MODE
GST_TAG_CAPTURE_SCENE_CAPTURE_TYPE
GST_TAG_CAPTURE_GAIN_ADJUSTMENT
GST_TAG_CAPTURE_WHITE_BALANCE
GST_TAG_CAPTURE_CONTRAST
GST_TAG_CAPTURE_SATURATION
Comment 12 Thiago Sousa Santos 2010-08-17 13:37:28 UTC
(In reply to comment #7)
> Review of attachment 167644 [details] [review]:
> 
> ::: gst/gsttaglist.c
> @@ +379,3 @@
> +  gst_tag_register (GST_TAG_CAPTURE_FLASH_FIRED, GST_TAG_FLAG_META,
> +      G_TYPE_BOOLEAN, _("capture flash fired"),
> +      _("If the flash was fired when capturing an image"), NULL);
> 
> http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif/flash.html
> seems to suggest that the flash firing could be more complex. I'll try to find
> some media that has more complex settings, but here's one to start with:
> http://farm4.static.flickr.com/3165/2600398503_3387890d40_o_d.jpg

Yes, this exif flash tag is made of flags. Not sure how to represent those in gstreamer tags. With my initial proposal we would only be able to set the first bit (flash fired/flash not fired) which is probably the most important bit there.

Any ideas on how to represent this? Using multiple different tags? Or a "flash-type" string tag?
Comment 13 Arun Raghavan 2010-08-17 13:40:09 UTC
(In reply to comment #12)
[...]
> Yes, this exif flash tag is made of flags. Not sure how to represent those in
> gstreamer tags. With my initial proposal we would only be able to set the first
> bit (flash fired/flash not fired) which is probably the most important bit
> there.
> 
> Any ideas on how to represent this? Using multiple different tags? Or a
> "flash-type" string tag?

Maybe we can split this into 2 tags, one human-readable boolean flag which is the one you've added, and one with just the EXIF value for muxers to use if available?
Comment 14 Thiago Sousa Santos 2010-08-20 17:28:12 UTC
Yes, I think multiple tags fits better here. I'll add the GST_TAG_CAPTURE_FLASH_FIRED for now. We can add others if needed later.


I might push this upstream real soon now. If someone has an objection/suggestion, please stand up :)
Comment 15 Thiago Sousa Santos 2010-08-20 18:24:31 UTC
Created attachment 168425 [details] [review]
tag: Adds GST_TAG_CAPTURE_FLASH_FIRED/_MODE

Adds a new tag for informing if flash was used while
capturing an image and the flash mode selected by the
user during this capture

API: GST_TAG_CAPTURE_FLASH_FIRED
API: GST_TAG_CAPTURE_FLASH_MODE
Comment 16 Thiago Sousa Santos 2010-08-24 18:49:55 UTC
Seems like metadata is using the same names for tags that I have added here. Maybe we should rename them to GST_TAG_CAPTURING... instead og GST_TAG_CAPTURE...?

The problematic tags are:
      GST_TAG_CAPTURE_CONTRAST ('capture-contrast')
      GST_TAG_CAPTURE_EXPOSURE_MODE ('capture-exposure-mode')
      GST_TAG_CAPTURE_EXPOSURE_PROGRAM ('capture-exposure-program')
      GST_TAG_CAPTURE_SATURATION ('capture-saturation')
      GST_TAG_CAPTURE_SCENE_CAPTURE_TYPE ('capture-scene-capture-type')
      GST_TAG_CAPTURE_SHUTTER_SPEED ('capture-shutter-speed')
      GST_TAG_CAPTURE_WHITE_BALANCE ('capture-white-balance')

They also have different types from the ones I'm adding.

Metadata plugin fails to load because of this conflict, I'd rather change the names to avoid people upgrading to newer -base releases and breaking their old -bad stuff.
Comment 17 Thiago Sousa Santos 2010-08-25 12:24:39 UTC
Just pushed this. Adding the tags and mapping them into exif.

(core)
commit 0bd40a439789fdfb92bb945ccdb0b9b2b34611eb
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Mon Aug 16 14:12:35 2010 -0300

    tag: Adds GST_TAG_APPLICATION_DATA
    
    Adds GST_TAG_APPLICATION_DATA for representing arbitrary private
    data that applications might want to store into tags. Exif/id3,
    for example, have tags for this.
    
    API: GST_TAG_APPLICATION_DATA
    
    Fixes #626651

(base)
commit 5045c177518c962e2a4956962ffb5bb3b2d5cfb1
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Wed Aug 25 08:41:52 2010 -0300

    tag: exif: Move some tags to their correct IFDs
    
    Put some tags in their correct IFDs

commit 0ea550b0cfda173f7a60f2a20cf99b1d4269d10d
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Fri Aug 20 16:39:08 2010 -0300

    tag: exif: Always write FlashPixVersion tag
    
    FlashPixVersion is mandatory and constant. Write it always.

commit 9c5f791a34fbcf4ebed5aa203ab0b9b4da699301
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Fri Aug 20 15:59:22 2010 -0300

    tag: exif: Adds flash tags mapping
    
    Adds a mapping for GST_TAG_CAPTURING_FLASH_FIRED/_MODE to
    the exif Flash tag.
    
    Tests included.

commit ac361dcc3af27abb83c58b69d7d7c6c8722a998c
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Thu Aug 19 15:47:18 2010 -0300

    tag: exif: More photography mappings
    
    Adds mappings from:
    GST_TAG_CAPTURING_EXPOSURE_PROGRAM -> ExposureProgram
    GST_TAG_CAPTURING_EXPOSURE_MODE -> ExposureMode
    GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE -> SceneCaptureType
    GST_TAG_CAPTURING_GAIN_ADJUSTMENT -> GainControl
    GST_TAG_CAPTURING_WHITE_BALANCE -> WhiteBalance
    GST_TAG_CAPTURING_CONTRAST -> Constrast
    GST_TAG_CAPTURING_SATURATION -> Saturation
    
    Also renames gst_tag_image_orientation_from_exif_value and
    gst_tag_image_orientation_to_exif_value to remove the 'gst'
    prefix and not including in the win32 defs.
    
    Tests included.

commit cc8bd8bcec93a1822efbb58c3ff5fda5edb58cac
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Thu Aug 19 09:39:39 2010 -0300

    tag: exif: Add macros for the exif ids
    
    Use macros for exif ids to avoid having those numbers spread
    all over the code.

commit 10d680b74d742f8a4efb3731944190cf56ced169
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Tue Aug 17 15:56:34 2010 -0300

    tag: exif: Adds photography tags mappings
    
    Adds the following mappings for the exif helper:
    * GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO -> DigitalZoomRatio
    * GST_TAG_CAPTURING_FOCAL_LENGTH -> FocalLength
    * GST_TAG_CAPTURING_SHUTTER_SPEED -> ExposureTime, ShutterSpeedValue
    * GST_TAG_CAPTURING_FOCAL_RATIO -> FNumber, ApertureValue
    * GST_TAG_CAPTURING_ISO_SPEED -> ISOSpeed, PhotographicSensitivity
    
    Tests included.

commit 57013ae63e681057d7525d6e09532995177127ce
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Tue Aug 17 15:05:32 2010 -0300

    tag: exif: Adds mapping for GST_TAG_APPLICATION_DATA
    
    Adds mapping for GST_TAG_APPLICATION_DATA to the exif
    'maker-note' tag.

commit 421e1e05ffaa2ef8787c7ef831e4e60e0aec33ad
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Fri Aug 20 14:54:23 2010 -0300

    tag: Adds GST_TAG_CAPTURE_FLASH_FIRED/_MODE
    
    Adds a new tag for informing if flash was used while
    capturing an image and the flash mode selected by the
    user during this capture
    
    API: GST_TAG_CAPTURING_FLASH_FIRED
    API: GST_TAG_CAPTURING_FLASH_MODE
    
    https://bugzilla.gnome.org/show_bug.cgi?id=626651

commit 5596c965fdf0538453375e6fceb8b5d119ad38b4
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Tue Aug 17 07:21:20 2010 -0300

    tag: More photography related tags
    
    API: GST_TAG_CAPTURING_EXPOSURE_PROGRAM
    API: GST_TAG_CAPTURING_EXPOSURE_MODE
    API: GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE
    API: GST_TAG_CAPTURING_GAIN_ADJUSTMENT
    API: GST_TAG_CAPTURING_WHITE_BALANCE
    API: GST_TAG_CAPTURING_CONTRAST
    API: GST_TAG_CAPTURING_SATURATION
    
    Fixes #626651

commit 19cef390235f4cb1eba7868493ff2dec8aa2bf30
Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Tue Aug 17 06:47:52 2010 -0300

    tag: Adds some basic photography tags
    
    Adds the following basic photography tags.
    
    API: GST_TAG_CAPTURING_SHUTTER_SPEED
    API: GST_TAG_CAPTURING_FOCAL_RATIO
    API: GST_TAG_CAPTURING_FOCAL_LENGTH
    API: GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO
    API: GST_TAG_CAPTURING_ISO_SPEED
    
    Fixes #626651