Commit Graph

807 Commits

Author SHA1 Message Date
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
Martchus 2fda0a505d Prevent showing warning about encoding wrongly when making ID3v1 fields
Due to the fallthrough the warning would be printed in any case when using
UTF-8 and not only if the BOM is actually written (as there are non-ASCII
characters). This problem became apparent when using the tageditor's CLI
with `--id3-init-on-create` to create an ID3v1 tag from ID3v2. Of course it
doesn't help if there are actually non-ASCII characters present.
2021-08-08 01:20:39 +02:00
Martchus f39e8b4d8c Avoid useless cases when assigning tag size (which is now std::uint64_t) 2021-08-08 00:05:11 +02:00
Martchus 62e32f085e Extend documentation of Tag::size() 2021-08-08 00:04:28 +02:00
Martchus 3f5d5e3098 Add functions to return only tags which have actually been parsed 2021-08-08 00:04:12 +02:00
Martchus e095c7d87d Fix check for comment of Matroska test file 2021-07-06 17:19:58 +02:00
Martchus cef4dc0bb7 Apply clang-format 2021-07-06 16:38:52 +02:00
Martchus 0e97b96ea8 Bump patch version (10.0.0 -> 10.0.1) 2021-07-03 11:42:13 +02:00
Martchus 0c3d593924
Merge pull request #18 from jonaski/spelling
Fix spelling and typos
2021-07-02 11:16:37 +02:00
Jonas Kvinge ea23d71e8a Fix spelling and typos 2021-07-02 11:12:39 +02:00
Martchus 72631f5110 Remove Windows-specific notes covered by c++utilities 2021-05-31 20:40:03 +02:00
Martchus 9da53e6d82 Allow one to disable the automatic handling of ID3v2 record fields 2021-05-13 16:07:06 +02:00
Martchus ad6c3baf85 Remove macros to configure default parsing behavior
The macro FORCE_FULL_PARSE_DEFAULT doesn't seem to be set anywhere anyways
at this point.
2021-05-13 15:33:27 +02:00
Martchus 32cd02217b Replace boolean fields in MediaFileInfo with flag enums 2021-05-13 15:30:22 +02:00
Martchus 0e29c98b9f Use flagenumclass.h to implement operators for VorbisCommentFlags 2021-05-13 15:28:56 +02:00
Martchus 2448bcd456 Fix TagValue::convertDescriptionEncoding() 2021-05-09 18:37:31 +02:00
Martchus 87357af974 Fix handling empty ID3v2 record date fields to avoid year "0001" in this case 2021-05-09 12:15:57 +02:00
Martchus a6ca3183b3 Fix reading empty ID3v1 fields 2021-05-09 12:15:00 +02:00
Martchus 92e80a9286 Improve passing paths
* Use `std::string_view` instead of `const std::string &`
* Add overloads taking `std::string &&` for re-using existing strings
2021-04-23 22:16:43 +02:00
Martchus f5cb2c5cba Preserve media type of MP4 tracks if media type is unknown 2021-04-09 22:15:44 +02:00
Martchus 4fca95afa3 Preserve implicit language setting "English" via ISO language code of MKV tracks 2021-04-07 21:21:52 +02:00
Martchus c7e95ad8d5 Avoid implicit conversion 2021-04-07 20:53:14 +02:00
Martchus 9e2629a668 Fix crash when applying changes to Matroska file with track with IETF language 2021-04-07 09:22:33 +02:00
Martchus 0a041f6ad2 Fix warnings 2021-03-20 21:26:25 +01:00
Martchus ec2f8213b0 Consider 4:3 resolutions as well in Size::abbreviation()
So e.g. 960×720 is considered 720p (and not just 1280×720).
2021-02-16 00:07:42 +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 763eb1bd53 Adjust code for turning Vorbis comment field "YEAR" into "DATE"
Maybe this way it will compile with GCC 8.
2021-02-03 14:11:40 +01:00
Martchus 8cd115c69d Adapt tests to use KnownField::RecordDate instead of KnownField::Year 2021-02-01 17:22:57 +01:00
Martchus f21ac07da0 Get rid of deprecated fields 2021-02-01 17:11:08 +01:00
Martchus 709b4a409f Ensure attachments have been parsed before making MKV file 2021-02-01 17:10:29 +01:00
Martchus 78439e2e3f Fix returning nullptr where now a std::string_view is required 2021-02-01 17:10:01 +01:00
Martchus 64d98f5530 Use std::string_view where it makes sense 2021-01-30 21:53:06 +01:00
Martchus 49154905b1 Improve code in Mp4Tag::setValues() 2021-01-30 19:22:06 +01:00
Martchus 42eac2074d Return additional values stored within MP4 fields via values() 2021-01-30 19:18:29 +01:00
Martchus 5629a808be Clear current values of a field before assigning a new one via setValues()
Some tag fields allow to store additional values or other data related to
the value. It likely doesn't make much sense to keep the this data when
setting a new value.
2021-01-30 19:15:41 +01:00
Martchus 7692eec9af Make it easier to customize getting internal values 2021-01-30 19:12:04 +01:00
Martchus 65d52b2d57 Improve customization point for clearing tag field
* Allow customizing clearing only the value
* Use same naming scheme as in other places
* Avoid having to add an empty reset() function in subclasses
2021-01-30 19:10:16 +01:00
Martchus cbd7e75972 Remove unused TagField::cleared() 2021-01-30 18:16:02 +01:00
Martchus 5b6c65aa27 Improve diag messages when parsing MP4 tag fields 2021-01-30 15:13:42 +01:00
Martchus 8efe6e5a63 Avoid converting MP4 data when text of correct encoding is assigned anyways 2021-01-30 15:00:10 +01:00
Martchus 84183aaf02 Improve handling of MP4 tags
* Preserve multiple data atoms
* Assume JPEG as raw data type when making cover field (instead of UTF-8)
* Split certain functions
* Simplify code
2021-01-30 13:59:48 +01:00
Martchus 047d739918 Fix Vorbis Comment mapping for encoderSettings()
* The "Encoder settings" field should correspond to `ENCODER_OPTIONS`
  rather than `ENCODING`
* See https://github.com/Martchus/tageditor/issues/62
* See https://exiftool.org/TagNames/Vorbis.html
2021-01-29 21:38:59 +01:00
Martchus fd4c538180 Improve performance of Matroska writer
Especially when dealing with big files the performance is quite bad. This
change speeds it up a little by using an unordered map to find the elements
for certain offsets instead of using linear lookup.

According to callgrind the modified functions where one with the biggest
own cost. The function updateRelativeOffsets() was actually the 2nd costly
function just below  __memcpy_avx_unaligned_erms.

Now TagParser::EbmlElement::internalParse(TagParser::Diagnostics&) is quite
high as well as standard IO stream functions.
2021-01-27 21:24:53 +01:00