Commit Graph

832 Commits

Author SHA1 Message Date
Martchus 981db492e4 Avoid unqualified calls to `std::move` 2023-02-20 19:54:42 +01:00
Martchus 15d74bbfb0 Add media format entry for H.266 2023-02-18 21:43:16 +01:00
Martchus 3272d9c511 Bump minor version 2023-02-18 21:42:38 +01:00
Martchus 522aa4359e Avoid use of platform-specific `unistd.h` header 2023-02-11 13:55:04 +01:00
Martchus cb93d6900c Apply clang-format 2023-02-03 13:31:40 +01:00
Martchus a9c4bca679 Fix broken doc comment 2023-02-03 12:45:44 +01:00
Martchus ca6abe31a0 Fix compilation with MSVC
Apparently the move c'tor isn't available unless explicitly specified
leading to errors when `SegmentData` is used in `std::vector`.
2023-02-02 00:28:01 +01:00
Martchus 205b119416 Use `std` more consistently in `matroskacontainer.cpp` 2023-02-02 00:24:49 +01:00
Martchus 338011e3eb Add missing headers to `matroskaseekinfo.h` 2023-02-02 00:21:37 +01:00
Martchus 7873db611a Add copy c'tor for `AbortableProgressFeedback` to fix compilation with MSVC 2023-02-01 14:36:11 +01:00
Martchus dc4e4082e0 Use `std::filesystem::resize_file` instead of POSIX function
* Avoid platform-specific code
* Fix build with MSVC
2023-02-01 14:05:32 +01:00
Martchus 937631e5c4 Update copyright notice 2023-01-17 18:33:49 +01:00
Martchus 6a07d60649 Avoid message "Parsing tags not implemented …" for MPEG audio frames
This info message that is generated for e.g. MP3 files without ID3 tags is
misleading.
2023-01-08 21:11:57 +01:00
Martchus edc7aa06c9 Bump patch version 2023-01-08 21:10:04 +01:00
Martchus 04e6996ce3 Use the output file path when making an MP4 file also if no rewrite required
Otherwise the `--output-files` option of the tag editor will be ignored
when editing an MP4 file and no rewrite is required.

Note that the condition is already this way in `MediaFileInfo::makeMp3File()`
and `MatroskaContainer::internalMakeFile()`.
2023-01-02 20:04:42 +01:00
Martchus 766e7657b5 Preserve explicitly "undefined" language of MP4 tracks 2023-01-02 19:50:30 +01:00
Martchus 8d4c315611 Improve error messages about missing mandatory MP4 atoms 2023-01-02 19:18:07 +01:00
Martchus 3193df8e3f Fix reading duration from MP4's track header atom
* Skip 4 bytes reserved space correctly
* See https://github.com/Martchus/tageditor/issues/98
2023-01-02 19:16:45 +01:00
Martchus 0347ca73eb Avoid using deprecated OpenSSL functions in testsuite 2023-01-02 01:56:58 +01:00
Martchus dbdfd015bb Bump patch version 2023-01-02 01:55:53 +01:00
Martchus 93da1f1e25 Create ID3v2 tag for AIFF files within `createAppropriateTags()`
Wikipedia says an ID3v2 tag can be added and other software seems to be
able to cope with it.
2022-08-17 23:11:20 +02:00
Martchus bfe6ce8c1e Support detecting AIFF format 2022-08-17 23:06:09 +02:00
Martchus 49c6b61e0c Streamline coding style of date time related tests 2022-08-13 16:05:39 +02:00
Martchus 6333aaa84b Adapt DateTime test to latest changes 2022-08-13 16:04:56 +02:00
Martchus 4ac97910e9 Revert "Adapt tests to recent changes" partially
* In accordance with revert of 44fea6c8c2.
* This partially reverts commit 965ee4ab4b.
2022-08-13 15:43:28 +02:00
Martchus 0cc9271a7f Revert "Omit default components when formatting date time"
* This hack is no longer required as it is now possible to preserve
  what date time parts are specified.
