summaryrefslogtreecommitdiffstats
path: root/xbmc/pictures/ExifParse.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
commitc04dcc2e7d834218ef2d4194331e383402495ae1 (patch)
tree7333e38d10d75386e60f336b80c2443c1166031d /xbmc/pictures/ExifParse.h
parentInitial commit. (diff)
downloadkodi-c04dcc2e7d834218ef2d4194331e383402495ae1.tar.xz
kodi-c04dcc2e7d834218ef2d4194331e383402495ae1.zip
Adding upstream version 2:20.4+dfsg.upstream/2%20.4+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xbmc/pictures/ExifParse.h')
-rw-r--r--xbmc/pictures/ExifParse.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/xbmc/pictures/ExifParse.h b/xbmc/pictures/ExifParse.h
new file mode 100644
index 0000000..6da3bf2
--- /dev/null
+++ b/xbmc/pictures/ExifParse.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include "libexif.h"
+
+class CExifParse
+{
+ public:
+ ~CExifParse(void) = default;
+ bool Process(const unsigned char* const Data, const unsigned short length, ExifInfo_t *info);
+ static int Get16(const void* const Short, const bool motorolaOrder=true);
+ static int Get32(const void* const Long, const bool motorolaOrder=true);
+
+ private:
+ ExifInfo_t *m_ExifInfo = nullptr;
+ double m_FocalPlaneXRes = 0.0;
+ double m_FocalPlaneUnits = 0.0;
+ unsigned m_LargestExifOffset = 0; // Last exif data referenced (to check if thumbnail is at end)
+ int m_ExifImageWidth = 0;
+ bool m_MotorolaOrder = false;
+ bool m_DateFound = false;
+
+// void LocaliseDate (void);
+// void GetExposureTime (const float exposureTime);
+ double ConvertAnyFormat(const void* const ValuePtr, int Format);
+ void ProcessDir(const unsigned char* const DirStart,
+ const unsigned char* const OffsetBase,
+ const unsigned ExifLength, int NestingLevel);
+ void ProcessGpsInfo(const unsigned char* const DirStart,
+ int ByteCountUnused,
+ const unsigned char* const OffsetBase,
+ unsigned ExifLength);
+ void GetLatLong(const unsigned int Format,
+ const unsigned char* ValuePtr,
+ const int ComponentSize,
+ char *latlongString);
+};
+