Commit Graph

507 Commits

Author SHA1 Message Date
Christoph Hasse
e4adf388aa fix(quicktimevideo) cleanup and hardening as suggested in review by @kevinbackhouse 2022-08-24 17:39:42 +02:00
Christoph Hasse
0577057548 fix(quicktimevideo) silence windows warnings 2022-08-24 17:39:42 +02:00
Christoph Hasse
3456f30988 fix(video) clang-format quicktimevideo 2022-08-24 17:39:42 +02:00
Christoph Hasse
0a948c6a7d feat(video) revive quicktime.{h,cpp} and adapt to codebase changes. 2022-08-24 17:39:42 +02:00
Rosen Penev
71dc04ebb1 misc sonarlint stuff
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-22 23:00:32 -07:00
Rosen Penev
10a62b2350 replace custom gcd function with std
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-16 05:58:09 -07:00
Rosen Penev
fc840405cc revert std::function back to function pointers
The former has too much overhead. No point in it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-08 19:24:47 -07:00
Rosen Penev
5c90684441 simplify some defines
As far as I can tell, _WIN32 is defined for true Windows platforms.
Cygwin is a POSIX platform.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-08 15:31:05 -07:00
Rosen Penev
f3b572d211 fix iconv handling and windows
WIN32 as a define is wrong. _WIN32 is the correct one.

Which opens up the issue of the used functions and the wrong logic.
Changed the function logic to use if and elif, as done later in the
code.

Also changed all usages of WIN32 with _WIN32

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-08 15:31:05 -07:00
Rosen Penev
938964f4d0 remove GroupName struct
No point in this.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-03 19:59:13 -07:00
Kevin Backhouse
cc604780be
Merge pull request #2283 from kevinbackhouse/printStructure-depth
Convert type of depth parameter to size_t
2022-08-03 16:38:03 +01:00
Kevin Backhouse
4410f46214 Change the return type of the 2Data functions to size_t. 2022-08-01 16:28:36 -07:00
Rosen Penev
1d0530f04d misc sonarlint changes
Mostly const changes.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-31 20:51:12 -07:00
Kevin Backhouse
b0040e3bbe
Convert type of depth parameter to size_t. 2022-07-30 22:22:50 -04:00
Kevin Backhouse
1958e70a71 Use int32_t in TimeValue 2022-07-26 23:13:42 -07:00
Rosen Penev
02b0ff39d7 Make headers compatible with C++11
Remove is_signed_v and CTAD for std::array as they are in C++17