* This reverts commit 44fea6c8c2.
2022-08-13 15:43:28 +02:00
Martchus b50de3cf4f Preserve present parts when converting old record date fields 2022-08-13 15:43:28 +02:00
Martchus f0d8a6efa7 Set only present parts when setting recording time of ID3 <= v2.3
See https://github.com/Martchus/tageditor/issues/86
2022-08-13 14:47:49 +02:00
Martchus 74f6d2b6ac Fix reference to ID3v2 field in error message 2022-08-13 14:43:43 +02:00
Martchus 4aff37b788 Support `CppUtilities::DateTimeExpression` in `TagValue` 2022-08-13 14:42:51 +02:00
Martchus d6a2903749 Fix namespace in documentation of TagDataType 2022-08-13 12:30:59 +02:00
Martchus 99bb786eeb Improve comments about `lRecordingTime`-mapping 2022-08-12 19:41:15 +02:00
Martchus 6da62db035 Add mapping for BPM in Vorbis Comments 2022-08-12 00:37:25 +02:00
Martchus 63c76e6ca4 Bump minor version 2022-08-12 00:36:59 +02:00
Martchus f068c44172 Prevent adding fields with an invalid ID
When there's no mapping for the specified known field, `fieldId()` returns
an invalid field ID. It should not be passed to `setValues()` as we would
otherwise attempt to create an invalid field.
2022-08-12 00:32:17 +02:00
Martchus df27013c2f Avoid misleading log message
"Writing frames" should just be "Writing data" because whatever the file
contains might not be (some kind of) frames.
2022-08-12 00:07:02 +02:00
Martchus 5dd5e301b3 Fix adding ID3v2 tag to file with unknown container format
The bytes skipped while searching for MP3 frames should not be used as
container offset. The container offset should just the offset after the
first ID3v2 tag (or zero if there are no tags).
2022-08-12 00:02:38 +02:00
Martchus 2484cb03f8 Fix merging ID3v2 tags 2022-08-11 23:59:40 +02:00
Martchus 60233c2af2 Add missing documentation 2022-08-02 21:41:05 +02:00
Martchus b4d9a3aeb8 Bump patch version 2022-08-02 21:40:24 +02:00
Martchus ccf77959b4 Convert text values to a supported encoding if needed on the fly
* This makes it harder to use the library wrongly and does not lead to
  worse performance as character set conversions are only done as needed.
* That's actually already done by serializers for most tag formats. This
  change ensures serializers for Matroska and Vorbis tag fields do this as
  well.
* Update documentation accordingly.
2022-07-21 23:30:45 +02:00
Martchus 2ae83a2301 Remove unused include 2022-07-21 23:24:08 +02:00
Martchus 1a5dff611c
Merge pull request #24 from Martchus/rating
Scale rating automatically when serializing popularity/rating field
2022-07-20 23:26:52 +02:00
Martchus c3c525c352 Scale rating automatically when serializing popularity/rating field
* Allow one to get a `Popularity` where `.rating` is always between 1 and 5
  via `TagValue::toScaledPopularity()` (or a "raw" scale by specifying the
  corresponding tag format)
* Allow one to assign a `Popularity` with `.scale = TagType::Unspecified`
  and `.rating` between 1 and 5 (or a "raw" scale by specifying the
  corresponding tag format). It will then be converted internally to
  the required scale (whatever the tag format internally uses)
    * Ensure all tag formats with popularity/rating field use
      `TagValue::toScaledPopularity()` internally when a `Popularity`
      object is assigned
* Ensure all tag formats with popularity/rating field store the rating as
  popularity object to preserve the scaling information
* Keep passing raw strings around working
    * `TagValue::toString()` still does *no* scaling
    * `TagValue::toScaledPopularity()` does *no* scaling for text values
      and instead just assigns the specified scale
* See https://github.com/Martchus/tagparser/issues/23
2022-07-20 23:23:51 +02:00
Martchus ed0fcad420 Bump minor version 2022-07-20 16:57:01 +02:00
Martchus 98d28ede9f Add scale info to Popularity for furture extension
This would allow implementing a way to convert between different scales and
which in turn would allow the UI to provide an editor with a generic scale
(e.g. stars) instead of only allowing to edit raw values as string.

This also make it assume that a single number is meant to be the rating
(instead of the user). That should make editing the rating a bit more
straight forward (if one doesn't care about the user and play counter).
2022-06-20 21:27:42 +02:00
Martchus d17f04864d Move TagType into separate header
So it can be used in different places without creating a dependency loop.
2022-06-20 21:21:11 +02:00
Martchus c4d850825a Map `RATING` field for Vorbis comments 2022-06-19 17:51:51 +02:00
Martchus 0e3ccf8baa Support play counter ID3v2 frame 2022-06-19 17:40:01 +02:00
Martchus 449ad034de Add string-representation for all types in tagDataTypeString() 2022-06-19 17:39:32 +02:00