3 #ifndef EXIV2_MAKERNOTE_INT_HPP
4 #define EXIV2_MAKERNOTE_INT_HPP
8 #include "tags_int.hpp"
25 std::string readExiv2Config(
const std::string& section,
const std::string& value,
const std::string& def);
34 using NewMnFct2 = std::unique_ptr<TiffComponent> (*)(uint16_t tag, IfdId group, IfdId mnGroup);
74 static std::unique_ptr<TiffComponent>
create(uint16_t tag, IfdId group,
const std::string&
make,
const byte* pData,
80 static std::unique_ptr<TiffComponent>
create(uint16_t tag, IfdId group, IfdId mnGroup);
110 [[nodiscard]]
virtual size_t size()
const = 0;
118 [[nodiscard]]
virtual size_t ifdOffset()
const;
130 [[nodiscard]]
virtual size_t baseOffset(
size_t mnOffset)
const;
149 [[nodiscard]]
size_t size()
const override;
151 [[nodiscard]]
size_t ifdOffset()
const override;
158 static const byte signature_[];
176 [[nodiscard]]
size_t size()
const override;
178 [[nodiscard]]
size_t ifdOffset()
const override;
179 [[nodiscard]]
size_t baseOffset(
size_t mnOffset)
const override;
186 static const byte signature_[];
204 [[nodiscard]]
size_t size()
const override;
206 [[nodiscard]]
size_t ifdOffset()
const override;
207 [[nodiscard]]
size_t baseOffset(
size_t mnOffset)
const override;
214 static const byte signature_[];
233 [[nodiscard]]
size_t size()
const override;
235 [[nodiscard]]
size_t ifdOffset()
const override;
237 [[nodiscard]]
size_t baseOffset(
size_t mnOffset)
const override;
244 static const byte signature_[];
264 [[nodiscard]]
size_t size()
const override;
266 [[nodiscard]]
size_t ifdOffset()
const override;
274 static const byte signature_[];
293 [[nodiscard]]
size_t size()
const override;
295 [[nodiscard]]
size_t ifdOffset()
const override;
297 [[nodiscard]]
size_t baseOffset(
size_t mnOffset)
const override;
306 static const byte signature_[];
324 [[nodiscard]]
size_t size()
const override;
326 [[nodiscard]]
size_t ifdOffset()
const override;
334 static const byte signature_[];
352 [[nodiscard]]
size_t size()
const override;
354 [[nodiscard]]
size_t ifdOffset()
const override;
355 [[nodiscard]]
size_t baseOffset(
size_t mnOffset)
const override;
362 static const byte signature_[];
380 [[nodiscard]]
size_t size()
const override;
382 [[nodiscard]]
size_t ifdOffset()
const override;
389 static const byte signature_[];
407 [[nodiscard]]
size_t size()
const override;
409 [[nodiscard]]
size_t baseOffset(
size_t mnOffset)
const override;
428 [[nodiscard]]
size_t size()
const override;
430 [[nodiscard]]
size_t ifdOffset()
const override;
438 static const byte signature1_[];
439 static const byte signature2_[];
457 [[nodiscard]]
size_t size()
const override;
459 [[nodiscard]]
size_t ifdOffset()
const override;
467 static const byte signature_[];
485 [[nodiscard]]
size_t size()
const override;
487 [[nodiscard]]
size_t ifdOffset()
const override;
496 static const byte signature_[];
505 std::unique_ptr<TiffComponent>
newIfdMn(uint16_t tag, IfdId group, IfdId mnGroup,
const byte* pData,
size_t size,
509 std::unique_ptr<TiffComponent>
newIfdMn2(uint16_t tag, IfdId group, IfdId mnGroup);
512 std::unique_ptr<TiffComponent>
newOlympusMn(uint16_t tag, IfdId group, IfdId mnGroup,
const byte* pData,
size_t size,
516 std::unique_ptr<TiffComponent>
newOlympusMn2(uint16_t tag, IfdId group, IfdId mnGroup);
519 std::unique_ptr<TiffComponent>
newOlympus2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
522 std::unique_ptr<TiffComponent>
newOMSystemMn(uint16_t tag, IfdId group, IfdId mnGroup,
const byte* pData,
size_t size,
526 std::unique_ptr<TiffComponent>
newOMSystemMn2(uint16_t tag, IfdId group, IfdId mnGroup);
529 std::unique_ptr<TiffComponent>
newFujiMn(uint16_t tag, IfdId group, IfdId mnGroup,
const byte* pData,
size_t size,
533 std::unique_ptr<TiffComponent>
newFujiMn2(uint16_t tag, IfdId group, IfdId mnGroup);
539 std::unique_ptr<TiffComponent>
newNikonMn(uint16_t tag, IfdId group, IfdId mnGroup,
const byte* pData,
size_t size,
543 std::unique_ptr<TiffComponent>
newNikon2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
546 std::unique_ptr<TiffComponent>
newNikon3Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
549 std::unique_ptr<TiffComponent>
newPanasonicMn(uint16_t tag, IfdId group, IfdId mnGroup,
const byte* pData,
size_t size,
553 std::unique_ptr<TiffComponent>
newPanasonicMn2(uint16_t tag, IfdId group, IfdId mnGroup);
556 std::unique_ptr<TiffComponent>
newPentaxMn(uint16_t tag, IfdId group, IfdId mnGroup,
const byte* pData,
size_t size,
560 std::unique_ptr<TiffComponent>
newPentaxMn2(uint16_t tag, IfdId group, IfdId mnGroup);
563 std::unique_ptr<TiffComponent>
newPentaxDngMn2(uint16_t tag, IfdId group, IfdId mnGroup);
566 std::unique_ptr<TiffComponent>
newSamsungMn(uint16_t tag, IfdId group, IfdId mnGroup,
const byte* pData,
size_t size,
570 std::unique_ptr<TiffComponent>
newSamsungMn2(uint16_t tag, IfdId group, IfdId mnGroup);
573 std::unique_ptr<TiffComponent>
newSigmaMn(uint16_t tag, IfdId group, IfdId mnGroup,
const byte* pData,
size_t size,
577 std::unique_ptr<TiffComponent>
newSigmaMn2(uint16_t tag, IfdId group, IfdId mnGroup);
580 std::unique_ptr<TiffComponent>
newSonyMn(uint16_t tag, IfdId group, IfdId mnGroup,
const byte* pData,
size_t size,
584 std::unique_ptr<TiffComponent>
newSony1Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
587 std::unique_ptr<TiffComponent>
newSony2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
590 std::unique_ptr<TiffComponent>
newCasioMn(uint16_t tag, IfdId group, IfdId mnGroup,
const byte* pData,
size_t size,
594 std::unique_ptr<TiffComponent>
newCasio2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
682 #endif // EXIV2_MAKERNOTE_INT_HPP
const char * make_
Camera make.
Definition: makernote_int.hpp:52
std::unique_ptr< TiffComponent >(*)(uint16_t tag, IfdId group, IfdId mnGroup) NewMnFct2
Type for a pointer to a function creating a makernote (group)
Definition: makernote_int.hpp:34
std::unique_ptr< TiffComponent > newOMSystemMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an OM Digital Solutions makernote.
Definition: makernote_int.cpp:696
std::unique_ptr< TiffComponent > newCasioMn(uint16_t tag, IfdId group, IfdId, const byte *pData, size_t size, ByteOrder)
Function to create a Casio2 makernote.
Definition: makernote_int.cpp:837
std::unique_ptr< TiffComponent > newSigmaMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, size_t size, ByteOrder)
Function to create a Sigma makernote.
Definition: makernote_int.cpp:802
DataBuf nikonCrypt(uint16_t tag, const byte *pData, size_t size, TiffComponent *pRoot)
Encrypt and decrypt Nikon data.
Definition: makernote_int.cpp:926
int sonyMisc3cSelector(uint16_t, const byte *, size_t, TiffComponent *pRoot)
Function to select cfg + def of the SonyMisc3c (tag 9400) complex binary array.
Definition: makernote_int.cpp:1020
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:34
std::unique_ptr< TiffComponent > newOlympusMn(uint16_t tag, IfdId group, IfdId, const byte *pData, size_t size, ByteOrder)
Function to create an Olympus makernote.
Definition: makernote_int.cpp:659
std::unique_ptr< TiffComponent > newFujiMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, size_t size, ByteOrder)
Function to create a Fujifilm makernote.
Definition: makernote_int.cpp:700
std::unique_ptr< TiffComponent >(*)(uint16_t, IfdId, IfdId, const byte *, size_t, ByteOrder) NewMnFct
Type for a pointer to a function creating a makernote (image)
Definition: makernote_int.hpp:31
int sonyMisc2bSelector(uint16_t, const byte *, size_t, TiffComponent *pRoot)
Function to select cfg + def of the SonyMisc2b (tag 9404b) complex binary array.
Definition: makernote_int.cpp:993
int nikonSelector(uint16_t tag, const byte *pData, size_t size, TiffComponent *)
Function to select cfg + def of a Nikon complex binary array.
Definition: makernote_int.cpp:916
std::unique_ptr< TiffComponent > newSony2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony2 makernote.
Definition: makernote_int.cpp:833
std::unique_ptr< TiffComponent > newFujiMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Fujifilm makernote.
Definition: makernote_int.cpp:708
uint8_t byte
1 byte unsigned integer type.
Definition: types.hpp:26
std::unique_ptr< TiffComponent > newOMSystemMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, size_t size, ByteOrder)
Function to create an OM Digital Solutions makernote.
Definition: makernote_int.cpp:688
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:124
Simple IO wrapper to ensure that the header is only written if there is any other data at all...
Definition: tiffcomposite_int.hpp:102
bool operator==(const std::string &key) const
Compare a TiffMnRegistry structure with a key being the make string from the image. The two are equal if TiffMnRegistry::make_ equals a substring of the key of the same size. E.g., registry = "OLYMPUS", key = "OLYMPUS OPTICAL CO.,LTD" (found in the image) match.
Definition: makernote_int.cpp:138
std::unique_ptr< TiffComponent > newPanasonicMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, size_t size, ByteOrder)
Function to create a Panasonic makernote.
Definition: makernote_int.cpp:745
IfdId
Type to specify the IFD to which a metadata belongs.
Definition: tags.hpp:34
std::unique_ptr< TiffComponent > newOlympus2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus II makernote.
Definition: makernote_int.cpp:684
std::string getExiv2ConfigPath()
Determine the path to the Exiv2 configuration file.
Definition: makernote_int.cpp:66
Interface class for components of a TIFF directory hierarchy (Composite pattern). Both TIFF directori...
Definition: tiffcomposite_int.hpp:152
std::unique_ptr< TiffComponent > newNikon2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon2 makernote.
Definition: makernote_int.cpp:737
std::unique_ptr< TiffComponent > newPanasonicMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Panasonic makernote.
Definition: makernote_int.cpp:753
int sonyCsSelector(uint16_t, const byte *, size_t, TiffComponent *pRoot)
Function to select cfg + def of the Sony Camera Settings complex binary array.
Definition: makernote_int.cpp:967
Helper structure for the Matroska tags lookup table.
Definition: matroskavideo.hpp:39
std::unique_ptr< TiffComponent > newSamsungMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *pData, size_t size, ByteOrder)
Function to create a Samsung makernote.
Definition: makernote_int.cpp:782
NewMnFct newMnFct_
Makernote create function (image)
Definition: makernote_int.hpp:54
int sony2010eSelector(uint16_t, const byte *, size_t, TiffComponent *pRoot)
Function to select cfg + def of the Sony 2010 Miscellaneous Information complex binary array...
Definition: makernote_int.cpp:977
std::unique_ptr< TiffComponent > newPentaxMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax makernote.
Definition: makernote_int.cpp:774
std::unique_ptr< TiffComponent > newSony1Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony1 makernote.
Definition: makernote_int.cpp:829
std::unique_ptr< TiffComponent > newCasio2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Casio2 makernote.
Definition: makernote_int.cpp:847
TiffMnCreator(const TiffComponent &)=delete
Prevent destruction (needed if used as a policy class)
EXIV2API ExifData::const_iterator make(const ExifData &ed)
Return the camera make. Please keep in mind that this accessor is provided for convenience only and w...
Definition: easyaccess.cpp:333
std::unique_ptr< TiffComponent > newIfdMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a simple IFD makernote (Canon, Minolta, Nikon1)
Definition: makernote_int.cpp:655
int sony2FpSelector(uint16_t, const byte *, size_t, TiffComponent *pRoot)
Function to select cfg + def of the Sony2Fp (tag 9402) complex binary array.
Definition: makernote_int.cpp:986
IfdId mnGroup_
Group identifier.
Definition: makernote_int.hpp:53
std::unique_ptr< TiffComponent > newIfdMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, size_t size, ByteOrder)
Function to create a simple IFD makernote (Canon, Minolta, Nikon1)
Definition: makernote_int.cpp:647
std::unique_ptr< TiffComponent > newSamsungMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Samsung makernote.
Definition: makernote_int.cpp:798
Makernote registry structure.
Definition: makernote_int.hpp:37
std::unique_ptr< TiffComponent > newNikon3Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon3 makernote.
Definition: makernote_int.cpp:741
TIFF makernote factory for concrete TIFF makernotes.
Definition: makernote_int.hpp:61
std::unique_ptr< TiffComponent > newPentaxMn(uint16_t tag, IfdId group, IfdId, const byte *pData, size_t size, ByteOrder)
Function to create an Pentax makernote.
Definition: makernote_int.cpp:757
std::unique_ptr< TiffComponent > newSigmaMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sigma makernote.
Definition: makernote_int.cpp:810
NewMnFct2 newMnFct2_
Makernote create function (group)
Definition: makernote_int.hpp:55
std::unique_ptr< TiffComponent > newNikonMn(uint16_t tag, IfdId group, IfdId, const byte *pData, size_t size, ByteOrder)
Function to create a Nikon makernote. This will create the appropriate Nikon 1, 2 or 3 makernote...
Definition: makernote_int.cpp:712
std::unique_ptr< TiffComponent > newPentaxDngMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax DNG makernote.
Definition: makernote_int.cpp:778
static std::unique_ptr< TiffComponent > create(uint16_t tag, IfdId group, const std::string &make, const byte *pData, size_t size, ByteOrder byteOrder)
Create the Makernote for camera make and details from the makernote entry itself if needed...
Definition: makernote_int.cpp:149
std::unique_ptr< TiffComponent > newOlympusMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus makernote.
Definition: makernote_int.cpp:680
std::unique_ptr< TiffComponent > newSonyMn(uint16_t tag, IfdId group, IfdId, const byte *pData, size_t size, ByteOrder)
Function to create a Sony makernote.
Definition: makernote_int.cpp:814