Remove remove_cv_t, remove_pointer_t, and make_unsigned_t as they are in
C++14

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-24 16:37:25 -07:00
Rosen Penev
9ca7f861cf remove string_view from headers
This should allow usage with C++11 projects. It's also wrong. The only
user of this assigns an std::string from a string_view, which is not
safe.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-24 16:37:25 -07:00
Peter
dc4ae73013
Add tag description option to exiv2 app (#2279)
* Add `tagDesc()` to (Exif|Xmp|Iptc) Datums and Keys
* Add `--Print d` option to exiv2 app
* Add testing for all exiv2 application `--Print` options
* Update manpage
2022-07-12 15:31:43 +01:00
Kevin Backhouse
05586628b2
Merge pull request #2276 from kevinbackhouse/TagInfo-enums
Move enums from tags_int.hpp to tags.hpp
2022-07-12 10:23:26 +01:00
Kevin Backhouse
3ef783e02a
Convert IfdId and SectionId to enum classes. 2022-07-11 22:37:52 +01:00
Kevin Backhouse
3f7cb78a3b
Move enums from tags_int.hpp to tags.hpp 2022-07-08 12:03:53 +01:00
Rosen Penev
7575300732 clang: remove pointless ; at the end of function
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-05 17:41:12 -07:00
Rosen Penev
e2ee1338f5 pass bool by value
No sense in passing by reference

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-05 17:41:12 -07:00
Rosen Penev
c74ae5aa00 clang-tidy: remove const char operator
It morphs into std::string anyway.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-05 17:41:12 -07:00
Rosen Penev
5ca0acd129 clang-tidy: some llvm- warnings
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-05 17:41:12 -07:00
Rosen Penev
f787a4c2ac clang-tidy: add missing override
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-05 15:29:42 -07:00
Kevin Backhouse
a5c521ea57
Merge pull request #2252 from neheb/2
clang-tidy: use default member init
2022-07-05 23:07:08 +01:00
Kevin Backhouse
b3f2ab5988
Fix some "signed shift" warnings. 2022-07-05 18:34:57 +01:00
Rosen Penev
bae7da19ca clang-tidy: use default member init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-03 12:24:41 -07:00
Kevin Backhouse
ad4e13b827
Change return type of BasicIo::tell() to size_t. 2022-06-21 17:05:10 +01:00
Rosen Penev
a98954a98e clang-tidy: add missing special member functions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-21 17:39:26 -07:00
Viktor Schneider
1ff09506e0 add missing header for std::unique_ptr in values.hpp
76f01fd4d3 removes the <memory> header
which is required to use std::unique_ptr for some builds
(e.g. archlinux using gcc 12.1.0).
2022-05-16 08:19:21 +02:00
Rosen Penev
19dc566889 use _v
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-02 09:27:55 +02:00
Luis Díaz Más
c9bdd6ed94
Merge pull request #2209 from Exiv2/mainTODOs
Improvements around TODO comments
2022-04-29 09:04:46 +02:00
Rosen Penev
a86bc386da reference conversions
There's no nullptr here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-18 13:53:14 -07:00
Rosen Penev
48f848f5bb clang-tidy: remove const params in decls
Found with readability-avoid-const-params-in-decls

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-18 13:53:13 -07:00
Rosen Penev
a8061e7ee9 clang-tidy: default member init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-14 18:01:55 -07:00
Luis Díaz Más
6964f5f9f2 DataBuf::c_data() returns nullptr when empty + avoid duplication
After the previous commit, I realized that std::vector::data() also
returns nullptr when the vector is empty. So I decided to emulate this
behavior in DataBuf::c_data().

Anyways, the changes done in the previous commit are valid and allow us
to avoid some processing when the DataBuf is empty.
2022-04-14 10:40:58 +02:00
Luis Díaz Más
25c47cd1cf
Merge pull request #2197 from Exiv2/mainRefactoringFormats
Refactoring in JpegImage and Photoshop classes
2022-04-10 13:23:33 +02:00
Luis Díaz Más
f942ba89bd Move Photoshopb class to internal namespace 2022-04-10 10:55:10 +02:00
Luis Diaz
047f6b733e Change logic to determine if segment has size
Note that the failing tests that had to be adapted were bad formed files
from FUZZERs. We should not consider invalid markers like 0x00 or 0x52
but only undefined APPn markers.
2022-04-10 10:53:36 +02:00
Luis Diaz
24d2a7b8f0 JpegBase::markerHasLength moved to implementation details 2022-04-10 10:53:35 +02:00
Luis Diaz
23fe743d4d Move private constants to .cpp 2022-04-10 10:53:34 +02:00
Rosen Penev
b53ed72fd8 clang-tidy: manual special functions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-10 01:40:39 -07:00
Rosen Penev
a20ace20fc clang-tidy: manual clang-tidy fixes
clang-tidy has issues applying these.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-10 01:40:39 -07:00
Rosen Penev
fdfcde5e4b structured binding conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-09 10:49:02 +02:00
Luis Diaz
8ab7800477 Remove 2nd param from Photoshop::isIrb() since it is always hardcoded 2022-04-06 15:55:29 +02:00
Luis Diaz
a698c3fc08 Remove deprecated variable 2022-04-06 15:18:43 +02:00
Luis Diaz
459c73c0f6 doxygen: update doc style in Photoshop class 2022-04-06 15:18:42 +02:00
Rosen Penev
06d977d7bc clang-tidy: use default
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-01 16:38:04 -07:00