 |
Exiv2
|
20 #ifndef MAKERNOTE_INT_HPP_
21 #define MAKERNOTE_INT_HPP_
25 #include "tifffwd_int.hpp"
26 #include "tags_int.hpp"
47 std::string
readExiv2Config(
const std::string& section,
const std::string& value,
const std::string& def);
106 const std::string&
make,
135 virtual bool read(
const byte* pData,
146 virtual uint32_t
size()
const =0;
167 virtual uint32_t
baseOffset(uint32_t mnOffset)
const;
184 virtual bool read(
const byte* pData,
190 virtual uint32_t
size()
const;
199 static const byte signature_[];
215 virtual bool read(
const byte* pData,
221 virtual uint32_t
size()
const;
224 virtual uint32_t
baseOffset(uint32_t mnOffset)
const;
231 static const byte signature_[];
247 virtual bool read(
const byte* pData,
254 virtual uint32_t
size()
const;
258 virtual uint32_t
baseOffset(uint32_t mnOffset)
const;
265 static const byte signature_[];
283 virtual bool read(
const byte* pData,
289 virtual uint32_t
size()
const;
299 static const byte signature_[];
315 virtual bool read(
const byte* pData,
322 virtual uint32_t
size()
const;
326 virtual uint32_t
baseOffset(uint32_t mnOffset)
const;
335 static const byte signature_[];
351 virtual bool read(
const byte* pData,
357 virtual uint32_t
size()
const;
367 static const byte signature_[];
383 virtual bool read(
const byte* pData,
389 virtual uint32_t
size()
const;
392 virtual uint32_t
baseOffset(uint32_t mnOffset)
const;
399 static const byte signature_[];
415 virtual bool read(
const byte* pData,
421 virtual uint32_t
size()
const;
430 static const byte signature_[];
444 virtual bool read(
const byte* pData,
450 virtual uint32_t
size()
const;
452 virtual uint32_t
baseOffset(uint32_t mnOffset)
const;
469 virtual bool read(
const byte* pData,
475 virtual uint32_t
size()
const;
485 static const byte signature1_[];
486 static const byte signature2_[];
502 virtual bool read(
const byte* pData,
508 virtual uint32_t
size()
const;
518 static const byte signature_[];
534 virtual bool read(
const byte* pData,
540 virtual uint32_t
size()
const;
551 static const byte signature_[];
776 #endif // #ifndef MAKERNOTE_INT_HPP_
void accept(TiffVisitor &visitor)
Interface to accept visitors (Visitor pattern). Visitors can perform operations on all components of ...
Definition: tiffcomposite_int.cpp:883
const NikonArrayIdx nikonArrayIdx[]
Nikon binary array version lookup table.
NewMnFct newMnFct_
Makernote create function (image)
Definition: makernote_int.hpp:84
int sonyCsSelector(uint16_t, const byte *, uint32_t, TiffComponent *const pRoot)
Function to select cfg + def of the Sony Camera Settings complex binary array.
Definition: makernote_int.cpp:1237
void init(uint16_t tag, IfdId group)
Initialize the Finder for a new search.
Definition: tiffvisitor_int.cpp:120
int idx_
Index into the array set.
Definition: makernote_int.cpp:1141
byte * pData_
Pointer to the buffer, 0 if none has been allocated.
Definition: types.hpp:258
Structure for an index into the array set of complex binary arrays.
Definition: makernote_int.cpp:1121
This abstract base class provides the common functionality of an IFD directory entry and defines an e...
Definition: tiffcomposite_int.hpp:411
EXIV2API ExifData::const_iterator make(const ExifData &ed)
Return the camera make.
Definition: easyaccess.cpp:437
~TiffMnCreator()
Prevent destruction (needed if used as a policy class)
Definition: makernote_int.hpp:120
TiffComponent * newCasio2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Casio2 makernote.
Definition: makernote_int.cpp:1113
IfdId
Type to specify the IFD to which a metadata belongs.
Definition: tags_int.hpp:46
const char * ver_
Version string.
Definition: makernote_int.cpp:1139
TiffComponent * newFujiMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Fujifilm makernote.
Definition: makernote_int.cpp:915
TiffComponent * newOlympusMn(uint16_t tag, IfdId group, IfdId, const byte *pData, uint32_t size, ByteOrder)
Function to create an Olympus makernote.
Definition: makernote_int.cpp:871
TiffComponent * newNikon2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon2 makernote.
Definition: makernote_int.cpp:952
TiffComponent * result() const
Return the search result. 0 if no TIFF component was found for the tag and group combination.
Definition: tiffvisitor_int.hpp:202
Interface class for components of a TIFF directory hierarchy (Composite pattern). Both TIFF directori...
Definition: tiffcomposite_int.hpp:171
Makernote registry structure.
Definition: makernote_int.hpp:67
uint16_t tag_
Tag number of the binary array.
Definition: makernote_int.cpp:1138
int nikonAf2Selector(uint16_t tag, const byte *, uint32_t size, TiffComponent *const)
Function to select cfg + def of a Nikon complex binary array.
Definition: makernote_int.cpp:1190
uint32_t start_
Start of the encrypted data.
Definition: makernote_int.cpp:1142
virtual long count() const =0
Return the number of components of the value.
int sony2010eSelector(uint16_t, const byte *, uint32_t, TiffComponent *const pRoot)
Function to select cfg + def of the Sony 2010 Miscellaneous Information complex binary array.
Definition: makernote_int.cpp:1248
TiffComponent * newCasioMn(uint16_t tag, IfdId group, IfdId, const byte *pData, uint32_t size, ByteOrder)
Function to create a Casio2 makernote.
Definition: makernote_int.cpp:1097
Key(uint16_t tag, const char *ver, uint32_t size)
Constructor.
Definition: makernote_int.cpp:1125
TiffComponent * newPentaxMn(uint16_t tag, IfdId group, IfdId, const byte *pData, uint32_t size, ByteOrder)
Function to create an Pentax makernote.
Definition: makernote_int.cpp:985
const Value * pValue() const
Return a const pointer to the converted value of this component.
Definition: tiffcomposite_int.hpp:473
Simple IO wrapper to ensure that the header is only written if there is any other data at all.
Definition: tiffcomposite_int.hpp:121
TiffComponent * newSamsungMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *pData, uint32_t size, ByteOrder)
Function to create a Samsung makernote.
Definition: makernote_int.cpp:1016
TiffComponent * newNikon3Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon3 makernote.
Definition: makernote_int.cpp:959
bool operator==(const Key &key) const
Comparison operator for a key.
Definition: makernote_int.cpp:1131
TiffComponent * newSamsungMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Samsung makernote.
Definition: makernote_int.cpp:1038
std::string getExiv2ConfigPath()
Determine the path to the Exiv2 configuration file.
Definition: makernote_int.cpp:94
TiffComponent * newPanasonicMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, uint32_t size, ByteOrder)
Function to create a Panasonic makernote.
Definition: makernote_int.cpp:966
uint16_t tag_
Tag number.
Definition: makernote_int.cpp:1126
TiffComponent * newIfdMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a simple IFD makernote (Canon, Minolta, Nikon1)
Definition: makernote_int.cpp:864
Key for comparisons.
Definition: makernote_int.cpp:1123
uint8_t byte
1 byte unsigned integer type.
Definition: types.hpp:94
DataBuf nikonCrypt(uint16_t tag, const byte *pData, uint32_t size, TiffComponent *const pRoot)
Encrypt and decrypt Nikon data.
Definition: makernote_int.cpp:1199
Search the composite for a component with tag and group. Return a pointer to the component or 0,...
Definition: tiffvisitor_int.hpp:156
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:193
void alloc(long size)
Allocate a data buffer of at least the given size. Note that if the requested size is less than the c...
Definition: types.cpp:156
std::string toString() const
Return the value as a string. Implemented in terms of write(std::ostream& os) const of the concrete c...
Definition: value.cpp:168
long size_
The current size of the buffer.
Definition: types.hpp:260
TiffComponent * newSony2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony2 makernote.
Definition: makernote_int.cpp:1090
int ParseError()
Return the result of ini_parse(), i.e., 0 on success, line number of first error on parse error,...
Definition: ini.cpp:236
TiffComponent * newOlympusMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus makernote.
Definition: makernote_int.cpp:889
const T * find(T(&src)[N], const K &key)
Find an element that matches key in the array src.
Definition: types.hpp:497
std::string Get(std::string section, std::string name, std::string default_value)
Get a string value from INI file, returning default_value if not found.
Definition: ini.cpp:241
TiffComponent * newPanasonicMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Panasonic makernote.
Definition: makernote_int.cpp:978
TiffComponent *(* NewMnFct)(uint16_t tag, IfdId group, IfdId mnGroup, const byte *pData, uint32_t size, ByteOrder byteOrder)
Type for a pointer to a function creating a makernote (image)
Definition: makernote_int.hpp:54
virtual long toLong(long n=0) const =0
Convert the n-th component of the value to a long. The behaviour of this method may be undefined if t...
int nikonSelector(uint16_t tag, const byte *pData, uint32_t size, TiffComponent *const)
Function to select cfg + def of a Nikon complex binary array.
Definition: makernote_int.cpp:1183
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
const char * ver_
Version string.
Definition: makernote_int.cpp:1127
TiffComponent *(* NewMnFct2)(uint16_t tag, IfdId group, IfdId mnGroup)
Type for a pointer to a function creating a makernote (group)
Definition: makernote_int.hpp:62
TiffComponent * newSony1Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony1 makernote.
Definition: makernote_int.cpp:1083
TiffComponent * newSigmaMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, uint32_t size, ByteOrder)
Function to create a Sigma makernote.
Definition: makernote_int.cpp:1045
TiffComponent * newPentaxDngMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax DNG makernote.
Definition: makernote_int.cpp:1009
TiffComponent * newPentaxMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax makernote.
Definition: makernote_int.cpp:1002
TiffComponent * newSonyMn(uint16_t tag, IfdId group, IfdId, const byte *pData, uint32_t size, ByteOrder)
Function to create a Sony makernote.
Definition: makernote_int.cpp:1064
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:102
TiffComponent * newIfdMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, uint32_t size, ByteOrder)
Function to create a simple IFD makernote (Canon, Minolta, Nikon1)
Definition: makernote_int.cpp:852
TiffComponent * newNikonMn(uint16_t tag, IfdId group, IfdId, const byte *pData, uint32_t size, ByteOrder)
Function to create a Nikon makernote. This will create the appropriate Nikon 1, 2 or 3 makernote,...
Definition: makernote_int.cpp:922
TiffComponent * newOlympus2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus II makernote.
Definition: makernote_int.cpp:896
Read an INI file into easy-to-access name/value pairs. (Note that I've gone for simplicity here rathe...
Definition: ini.hpp:157
std::string readExiv2Config(const std::string §ion, const std::string &value, const std::string &def)
Read value from Exiv2 configuration file.
Definition: makernote_int.cpp:113
long write(const byte *pData, long wcount)
Wraps the corresponding BasicIo::write() method.
Definition: tiffcomposite_int.cpp:65
TiffComponent * newSigmaMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sigma makernote.
Definition: makernote_int.cpp:1057
static TiffComponent * create(uint16_t tag, IfdId group, const std::string &make, const byte *pData, uint32_t size, ByteOrder byteOrder)
Create the Makernote for camera make and details from the makernote entry itself if needed....
Definition: makernote_int.cpp:166
EXIV2API ExifData::const_iterator model(const ExifData &ed)
Return the camera model.
Definition: easyaccess.cpp:445
NewMnFct2 newMnFct2_
Makernote create function (group)
Definition: makernote_int.hpp:85
uint32_t size_
Size of the data (not the version string)
Definition: makernote_int.cpp:1128
bool operator==(const std::string &key) const
Compare a TiffMnRegistry structure with a key being the make string from the image....
Definition: makernote_int.cpp:154
uint32_t size_
Size of the data.
Definition: makernote_int.cpp:1140
TIFF makernote factory for concrete TIFF makernotes.
Definition: makernote_int.hpp:91
Tiff IFD Makernote. This is a concrete class suitable for all IFD makernotes.
Definition: tiffcomposite_int.hpp:1147
TiffComponent * newFujiMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, uint32_t size, ByteOrder)
Function to create a Fujifilm makernote.
Definition: makernote_int.cpp:903
IfdId mnGroup_
Group identifier.
Definition: makernote_int.hpp:83
const char * make_
Camera make.
Definition: makernote_int.hpp:82
EXIV2API uint32_t getULong(const byte *buf, ByteOrder byteOrder)
Read a 4 byte unsigned long value from the data buffer.
Definition: types.cpp:278