Added by Mihail Zenkov over 5 years ago

I want add support for 'Exif.Sony1.AFInfo' (0x940E) and have some progress (see attached patch). But AFInfo have many sub tags. How I can separate it to virtual tags (don't know right name for this) and got something like 'Exif.Sony1.AFInfo.FocusMode', 'Exif.Sony1.AFInfo.StatusActiveSensor', etc?

Replies (2)

RE: Exif.Sony1.AFInfo - Added by Robin Mills over 5 years ago

I'm not sure if you can do that. The syntax of the meta data is normally Type.Section.Element for example:

1126 rmills@rmillsmbp:~/gnu/exiv2/trunk/samples $ exiv2 -pa --grep Image.Model 
Exif.Image.Model                             Ascii      12  NIKON D5300
1127 rmills@rmillsmbp:~/gnu/exiv2/trunk/samples $ 
The simple fix is to name the keys AFInfoStatusActiveSensor and the like.

RE: Exif.Sony1.AFInfo - Added by Mihail Zenkov over 5 years ago

Ok. But how I should add 'AFInfoStatusActiveSensor' and other tags? Is right way just add few tags with same ID (0x940E)?

TagInfo(0x940E, "AFInfoStatusActiveSensor", N_("AF Status Active Sensor"),
                N_("AF Status Active Sensor"),
                sony1Id, makerTags, unsignedByte, -1, printAFInfoStatusActiveSensor),
TagInfo(0x940E, "AFInfoFocusMode", N_("Focus Mode"),
                N_("Focus Mode"),
                sony1Id, makerTags, unsignedByte, -1, printAFInfoFocusMode),