Commit graph

1642 commits

Author SHA1 Message Date
Serial
def61e7410 MPEG: Log a warning when estimating duration from bitrate 2023-12-31 22:37:07 -05:00
Serial
1214f20c8b OGG: Use rounded division to calculate durations
This brings us to parity with FFmpeg durations.
2023-12-31 14:22:39 -05:00
Serial
945c33f528 ogg_pager: Add Packets::iter() 2023-12-31 13:44:33 -05:00
Serial
9444766b38 ID3v2: Move Id3v2Tag unit tests to tag/tests.rs
We reached nearly 1.5k lines of unit tests for `Id3v2Tag`, and with the `tag` module already being quite large itself, it was nearly 3k lines total.

Moving the unit tests to `{module}/tests.rs` is a common pattern in std.
2023-12-31 13:03:49 -05:00
Serial
c606e07c62 changelog: Add entry for ID3v2 TIPL fix 2023-12-26 22:28:35 -05:00
Serial
404960bad9 Text: Document TextDecodeOptions 2023-12-26 22:28:35 -05:00
Serial
3c33cb1f43 ID3v2: Support UTF-16 TIPL frames with single BOM
This changes the signature of `decode_text` to take the new `TextDecodeOptions`. This allows us to specify a UTF-16 BOM ahead of time.

closes #306
2023-12-26 22:28:35 -05:00
Uwe Klotz
7e93b3c1f7 ogg-pager: Update byteorder dependency 2023-12-22 20:52:26 -05:00
Uwe Klotz
5f3cfa06d7 Replace base64 with data-encoding 2023-12-22 20:48:24 -05:00
Uwe Klotz
f8aaaeab20 Update Cargo.toml
Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
2023-12-21 20:44:08 -05:00
Uwe Klotz
a6689dd5b5 Use local, static OnceLock instance 2023-12-21 20:44:08 -05:00
Uwe Klotz
7ce77290e4 Rust v1.70: Replace once_cell with std::sync::OnceLock 2023-12-21 20:44:08 -05:00
Serial
80273a449c Tests: Update doc tests referring to MimeType::None
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-12-18 12:36:45 -05:00
Serial
ec80ae828c Tests/Benches: Fixup for new Picture::new_unchecked signature
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-12-18 12:36:45 -05:00
Serial
c62ac9e252 Clippy: Fix needless_borrow
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-12-18 12:36:45 -05:00
Serial
d9f59e177b changelog: Add entry for removed None variants
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-12-18 12:36:45 -05:00
Serial
f3457f450c Picture: Fix docs referring to MimeType::None
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-12-18 12:36:45 -05:00
Serial
2a18e5f358 MPEG: Remove Emphasis::None variant
This is better expressed by making `MpegProperties` store an `Option<Emphasis>`.

Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-12-18 12:36:45 -05:00
Serial
46ec39216a ID3v2: Remove {Text, Image}SizeRestrictions::None variants
This is better expressed by making `TagRestrictions` store an `Option<{TextSizeRestrictions}>`
 and `Option<{ImageSizeRestrictions}>` instead.

Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-12-18 12:36:45 -05:00
Serial
beb82f6416 Picture: Remove MimeType::None variant
This is better expressed by making `Picture` store an `Option<MimeType>` instead.

Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-12-18 12:36:45 -05:00
Serial
b89ca2a30d changelog: Add entries for ID3v2 TIPL change 2023-12-18 12:31:36 -05:00
Serial
07ddca3762 ID3v2: Support building TIPL frames on Tag merge 2023-12-18 12:31:36 -05:00
obsoleszenz
be749a48a3 Fix u32 overflow by first casting stream_len to u64 before applying
multiplication
2023-12-17 15:36:03 -05:00
Serial
60db8d218c ID3v2: Stop erroring on empty frames 2023-12-14 12:16:03 -05:00
Serial
90ec1e20f7 changelog: Update with MP4 changes 2023-12-05 14:32:33 -05:00
Serial
70ac1596b9 MP4: Use let else to prevent nesting 2023-12-05 14:32:33 -05:00
Serial
a3b3d3bdf7 MP4: Round duration millis
Fixes cases of us being off by one
2023-12-05 14:32:33 -05:00
Serial
f14859f30b MP4: Fix FLAC atom FOURCC
The correct FOURCC is `dfLa`, so this would always be missed and properties would be incomplete.
2023-12-05 14:32:33 -05:00
Serial
001c5a7cec Properties: Remove old comment about FFmpeg reported bitrate
Turns out our value of `280` is correct and matches FFmpeg.
2023-12-05 14:32:33 -05:00
Serial
25785701bd MP4: Check if audio streams are DRM protected
Credit to `Lukáš Lalinský` for finding the location of the undocumented `drms` atom.
Source: <https://mail.kde.org/pipermail/taglib-devel/2011-March/001886.html>
2023-12-03 16:22:33 -05:00
Serial
558d7cc2f7 ID3v1: Rename GENRES[14] to "R&B" 2023-12-03 15:18:08 -05:00
Serial
f5b5dea583
0.17.1
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-11-26 13:31:01 -05:00
Serial
a6f9776417 fmt
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-11-20 12:20:29 -05:00
Serial
a08a7c84c1 MP4: Skip over invalid ilst atoms by default
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-11-20 12:20:29 -05:00
Serial
487d241903
0.17.0: Attempt 2 2023-11-15 12:10:55 -05:00
Serial
10e2fe35b5
benches: Move assets outside of benches
Also specify the paths of the benchmarks, since publishing breaks when it cannot find them.
2023-11-15 12:09:52 -05:00
Serial
d7199f1b71
0.17.0
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-11-15 11:57:48 -05:00
Serial
ace222b2c8
misc: Update dependencies
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2023-11-15 11:55:31 -05:00
sublipri
ed623c44c8 ID3v2: Use genres method in Accessor genre getter 2023-11-04 21:57:03 -04:00
sublipri
f1afc3efda ID3v2: Add genres method to Id3v2Tag 2023-11-04 21:57:03 -04:00
Serial
23c334e1de ID3v2: Properly handle multi-value UTF-16 encoded frames 2023-10-27 10:47:06 -04:00
Uwe Klotz
9985a55e02 Add utf8_decode_str()/trim_end_nulls_str() to avoid/defer allocations 2023-10-26 13:26:21 -04:00
Uwe Klotz
7398602e78 Strip trailing null characters from decoded text 2023-10-25 11:52:31 -04:00
sublipri
486cba1f04 ID3v2: Trim trailing nulls in some frames' content 2023-10-23 19:56:33 -04:00
sublipri
0cd16bda35 util: Add helper function to trim trailing nulls 2023-10-23 19:56:33 -04:00
sublipri
f45d1d3676 ID3v2: Add test for frames with null terminators 2023-10-23 19:56:33 -04:00
Serial
66c63afb97 Benches: Add picture and encoder to create_tag benchmark 2023-10-23 12:52:42 -04:00
Serial
af3b98d441 Benches: Switch to using real-world assets 2023-10-23 12:52:42 -04:00
Serial
776c7dadcb changelog: Update entries with PR link 2023-10-23 12:02:01 -04:00
Serial
e5756758f0 ParseOptions: Add a note about alloc limits being retained 2023-10-23 12:02:01 -04:00