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 792178 - Use enumerated constants for EXIF flash values, metering modes and resolution units
Use enumerated constants for EXIF flash values, metering modes and resolution...
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Miners
git master
Other All
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2018-01-03 17:16 UTC by Debarshi Ray
Modified: 2018-01-29 10:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-extract: Use enumerated constants for EXIF flash values (2.04 KB, patch)
2018-01-03 17:31 UTC, Debarshi Ray
committed Details | Review
libtracker-extract: Use enumerated constants for EXIF metering modes (2.06 KB, patch)
2018-01-03 17:32 UTC, Debarshi Ray
committed Details | Review
libtracker-extract, tracker-extract: Use enums for resolution units (5.34 KB, patch)
2018-01-27 22:12 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2018-01-03 17:16:39 UTC
Currently src/libtracker-extract/tracker-exif.c has a list of integer literals to match the various EXIF flash values and metering modes. Without accompanying comments, particularly the flash values, it is hard to understand what these magic constants represent. It would be nicer to use enumerated constants instead.

As far as I can see, there are no macros or constants defined by libexif or (g)exiv2. So we add our own private constants for them.
Comment 1 Debarshi Ray 2018-01-03 17:31:39 UTC
Created attachment 366255 [details] [review]
libtracker-extract: Use enumerated constants for EXIF flash values
Comment 2 Debarshi Ray 2018-01-03 17:32:25 UTC
Created attachment 366256 [details] [review]
libtracker-extract: Use enumerated constants for EXIF metering modes
Comment 3 Debarshi Ray 2018-01-03 17:37:48 UTC
Just to complete the paper trail, this came up in https://bugzilla.gnome.org/show_bug.cgi?id=787589#c11
Comment 4 Carlos Garnacho 2018-01-26 23:53:22 UTC
Comment on attachment 366255 [details] [review]
libtracker-extract: Use enumerated constants for EXIF flash values

Looks good :)
Comment 5 Carlos Garnacho 2018-01-26 23:55:44 UTC
Comment on attachment 366256 [details] [review]
libtracker-extract: Use enumerated constants for EXIF metering modes

nice!
Comment 6 Debarshi Ray 2018-01-27 17:01:33 UTC
Thanks for the reviews, Carlos!
Comment 7 Debarshi Ray 2018-01-27 22:12:20 UTC
Created attachment 367538 [details] [review]
libtracker-extract, tracker-extract: Use enums for resolution units

I had this another one in my tree which I had forgotten to attach before.
Comment 8 Carlos Garnacho 2018-01-28 20:34:19 UTC
Comment on attachment 367538 [details] [review]
libtracker-extract, tracker-extract: Use enums for resolution units

Thanks :), that's quite more readable.