Martchus
56ccd3da80
Use auto-syntax in places touched by previous commit consistently
2023-10-31 20:06:38 +01:00
Martchus
9f41c30443
Silence/fix GCC's maybe-uninitialized warnings
...
* The warning about `bsEnvCount` is actually correct.
* The warning about `lastAtomToBeWritten` might be correct.
* The warning about `relPos` is definitely unjustified because `relPos` is
only used when `cueRelativePositionElement` is not `nullptr` and `relPos`
is initialized in that case.
* The warnings about `pos`, `nextPageOffset` and `startOfLastMetaDataBlock`
are also wrong for similar reasons.
2023-10-31 20:05:13 +01:00
Martchus
a5ab3ed1b2
Avoid abusing OggPage header flags to store whether last segment unconcluded
2023-05-16 23:18:27 +02:00
Martchus
60233c2af2
Add missing documentation
2022-08-02 21:41:05 +02:00
Martchus
72f56f4297
Set the OggIterator filter correctly when parsing tags
...
I suppose otherwise parsing will fail if there are multiple streams and the
tag spans multiple interleaved pages.
2022-05-03 23:52:18 +02:00
Martchus
5106d94f2a
Add Ogg stream serial number to tag target when parsing Vorbis comments
...
So the stream the Vorbis comment belongs to is shown in the tag editor GUI.
Otherwise it shouldn't change the behavior.
2022-05-03 23:50:20 +02:00
Martchus
5e3fa563e1
Fix warning about shadowing variable
2021-10-26 15:54:57 +02:00
Martchus
fd5e9bf950
Fix crashes due to wrong parameter passing
...
The refactoring to use `std::string_view`
(see 64d98f5530
) caused this regression
(see https://github.com/Martchus/tageditor/issues/75 ). We must specify the
size because the buffers used here are not null-terminated.
2021-10-26 15:54:30 +02:00
Martchus
e277070e9c
Use `std::filesystem` in backup helper code
...
* Fix applying changes to symlinks so that the target is modified in any
case (and not just if a rewrite isn't necessary)
* Avoid using `std::rename` and `std::remove` because they might not work
under Windows when the path contains non-ASCII characters
* Simplify code, remove `isRelative()`
2021-09-11 23:54:49 +02:00
Martchus
ee9aeb00b4
Write zero lacing value in Ogg header if Vorbis comment size divisible by 255
...
See https://github.com/Martchus/tageditor/issues/70
2021-08-16 19:22:15 +02:00
Martchus
0b47186e57
Deprecate certain unused Ogg functions which are likely not generally useful
2021-08-16 18:44:48 +02:00
Martchus
932687f93d
Improve warnings when parsing Vorbis comments
2021-08-16 18:37:44 +02:00
Martchus
18d4a5e8de
Allow aborting Ogg parsing
2021-08-15 23:33:01 +02:00
Martchus
10f781951c
Allow aborting Ogg writing
2021-08-15 23:31:20 +02:00
Martchus
7341f53c12
Fix warnings about implicit cast
2021-08-15 21:25:41 +02:00
Martchus
c1ecc03617
Use if-else instead of try-catch when finding track for Ogg page
2021-08-14 13:50:44 +02:00
Martchus
617e36f27c
Add more details in warning about missing Ogg pages
2021-08-14 13:49:55 +02:00
Martchus
0b0127aab7
Prevent warning about missing Ogg pages when skipping pages for all streams
2021-08-14 13:49:37 +02:00
Martchus
dd2b75d845
Try to re-sync Ogg parser when invalid bytes are detected
2021-08-14 13:42:08 +02:00
Martchus
c9f6ae77e2
Emit progress information while applying changes to Ogg file
2021-08-13 21:00:14 +02:00
Martchus
6cd16dcdfc
Ensure `currentParams` is set before dereferencing when applying OGG changes
2021-08-13 20:41:30 +02:00
Martchus
339995edf5
Prevent dropping Ogg pages which have been omitten during parsing when applying changes
...
See https://github.com/Martchus/tageditor/issues/69
2021-08-13 20:41:30 +02:00
Martchus
9dfeb76209
Prevent warning about assigned value never being read
2021-08-13 20:08:40 +02:00
Martchus
b11869f837
Fix saving Ogg files when path is using URL scheme `file://`
2021-08-13 18:11:21 +02:00
Jonas Kvinge
ea23d71e8a
Fix spelling and typos
2021-07-02 11:12:39 +02:00
Martchus
0a041f6ad2
Fix warnings
2021-03-20 21:26:25 +01:00
Martchus
65597fd71e
Add API to allow aborting overall/expensive parsing functions
...
* Not really implemented within the various code paths of the parsers at
this point; this commit mainly adds the API.
* Adjust example in README
2021-02-04 23:21:50 +01:00
Martchus
64d98f5530
Use std::string_view where it makes sense
2021-01-30 21:53:06 +01:00
Martchus
761e3ee44b
Mark all "final" tag, track and container classes as such
2020-12-18 21:13:52 +01:00
Martchus
4cc2dbd9e6
Use flags instead of tons of boolean fields in AbstractTrack
2020-12-16 17:48:08 +01:00
Martchus
5f39e377dc
Use std::size_t consistently
2020-11-25 17:54:30 +01:00
Martchus
7043c3d2a9
Don't suppress IO errors when writing files
...
* Close or flush streams explicitely so writing is not
deferred
* to catch errors in the right place
* to avoid suppressing errors completely when writing
would be deferred to the destructor invocation
* Improve comments
2019-12-15 19:43:16 +01:00
Martchus
c9e1dde70b
Adapt to changes in c++utilities
2019-06-12 20:40:45 +02:00
Martchus
5ad00a083c
Adapt to changes in c++utilities
2019-06-10 23:11:39 +02:00
Martchus
c17db5f2f6
Apply cmake-format and clang-format
2019-05-04 21:03:09 +02:00
Martchus
3288d49d62
Support 'file://' URLs also when saving
2019-05-04 16:04:37 +02:00
Martchus
7efa7a0d5a
Adapt to c++utilities v5
2019-05-04 16:04:21 +02:00
Martchus
59d2156165
Add tagType and tagName to OggVorbisComment
2019-01-02 17:08:29 +01:00
Martchus
270aee1d55
Use override in OggVorbisComment
2018-08-29 22:31:56 +02:00
Martchus
dcb89aeb62
Improve padding of OggParameter
2018-08-29 22:31:30 +02:00
Martchus
8642cd67e9
Improve coding style (after running clang-tidy)
2018-08-12 22:14:21 +02:00
Martchus
a2ff0f418f
Fix typo occured -> occurred
2018-07-23 14:44:06 +02:00
Martchus
e81c6bb169
Implement small TODOs for v8
2018-07-12 12:34:38 +02:00
Martchus
a87ad5f5ec
Don't use global variable for backup directory
2018-07-12 12:34:38 +02:00
Martchus
9361e0bc13
Use constexpr where possible
2018-07-12 12:34:38 +02:00
Martchus
3265e0bea4
Fix documentation which was still using the old namespace
2018-06-03 20:38:32 +02:00
Martchus
0a640c9f7f
Fix warnings, mostly about implicit int conversions
...
This should fix all non-erros, leaving only warnings which
are indeed potential problems.
The following warnings should be safe to ignore:
* Conversions of various offsets from uint64 to
std::streamoff/int64 are safe because such offsets have
been obtained via tellg() and other functions
returning std::streamoff in the first place.
* It also works vice-versa since tellg() should not
return negative offsets with exceptions enabled.
* Conversions from char to unsigned char are also ok.
* Unused diag arguments can be ignored (those might be
useful later).
* Annotate all intended fallthoughs.
2018-06-02 23:04:53 +02:00
Martchus
d856fb4c75
Use std::numeric_limits
2018-03-21 20:40:51 +01:00
Martchus
c0336ed4bb
Apply clang-format
2018-03-07 01:17:50 +01:00
Martchus
a0986ad4a9
Fix style issues
2018-03-07 01:11:42 +01:00