From 02d9d18de5ca2de5521174fb8a7713115ecd287d Mon Sep 17 00:00:00 2001 From: Stephen Shaw Date: Sun, 19 Apr 2026 01:27:38 -0600 Subject: [PATCH 1/3] fix: Surface unified Tag view over all metadata sources (#6) Adds two tag facades so callers of Tag.Pictures and related properties see the same values the file actually contains, regardless of which spec-defined storage location the metadata lives in. Issue #6 reproduction: a FLAC file with a PICTURE metadata block had MediaFileResult.File.Pictures populated but MediaFileResult.Tag.Pictures empty, because OpenFlac returned the raw VorbisComment as the Tag, and VorbisComment.Pictures only reflects base64 METADATA_BLOCK_PICTURE fields inside the Vorbis comment -- not native FLAC PICTURE blocks. Design ------ Research across TagLib C++, Mutagen (Python), Jaudiotagger (Java), and the FLAC / Vorbis specifications converged on "union on read, canonical location on write". Implemented as two facades: * Core/CombinedTag: generic Tag that composes an ordered list of Tag instances. First non-null/non-empty value wins for text fields; Pictures unions across members with dedup on (PictureType, MimeType, PictureData). Writes are no-ops on the base; subclasses override individual members. * Xiph/FlacTag: FLAC-specific view. Text fields delegate to VorbisComment (creating one on first write). Pictures surface the union of native PICTURE blocks and VorbisComment.METADATA_BLOCK_PICTURE entries with the same dedup key. Writes go to native PICTURE blocks and strip the base64 entries to prevent drift after round-trip. Wiring ------ * FlacFile.Tag: now returns a lazy FlacTag instead of the raw VorbisComment. * Mp3File.Tag: now returns CombinedTag(Id3v2Tag, Id3v1Tag) instead of "Id3v2Tag ?? Id3v1Tag", so ID3v1-only fields (e.g. Genre from the legacy 1-byte genre index when no TCON frame exists) are no longer silently dropped. * MediaFile.OpenFlac / OpenMp3: now pass result.File.Tag through to the MediaFileResult, eliminating the duplicated tag-selection logic. Spec references --------------- * FLAC PICTURE block (type 6): https://xiph.org/flac/format.html and RFC 9639 Section 8.8 -- the canonical FLAC picture storage. * METADATA_BLOCK_PICTURE in Vorbis Comment: https://wiki.xiph.org/VorbisComment#METADATA_BLOCK_PICTURE -- base64-encoded FLAC PICTURE block body embedded in a comment field. Canonical for Ogg Vorbis / Opus, tolerated but discouraged in FLAC. * ID3v1: https://id3.org/ID3v1 (128-byte footer, fixed-length fields). * ID3v2.4: https://id3.org/id3v2.4.0-structure (variable-length frames, full Unicode, authoritative when coexisting with ID3v1). Tests (TDD) ----------- 12 new tests, each with spec references in the doc comments: * Xiph/FlacTagTests (8): PICTURE-block read, METADATA_BLOCK_PICTURE read, dedup when both present, union when distinct, text-field round-trip, write canonicalizes to PICTURE blocks, write strips legacy base64, MediaFile.ReadFromData integration. * Core/CombinedTagTests (3): primary wins, fallback to secondary, null-tag skip. * Mpeg/Mp3FileTests (+1): ID3v2 preferred for fields it has; ID3v1 fallback for fields only in v1. Public API snapshot ------------------- Regenerated TagLibSharp2.PublicApi.verified.txt to include the two new public classes. Removed stale TagLibSharp2.PublicApi.DotNet8_0.verified.txt which had drifted from the main snapshot (pre-existing drift, unrelated to this change) -- now one baseline per public API surface. Build / test: 3792 pass, 0 fail, on net8.0 and net10.0. Closes #6. --- src/TagLibSharp2/Core/CombinedTag.cs | 144 + src/TagLibSharp2/Core/MediaFile.cs | 8 +- src/TagLibSharp2/Mpeg/Mp3File.cs | 2 +- src/TagLibSharp2/Xiph/FlacFile.cs | 4 +- src/TagLibSharp2/Xiph/FlacTag.cs | 119 + .../Core/CombinedTagTests.cs | 71 + tests/TagLibSharp2.Tests/Mpeg/Mp3FileTests.cs | 40 + ...LibSharp2.PublicApi.DotNet8_0.verified.txt | 3288 ----------------- .../TagLibSharp2.PublicApi.verified.txt | 30 + tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs | 246 ++ 10 files changed, 656 insertions(+), 3296 deletions(-) create mode 100644 src/TagLibSharp2/Core/CombinedTag.cs create mode 100644 src/TagLibSharp2/Xiph/FlacTag.cs create mode 100644 tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs delete mode 100644 tests/TagLibSharp2.Tests/PublicApi/Snapshots/TagLibSharp2.PublicApi.DotNet8_0.verified.txt create mode 100644 tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs diff --git a/src/TagLibSharp2/Core/CombinedTag.cs b/src/TagLibSharp2/Core/CombinedTag.cs new file mode 100644 index 0000000..e21a692 --- /dev/null +++ b/src/TagLibSharp2/Core/CombinedTag.cs @@ -0,0 +1,144 @@ +// Copyright (c) 2025-2026 Stephen Shaw and contributors +// Licensed under the MIT License. See LICENSE file in the project root for full license information. + +namespace TagLibSharp2.Core; + +/// +/// A tag facade that exposes a unified view over multiple underlying +/// instances in priority order. +/// +/// +/// +/// Getters return the first non-null/non-empty value from the ordered list of tags. +/// Pictures are unioned across members and deduplicated on (PictureType, MimeType, +/// PictureData). +/// +/// +/// Writes are no-ops on this base facade; callers wanting mutation should operate +/// on the underlying tags directly. Format-specific subclasses (e.g. the FLAC tag +/// view) override individual members to forward writes to the appropriate storage. +/// +/// +/// The motivating case is an MP3 file that carries both an ID3v2 tag +/// (https://id3.org/id3v2.4.0-structure) and an ID3v1 tag (https://id3.org/ID3v1). +/// ID3v2 is authoritative when both are present, but ID3v1-only fields must still +/// surface through the unified view so legacy data is not silently lost. +/// +/// +public class CombinedTag : Tag +{ + readonly Tag?[] _tags; + + /// + /// Initializes a new with the supplied tags in + /// priority order. The first non-null tag's value wins for each field. + /// + /// Tags in priority order. Null entries are allowed and ignored. + public CombinedTag (params Tag?[] tags) + { + _tags = tags ?? []; + } + + /// + /// Gets the underlying tags in priority order. Null entries are preserved. + /// + protected IReadOnlyList Tags => _tags; + + T? FirstNonDefault (Func selector, Func isDefault) + { + foreach (var tag in _tags) { + if (tag is null) + continue; + var value = selector (tag); + if (!isDefault (value)) + return value; + } + return default; + } + + string? FirstNonEmptyString (Func selector) => + FirstNonDefault (selector, string.IsNullOrEmpty); + + uint? FirstNonNullUInt (Func selector) => + FirstNonDefault (selector, v => !v.HasValue); + + /// + public override TagTypes TagType { + get { + var types = TagTypes.None; + foreach (var tag in _tags) { + if (tag is not null) + types |= tag.TagType; + } + return types; + } + } + + /// + public override string? Title { + get => FirstNonEmptyString (t => t.Title); + set { } + } + + /// + public override string? Artist { + get => FirstNonEmptyString (t => t.Artist); + set { } + } + + /// + public override string? Album { + get => FirstNonEmptyString (t => t.Album); + set { } + } + + /// + public override string? Year { + get => FirstNonEmptyString (t => t.Year); + set { } + } + + /// + public override string? Comment { + get => FirstNonEmptyString (t => t.Comment); + set { } + } + + /// + public override string? Genre { + get => FirstNonEmptyString (t => t.Genre); + set { } + } + + /// + public override uint? Track { + get => FirstNonNullUInt (t => t.Track); + set { } + } + + /// +#pragma warning disable CA1819 // Properties should not return arrays - Tag API contract + public override IPicture[] Pictures { + get { + var merged = new List (); + var seen = new HashSet<(PictureType, string, BinaryData)> (); + foreach (var tag in _tags) { + if (tag is null) + continue; + foreach (var p in tag.Pictures) { + if (seen.Add ((p.PictureType, p.MimeType, p.PictureData))) + merged.Add (p); + } + } + return [.. merged]; + } + set { } + } +#pragma warning restore CA1819 + + /// + public override BinaryData Render () => BinaryData.Empty; + + /// + public override void Clear () { } +} diff --git a/src/TagLibSharp2/Core/MediaFile.cs b/src/TagLibSharp2/Core/MediaFile.cs index 8b325b6..48db9e1 100644 --- a/src/TagLibSharp2/Core/MediaFile.cs +++ b/src/TagLibSharp2/Core/MediaFile.cs @@ -386,7 +386,7 @@ static MediaFileResult OpenFlac (ReadOnlyMemory data) if (!result.IsSuccess) return MediaFileResult.Failure (result.Error!); - return MediaFileResult.Success (result.File!, result.File!.VorbisComment, MediaFormat.Flac); + return MediaFileResult.Success (result.File!, result.File!.Tag, MediaFormat.Flac); } static MediaFileResult OpenOggVorbis (ReadOnlyMemory data) @@ -413,11 +413,7 @@ static MediaFileResult OpenMp3 (ReadOnlyMemory data) if (!result.IsSuccess) return MediaFileResult.Failure (result.Error!); - // Prefer ID3v2 tag, fall back to ID3v1 - Tag? tag = result.File!.Id3v2Tag is not null - ? result.File.Id3v2Tag - : result.File.Id3v1Tag; - return MediaFileResult.Success (result.File, tag, MediaFormat.Mp3); + return MediaFileResult.Success (result.File!, result.File!.Tag, MediaFormat.Mp3); } static MediaFileResult OpenWav (ReadOnlyMemory data) diff --git a/src/TagLibSharp2/Mpeg/Mp3File.cs b/src/TagLibSharp2/Mpeg/Mp3File.cs index 23645d0..5ef70fc 100644 --- a/src/TagLibSharp2/Mpeg/Mp3File.cs +++ b/src/TagLibSharp2/Mpeg/Mp3File.cs @@ -88,7 +88,7 @@ public sealed class Mp3File : IMediaFile public bool HasId3v2Tag => Id3v2Tag is not null; /// - public Tag? Tag => (Tag?)Id3v2Tag ?? Id3v1Tag; + public Tag? Tag => new CombinedTag (Id3v2Tag, Id3v1Tag); /// IMediaProperties? IMediaFile.AudioProperties => Properties; diff --git a/src/TagLibSharp2/Xiph/FlacFile.cs b/src/TagLibSharp2/Xiph/FlacFile.cs index 3bcf493..f13bbb1 100644 --- a/src/TagLibSharp2/Xiph/FlacFile.cs +++ b/src/TagLibSharp2/Xiph/FlacFile.cs @@ -271,8 +271,10 @@ public string? Comment { /// public AudioProperties Properties { get; } + FlacTag? _tag; + /// - public Tag? Tag => VorbisComment; + public Tag? Tag => _tag ??= new FlacTag (this); /// IMediaProperties? IMediaFile.AudioProperties => Properties; diff --git a/src/TagLibSharp2/Xiph/FlacTag.cs b/src/TagLibSharp2/Xiph/FlacTag.cs new file mode 100644 index 0000000..b28bff9 --- /dev/null +++ b/src/TagLibSharp2/Xiph/FlacTag.cs @@ -0,0 +1,119 @@ +// Copyright (c) 2025-2026 Stephen Shaw and contributors +// Licensed under the MIT License. See LICENSE file in the project root for full license information. + +using TagLibSharp2.Core; + +namespace TagLibSharp2.Xiph; + +/// +/// Unified tag view over a 's metadata. +/// +/// +/// +/// FLAC can store pictures in two spec-defined locations: +/// +/// +/// Native PICTURE metadata blocks (block type 6), per RFC 9639 §8.8. +/// METADATA_BLOCK_PICTURE fields inside the VORBIS_COMMENT block (base64-encoded), +/// per https://wiki.xiph.org/VorbisComment#METADATA_BLOCK_PICTURE. +/// +/// +/// This class provides a single Tag view that surfaces both so callers do not need +/// to know FLAC's internal storage layout. +/// +/// +public sealed class FlacTag : Tag +{ + readonly FlacFile _file; + + internal FlacTag (FlacFile file) + { + _file = file; + } + + /// + public override TagTypes TagType => TagTypes.Xiph | TagTypes.FlacMetadata; + + /// + public override string? Title { + get => _file.VorbisComment?.Title; + set => EnsureVorbisComment ().Title = value; + } + + /// + public override string? Artist { + get => _file.VorbisComment?.Artist; + set => EnsureVorbisComment ().Artist = value; + } + + /// + public override string? Album { + get => _file.VorbisComment?.Album; + set => EnsureVorbisComment ().Album = value; + } + + /// + public override string? Year { + get => _file.VorbisComment?.Year; + set => EnsureVorbisComment ().Year = value; + } + + /// + public override string? Comment { + get => _file.VorbisComment?.Comment; + set => EnsureVorbisComment ().Comment = value; + } + + /// + public override string? Genre { + get => _file.VorbisComment?.Genre; + set => EnsureVorbisComment ().Genre = value; + } + + /// + public override uint? Track { + get => _file.VorbisComment?.Track; + set => EnsureVorbisComment ().Track = value; + } + + VorbisComment EnsureVorbisComment () => + _file.VorbisComment ??= new VorbisComment ("TagLibSharp2"); + + /// +#pragma warning disable CA1819 // Properties should not return arrays - Tag API contract + public override IPicture[] Pictures { + get { + var blockPictures = _file.Pictures; + var embedded = _file.VorbisComment?.Pictures ?? []; + var merged = new List (blockPictures.Count + embedded.Length); + var seen = new HashSet<(PictureType, string, BinaryData)> (); + foreach (var p in blockPictures) { + if (seen.Add ((p.PictureType, p.MimeType, p.PictureData))) + merged.Add (p); + } + foreach (var p in embedded) { + if (seen.Add ((p.PictureType, p.MimeType, p.PictureData))) + merged.Add (p); + } + return [.. merged]; + } + set { + _file.RemoveAllPictures (); + _file.VorbisComment?.RemoveAllPictures (); + if (value is null) + return; + foreach (var p in value) { + var flacPic = p as FlacPicture ?? new FlacPicture ( + p.MimeType, p.PictureType, p.Description, p.PictureData, 0, 0, 0, 0); + _file.AddPicture (flacPic); + } + } + } +#pragma warning restore CA1819 + + /// + public override BinaryData Render () => BinaryData.Empty; + + /// + public override void Clear () { } +} diff --git a/tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs b/tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs new file mode 100644 index 0000000..31bc0a3 --- /dev/null +++ b/tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs @@ -0,0 +1,71 @@ +// Copyright (c) 2025-2026 Stephen Shaw and contributors +// Licensed under the MIT License. See LICENSE file in the project root for full license information. + +using TagLibSharp2.Core; +using TagLibSharp2.Id3; +using TagLibSharp2.Id3.Id3v2; + +namespace TagLibSharp2.Tests.Core; + +/// +/// Tests for — a Tag facade that exposes a unified view +/// over multiple underlying Tag instances in a well-defined priority order. +/// +/// +/// The motivating case is an MP3 file that contains both an ID3v2 tag and an +/// ID3v1 tag. Per the ID3v1 specification (https://id3.org/ID3v1), ID3v1 has +/// strict field length limits (title/artist/album capped at 30 bytes, year at +/// 4 bytes, etc.). ID3v2 has no such limits. When both are present, taggers +/// generally treat ID3v2 as authoritative and ID3v1 as a legacy-compat copy, +/// so reads must prefer ID3v2 and fall back to ID3v1 for fields missing in v2. +/// +[TestClass] +[TestCategory ("Unit")] +[TestCategory ("Core")] +public class CombinedTagTests +{ + /// + /// When the primary tag has a field value, that value wins regardless of what + /// later tags hold. This implements the "ID3v2 is authoritative" convention. + /// + [TestMethod] + public void Title_PrimaryTagValueWinsOverSecondary () + { + var primary = new Id3v2Tag { Title = "From Primary" }; + var secondary = new Id3v1Tag { Title = "From Secondary" }; + + var combined = new CombinedTag (primary, secondary); + + Assert.AreEqual ("From Primary", combined.Title); + } + + /// + /// When the primary tag does not have a value for a field, the combined tag + /// falls back to later tags. This prevents ID3v1-only information (typical + /// for files tagged prior to widespread ID3v2 adoption) from being lost. + /// + [TestMethod] + public void Title_FallsBackToSecondaryWhenPrimaryIsEmpty () + { + var primary = new Id3v2Tag (); + var secondary = new Id3v1Tag { Title = "Only In Secondary" }; + + var combined = new CombinedTag (primary, secondary); + + Assert.AreEqual ("Only In Secondary", combined.Title); + } + + /// + /// A null tag in the priority list is skipped. This supports the common + /// case where a file is being read and one of the tag blocks is absent. + /// + [TestMethod] + public void Title_SkipsNullTagsInPriorityList () + { + var secondary = new Id3v1Tag { Title = "From Secondary" }; + + var combined = new CombinedTag (null, secondary); + + Assert.AreEqual ("From Secondary", combined.Title); + } +} diff --git a/tests/TagLibSharp2.Tests/Mpeg/Mp3FileTests.cs b/tests/TagLibSharp2.Tests/Mpeg/Mp3FileTests.cs index 8ee9758..28e02db 100644 --- a/tests/TagLibSharp2.Tests/Mpeg/Mp3FileTests.cs +++ b/tests/TagLibSharp2.Tests/Mpeg/Mp3FileTests.cs @@ -84,6 +84,46 @@ public void Read_Id3v1Only_ParsesTag () Assert.AreEqual (TestConstants.Metadata.Artist, result.File.Id3v1Tag.Artist); } + /// + /// When an MP3 file carries both an ID3v2 and an ID3v1 tag, + /// must return a unified view that prefers ID3v2 for fields v2 has and falls back + /// to ID3v1 for fields only present in the legacy tag. + /// + /// + /// ID3v1 (https://id3.org/ID3v1) has a fixed 128-byte footer with short length + /// limits. ID3v2 (https://id3.org/id3v2.4.0-structure) is prepended to the file + /// and has no such limits. Per widespread convention (followed by iTunes, foobar2000, + /// MusicBrainz Picard, and TagLib itself), ID3v2 is authoritative when both are + /// present. A file might still carry ID3v1-only data (older files re-tagged by tools + /// that only update v2), so we must not silently lose those values. + /// + [TestMethod] + public void Tag_BothIdTags_PrefersId3v2ButFallsBackToId3v1 () + { + // ID3v2: has Title but no Genre + var id3v2 = new Id3v2Tag { Title = "V2 Title" }; + var v2Data = id3v2.Render (); + + // ID3v1: has both Title and Genre + var id3v1 = new Id3v1Tag { Title = "V1 Title", Genre = "Rock" }; + var v1Data = id3v1.Render (); + + var audioData = new byte[256]; + var fullData = new byte[v2Data.Length + audioData.Length + v1Data.Length]; + v2Data.Span.CopyTo (fullData); + v1Data.Span.CopyTo (fullData.AsSpan (v2Data.Length + audioData.Length)); + + var result = Mp3File.Read (fullData); + + Assert.IsTrue (result.IsSuccess); + Assert.IsNotNull (result.File!.Id3v2Tag); + Assert.IsNotNull (result.File.Id3v1Tag); + Assert.AreEqual ("V2 Title", result.File.Tag!.Title, + "Title should come from ID3v2 (authoritative when both present)"); + Assert.AreEqual ("Rock", result.File.Tag.Genre, + "Genre should fall back to ID3v1 when ID3v2 has no Genre"); + } + [TestMethod] public void Read_BothTags_ParsesBoth () { diff --git a/tests/TagLibSharp2.Tests/PublicApi/Snapshots/TagLibSharp2.PublicApi.DotNet8_0.verified.txt b/tests/TagLibSharp2.Tests/PublicApi/Snapshots/TagLibSharp2.PublicApi.DotNet8_0.verified.txt deleted file mode 100644 index 9744a3e..0000000 --- a/tests/TagLibSharp2.Tests/PublicApi/Snapshots/TagLibSharp2.PublicApi.DotNet8_0.verified.txt +++ /dev/null @@ -1,3288 +0,0 @@ -namespace TagLibSharp2.Aiff -{ - public class AiffAudioProperties : TagLibSharp2.Core.IMediaProperties - { - public const int MinAifcCommSize = 22; - public const int MinCommSize = 18; - public int Bitrate { get; } - public int BitsPerSample { get; } - public int Channels { get; } - public string? Codec { get; } - public string? CompressionName { get; } - public string? CompressionType { get; } - public System.TimeSpan Duration { get; } - public uint SampleFrames { get; } - public int SampleRate { get; } - public static bool TryParse(TagLibSharp2.Core.BinaryData commData, out TagLibSharp2.Aiff.AiffAudioProperties? properties) { } - } - public class AiffChunk - { - public const int HeaderSize = 8; - public AiffChunk(string fourCC, TagLibSharp2.Core.BinaryData data) { } - public TagLibSharp2.Core.BinaryData Data { get; } - public string FourCC { get; } - public uint Size { get; } - public int TotalSize { get; } - public TagLibSharp2.Core.BinaryData Render() { } - public static bool TryParse(TagLibSharp2.Core.BinaryData data, int offset, out TagLibSharp2.Aiff.AiffChunk? chunk) { } - } - public sealed class AiffFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public const int HeaderSize = 12; - public static readonly TagLibSharp2.Core.BinaryData AifcType; - public static readonly TagLibSharp2.Core.BinaryData AiffType; - public static readonly TagLibSharp2.Core.BinaryData FormMagic; - public AiffFile() { } - public System.Collections.Generic.IReadOnlyList AllChunks { get; } - public TagLibSharp2.Id3.Id3v2.Frames.PictureFrame? CoverArt { get; } - public uint FileSize { get; } - public string FormType { get; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public bool HasPictures { get; } - public bool IsValid { get; } - public TagLibSharp2.Core.IPicture[] Pictures { get; } - public TagLibSharp2.Aiff.AiffAudioProperties? Properties { get; } - public string? SourcePath { get; } - public TagLibSharp2.Id3.Id3v2.Id3v2Tag? Tag { get; set; } - public void Dispose() { } - public TagLibSharp2.Aiff.AiffChunk? GetChunk(string fourCC) { } - public TagLibSharp2.Core.BinaryData Render() { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Aiff.AiffFileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Aiff.AiffFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Aiff.AiffFile? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Aiff.AiffFile? file) { } - } - public readonly struct AiffFileReadResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Aiff.AiffFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Aiff.AiffFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Aiff.AiffFileReadResult Failure(string error) { } - public static TagLibSharp2.Aiff.AiffFileReadResult Success(TagLibSharp2.Aiff.AiffFile file) { } - public static bool operator !=(TagLibSharp2.Aiff.AiffFileReadResult left, TagLibSharp2.Aiff.AiffFileReadResult right) { } - public static bool operator ==(TagLibSharp2.Aiff.AiffFileReadResult left, TagLibSharp2.Aiff.AiffFileReadResult right) { } - } -} -namespace TagLibSharp2.Ape -{ - public sealed class ApeBinaryData - { - public ApeBinaryData(string filename, byte[] data) { } - public byte[] Data { get; } - public string Filename { get; } - } - public enum ApeItemType - { - Text = 0, - Binary = 1, - ExternalLocator = 2, - Reserved = 3, - } - public sealed class ApePicture : TagLibSharp2.Core.Picture - { - public const string ArtistKey = "Cover Art (Artist)"; - public const string BackCoverKey = "Cover Art (Back)"; - public const string FrontCoverKey = "Cover Art (Front)"; - public const string MediaKey = "Cover Art (Media)"; - public ApePicture(string filename, TagLibSharp2.Core.PictureType pictureType, TagLibSharp2.Core.BinaryData pictureData) { } - public ApePicture(string mimeType, TagLibSharp2.Core.PictureType pictureType, string filename, TagLibSharp2.Core.BinaryData pictureData) { } - public override string Description { get; } - public string Filename { get; } - public override string MimeType { get; } - public override TagLibSharp2.Core.BinaryData PictureData { get; } - public override TagLibSharp2.Core.PictureType PictureType { get; } - public string GetKey() { } - public static TagLibSharp2.Ape.ApePicture FromBinaryData(string key, TagLibSharp2.Ape.ApeBinaryData data) { } - public static TagLibSharp2.Ape.ApePicture FromPicture(TagLibSharp2.Core.IPicture picture) { } - public static string GetKeyForPictureType(TagLibSharp2.Core.PictureType type) { } - public static TagLibSharp2.Core.PictureType GetPictureTypeForKey(string key) { } - } - public sealed class ApeTag : TagLibSharp2.Core.Tag - { - public ApeTag() { } - public override string? AcoustIdFingerprint { get; set; } - public override string? AcoustIdId { get; set; } - public override string? Album { get; set; } - public override string? AlbumArtist { get; set; } - public override string? AlbumArtistSort { get; set; } - public override string? AlbumSort { get; set; } - public override string? AmazonId { get; set; } - public override string? Artist { get; set; } - public override string? ArtistSort { get; set; } - public override string? Barcode { get; set; } - public override uint? BeatsPerMinute { get; set; } - public override string? CatalogNumber { get; set; } - public override string? Comment { get; set; } - public override string? Composer { get; set; } - public override string? ComposerSort { get; set; } - public override string? Conductor { get; set; } - public override string? Copyright { get; set; } - public override string? DateTagged { get; set; } - public override string? Description { get; set; } - public uint? Disc { get; set; } - public override uint? DiscNumber { get; set; } - public override string? DiscSubtitle { get; set; } - public override string? EncodedBy { get; set; } - public override string? EncoderSettings { get; set; } - public override string? Genre { get; set; } - public override string? Grouping { get; set; } - public override string? InitialKey { get; set; } - public override bool IsCompilation { get; set; } - public override string? Isrc { get; set; } - public int ItemCount { get; } - public override string? Language { get; set; } - public override string? Lyrics { get; set; } - public override string? MediaType { get; set; } - public override string? Mood { get; set; } - public override string? Movement { get; set; } - public override uint? MovementNumber { get; set; } - public override uint? MovementTotal { get; set; } - public override string? MusicBrainzAlbumArtistId { get; set; } - public override string? MusicBrainzArtistId { get; set; } - public override string? MusicBrainzDiscId { get; set; } - public override string? MusicBrainzRecordingId { get; set; } - public override string? MusicBrainzReleaseCountry { get; set; } - public override string? MusicBrainzReleaseGroupId { get; set; } - public override string? MusicBrainzReleaseId { get; set; } - public override string? MusicBrainzReleaseStatus { get; set; } - public override string? MusicBrainzReleaseType { get; set; } - public override string? MusicBrainzTrackId { get; set; } - public override string? MusicBrainzWorkId { get; set; } - public override string? OriginalReleaseDate { get; set; } - public override TagLibSharp2.Core.IPicture[] Pictures { get; set; } - public override string? PodcastFeedUrl { get; set; } - public override string? Publisher { get; set; } - public override string? R128AlbumGain { get; set; } - public override string? R128TrackGain { get; set; } - public override string? Remixer { get; set; } - public override string? ReplayGainAlbumGain { get; set; } - public override string? ReplayGainAlbumPeak { get; set; } - public override string? ReplayGainTrackGain { get; set; } - public override string? ReplayGainTrackPeak { get; set; } - public override string? Subtitle { get; set; } - public override TagLibSharp2.Core.TagTypes TagType { get; } - public override string? Title { get; set; } - public override string? TitleSort { get; set; } - public override uint? TotalDiscs { get; set; } - public override uint? TotalTracks { get; set; } - public override uint? Track { get; set; } - public override string? Work { get; set; } - public override string? Year { get; set; } - public override void Clear() { } - public TagLibSharp2.Ape.ApeBinaryData? GetBinaryItem(string key) { } - public string? GetValue(string key) { } - public bool Remove(string key) { } - public override TagLibSharp2.Core.BinaryData Render() { } - public TagLibSharp2.Core.BinaryData RenderWithOptions(bool includeHeader = false) { } - public void SetBinaryItem(string key, string filename, byte[] data) { } - public void SetValue(string key, string value) { } - public static TagLibSharp2.Ape.ApeTagParseResult Parse(System.ReadOnlySpan data) { } - } - public sealed class ApeTagFooter - { - public const int Size = 32; - public uint Flags { get; } - public bool HasFooter { get; } - public bool HasHeader { get; } - public bool IsHeader { get; } - public bool IsReadOnly { get; } - public uint ItemCount { get; } - public uint TagSize { get; } - public uint Version { get; } - public static System.ReadOnlySpan Magic { get; } - public byte[] Render() { } - public static TagLibSharp2.Ape.ApeTagFooter Create(uint tagSize, uint itemCount, bool isHeader = false, bool hasHeader = false, bool isReadOnly = false) { } - public static TagLibSharp2.Ape.ApeTagFooterParseResult Parse(System.ReadOnlySpan data) { } - } - public readonly struct ApeTagFooterParseResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Ape.ApeTagFooter? Footer { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Ape.ApeTagFooterParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Ape.ApeTagFooterParseResult Failure(string error) { } - public static TagLibSharp2.Ape.ApeTagFooterParseResult Success(TagLibSharp2.Ape.ApeTagFooter footer) { } - public static bool operator !=(TagLibSharp2.Ape.ApeTagFooterParseResult left, TagLibSharp2.Ape.ApeTagFooterParseResult right) { } - public static bool operator ==(TagLibSharp2.Ape.ApeTagFooterParseResult left, TagLibSharp2.Ape.ApeTagFooterParseResult right) { } - } - public sealed class ApeTagHeader - { - public const int Size = 32; - public uint Flags { get; } - public bool HasHeader { get; } - public bool IsHeader { get; } - public bool IsReadOnly { get; } - public uint ItemCount { get; } - public uint TagSize { get; } - public uint Version { get; } - public byte[] Render() { } - public static TagLibSharp2.Ape.ApeTagHeader Create(uint tagSize, uint itemCount, bool isReadOnly = false) { } - public static TagLibSharp2.Ape.ApeTagHeaderParseResult Parse(System.ReadOnlySpan data) { } - } - public readonly struct ApeTagHeaderParseResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Ape.ApeTagHeader? Header { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Ape.ApeTagHeaderParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Ape.ApeTagHeaderParseResult Failure(string error) { } - public static TagLibSharp2.Ape.ApeTagHeaderParseResult Success(TagLibSharp2.Ape.ApeTagHeader header) { } - public static bool operator !=(TagLibSharp2.Ape.ApeTagHeaderParseResult left, TagLibSharp2.Ape.ApeTagHeaderParseResult right) { } - public static bool operator ==(TagLibSharp2.Ape.ApeTagHeaderParseResult left, TagLibSharp2.Ape.ApeTagHeaderParseResult right) { } - } - public sealed class ApeTagItem - { - public const int MaxKeyLength = 255; - public const int MinHeaderSize = 8; - public const int MinKeyLength = 2; - public TagLibSharp2.Ape.ApeBinaryData? BinaryValue { get; } - public uint Flags { get; } - public bool IsReadOnly { get; } - public TagLibSharp2.Ape.ApeItemType ItemType { get; } - public string Key { get; } - public byte[] RawValue { get; } - public string? ValueAsString { get; } - public byte[] Render() { } - public static TagLibSharp2.Ape.ApeTagItem CreateBinary(string key, string filename, byte[] data, bool isReadOnly = false) { } - public static TagLibSharp2.Ape.ApeTagItem CreateExternalLocator(string key, string url, bool isReadOnly = false) { } - public static TagLibSharp2.Ape.ApeTagItem CreateText(string key, string value, bool isReadOnly = false) { } - public static TagLibSharp2.Ape.ApeTagItemParseResult Parse(System.ReadOnlySpan data) { } - } - public readonly struct ApeTagItemParseResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public TagLibSharp2.Ape.ApeTagItem? Item { get; } - public bool Equals(TagLibSharp2.Ape.ApeTagItemParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Ape.ApeTagItemParseResult Failure(string error) { } - public static TagLibSharp2.Ape.ApeTagItemParseResult Success(TagLibSharp2.Ape.ApeTagItem item, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Ape.ApeTagItemParseResult left, TagLibSharp2.Ape.ApeTagItemParseResult right) { } - public static bool operator ==(TagLibSharp2.Ape.ApeTagItemParseResult left, TagLibSharp2.Ape.ApeTagItemParseResult right) { } - } - public readonly struct ApeTagParseResult : System.IEquatable - { - public string? Error { get; } - public bool IsSuccess { get; } - public TagLibSharp2.Ape.ApeTag? Tag { get; } - public bool Equals(TagLibSharp2.Ape.ApeTagParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Ape.ApeTagParseResult Failure(string error) { } - public static TagLibSharp2.Ape.ApeTagParseResult Success(TagLibSharp2.Ape.ApeTag tag) { } - public static bool operator !=(TagLibSharp2.Ape.ApeTagParseResult left, TagLibSharp2.Ape.ApeTagParseResult right) { } - public static bool operator ==(TagLibSharp2.Ape.ApeTagParseResult left, TagLibSharp2.Ape.ApeTagParseResult right) { } - } - public sealed class MonkeysAudioFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public TagLibSharp2.Ape.ApeTag? ApeTag { get; } - public int BitsPerSample { get; } - public uint BlocksPerFrame { get; } - public int Channels { get; } - public int CompressionLevel { get; } - public uint FinalFrameBlocks { get; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public TagLibSharp2.Core.AudioProperties Properties { get; } - public int SampleRate { get; } - public string? SourcePath { get; } - public TagLibSharp2.Core.Tag? Tag { get; } - public uint TotalFrames { get; } - public int Version { get; } - public void Dispose() { } - public TagLibSharp2.Ape.ApeTag EnsureApeTag() { } - public void RemoveApeTag() { } - public byte[] Render(System.ReadOnlySpan originalData) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Ape.MonkeysAudioFileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Ape.MonkeysAudioFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Ape.MonkeysAudioFile? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Ape.MonkeysAudioFile? file) { } - } - public readonly struct MonkeysAudioFileReadResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Ape.MonkeysAudioFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Ape.MonkeysAudioFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Ape.MonkeysAudioFileReadResult Failure(string error) { } - public static TagLibSharp2.Ape.MonkeysAudioFileReadResult Success(TagLibSharp2.Ape.MonkeysAudioFile file) { } - public static bool operator !=(TagLibSharp2.Ape.MonkeysAudioFileReadResult left, TagLibSharp2.Ape.MonkeysAudioFileReadResult right) { } - public static bool operator ==(TagLibSharp2.Ape.MonkeysAudioFileReadResult left, TagLibSharp2.Ape.MonkeysAudioFileReadResult right) { } - } -} -namespace TagLibSharp2.Asf -{ - public enum AsfAttributeType - { - UnicodeString = 0, - Binary = 1, - Bool = 2, - Dword = 3, - Qword = 4, - Word = 5, - UniqueId = 6, - } - public sealed class AsfContentDescription - { - public AsfContentDescription(string title, string author, string copyright, string description, string rating) { } - public string Author { get; } - public string Copyright { get; } - public string Description { get; } - public string Rating { get; } - public string Title { get; } - public TagLibSharp2.Core.BinaryData Render() { } - public static TagLibSharp2.Asf.AsfContentDescriptionParseResult Parse(System.ReadOnlySpan data) { } - } - public readonly struct AsfContentDescriptionParseResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public TagLibSharp2.Asf.AsfContentDescription Value { get; } - public bool Equals(TagLibSharp2.Asf.AsfContentDescriptionParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Asf.AsfContentDescriptionParseResult Failure(string error) { } - public static TagLibSharp2.Asf.AsfContentDescriptionParseResult Success(TagLibSharp2.Asf.AsfContentDescription value, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Asf.AsfContentDescriptionParseResult left, TagLibSharp2.Asf.AsfContentDescriptionParseResult right) { } - public static bool operator ==(TagLibSharp2.Asf.AsfContentDescriptionParseResult left, TagLibSharp2.Asf.AsfContentDescriptionParseResult right) { } - } - public sealed class AsfDescriptor - { - public TagLibSharp2.Core.BinaryData? BinaryValue { get; } - public bool? BoolValue { get; } - public uint? DwordValue { get; } - public ushort LanguageIndex { get; } - public string Name { get; } - public ulong? QwordValue { get; } - public TagLibSharp2.Core.BinaryData RawValue { get; } - public ushort StreamNumber { get; } - public string? StringValue { get; } - public TagLibSharp2.Asf.AsfAttributeType Type { get; } - public ushort? WordValue { get; } - public TagLibSharp2.Core.BinaryData RenderName() { } - public TagLibSharp2.Core.BinaryData RenderValue() { } - public static TagLibSharp2.Asf.AsfDescriptor CreateBinary(string name, TagLibSharp2.Core.BinaryData value) { } - public static TagLibSharp2.Asf.AsfDescriptor CreateBinary(string name, byte[] value) { } - public static TagLibSharp2.Asf.AsfDescriptor CreateBool(string name, bool value) { } - public static TagLibSharp2.Asf.AsfDescriptor CreateDword(string name, uint value) { } - public static TagLibSharp2.Asf.AsfDescriptor CreateQword(string name, ulong value) { } - public static TagLibSharp2.Asf.AsfDescriptor CreateString(string name, string value) { } - public static TagLibSharp2.Asf.AsfDescriptor CreateWord(string name, ushort value) { } - } - public sealed class AsfExtendedContentDescription - { - public AsfExtendedContentDescription(System.Collections.Generic.IReadOnlyList descriptors) { } - public System.Collections.Generic.IReadOnlyList Descriptors { get; } - public bool? GetBool(string name) { } - public TagLibSharp2.Asf.AsfDescriptor? GetDescriptor(string name) { } - public uint? GetDword(string name) { } - public ulong? GetQword(string name) { } - public string? GetString(string name) { } - public TagLibSharp2.Core.BinaryData Render() { } - public static TagLibSharp2.Asf.AsfExtendedContentDescriptionParseResult Parse(System.ReadOnlySpan data) { } - } - public readonly struct AsfExtendedContentDescriptionParseResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public TagLibSharp2.Asf.AsfExtendedContentDescription Value { get; } - public bool Equals(TagLibSharp2.Asf.AsfExtendedContentDescriptionParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Asf.AsfExtendedContentDescriptionParseResult Failure(string error) { } - public static TagLibSharp2.Asf.AsfExtendedContentDescriptionParseResult Success(TagLibSharp2.Asf.AsfExtendedContentDescription value, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Asf.AsfExtendedContentDescriptionParseResult left, TagLibSharp2.Asf.AsfExtendedContentDescriptionParseResult right) { } - public static bool operator ==(TagLibSharp2.Asf.AsfExtendedContentDescriptionParseResult left, TagLibSharp2.Asf.AsfExtendedContentDescriptionParseResult right) { } - } - public sealed class AsfFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public string? Album { get; set; } - public string? Artist { get; set; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public TagLibSharp2.Core.AudioProperties Properties { get; } - public string? SourcePath { get; } - public TagLibSharp2.Asf.AsfTag Tag { get; } - public string? Title { get; set; } - public void Dispose() { } - public byte[] Render(System.ReadOnlySpan originalData) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Asf.AsfFileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Asf.AsfFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Asf.AsfFile? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Asf.AsfFile? file) { } - } - public sealed class AsfFileProperties - { - public const int MinContentSize = 80; - public ulong CreationDateFiletime { get; } - public ulong DataPacketsCount { get; } - public System.TimeSpan Duration { get; } - public TagLibSharp2.Asf.AsfGuid FileId { get; } - public ulong FileSize { get; } - public uint Flags { get; } - public bool IsSeekable { get; } - public uint MaxBitrate { get; } - public uint MaxPacketSize { get; } - public uint MinPacketSize { get; } - public ulong PlayDurationNs { get; } - public ulong PrerollMs { get; } - public ulong SendDurationNs { get; } - public static TagLibSharp2.Asf.AsfFilePropertiesParseResult Parse(System.ReadOnlySpan data) { } - } - public readonly struct AsfFilePropertiesParseResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public TagLibSharp2.Asf.AsfFileProperties Value { get; } - public bool Equals(TagLibSharp2.Asf.AsfFilePropertiesParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Asf.AsfFilePropertiesParseResult Failure(string error) { } - public static TagLibSharp2.Asf.AsfFilePropertiesParseResult Success(TagLibSharp2.Asf.AsfFileProperties value, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Asf.AsfFilePropertiesParseResult left, TagLibSharp2.Asf.AsfFilePropertiesParseResult right) { } - public static bool operator ==(TagLibSharp2.Asf.AsfFilePropertiesParseResult left, TagLibSharp2.Asf.AsfFilePropertiesParseResult right) { } - } - public readonly struct AsfFileReadResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Asf.AsfFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Asf.AsfFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Asf.AsfFileReadResult Failure(string error) { } - public static TagLibSharp2.Asf.AsfFileReadResult Success(TagLibSharp2.Asf.AsfFile file) { } - public static bool operator !=(TagLibSharp2.Asf.AsfFileReadResult left, TagLibSharp2.Asf.AsfFileReadResult right) { } - public static bool operator ==(TagLibSharp2.Asf.AsfFileReadResult left, TagLibSharp2.Asf.AsfFileReadResult right) { } - } - public readonly struct AsfGuid : System.IEquatable - { - public const int Size = 16; - public bool Equals(TagLibSharp2.Asf.AsfGuid other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public TagLibSharp2.Core.BinaryData Render() { } - public static TagLibSharp2.Asf.AsfGuidParseResult Parse(System.ReadOnlySpan data) { } - public static bool operator !=(TagLibSharp2.Asf.AsfGuid left, TagLibSharp2.Asf.AsfGuid right) { } - public static bool operator ==(TagLibSharp2.Asf.AsfGuid left, TagLibSharp2.Asf.AsfGuid right) { } - } - public readonly struct AsfGuidParseResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public TagLibSharp2.Asf.AsfGuid Value { get; } - public bool Equals(TagLibSharp2.Asf.AsfGuidParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Asf.AsfGuidParseResult Failure(string error) { } - public static TagLibSharp2.Asf.AsfGuidParseResult Success(TagLibSharp2.Asf.AsfGuid value, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Asf.AsfGuidParseResult left, TagLibSharp2.Asf.AsfGuidParseResult right) { } - public static bool operator ==(TagLibSharp2.Asf.AsfGuidParseResult left, TagLibSharp2.Asf.AsfGuidParseResult right) { } - } - public static class AsfGuids - { - public static readonly TagLibSharp2.Asf.AsfGuid AudioMediaType; - public static readonly TagLibSharp2.Asf.AsfGuid AudioSpread; - public static readonly TagLibSharp2.Asf.AsfGuid CodecListObject; - public static readonly TagLibSharp2.Asf.AsfGuid ContentDescriptionObject; - public static readonly TagLibSharp2.Asf.AsfGuid DataObject; - public static readonly TagLibSharp2.Asf.AsfGuid ExtendedContentDescriptionObject; - public static readonly TagLibSharp2.Asf.AsfGuid ExtendedStreamPropertiesObject; - public static readonly TagLibSharp2.Asf.AsfGuid FilePropertiesObject; - public static readonly TagLibSharp2.Asf.AsfGuid HeaderExtensionObject; - public static readonly TagLibSharp2.Asf.AsfGuid HeaderObject; - public static readonly TagLibSharp2.Asf.AsfGuid LanguageListObject; - public static readonly TagLibSharp2.Asf.AsfGuid MetadataLibraryObject; - public static readonly TagLibSharp2.Asf.AsfGuid MetadataObject; - public static readonly TagLibSharp2.Asf.AsfGuid NoErrorCorrection; - public static readonly TagLibSharp2.Asf.AsfGuid PaddingObject; - public static readonly TagLibSharp2.Asf.AsfGuid SimpleIndexObject; - public static readonly TagLibSharp2.Asf.AsfGuid StreamBitratePropertiesObject; - public static readonly TagLibSharp2.Asf.AsfGuid StreamPropertiesObject; - public static readonly TagLibSharp2.Asf.AsfGuid VideoMediaType; - } - public sealed class AsfPicture : TagLibSharp2.Core.Picture - { - public const string AttributeName = "WM/Picture"; - public AsfPicture(string mimeType, TagLibSharp2.Core.PictureType pictureType, string description, TagLibSharp2.Core.BinaryData pictureData) { } - public override string Description { get; } - public override string MimeType { get; } - public override TagLibSharp2.Core.BinaryData PictureData { get; } - public override TagLibSharp2.Core.PictureType PictureType { get; } - public TagLibSharp2.Core.BinaryData Render() { } - public static TagLibSharp2.Asf.AsfPicture FromPicture(TagLibSharp2.Core.IPicture picture) { } - public static TagLibSharp2.Asf.AsfPicture? Parse(System.ReadOnlySpan data) { } - } - public sealed class AsfStreamProperties - { - public const int MinContentSize = 54; - public uint AvgBytesPerSec { get; } - public int BitsPerSample { get; } - public int BlockAlign { get; } - public int Channels { get; } - public int CodecId { get; } - public string CodecName { get; } - public TagLibSharp2.Asf.AsfGuid ErrorCorrectionType { get; } - public bool IsAudio { get; } - public bool IsVideo { get; } - public uint SampleRate { get; } - public int StreamNumber { get; } - public TagLibSharp2.Asf.AsfGuid StreamType { get; } - public ulong TimeOffset { get; } - public static TagLibSharp2.Asf.AsfStreamPropertiesParseResult Parse(System.ReadOnlySpan data) { } - } - public readonly struct AsfStreamPropertiesParseResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public TagLibSharp2.Asf.AsfStreamProperties Value { get; } - public bool Equals(TagLibSharp2.Asf.AsfStreamPropertiesParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Asf.AsfStreamPropertiesParseResult Failure(string error) { } - public static TagLibSharp2.Asf.AsfStreamPropertiesParseResult Success(TagLibSharp2.Asf.AsfStreamProperties value, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Asf.AsfStreamPropertiesParseResult left, TagLibSharp2.Asf.AsfStreamPropertiesParseResult right) { } - public static bool operator ==(TagLibSharp2.Asf.AsfStreamPropertiesParseResult left, TagLibSharp2.Asf.AsfStreamPropertiesParseResult right) { } - } - public sealed class AsfTag : TagLibSharp2.Core.Tag - { - public AsfTag() { } - public AsfTag(TagLibSharp2.Asf.AsfContentDescription? contentDescription, TagLibSharp2.Asf.AsfExtendedContentDescription? extendedContent) { } - public override string? AcoustIdFingerprint { get; set; } - public override string? AcoustIdId { get; set; } - public override string? Album { get; set; } - public override string? AlbumArtist { get; set; } - public override string? AlbumArtistSort { get; set; } - public override string? AlbumSort { get; set; } - public override string? AmazonId { get; set; } - public override string? Artist { get; set; } - public override string? ArtistSort { get; set; } - public override string? Barcode { get; set; } - public override uint? BeatsPerMinute { get; set; } - public override string? CatalogNumber { get; set; } - public override string? Comment { get; set; } - public override string? Composer { get; set; } - public override string? ComposerSort { get; set; } - public override string? Conductor { get; set; } - public TagLibSharp2.Asf.AsfContentDescription ContentDescription { get; } - public override string? Copyright { get; set; } - public override string? DateTagged { get; set; } - public override string? Description { get; set; } - public uint? DiscCount { get; } - public override uint? DiscNumber { get; set; } - public override string? EncodedBy { get; set; } - public override string? EncoderSettings { get; set; } - public TagLibSharp2.Asf.AsfExtendedContentDescription ExtendedContentDescription { get; } - public override string? Genre { get; set; } - public override string? Grouping { get; set; } - public override string? InitialKey { get; set; } - public override bool IsCompilation { get; set; } - public override bool IsEmpty { get; } - public override string? Isrc { get; set; } - public override string? Language { get; set; } - public override string? Lyrics { get; set; } - public override string? MediaType { get; set; } - public override string? Mood { get; set; } - public override string? Movement { get; set; } - public override uint? MovementNumber { get; set; } - public override uint? MovementTotal { get; set; } - public override string? MusicBrainzAlbumArtistId { get; set; } - public override string? MusicBrainzArtistId { get; set; } - public override string? MusicBrainzDiscId { get; set; } - public override string? MusicBrainzRecordingId { get; set; } - public override string? MusicBrainzReleaseCountry { get; set; } - public override string? MusicBrainzReleaseGroupId { get; set; } - public override string? MusicBrainzReleaseId { get; set; } - public override string? MusicBrainzReleaseStatus { get; set; } - public override string? MusicBrainzReleaseType { get; set; } - public override string? MusicBrainzTrackId { get; set; } - public override string? MusicBrainzWorkId { get; set; } - public override string? OriginalReleaseDate { get; set; } - public override TagLibSharp2.Core.IPicture[] Pictures { get; set; } - public override string? PodcastFeedUrl { get; set; } - public override string? Publisher { get; set; } - public override string? R128AlbumGain { get; set; } - public override string? R128TrackGain { get; set; } - public string Rating { get; set; } - public override string? Remixer { get; set; } - public override string? ReplayGainAlbumGain { get; set; } - public override string? ReplayGainAlbumPeak { get; set; } - public override string? ReplayGainTrackGain { get; set; } - public override string? ReplayGainTrackPeak { get; set; } - public override string? Subtitle { get; set; } - public override TagLibSharp2.Core.TagTypes TagType { get; } - public override string? Title { get; set; } - public override string? TitleSort { get; set; } - public override uint? TotalDiscs { get; set; } - public override uint? TotalTracks { get; set; } - public override uint? Track { get; set; } - public override string? Work { get; set; } - public override string? Year { get; set; } - public override void Clear() { } - public override TagLibSharp2.Core.BinaryData Render() { } - public TagLibSharp2.Core.BinaryData RenderContentDescription() { } - } -} -namespace TagLibSharp2.Core -{ - public static class AtomicFileWriter - { - public static TagLibSharp2.Core.FileWriteResult Write(string path, System.ReadOnlySpan data, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task WriteAsync(string path, System.ReadOnlyMemory data, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - } - public readonly struct AudioProperties : System.IEquatable, TagLibSharp2.Core.IMediaProperties - { - public AudioProperties(System.TimeSpan Duration, int Bitrate, int SampleRate, int BitsPerSample, int Channels, string? Codec = null) { } - public int Bitrate { get; init; } - public int BitsPerSample { get; init; } - public int Channels { get; init; } - public string? Codec { get; init; } - public System.TimeSpan Duration { get; init; } - public bool IsValid { get; } - public int SampleRate { get; init; } - public static TagLibSharp2.Core.AudioProperties Empty { get; } - public override string ToString() { } - public static TagLibSharp2.Core.AudioProperties FromDff(System.TimeSpan duration, int sampleRate, int channels, bool isDst = false) { } - public static TagLibSharp2.Core.AudioProperties FromDsf(System.TimeSpan duration, int sampleRate, int channels) { } - public static TagLibSharp2.Core.AudioProperties FromFlac(ulong totalSamples, int sampleRate, int bitsPerSample, int channels) { } - public static TagLibSharp2.Core.AudioProperties FromOpus(ulong granulePosition, ushort preSkip, uint inputSampleRate, int channels, long fileSize) { } - public static TagLibSharp2.Core.AudioProperties FromVorbis(ulong totalSamples, int sampleRate, int channels, int bitrateNominal) { } - } - public static class BatchProcessor - { - public static int DefaultMaxDegreeOfParallelism { get; set; } - public static System.Collections.Generic.IReadOnlyList> Process(System.Collections.Generic.IEnumerable paths, System.Func operation, int? maxDegreeOfParallelism = default, System.IProgress? progress = null) { } - public static System.Threading.Tasks.Task>> ProcessAsync(System.Collections.Generic.IEnumerable paths, System.Func> operation, int? maxDegreeOfParallelism = default, System.IProgress? progress = null, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.Task>> TransformTagsAsync(System.Collections.Generic.IEnumerable paths, [System.Runtime.CompilerServices.TupleElementNames(new string[] { - "file", - "tag"})] System.Func?>> readFile, System.Action transform, System.Func saveFile, int? maxDegreeOfParallelism = default, System.IProgress? progress = null, System.Threading.CancellationToken cancellationToken = default) - where TTag : TagLibSharp2.Core.Tag { } - } - public readonly struct BatchProgress : System.IEquatable - { - public BatchProgress(int completed, int total, string currentPath) { } - public int Completed { get; } - public string CurrentPath { get; } - public double PercentComplete { get; } - public int Total { get; } - public bool Equals(TagLibSharp2.Core.BatchProgress other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static bool operator !=(TagLibSharp2.Core.BatchProgress left, TagLibSharp2.Core.BatchProgress right) { } - public static bool operator ==(TagLibSharp2.Core.BatchProgress left, TagLibSharp2.Core.BatchProgress right) { } - } - public static class BatchResultExtensions - { - public static int FailureCount(this System.Collections.Generic.IEnumerable> results) { } - public static int SuccessCount(this System.Collections.Generic.IEnumerable> results) { } - public static System.Collections.Generic.IEnumerable> WhereFailed(this System.Collections.Generic.IEnumerable> results) { } - public static System.Collections.Generic.IEnumerable> WhereSucceeded(this System.Collections.Generic.IEnumerable> results) { } - } - public readonly struct BatchResult : System.IEquatable> - { - public System.Exception? Error { get; } - public bool IsCancelled { get; } - public bool IsSuccess { get; } - public string Path { get; } - public T Value { get; } - public bool Equals(TagLibSharp2.Core.BatchResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Core.BatchResult Cancelled(string path) { } - public static TagLibSharp2.Core.BatchResult Failure(string path, System.Exception error) { } - public static TagLibSharp2.Core.BatchResult Success(string path, T value) { } - public static bool operator !=(TagLibSharp2.Core.BatchResult left, TagLibSharp2.Core.BatchResult right) { } - public static bool operator ==(TagLibSharp2.Core.BatchResult left, TagLibSharp2.Core.BatchResult right) { } - } - public readonly struct BinaryData : System.Collections.Generic.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IReadOnlyList, System.Collections.IEnumerable, System.IComparable, System.IEquatable - { - public BinaryData(System.ReadOnlySpan data) { } - public BinaryData(byte[] data) { } - public BinaryData(int length, byte fill = 0) { } - public int Count { get; } - public bool IsEmpty { get; } - public byte this[int index] { get; } - public TagLibSharp2.Core.BinaryData this[System.Range range] { get; } - public int Length { get; } - public System.ReadOnlyMemory Memory { get; } - public System.ReadOnlySpan Span { get; } - public static TagLibSharp2.Core.BinaryData Empty { get; } - public TagLibSharp2.Core.BinaryData Add(TagLibSharp2.Core.BinaryData other) { } - public int CompareTo(TagLibSharp2.Core.BinaryData other) { } - public ushort ComputeCrc16Ccitt() { } - public uint ComputeCrc32() { } - public byte ComputeCrc8() { } - public bool Contains(System.ReadOnlySpan pattern) { } - public bool Contains(byte value) { } - public bool EndsWith(System.ReadOnlySpan pattern) { } - public bool Equals(TagLibSharp2.Core.BinaryData other) { } - public override bool Equals(object? obj) { } - public System.Collections.Generic.IEnumerator GetEnumerator() { } - public override int GetHashCode() { } - public int IndexOf(System.ReadOnlySpan pattern, int startIndex = 0) { } - public int IndexOf(byte value, int startIndex = 0) { } - public int LastIndexOf(System.ReadOnlySpan pattern) { } - public int LastIndexOf(byte value) { } - public TagLibSharp2.Core.BinaryData PadLeft(int length, byte padByte = 0) { } - public TagLibSharp2.Core.BinaryData PadRight(int length, byte padByte = 0) { } - public TagLibSharp2.Core.BinaryData Resize(int length, byte padByte = 0) { } - public TagLibSharp2.Core.BinaryData Slice(int start) { } - public TagLibSharp2.Core.BinaryData Slice(int start, int length) { } - public bool StartsWith(System.ReadOnlySpan pattern) { } - public byte[] ToArray() { } - public string ToHexString() { } - public string ToHexStringUpper() { } - public short ToInt16BE(int offset = 0) { } - public short ToInt16LE(int offset = 0) { } - public int ToInt32BE(int offset = 0) { } - public int ToInt32LE(int offset = 0) { } - public long ToInt64BE(int offset = 0) { } - public long ToInt64LE(int offset = 0) { } - public System.ReadOnlySpan ToReadOnlySpan() { } - public override string ToString() { } - public string ToString(System.Text.Encoding encoding) { } - public string ToStringLatin1() { } - public string ToStringLatin1NullTerminated() { } - public string ToStringUtf16() { } - public string ToStringUtf16NullTerminated() { } - public string ToStringUtf8() { } - public string ToStringUtf8NullTerminated() { } - public uint ToSyncSafeUInt32(int offset = 0) { } - public ushort ToUInt16BE(int offset = 0) { } - public ushort ToUInt16LE(int offset = 0) { } - public uint ToUInt24BE(int offset = 0) { } - public uint ToUInt32BE(int offset = 0) { } - public uint ToUInt32LE(int offset = 0) { } - public ulong ToUInt64BE(int offset = 0) { } - public ulong ToUInt64LE(int offset = 0) { } - public TagLibSharp2.Core.BinaryData Trim(byte trimByte = 0) { } - public TagLibSharp2.Core.BinaryData TrimEnd(byte trimByte = 0) { } - public TagLibSharp2.Core.BinaryData TrimStart(byte trimByte = 0) { } - public static TagLibSharp2.Core.BinaryData Concat(params TagLibSharp2.Core.BinaryData[] items) { } - public static TagLibSharp2.Core.BinaryData FromByteArray(byte[] data) { } - public static TagLibSharp2.Core.BinaryData FromHexString(string hex) { } - public static TagLibSharp2.Core.BinaryData FromInt16BE(short value) { } - public static TagLibSharp2.Core.BinaryData FromInt16LE(short value) { } - public static TagLibSharp2.Core.BinaryData FromInt32BE(int value) { } - public static TagLibSharp2.Core.BinaryData FromInt32LE(int value) { } - public static TagLibSharp2.Core.BinaryData FromInt64BE(long value) { } - public static TagLibSharp2.Core.BinaryData FromInt64LE(long value) { } - public static TagLibSharp2.Core.BinaryData FromString(string value, System.Text.Encoding encoding) { } - public static TagLibSharp2.Core.BinaryData FromStringLatin1(string value) { } - public static TagLibSharp2.Core.BinaryData FromStringLatin1NullTerminated(string value) { } - public static TagLibSharp2.Core.BinaryData FromStringUtf16(string value, bool includeBom = true) { } - public static TagLibSharp2.Core.BinaryData FromStringUtf16NullTerminated(string value, bool includeBom = true) { } - public static TagLibSharp2.Core.BinaryData FromStringUtf8(string value) { } - public static TagLibSharp2.Core.BinaryData FromStringUtf8NullTerminated(string value) { } - public static TagLibSharp2.Core.BinaryData FromSyncSafeUInt32(uint value) { } - public static TagLibSharp2.Core.BinaryData FromUInt16BE(ushort value) { } - public static TagLibSharp2.Core.BinaryData FromUInt16LE(ushort value) { } - public static TagLibSharp2.Core.BinaryData FromUInt24BE(uint value) { } - public static TagLibSharp2.Core.BinaryData FromUInt32BE(uint value) { } - public static TagLibSharp2.Core.BinaryData FromUInt32LE(uint value) { } - public static TagLibSharp2.Core.BinaryData FromUInt64BE(ulong value) { } - public static TagLibSharp2.Core.BinaryData FromUInt64LE(ulong value) { } - public static System.ReadOnlySpan op_Implicit(TagLibSharp2.Core.BinaryData data) { } - public static TagLibSharp2.Core.BinaryData op_Implicit(byte[] data) { } - public static bool operator !=(TagLibSharp2.Core.BinaryData left, TagLibSharp2.Core.BinaryData right) { } - public static TagLibSharp2.Core.BinaryData operator +(TagLibSharp2.Core.BinaryData left, TagLibSharp2.Core.BinaryData right) { } - public static bool operator <(TagLibSharp2.Core.BinaryData left, TagLibSharp2.Core.BinaryData right) { } - public static bool operator <=(TagLibSharp2.Core.BinaryData left, TagLibSharp2.Core.BinaryData right) { } - public static bool operator ==(TagLibSharp2.Core.BinaryData left, TagLibSharp2.Core.BinaryData right) { } - public static bool operator >(TagLibSharp2.Core.BinaryData left, TagLibSharp2.Core.BinaryData right) { } - public static bool operator >=(TagLibSharp2.Core.BinaryData left, TagLibSharp2.Core.BinaryData right) { } - } - public sealed class BinaryDataBuilder : System.IDisposable - { - public BinaryDataBuilder() { } - public BinaryDataBuilder(int initialCapacity) { } - public int Capacity { get; } - public byte this[int index] { get; set; } - public int Length { get; } - public System.ReadOnlyMemory Memory { get; } - public System.ReadOnlySpan Span { get; } - public TagLibSharp2.Core.BinaryDataBuilder Add(System.ReadOnlySpan data) { } - public TagLibSharp2.Core.BinaryDataBuilder Add(TagLibSharp2.Core.BinaryData data) { } - public TagLibSharp2.Core.BinaryDataBuilder Add(params byte[] data) { } - public TagLibSharp2.Core.BinaryDataBuilder Add(byte value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddFill(byte value, int count) { } - public TagLibSharp2.Core.BinaryDataBuilder AddInt16BE(short value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddInt16LE(short value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddInt32BE(int value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddInt32LE(int value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddInt64BE(long value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddInt64LE(long value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddString(string value, System.Text.Encoding encoding) { } - public TagLibSharp2.Core.BinaryDataBuilder AddStringLatin1(string value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddStringLatin1NullTerminated(string value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddStringUtf16(string value, bool includeBom = true) { } - public TagLibSharp2.Core.BinaryDataBuilder AddStringUtf16NullTerminated(string value, bool includeBom = true) { } - public TagLibSharp2.Core.BinaryDataBuilder AddStringUtf8(string value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddStringUtf8NullTerminated(string value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddSyncSafeUInt32(uint value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddUInt16BE(ushort value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddUInt16LE(ushort value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddUInt24BE(uint value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddUInt24LE(uint value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddUInt32BE(uint value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddUInt32LE(uint value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddUInt64BE(ulong value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddUInt64LE(ulong value) { } - public TagLibSharp2.Core.BinaryDataBuilder AddZeros(int count) { } - public TagLibSharp2.Core.BinaryDataBuilder Clear() { } - public void Dispose() { } - public void EnsureCapacity(int capacity) { } - public TagLibSharp2.Core.BinaryDataBuilder Insert(int index, System.ReadOnlySpan data) { } - public TagLibSharp2.Core.BinaryDataBuilder Insert(int index, TagLibSharp2.Core.BinaryData data) { } - public TagLibSharp2.Core.BinaryDataBuilder RemoveRange(int index, int count) { } - public TagLibSharp2.Core.BinaryDataBuilder Reset() { } - public byte[] ToArray() { } - public TagLibSharp2.Core.BinaryData ToBinaryData() { } - } - public sealed class DefaultFileSystem : TagLibSharp2.Core.IFileSystem - { - public static TagLibSharp2.Core.DefaultFileSystem Instance { get; } - public string CombinePath(string path1, string path2) { } - public System.IO.Stream Create(string path) { } - public void Delete(string path) { } - public bool FileExists(string path) { } - public string? GetDirectoryName(string path) { } - public string GetFileName(string path) { } - public void Move(string sourcePath, string destinationPath) { } - public System.IO.Stream OpenRead(string path) { } - public System.IO.Stream OpenReadWrite(string path) { } - public byte[] ReadAllBytes(string path) { } - public System.Threading.Tasks.Task ReadAllBytesAsync(string path, System.Threading.CancellationToken cancellationToken = default) { } - public void WriteAllBytes(string path, System.ReadOnlySpan data) { } - public System.Threading.Tasks.Task WriteAllBytesAsync(string path, System.ReadOnlyMemory data, System.Threading.CancellationToken cancellationToken = default) { } - } - public static class ExtendedFloat - { - public static byte[] FromDouble(double value) { } - public static double ToDouble(System.ReadOnlySpan data) { } - public static double ToDouble(TagLibSharp2.Core.BinaryData data) { } - public static double ToDouble(byte[] data) { } - } - public static class FileHelper - { - public static TagLibSharp2.Core.FileReadResult SafeReadAllBytes(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task SafeReadAllBytesAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - } - public readonly struct FileReadResult : System.IEquatable - { - public System.ReadOnlyMemory? Data { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Core.FileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Core.FileReadResult Failure(string error) { } - public static TagLibSharp2.Core.FileReadResult Success(byte[] data) { } - public static bool operator !=(TagLibSharp2.Core.FileReadResult left, TagLibSharp2.Core.FileReadResult right) { } - public static bool operator ==(TagLibSharp2.Core.FileReadResult left, TagLibSharp2.Core.FileReadResult right) { } - } - public readonly struct FileWriteResult : System.IEquatable - { - public int BytesWritten { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Core.FileWriteResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Core.FileWriteResult Failure(string error) { } - public static TagLibSharp2.Core.FileWriteResult Success(int bytesWritten) { } - public static bool operator !=(TagLibSharp2.Core.FileWriteResult left, TagLibSharp2.Core.FileWriteResult right) { } - public static bool operator ==(TagLibSharp2.Core.FileWriteResult left, TagLibSharp2.Core.FileWriteResult right) { } - } - public interface IFileSystem - { - string CombinePath(string path1, string path2); - System.IO.Stream Create(string path); - void Delete(string path); - bool FileExists(string path); - string? GetDirectoryName(string path); - string GetFileName(string path); - void Move(string sourcePath, string destinationPath); - System.IO.Stream OpenRead(string path); - System.IO.Stream OpenReadWrite(string path); - byte[] ReadAllBytes(string path); - System.Threading.Tasks.Task ReadAllBytesAsync(string path, System.Threading.CancellationToken cancellationToken = default); - void WriteAllBytes(string path, System.ReadOnlySpan data); - System.Threading.Tasks.Task WriteAllBytesAsync(string path, System.ReadOnlyMemory data, System.Threading.CancellationToken cancellationToken = default); - } - public interface IMediaFile : System.IDisposable - { - TagLibSharp2.Core.IMediaProperties? AudioProperties { get; } - TagLibSharp2.Core.MediaFormat Format { get; } - TagLibSharp2.Core.ImageProperties? ImageProperties { get; } - TagLibSharp2.Core.MediaTypes MediaTypes { get; } - string? SourcePath { get; } - TagLibSharp2.Core.Tag? Tag { get; } - TagLibSharp2.Core.VideoProperties? VideoProperties { get; } - } - public interface IMediaProperties - { - int Bitrate { get; } - int BitsPerSample { get; } - int Channels { get; } - string? Codec { get; } - System.TimeSpan Duration { get; } - int SampleRate { get; } - } - public interface IPicture - { - string Description { get; } - string MimeType { get; } - TagLibSharp2.Core.BinaryData PictureData { get; } - TagLibSharp2.Core.PictureType PictureType { get; } - } - public readonly struct ImageProperties : System.IEquatable - { - public ImageProperties(int Width, int Height, int ColorDepth = 0, string? Format = null) { } - public int ColorDepth { get; init; } - public string? Format { get; init; } - public int Height { get; init; } - public bool IsValid { get; } - public int Width { get; init; } - public static TagLibSharp2.Core.ImageProperties Empty { get; } - public override string ToString() { } - } - public static class MediaFile - { - public static TagLibSharp2.Core.MediaFormat DetectFormat(System.ReadOnlySpan data, string? pathHint = null) { } - public static TagLibSharp2.Core.MediaFileResult Read(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static TagLibSharp2.Core.MediaFileResult ReadFromData(System.ReadOnlyMemory data, string? pathHint = null) { } - } - public sealed class MediaFileResult - { - public string? Error { get; } - public object? File { get; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public bool IsSuccess { get; } - public TagLibSharp2.Core.Tag? Tag { get; } - public T? GetFileAs() - where T : class { } - } - public enum MediaFormat - { - Unknown = 0, - Flac = 1, - OggVorbis = 2, - Opus = 3, - Mp3 = 4, - Wav = 5, - Aiff = 6, - Mp4 = 7, - Dsf = 8, - Dff = 9, - OggFlac = 10, - WavPack = 11, - MonkeysAudio = 12, - Asf = 13, - Musepack = 14, - } - [System.Flags] - public enum MediaTypes - { - None = 0, - Audio = 1, - Video = 2, - Image = 4, - } - public abstract class Picture : TagLibSharp2.Core.IPicture - { - protected Picture() { } - public abstract string Description { get; } - public abstract string MimeType { get; } - public abstract TagLibSharp2.Core.BinaryData PictureData { get; } - public abstract TagLibSharp2.Core.PictureType PictureType { get; } - public void SaveToFile(string path) { } - public System.IO.MemoryStream ToStream() { } - public static string DetectMimeType(System.ReadOnlySpan data, string? filePath = null) { } - } - public enum PictureType : byte - { - Other = 0, - FileIcon = 1, - OtherFileIcon = 2, - FrontCover = 3, - BackCover = 4, - LeafletPage = 5, - Media = 6, - LeadArtist = 7, - Artist = 8, - Conductor = 9, - Band = 10, - Composer = 11, - Lyricist = 12, - RecordingLocation = 13, - DuringRecording = 14, - DuringPerformance = 15, - MovieScreenCapture = 16, - ColouredFish = 17, - Illustration = 18, - BandLogo = 19, - PublisherLogo = 20, - } - public abstract class Tag - { - protected Tag() { } - public virtual string? AcoustIdFingerprint { get; set; } - public virtual string? AcoustIdId { get; set; } - public abstract string? Album { get; set; } - public virtual string? AlbumArtist { get; set; } - public virtual string? AlbumArtistSort { get; set; } - public virtual string[] AlbumArtists { get; set; } - public virtual string[]? AlbumArtistsSort { get; set; } - public virtual string? AlbumSort { get; set; } - public virtual string? AmazonId { get; set; } - public abstract string? Artist { get; set; } - public virtual string? ArtistSort { get; set; } - public virtual string? Barcode { get; set; } - public virtual uint? BeatsPerMinute { get; set; } - public virtual string? CatalogNumber { get; set; } - public abstract string? Comment { get; set; } - public virtual string? Composer { get; set; } - public virtual string? ComposerSort { get; set; } - public virtual string[] Composers { get; set; } - public virtual string[]? ComposersSort { get; set; } - public virtual string? Conductor { get; set; } - public virtual string? Copyright { get; set; } - public virtual string? DateTagged { get; set; } - public virtual string? Description { get; set; } - public virtual uint? DiscNumber { get; set; } - public virtual string? DiscSubtitle { get; set; } - public virtual string? EncodedBy { get; set; } - public virtual string? EncoderSettings { get; set; } - public abstract string? Genre { get; set; } - public virtual string[] Genres { get; set; } - public virtual string? Grouping { get; set; } - public virtual string? InitialKey { get; set; } - public virtual bool IsCompilation { get; set; } - public virtual bool IsEmpty { get; } - public virtual string? Isrc { get; set; } - public virtual string? Language { get; set; } - public virtual string? Lyrics { get; set; } - public virtual string? MediaType { get; set; } - public virtual string? Mood { get; set; } - public virtual string? Movement { get; set; } - public virtual uint? MovementNumber { get; set; } - public virtual uint? MovementTotal { get; set; } - public virtual string? MusicBrainzAlbumArtistId { get; set; } - public virtual string? MusicBrainzArtistId { get; set; } - public virtual string? MusicBrainzDiscId { get; set; } - public virtual string? MusicBrainzRecordingId { get; set; } - public virtual string? MusicBrainzReleaseArtistId { get; set; } - public virtual string? MusicBrainzReleaseCountry { get; set; } - public virtual string? MusicBrainzReleaseGroupId { get; set; } - public virtual string? MusicBrainzReleaseId { get; set; } - public virtual string? MusicBrainzReleaseStatus { get; set; } - public virtual string? MusicBrainzReleaseType { get; set; } - public virtual string? MusicBrainzTrackId { get; set; } - public virtual string? MusicBrainzWorkId { get; set; } - public virtual string? OriginalReleaseDate { get; set; } - public virtual string[] Performers { get; set; } - public virtual string[]? PerformersRole { get; set; } - public virtual string[]? PerformersSort { get; set; } - public virtual TagLibSharp2.Core.IPicture[] Pictures { get; set; } - public virtual string? PodcastFeedUrl { get; set; } - public virtual string? Publisher { get; set; } - public virtual string? R128AlbumGain { get; set; } - public double? R128AlbumGainDb { get; set; } - public virtual string? R128TrackGain { get; set; } - public double? R128TrackGainDb { get; set; } - public virtual string? Remixer { get; set; } - public virtual string? ReplayGainAlbumGain { get; set; } - public virtual string? ReplayGainAlbumPeak { get; set; } - public virtual string? ReplayGainTrackGain { get; set; } - public virtual string? ReplayGainTrackPeak { get; set; } - public virtual string? Subtitle { get; set; } - public abstract TagLibSharp2.Core.TagTypes TagType { get; } - public abstract string? Title { get; set; } - public virtual string? TitleSort { get; set; } - public virtual uint? TotalDiscs { get; set; } - public virtual uint? TotalTracks { get; set; } - public abstract uint? Track { get; set; } - public virtual string? Work { get; set; } - public abstract string? Year { get; set; } - public abstract void Clear(); - public void CopyTo(TagLibSharp2.Core.Tag target, TagLibSharp2.Core.TagCopyOptions options = 63) { } - public abstract TagLibSharp2.Core.BinaryData Render(); - public virtual TagLibSharp2.Core.ValidationResult Validate() { } - } - [System.Flags] - public enum TagCopyOptions - { - None = 0, - Basic = 1, - Extended = 2, - SortOrder = 4, - ReplayGain = 8, - MusicBrainz = 16, - Pictures = 32, - All = 63, - } - public readonly struct TagReadResult : System.IEquatable> - where T : TagLibSharp2.Core.Tag - { - public int BytesConsumed { get; } - public string? Error { get; } - public bool HasDuplicateTag { get; } - public bool IsNotFound { get; } - public bool IsSuccess { get; } - public T Tag { get; } - public bool Equals(TagLibSharp2.Core.TagReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Core.TagReadResult Failure(string error) { } - public static TagLibSharp2.Core.TagReadResult NotFound() { } - public static TagLibSharp2.Core.TagReadResult Success(T tag, int bytesConsumed, bool hasDuplicateTag = false) { } - public static bool operator !=(TagLibSharp2.Core.TagReadResult left, TagLibSharp2.Core.TagReadResult right) { } - public static bool operator ==(TagLibSharp2.Core.TagReadResult left, TagLibSharp2.Core.TagReadResult right) { } - } - [System.Flags] - public enum TagTypes - { - None = 0, - Id3v1 = 1, - Id3v2 = 2, - Ape = 4, - Xiph = 8, - Apple = 16, - Asf = 32, - RiffInfo = 64, - Matroska = 128, - FlacMetadata = 256, - Xmp = 512, - AllTags = -1, - } - public sealed class ValidationIssue - { - public ValidationIssue(string field, TagLibSharp2.Core.ValidationSeverity severity, string message, string? suggestedFix = null) { } - public string Field { get; } - public string Message { get; } - public TagLibSharp2.Core.ValidationSeverity Severity { get; } - public string? SuggestedFix { get; } - public override string ToString() { } - } - public sealed class ValidationResult - { - public ValidationResult() { } - public System.Collections.Generic.IReadOnlyList AllIssues { get; } - public int ErrorCount { get; } - public bool HasErrors { get; } - public bool HasWarnings { get; } - public bool IsValid { get; } - public int WarningCount { get; } - public void AddError(string field, string message, string? suggestedFix = null) { } - public void AddInfo(string field, string message) { } - public void AddIssue(TagLibSharp2.Core.ValidationIssue issue) { } - public void AddWarning(string field, string message, string? suggestedFix = null) { } - public System.Collections.Generic.IEnumerable GetIssues(TagLibSharp2.Core.ValidationSeverity severity) { } - } - public enum ValidationSeverity - { - Info = 0, - Warning = 1, - Error = 2, - } - public readonly struct VideoProperties : System.IEquatable - { - public VideoProperties(System.TimeSpan Duration, int Width, int Height, int Bitrate, double FrameRate, string? Codec = null) { } - public int Bitrate { get; init; } - public string? Codec { get; init; } - public System.TimeSpan Duration { get; init; } - public double FrameRate { get; init; } - public int Height { get; init; } - public bool IsValid { get; } - public int Width { get; init; } - public static TagLibSharp2.Core.VideoProperties Empty { get; } - public override string ToString() { } - } -} -namespace TagLibSharp2.Dff -{ - public sealed class DffAudioProperties : TagLibSharp2.Core.IMediaProperties - { - public int Bitrate { get; } - public int BitsPerSample { get; } - public int Channels { get; } - public string? Codec { get; } - public TagLibSharp2.Dff.DffCompressionType CompressionType { get; } - public TagLibSharp2.Dsf.DsfSampleRate DsdRate { get; } - public System.TimeSpan Duration { get; } - public int SampleRate { get; } - } - public enum DffCompressionType - { - Dsd = 0, - Dst = 1, - Unknown = 2, - } - public sealed class DffFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public int BitsPerSample { get; } - public int Channels { get; } - public TagLibSharp2.Dff.DffCompressionType CompressionType { get; } - public TagLibSharp2.Dsf.DsfSampleRate DsdRate { get; } - public System.TimeSpan Duration { get; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public int FormatVersionMajor { get; } - public int FormatVersionMinor { get; } - public bool HasId3v2Tag { get; } - public TagLibSharp2.Id3.Id3v2.Id3v2Tag? Id3v2Tag { get; set; } - public bool IsCompressed { get; } - public TagLibSharp2.Dff.DffAudioProperties? Properties { get; } - public ulong SampleCount { get; } - public int SampleRate { get; } - public string? SourcePath { get; } - public TagLibSharp2.Core.Tag? Tag { get; } - public void Dispose() { } - public TagLibSharp2.Id3.Id3v2.Id3v2Tag EnsureId3v2Tag() { } - public TagLibSharp2.Core.BinaryData Render() { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Dff.DffFileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Dff.DffFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Dff.DffFile? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Dff.DffFile? file) { } - } - public readonly struct DffFileReadResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Dff.DffFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Dff.DffFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Dff.DffFileReadResult Failure(string error) { } - public static TagLibSharp2.Dff.DffFileReadResult Success(TagLibSharp2.Dff.DffFile file) { } - } -} -namespace TagLibSharp2.Dsf -{ - public sealed class DsfAudioProperties : TagLibSharp2.Core.IMediaProperties - { - public int Bitrate { get; } - public int BitsPerSample { get; } - public int BlockSizePerChannel { get; } - public TagLibSharp2.Dsf.DsfChannelType ChannelType { get; } - public int Channels { get; } - public string? Codec { get; } - public TagLibSharp2.Dsf.DsfSampleRate DsdRate { get; } - public System.TimeSpan Duration { get; } - public int SampleRate { get; } - } - public enum DsfChannelType - { - Mono = 1, - Stereo = 2, - ThreeChannels = 3, - Quad = 4, - Surround50 = 5, - Surround51 = 6, - } - public sealed class DsfDataChunk - { - public const int HeaderSize = 12; - public ulong AudioDataSize { get; } - public ulong ChunkSize { get; } - public static int HeaderSizeValue { get; } - public static System.ReadOnlySpan Magic { get; } - public byte[] RenderHeader() { } - public static TagLibSharp2.Dsf.DsfDataChunk Create(ulong totalChunkSize) { } - public static TagLibSharp2.Dsf.DsfDataChunkParseResult Parse(System.ReadOnlySpan data) { } - } - public readonly struct DsfDataChunkParseResult : System.IEquatable - { - public TagLibSharp2.Dsf.DsfDataChunk? Chunk { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Dsf.DsfDataChunkParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Dsf.DsfDataChunkParseResult Failure(string error) { } - public static TagLibSharp2.Dsf.DsfDataChunkParseResult Success(TagLibSharp2.Dsf.DsfDataChunk chunk) { } - public static bool operator !=(TagLibSharp2.Dsf.DsfDataChunkParseResult left, TagLibSharp2.Dsf.DsfDataChunkParseResult right) { } - public static bool operator ==(TagLibSharp2.Dsf.DsfDataChunkParseResult left, TagLibSharp2.Dsf.DsfDataChunkParseResult right) { } - } - public sealed class DsfDsdChunk - { - public const int Size = 28; - public ulong ChunkSize { get; } - public ulong FileSize { get; } - public bool HasMetadata { get; } - public ulong MetadataOffset { get; } - public static System.ReadOnlySpan Magic { get; } - public byte[] Render() { } - public static TagLibSharp2.Dsf.DsfDsdChunk Create(ulong fileSize, ulong metadataOffset = 0) { } - public static TagLibSharp2.Dsf.DsfDsdChunkParseResult Parse(System.ReadOnlySpan data) { } - } - public readonly struct DsfDsdChunkParseResult : System.IEquatable - { - public TagLibSharp2.Dsf.DsfDsdChunk? Chunk { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Dsf.DsfDsdChunkParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Dsf.DsfDsdChunkParseResult Failure(string error) { } - public static TagLibSharp2.Dsf.DsfDsdChunkParseResult Success(TagLibSharp2.Dsf.DsfDsdChunk chunk) { } - public static bool operator !=(TagLibSharp2.Dsf.DsfDsdChunkParseResult left, TagLibSharp2.Dsf.DsfDsdChunkParseResult right) { } - public static bool operator ==(TagLibSharp2.Dsf.DsfDsdChunkParseResult left, TagLibSharp2.Dsf.DsfDsdChunkParseResult right) { } - } - public sealed class DsfFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public int BitsPerSample { get; } - public int BlockSizePerChannel { get; } - public TagLibSharp2.Dsf.DsfChannelType ChannelType { get; } - public int Channels { get; } - public TagLibSharp2.Dsf.DsfSampleRate DsdRate { get; } - public System.TimeSpan Duration { get; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public bool HasId3v2Tag { get; } - public TagLibSharp2.Id3.Id3v2.Id3v2Tag? Id3v2Tag { get; set; } - public TagLibSharp2.Dsf.DsfAudioProperties? Properties { get; } - public ulong SampleCount { get; } - public int SampleRate { get; } - public string? SourcePath { get; } - public TagLibSharp2.Core.Tag? Tag { get; } - public void Dispose() { } - public TagLibSharp2.Id3.Id3v2.Id3v2Tag EnsureId3v2Tag() { } - public TagLibSharp2.Core.BinaryData Render() { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Dsf.DsfFileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Dsf.DsfFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Dsf.DsfFile? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Dsf.DsfFile? file) { } - } - public readonly struct DsfFileReadResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Dsf.DsfFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Dsf.DsfFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Dsf.DsfFileReadResult Failure(string error) { } - public static TagLibSharp2.Dsf.DsfFileReadResult Success(TagLibSharp2.Dsf.DsfFile file) { } - public static bool operator !=(TagLibSharp2.Dsf.DsfFileReadResult left, TagLibSharp2.Dsf.DsfFileReadResult right) { } - public static bool operator ==(TagLibSharp2.Dsf.DsfFileReadResult left, TagLibSharp2.Dsf.DsfFileReadResult right) { } - } - public sealed class DsfFmtChunk - { - public const int Size = 52; - public uint BitsPerSample { get; } - public uint BlockSizePerChannel { get; } - public uint ChannelCount { get; } - public TagLibSharp2.Dsf.DsfChannelType ChannelType { get; } - public ulong ChunkSize { get; } - public TagLibSharp2.Dsf.DsfSampleRate DsdRate { get; } - public System.TimeSpan Duration { get; } - public uint FormatId { get; } - public uint FormatVersion { get; } - public ulong SampleCount { get; } - public uint SampleRate { get; } - public static System.ReadOnlySpan Magic { get; } - public byte[] Render() { } - public static TagLibSharp2.Dsf.DsfFmtChunk Create(uint channelCount, uint sampleRate, ulong sampleCount, uint blockSizePerChannel = 4096) { } - public static TagLibSharp2.Dsf.DsfFmtChunkParseResult Parse(System.ReadOnlySpan data) { } - } - public readonly struct DsfFmtChunkParseResult : System.IEquatable - { - public TagLibSharp2.Dsf.DsfFmtChunk? Chunk { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Dsf.DsfFmtChunkParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Dsf.DsfFmtChunkParseResult Failure(string error) { } - public static TagLibSharp2.Dsf.DsfFmtChunkParseResult Success(TagLibSharp2.Dsf.DsfFmtChunk chunk) { } - public static bool operator !=(TagLibSharp2.Dsf.DsfFmtChunkParseResult left, TagLibSharp2.Dsf.DsfFmtChunkParseResult right) { } - public static bool operator ==(TagLibSharp2.Dsf.DsfFmtChunkParseResult left, TagLibSharp2.Dsf.DsfFmtChunkParseResult right) { } - } - public enum DsfFormatId - { - DsdRaw = 0, - } - public enum DsfSampleRate - { - Unknown = 0, - DSD64 = 2822400, - DSD128 = 5644800, - DSD256 = 11289600, - DSD512 = 22579200, - DSD1024 = 45158400, - } -} -namespace TagLibSharp2.Id3 -{ - public static class Id3v1Genre - { - public static int Count { get; } - public static byte GetIndex(string? name) { } - public static string? GetName(byte index) { } - } - public sealed class Id3v1Tag : TagLibSharp2.Core.Tag - { - public const int TagSize = 128; - public Id3v1Tag() { } - public override string? Album { get; set; } - public override string? Artist { get; set; } - public override string? Comment { get; set; } - public override string? Genre { get; set; } - public byte GenreIndex { get; set; } - public bool IsVersion11 { get; } - public override TagLibSharp2.Core.TagTypes TagType { get; } - public override string? Title { get; set; } - public override uint? Track { get; set; } - public override string? Year { get; set; } - public override void Clear() { } - public override TagLibSharp2.Core.BinaryData Render() { } - public static TagLibSharp2.Core.TagReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Core.TagReadResult Read(byte[] data) { } - } -} -namespace TagLibSharp2.Id3.Id3v2.Frames -{ - public sealed class ChapterFrame - { - public ChapterFrame(string elementId, uint startTimeMs, uint endTimeMs) { } - public string ElementId { get; set; } - public uint EndByteOffset { get; set; } - public uint EndTimeMs { get; set; } - public uint StartByteOffset { get; set; } - public uint StartTimeMs { get; set; } - public string? Title { get; set; } - public static string FrameId { get; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.ChapterFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct ChapterFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.ChapterFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.ChapterFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.ChapterFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.ChapterFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.ChapterFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.ChapterFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.ChapterFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.ChapterFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.ChapterFrameReadResult right) { } - } - public sealed class CommentFrame - { - public CommentFrame(string text, string language = "eng", string description = "", TagLibSharp2.Id3.Id3v2.TextEncodingType encoding = 3) { } - public string Description { get; set; } - public TagLibSharp2.Id3.Id3v2.TextEncodingType Encoding { get; set; } - public string Language { get; set; } - public string Text { get; set; } - public static string FrameId { get; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.CommentFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct CommentFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.CommentFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.CommentFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.CommentFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.CommentFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.CommentFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.CommentFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.CommentFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.CommentFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.CommentFrameReadResult right) { } - } - public sealed class GeneralObjectFrame - { - public GeneralObjectFrame(string mimeType, string fileName, string description, TagLibSharp2.Core.BinaryData data, TagLibSharp2.Id3.Id3v2.TextEncodingType encoding = 3) { } - public TagLibSharp2.Core.BinaryData Data { get; set; } - public string Description { get; set; } - public TagLibSharp2.Id3.Id3v2.TextEncodingType Encoding { get; set; } - public string FileName { get; set; } - public string MimeType { get; set; } - public static string FrameId { get; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct GeneralObjectFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrameReadResult right) { } - } - public sealed class InvolvedPeopleFrame - { - public InvolvedPeopleFrame(TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrameType frameType) { } - public int Count { get; } - public TagLibSharp2.Id3.Id3v2.TextEncodingType Encoding { get; set; } - public string Id { get; } - [System.Runtime.CompilerServices.TupleElementNames(new string[] { - "Role", - "Person"})] - public System.Collections.Generic.IReadOnlyList> Pairs { get; } - public void Add(string role, string person) { } - public void Clear() { } - public System.Collections.Generic.IReadOnlyList GetPeople() { } - public System.Collections.Generic.IReadOnlyList GetPeopleForRole(string role) { } - public string? GetPerson(string role) { } - public System.Collections.Generic.IReadOnlyList GetRoles() { } - public int Remove(string role) { } - public bool RemovePair(string role, string person) { } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public void Set(string role, string person) { } - public static TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrameReadResult Read(string frameId, System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct InvolvedPeopleFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrameReadResult right) { } - } - public enum InvolvedPeopleFrameType - { - InvolvedPeople = 0, - MusicianCredits = 1, - } - public sealed class LyricsFrame - { - public LyricsFrame(string text, string language = "eng", string description = "", TagLibSharp2.Id3.Id3v2.TextEncodingType encoding = 3) { } - public string Description { get; set; } - public TagLibSharp2.Id3.Id3v2.TextEncodingType Encoding { get; set; } - public string Language { get; set; } - public string Text { get; set; } - public static string FrameId { get; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.LyricsFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct LyricsFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.LyricsFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.LyricsFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.LyricsFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.LyricsFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.LyricsFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.LyricsFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.LyricsFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.LyricsFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.LyricsFrameReadResult right) { } - } - public sealed class PictureFrame : TagLibSharp2.Core.Picture - { - public PictureFrame(string mimeType, TagLibSharp2.Core.PictureType pictureType, string description, TagLibSharp2.Core.BinaryData pictureData, TagLibSharp2.Id3.Id3v2.TextEncodingType encoding = 3) { } - public PictureFrame(string mimeType, TagLibSharp2.Core.PictureType pictureType, string description, byte[] pictureData, TagLibSharp2.Id3.Id3v2.TextEncodingType encoding = 3) { } - public override string Description { get; } - public override string MimeType { get; } - public override TagLibSharp2.Core.BinaryData PictureData { get; } - public override TagLibSharp2.Core.PictureType PictureType { get; } - public TagLibSharp2.Id3.Id3v2.TextEncodingType TextEncoding { get; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.PictureFrame FromBytes(byte[] imageData, TagLibSharp2.Core.PictureType pictureType = 3, string description = "") { } - public static TagLibSharp2.Id3.Id3v2.Frames.PictureFrame FromFile(string path, TagLibSharp2.Core.PictureType pictureType = 3, string description = "") { } - public static TagLibSharp2.Id3.Id3v2.Frames.PictureFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct PictureFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.PictureFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.PictureFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.PictureFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.PictureFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.PictureFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.PictureFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.PictureFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.PictureFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.PictureFrameReadResult right) { } - } - public sealed class PopularimeterFrame - { - public PopularimeterFrame(string email, byte rating = 0, ulong playCount = 0) { } - public string Email { get; set; } - public ulong PlayCount { get; set; } - public byte Rating { get; set; } - public static string FrameId { get; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static int RatingToStars(byte rating) { } - public static TagLibSharp2.Id3.Id3v2.Frames.PopularimeterFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - public static byte StarsToRating(int stars) { } - } - public readonly struct PopularimeterFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.PopularimeterFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.PopularimeterFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.PopularimeterFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.PopularimeterFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.PopularimeterFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.PopularimeterFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.PopularimeterFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.PopularimeterFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.PopularimeterFrameReadResult right) { } - } - public sealed class PrivateFrame - { - public PrivateFrame(string ownerId, TagLibSharp2.Core.BinaryData data) { } - public TagLibSharp2.Core.BinaryData Data { get; set; } - public string OwnerId { get; set; } - public static string FrameId { get; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.PrivateFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct PrivateFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.PrivateFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.PrivateFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.PrivateFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.PrivateFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.PrivateFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.PrivateFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.PrivateFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.PrivateFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.PrivateFrameReadResult right) { } - } - public sealed class SyncLyricsFrame - { - public SyncLyricsFrame() { } - public TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsType ContentType { get; set; } - public string Description { get; set; } - public TagLibSharp2.Id3.Id3v2.TextEncodingType Encoding { get; set; } - public string Language { get; set; } - public System.Collections.Generic.IReadOnlyList SyncItems { get; } - public TagLibSharp2.Id3.Id3v2.Frames.TimestampFormat TimestampFormat { get; set; } - public static string FrameId { get; } - public void AddSyncItem(string text, uint timestamp) { } - public void ClearSyncItems() { } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct SyncLyricsFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrameReadResult right) { } - } - public readonly struct SyncLyricsItem : System.IEquatable - { - public SyncLyricsItem(string text, uint timestamp) { } - public string Text { get; } - public uint Timestamp { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsItem other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsItem left, TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsItem right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsItem left, TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsItem right) { } - } - public enum SyncLyricsType : byte - { - Other = 0, - Lyrics = 1, - TextTranscription = 2, - PartNames = 3, - Events = 4, - Chords = 5, - Trivia = 6, - WebPageUrls = 7, - ImageUrls = 8, - } - public sealed class TableOfContentsFrame - { - public TableOfContentsFrame(string elementId) { } - public System.Collections.Generic.IReadOnlyList ChildElementIds { get; } - public string ElementId { get; set; } - public bool IsOrdered { get; set; } - public bool IsTopLevel { get; set; } - public string? Title { get; set; } - public static string FrameId { get; } - public void AddChildElement(string childId) { } - public void ClearChildElements() { } - public bool RemoveChildElement(string childId) { } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct TableOfContentsFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrameReadResult right) { } - } - public sealed class TextFrame - { - public TextFrame(string id, string text, TagLibSharp2.Id3.Id3v2.TextEncodingType encoding = 3) { } - public TagLibSharp2.Id3.Id3v2.TextEncodingType Encoding { get; set; } - public string Id { get; } - public string Text { get; set; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.TextFrameReadResult Read(string frameId, System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct TextFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.TextFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.TextFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.TextFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.TextFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.TextFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.TextFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.TextFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.TextFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.TextFrameReadResult right) { } - } - public enum TimestampFormat : byte - { - MpegFrames = 1, - Milliseconds = 2, - } - public sealed class UniqueFileIdFrame - { - public const string FrameId = "UFID"; - public const string MusicBrainzOwner = "http://musicbrainz.org"; - public UniqueFileIdFrame(string owner, TagLibSharp2.Core.BinaryData identifier) { } - public UniqueFileIdFrame(string owner, byte[] identifier) { } - public UniqueFileIdFrame(string owner, string identifierString) { } - public TagLibSharp2.Core.BinaryData Identifier { get; } - public string? IdentifierString { get; } - public string Owner { get; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct UniqueFileIdFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrameReadResult right) { } - } - public sealed class UrlFrame - { - public UrlFrame(string id, string url) { } - public string Id { get; } - public string Url { get; set; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static bool IsUrlFrameId(string frameId) { } - public static TagLibSharp2.Id3.Id3v2.Frames.UrlFrameReadResult Read(string frameId, System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct UrlFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.UrlFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.UrlFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.UrlFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.UrlFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.UrlFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.UrlFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.UrlFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.UrlFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.UrlFrameReadResult right) { } - } - public sealed class UserTextFrame - { - public const string FrameId = "TXXX"; - public UserTextFrame(string description, string value, TagLibSharp2.Id3.Id3v2.TextEncodingType encoding = 3) { } - public string Description { get; set; } - public TagLibSharp2.Id3.Id3v2.TextEncodingType Encoding { get; set; } - public string Value { get; set; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.UserTextFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct UserTextFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.UserTextFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.UserTextFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.UserTextFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.UserTextFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.UserTextFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.UserTextFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.UserTextFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.UserTextFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.UserTextFrameReadResult right) { } - } - public sealed class UserUrlFrame - { - public UserUrlFrame(string url, string description = "", TagLibSharp2.Id3.Id3v2.TextEncodingType encoding = 3) { } - public string Description { get; set; } - public TagLibSharp2.Id3.Id3v2.TextEncodingType Encoding { get; set; } - public string Url { get; set; } - public static string FrameId { get; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Id3.Id3v2.Frames.UserUrlFrameReadResult Read(System.ReadOnlySpan data, TagLibSharp2.Id3.Id3v2.Id3v2Version version) { } - } - public readonly struct UserUrlFrameReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Frames.UserUrlFrame? Frame { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Frames.UserUrlFrameReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Frames.UserUrlFrameReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Frames.UserUrlFrameReadResult Success(TagLibSharp2.Id3.Id3v2.Frames.UserUrlFrame frame, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Frames.UserUrlFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.UserUrlFrameReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Frames.UserUrlFrameReadResult left, TagLibSharp2.Id3.Id3v2.Frames.UserUrlFrameReadResult right) { } - } -} -namespace TagLibSharp2.Id3.Id3v2 -{ - public readonly struct Id3v2Header : System.IEquatable - { - public const int FooterSize = 10; - public const int HeaderSize = 10; - public Id3v2Header(byte majorVersion, byte minorVersion, TagLibSharp2.Id3.Id3v2.Id3v2HeaderFlags flags, uint tagSize) { } - public TagLibSharp2.Id3.Id3v2.Id3v2HeaderFlags Flags { get; } - public bool HasExtendedHeader { get; } - public bool HasFooter { get; } - public bool IsExperimental { get; } - public bool IsUnsynchronized { get; } - public byte MajorVersion { get; } - public byte MinorVersion { get; } - public uint TagSize { get; } - public uint TotalSize { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Id3v2Header other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public TagLibSharp2.Core.BinaryData Render() { } - public TagLibSharp2.Core.BinaryData RenderFooter() { } - public static TagLibSharp2.Id3.Id3v2.Id3v2HeaderReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Id3.Id3v2.Id3v2HeaderReadResult ReadFooter(System.ReadOnlySpan data) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Id3v2Header left, TagLibSharp2.Id3.Id3v2.Id3v2Header right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Id3v2Header left, TagLibSharp2.Id3.Id3v2.Id3v2Header right) { } - } - [System.Flags] - public enum Id3v2HeaderFlags : byte - { - None = 0, - Unsynchronization = 128, - ExtendedHeader = 64, - Experimental = 32, - Footer = 16, - } - public readonly struct Id3v2HeaderReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Id3.Id3v2.Id3v2Header Header { get; } - public bool IsNotFound { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Id3.Id3v2.Id3v2HeaderReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Id3.Id3v2.Id3v2HeaderReadResult Failure(string error) { } - public static TagLibSharp2.Id3.Id3v2.Id3v2HeaderReadResult NotFound() { } - public static TagLibSharp2.Id3.Id3v2.Id3v2HeaderReadResult Success(TagLibSharp2.Id3.Id3v2.Id3v2Header header, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Id3.Id3v2.Id3v2HeaderReadResult left, TagLibSharp2.Id3.Id3v2.Id3v2HeaderReadResult right) { } - public static bool operator ==(TagLibSharp2.Id3.Id3v2.Id3v2HeaderReadResult left, TagLibSharp2.Id3.Id3v2.Id3v2HeaderReadResult right) { } - } - public sealed class Id3v2Tag : TagLibSharp2.Core.Tag - { - public Id3v2Tag(TagLibSharp2.Id3.Id3v2.Id3v2Version version = 4) { } - public override string? AcoustIdFingerprint { get; set; } - public override string? AcoustIdId { get; set; } - public override string? Album { get; set; } - public override string? AlbumArtist { get; set; } - public override string? AlbumArtistSort { get; set; } - public override string[] AlbumArtists { get; set; } - public override string[]? AlbumArtistsSort { get; set; } - public override string? AlbumSort { get; set; } - public override string? AmazonId { get; set; } - public override string? Artist { get; set; } - public override string? ArtistSort { get; set; } - public override string? Barcode { get; set; } - public override uint? BeatsPerMinute { get; set; } - public override string? CatalogNumber { get; set; } - public System.Collections.Generic.IReadOnlyList ChapterFrames { get; } - public override string? Comment { get; set; } - public System.Collections.Generic.IReadOnlyList Comments { get; } - public override string? Composer { get; set; } - public override string? ComposerSort { get; set; } - public override string[] Composers { get; set; } - public override string[]? ComposersSort { get; set; } - public override string? Conductor { get; set; } - public override string? Copyright { get; set; } - public TagLibSharp2.Id3.Id3v2.Frames.PictureFrame? CoverArt { get; set; } - public override string? DateTagged { get; set; } - public override string? Description { get; set; } - public override uint? DiscNumber { get; set; } - public override string? DiscSubtitle { get; set; } - public override string? EncodedBy { get; set; } - public override string? EncoderSettings { get; set; } - public System.Collections.Generic.IReadOnlyList Frames { get; } - public System.Collections.Generic.IReadOnlyList GeneralObjectFrames { get; } - public override string? Genre { get; set; } - public override string[] Genres { get; set; } - public override string? Grouping { get; set; } - public bool HasPictures { get; } - public override string? InitialKey { get; set; } - public System.Collections.Generic.IReadOnlyList InvolvedPeopleFrames { get; } - public override bool IsCompilation { get; set; } - public override string? Isrc { get; set; } - public override string? Language { get; set; } - public override string? Lyrics { get; set; } - public System.Collections.Generic.IReadOnlyList LyricsFrames { get; } - public override string? MediaType { get; set; } - public override string? Mood { get; set; } - public override string? Movement { get; set; } - public override uint? MovementNumber { get; set; } - public override uint? MovementTotal { get; set; } - public override string? MusicBrainzAlbumArtistId { get; set; } - public override string? MusicBrainzArtistId { get; set; } - public override string? MusicBrainzDiscId { get; set; } - public override string? MusicBrainzRecordingId { get; set; } - public override string? MusicBrainzReleaseCountry { get; set; } - public override string? MusicBrainzReleaseGroupId { get; set; } - public override string? MusicBrainzReleaseId { get; set; } - public override string? MusicBrainzReleaseStatus { get; set; } - public override string? MusicBrainzReleaseType { get; set; } - public override string? MusicBrainzTrackId { get; set; } - public override string? MusicBrainzWorkId { get; set; } - public override string? OriginalReleaseDate { get; set; } - public override string[] Performers { get; set; } - public override string[]? PerformersRole { get; set; } - public override string[]? PerformersSort { get; set; } - public System.Collections.Generic.IReadOnlyList PictureFrames { get; } - public override TagLibSharp2.Core.IPicture[] Pictures { get; set; } - public ulong? PlayCount { get; set; } - public override string? PodcastFeedUrl { get; set; } - public System.Collections.Generic.IReadOnlyList PopularimeterFrames { get; } - public System.Collections.Generic.IReadOnlyList PrivateFrames { get; } - public override string? Publisher { get; set; } - public override string? R128AlbumGain { get; set; } - public override string? R128TrackGain { get; set; } - public byte? Rating { get; set; } - public override string? Remixer { get; set; } - public override string? ReplayGainAlbumGain { get; set; } - public override string? ReplayGainAlbumPeak { get; set; } - public override string? ReplayGainTrackGain { get; set; } - public override string? ReplayGainTrackPeak { get; set; } - public override string? Subtitle { get; set; } - public System.Collections.Generic.IReadOnlyList SyncLyricsFrames { get; } - public System.Collections.Generic.IReadOnlyList TableOfContentsFrames { get; } - public override TagLibSharp2.Core.TagTypes TagType { get; } - public override string? Title { get; set; } - public override string? TitleSort { get; set; } - public override uint? TotalDiscs { get; set; } - public override uint? TotalTracks { get; set; } - public override uint? Track { get; set; } - public System.Collections.Generic.IReadOnlyList UniqueFileIdFrames { get; } - public System.Collections.Generic.IReadOnlyList UrlFrames { get; } - public System.Collections.Generic.IReadOnlyList UserTextFrames { get; } - public System.Collections.Generic.IReadOnlyList UserUrlFrames { get; } - public int Version { get; } - public override string? Work { get; set; } - public override string? Year { get; set; } - public void AddChapter(TagLibSharp2.Id3.Id3v2.Frames.ChapterFrame frame) { } - public void AddComment(TagLibSharp2.Id3.Id3v2.Frames.CommentFrame comment) { } - public void AddGeneralObject(TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrame frame) { } - public void AddInvolvedPeopleFrame(TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrame frame) { } - public void AddLyrics(TagLibSharp2.Id3.Id3v2.Frames.LyricsFrame lyrics) { } - public void AddPicture(TagLibSharp2.Id3.Id3v2.Frames.PictureFrame picture) { } - public void AddPrivateFrame(TagLibSharp2.Id3.Id3v2.Frames.PrivateFrame frame) { } - public void AddSyncLyrics(TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrame frame) { } - public void AddTableOfContents(TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrame frame) { } - public void AddUniqueFileId(TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrame frame) { } - public void AddUserTextFrame(TagLibSharp2.Id3.Id3v2.Frames.UserTextFrame frame) { } - public override void Clear() { } - public TagLibSharp2.Id3.Id3v2.Frames.ChapterFrame? GetChapter(string? elementId = null) { } - public TagLibSharp2.Id3.Id3v2.Frames.CommentFrame? GetCommentFrame(string? language = null, string? description = null) { } - public TagLibSharp2.Id3.Id3v2.Frames.GeneralObjectFrame? GetGeneralObject(string? description = null) { } - public TagLibSharp2.Id3.Id3v2.Frames.InvolvedPeopleFrame? GetInvolvedPeopleFrame(string frameId) { } - public TagLibSharp2.Id3.Id3v2.Frames.LyricsFrame? GetLyricsFrame(string? language = null, string? description = null) { } - public TagLibSharp2.Id3.Id3v2.Frames.PictureFrame? GetPicture(TagLibSharp2.Core.PictureType pictureType) { } - public TagLibSharp2.Id3.Id3v2.Frames.PopularimeterFrame? GetPopularimeter(string email) { } - public TagLibSharp2.Id3.Id3v2.Frames.PrivateFrame? GetPrivateFrame(string? ownerId = null) { } - public TagLibSharp2.Id3.Id3v2.Frames.SyncLyricsFrame? GetSyncLyrics(string? language = null, string? description = null) { } - public TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrame? GetTableOfContents() { } - public TagLibSharp2.Id3.Id3v2.Frames.TableOfContentsFrame? GetTableOfContentsById(string elementId) { } - public string? GetTextFrame(string frameId) { } - public System.Collections.Generic.IReadOnlyList GetTextFrameValues(string frameId) { } - public TagLibSharp2.Id3.Id3v2.Frames.UniqueFileIdFrame? GetUniqueFileId(string owner) { } - public string? GetUrl(string frameId) { } - public string? GetUserText(string description) { } - public string? GetUserUrl(string description) { } - public void RemoveAllPictures() { } - public void RemoveChapters(string? elementId = null) { } - public void RemoveComments(string? language = null, string? description = null) { } - public void RemoveGeneralObjects(string? description = null) { } - public void RemoveInvolvedPeopleFrames(string? frameId = null) { } - public void RemoveLyrics(string? language = null, string? description = null) { } - public void RemovePictures(TagLibSharp2.Core.PictureType pictureType) { } - public void RemovePrivateFrames(string? ownerId = null) { } - public void RemoveSyncLyrics(string? language = null, string? description = null) { } - public void RemoveTableOfContents(string? elementId = null) { } - public void RemoveUniqueFileIds(string? owner = null) { } - public void RemoveUserTextFrames(string description) { } - public override TagLibSharp2.Core.BinaryData Render() { } - public TagLibSharp2.Core.BinaryData Render(int paddingSize, bool withFooter = false) { } - public void SetPicture(TagLibSharp2.Core.PictureType pictureType, TagLibSharp2.Id3.Id3v2.Frames.PictureFrame? picture) { } - public void SetPopularimeter(string email, byte rating, ulong playCount = 0) { } - public void SetTextFrameValues(string frameId, System.Collections.Generic.IEnumerable? values) { } - public void SetUrl(string frameId, string? url) { } - public void SetUserText(string description, string? value) { } - public void SetUserUrl(string description, string? url) { } - public static TagLibSharp2.Core.TagReadResult Read(System.ReadOnlySpan data) { } - } - public enum Id3v2Version - { - V22 = 2, - V23 = 3, - V24 = 4, - } - public enum TextEncodingType : byte - { - Latin1 = 0, - Utf16WithBom = 1, - Utf16BE = 2, - Utf8 = 3, - } -} -namespace TagLibSharp2.Mp4 -{ - public enum Mp4AudioCodec - { - Unknown = 0, - Aac = 1, - Alac = 2, - Mp3 = 3, - Ac3 = 4, - Eac3 = 5, - Flac = 6, - Opus = 7, - } - public static class Mp4AudioPropertiesParser - { - public static TagLibSharp2.Core.AudioProperties Parse(System.ReadOnlySpan data) { } - } - public class Mp4Box - { - public const int ExtendedHeaderSize = 16; - public const int HeaderSize = 8; - public System.Collections.Generic.IReadOnlyList Children { get; } - public TagLibSharp2.Core.BinaryData Data { get; } - public bool IsContainer { get; } - public long TotalSize { get; } - public string Type { get; } - public bool UsesExtendedSize { get; } - public TagLibSharp2.Mp4.Mp4Box? FindChild(string type) { } - public TagLibSharp2.Mp4.Mp4Box? FindDescendant(params string[] path) { } - public TagLibSharp2.Mp4.Mp4Box? Navigate(string path) { } - public TagLibSharp2.Core.BinaryData Render() { } - public override string ToString() { } - public static TagLibSharp2.Mp4.Mp4BoxReadResult Parse(System.ReadOnlySpan data) { } - } - public readonly struct Mp4BoxReadResult : System.IEquatable - { - public Mp4BoxReadResult(TagLibSharp2.Mp4.Mp4Box box, int bytesConsumed) { } - public TagLibSharp2.Mp4.Mp4Box? Box { get; } - public int BytesConsumed { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Mp4.Mp4BoxReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Mp4.Mp4BoxReadResult Failure() { } - public static bool operator !=(TagLibSharp2.Mp4.Mp4BoxReadResult left, TagLibSharp2.Mp4.Mp4BoxReadResult right) { } - public static bool operator ==(TagLibSharp2.Mp4.Mp4BoxReadResult left, TagLibSharp2.Mp4.Mp4BoxReadResult right) { } - } - public sealed class Mp4File : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public string? AcoustIdFingerprint { get; set; } - public string? AcoustIdId { get; set; } - public string? Album { get; set; } - public string? AlbumArtist { get; set; } - public string? AlbumArtistSort { get; set; } - public string? AlbumSort { get; set; } - public string? AmazonId { get; set; } - public string? Artist { get; set; } - public string? ArtistSort { get; set; } - public TagLibSharp2.Mp4.Mp4AudioCodec AudioCodec { get; } - public string? Barcode { get; set; } - public string? CatalogNumber { get; set; } - public string? Comment { get; set; } - public string? Composer { get; set; } - public string? ComposerSort { get; set; } - public string? Conductor { get; set; } - public string? DateTagged { get; set; } - public uint? DiscNumber { get; set; } - public System.TimeSpan Duration { get; } - public string FileType { get; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public string? Genre { get; set; } - public string? InitialKey { get; set; } - public bool IsGapless { get; set; } - public string? Isrc { get; set; } - public string? Language { get; set; } - public string? MediaType { get; set; } - public string? Mood { get; set; } - public string? Movement { get; set; } - public uint? MovementNumber { get; set; } - public uint? MovementTotal { get; set; } - public string? MusicBrainzDiscId { get; set; } - public string? MusicBrainzRecordingId { get; set; } - public string? MusicBrainzReleaseCountry { get; set; } - public string? MusicBrainzReleaseStatus { get; set; } - public string? MusicBrainzReleaseType { get; set; } - public string? OriginalReleaseDate { get; set; } - public TagLibSharp2.Core.IPicture[] Pictures { get; } - public string? PodcastFeedUrl { get; set; } - public TagLibSharp2.Core.AudioProperties Properties { get; } - public string? R128AlbumGain { get; set; } - public double? R128AlbumGainDb { get; set; } - public string? R128TrackGain { get; set; } - public double? R128TrackGainDb { get; set; } - public string? Remixer { get; set; } - public string? ReplayGainAlbumGain { get; set; } - public string? ReplayGainAlbumPeak { get; set; } - public string? ReplayGainTrackGain { get; set; } - public string? ReplayGainTrackPeak { get; set; } - public string? SourcePath { get; } - public string? Subtitle { get; set; } - public TagLibSharp2.Mp4.Mp4Tag? Tag { get; set; } - public string? Title { get; set; } - public string? TitleSort { get; set; } - public uint? TotalDiscs { get; set; } - public uint? TotalTracks { get; set; } - public uint? Track { get; set; } - public string? Work { get; set; } - public string? Year { get; set; } - public void AddPicture(TagLibSharp2.Core.IPicture picture) { } - public void ClearAllMetadata() { } - public void Dispose() { } - public string? GetFreeformTag(string mean, string name) { } - public void RemovePictures() { } - public TagLibSharp2.Core.BinaryData Render(System.ReadOnlySpan originalData) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public void SetFreeformTag(string mean, string name, string? value) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Mp4.Mp4FileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Mp4.Mp4FileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Mp4.Mp4File? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Mp4.Mp4File? file) { } - } - public readonly struct Mp4FileReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Mp4.Mp4File? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Mp4.Mp4FileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Mp4.Mp4FileReadResult Failure(string error) { } - public static TagLibSharp2.Mp4.Mp4FileReadResult Success(TagLibSharp2.Mp4.Mp4File file, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Mp4.Mp4FileReadResult left, TagLibSharp2.Mp4.Mp4FileReadResult right) { } - public static bool operator ==(TagLibSharp2.Mp4.Mp4FileReadResult left, TagLibSharp2.Mp4.Mp4FileReadResult right) { } - } - public class Mp4FullBox : TagLibSharp2.Mp4.Mp4Box - { - public Mp4FullBox(string type, byte version, uint flags, TagLibSharp2.Core.BinaryData contentData, System.Collections.Generic.IReadOnlyList? children = null, bool usesExtendedSize = false) { } - public TagLibSharp2.Core.BinaryData ContentData { get; } - public uint Flags { get; } - public byte Version { get; } - public override string ToString() { } - public static TagLibSharp2.Mp4.Mp4FullBox Parse(string type, TagLibSharp2.Core.BinaryData data, System.Collections.Generic.IReadOnlyList? children = null, bool usesExtendedSize = false) { } - } - public sealed class Mp4Picture : TagLibSharp2.Core.IPicture - { - public Mp4Picture(byte[] data, bool isJpeg) { } - public Mp4Picture(string mimeType, TagLibSharp2.Core.PictureType pictureType, string description, TagLibSharp2.Core.BinaryData pictureData) { } - public string Description { get; } - public string MimeType { get; } - public TagLibSharp2.Core.BinaryData PictureData { get; } - public TagLibSharp2.Core.PictureType PictureType { get; } - } - public sealed class Mp4Tag : TagLibSharp2.Core.Tag - { - public Mp4Tag() { } - public override string? AcoustIdFingerprint { get; set; } - public override string? AcoustIdId { get; set; } - public override string? Album { get; set; } - public override string? AlbumArtist { get; set; } - public override string? AlbumArtistSort { get; set; } - public override string? AlbumSort { get; set; } - public override string? AmazonId { get; set; } - public override string? Artist { get; set; } - public override string? ArtistSort { get; set; } - public override string? Barcode { get; set; } - public override uint? BeatsPerMinute { get; set; } - public override string? CatalogNumber { get; set; } - public override string? Comment { get; set; } - public override string? Composer { get; set; } - public override string? ComposerSort { get; set; } - public override string? Conductor { get; set; } - public override string? Copyright { get; set; } - public override string? DateTagged { get; set; } - public override string? Description { get; set; } - public override uint? DiscNumber { get; set; } - public override string? EncodedBy { get; set; } - public override string? EncoderSettings { get; set; } - public string? GaplessInfo { get; set; } - public override string? Genre { get; set; } - public override string? Grouping { get; set; } - public override string? InitialKey { get; set; } - public override bool IsCompilation { get; set; } - public bool IsGapless { get; set; } - public override string? Isrc { get; set; } - public override string? Language { get; set; } - public override string? Lyrics { get; set; } - public override string? MediaType { get; set; } - public override string? Mood { get; set; } - public override string? Movement { get; set; } - public override uint? MovementNumber { get; set; } - public override uint? MovementTotal { get; set; } - public override string? MusicBrainzAlbumArtistId { get; set; } - public override string? MusicBrainzArtistId { get; set; } - public override string? MusicBrainzDiscId { get; set; } - public override string? MusicBrainzRecordingId { get; set; } - public override string? MusicBrainzReleaseCountry { get; set; } - public override string? MusicBrainzReleaseGroupId { get; set; } - public override string? MusicBrainzReleaseId { get; set; } - public override string? MusicBrainzReleaseStatus { get; set; } - public override string? MusicBrainzReleaseType { get; set; } - public override string? MusicBrainzTrackId { get; set; } - public override string? MusicBrainzWorkId { get; set; } - public override string? OriginalReleaseDate { get; set; } - public override TagLibSharp2.Core.IPicture[] Pictures { get; set; } - public override string? PodcastFeedUrl { get; set; } - public override string? Publisher { get; set; } - public override string? R128AlbumGain { get; set; } - public override string? R128TrackGain { get; set; } - public override string? Remixer { get; set; } - public override string? ReplayGainAlbumGain { get; set; } - public override string? ReplayGainAlbumPeak { get; set; } - public override string? ReplayGainTrackGain { get; set; } - public override string? ReplayGainTrackPeak { get; set; } - public override string? Subtitle { get; set; } - public override TagLibSharp2.Core.TagTypes TagType { get; } - public override string? Title { get; set; } - public override string? TitleSort { get; set; } - public override uint? TotalDiscs { get; set; } - public override uint? TotalTracks { get; set; } - public override uint? Track { get; set; } - public override string? Work { get; set; } - public override string? Year { get; set; } - public override void Clear() { } - public override TagLibSharp2.Core.BinaryData Render() { } - } -} -namespace TagLibSharp2.Mpeg -{ - public enum ChannelMode - { - Stereo = 0, - JointStereo = 1, - DualChannel = 2, - Mono = 3, - } - public sealed class Mp3File : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public string? Album { get; set; } - public string? AlbumArtist { get; set; } - public string? Artist { get; set; } - public uint? BeatsPerMinute { get; set; } - public string? Comment { get; set; } - public string? Composer { get; set; } - public uint? DiscNumber { get; set; } - public System.TimeSpan? Duration { get; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public string? Genre { get; set; } - public bool HasId3v1Tag { get; } - public bool HasId3v2Tag { get; } - public TagLibSharp2.Id3.Id3v1Tag? Id3v1Tag { get; set; } - public int Id3v2Size { get; } - public TagLibSharp2.Id3.Id3v2.Id3v2Tag? Id3v2Tag { get; set; } - public string? MusicBrainzAlbumArtistId { get; set; } - public string? MusicBrainzArtistId { get; set; } - public string? MusicBrainzReleaseGroupId { get; set; } - public string? MusicBrainzReleaseId { get; set; } - public string? MusicBrainzTrackId { get; set; } - public TagLibSharp2.Mpeg.MpegAudioProperties? Properties { get; } - public string? ReplayGainAlbumGain { get; set; } - public string? ReplayGainAlbumPeak { get; set; } - public string? ReplayGainTrackGain { get; set; } - public string? ReplayGainTrackPeak { get; set; } - public string? SourcePath { get; } - public TagLibSharp2.Core.Tag? Tag { get; } - public string? Title { get; set; } - public uint? Track { get; set; } - public string? Year { get; set; } - public void Dispose() { } - public TagLibSharp2.Core.BinaryData Render(System.ReadOnlySpan originalData) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Mpeg.Mp3FileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Mpeg.Mp3FileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Mpeg.Mp3File? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Mpeg.Mp3File? file) { } - } - public readonly struct Mp3FileReadResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Mpeg.Mp3File? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Mpeg.Mp3FileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Mpeg.Mp3FileReadResult Failure(string error) { } - public static TagLibSharp2.Mpeg.Mp3FileReadResult Success(TagLibSharp2.Mpeg.Mp3File file) { } - public static bool operator !=(TagLibSharp2.Mpeg.Mp3FileReadResult left, TagLibSharp2.Mpeg.Mp3FileReadResult right) { } - public static bool operator ==(TagLibSharp2.Mpeg.Mp3FileReadResult left, TagLibSharp2.Mpeg.Mp3FileReadResult right) { } - } - public sealed class MpegAudioProperties : TagLibSharp2.Core.IMediaProperties - { - public int Bitrate { get; } - public int BitsPerSample { get; } - public int Channels { get; } - public string Codec { get; } - public System.TimeSpan Duration { get; } - public uint? FrameCount { get; } - public bool IsVbr { get; } - public TagLibSharp2.Mpeg.MpegLayer Layer { get; } - public int SampleRate { get; } - public TagLibSharp2.Mpeg.MpegVersion Version { get; } - public static bool TryParse(TagLibSharp2.Core.BinaryData data, int audioOffset, out TagLibSharp2.Mpeg.MpegAudioProperties? properties) { } - } - public sealed class MpegFrame - { - public const int HeaderSize = 4; - public const int VbriHeaderOffset = 36; - public int Bitrate { get; } - public TagLibSharp2.Mpeg.ChannelMode ChannelMode { get; } - public int FrameSize { get; } - public bool HasCrc { get; } - public bool HasPadding { get; } - public TagLibSharp2.Mpeg.MpegLayer Layer { get; } - public int SampleRate { get; } - public int SamplesPerFrame { get; } - public TagLibSharp2.Mpeg.MpegVersion Version { get; } - public int XingHeaderOffset { get; } - public static bool TryParse(TagLibSharp2.Core.BinaryData data, int offset, out TagLibSharp2.Mpeg.MpegFrame? frame) { } - } - public enum MpegLayer - { - Invalid = 0, - Layer3 = 1, - Layer2 = 2, - Layer1 = 3, - } - public enum MpegVersion - { - Version25 = 0, - Invalid = 1, - Version2 = 2, - Version1 = 3, - } - public sealed class VbriHeader - { - public const int MinHeaderSize = 26; - public uint ByteCount { get; } - public int Delay { get; } - public uint FrameCount { get; } - public int Quality { get; } - public int Version { get; } - public static bool TryParse(TagLibSharp2.Core.BinaryData data, int offset, out TagLibSharp2.Mpeg.VbriHeader? header) { } - } - public sealed class XingHeader - { - public uint? ByteCount { get; } - public uint? FrameCount { get; } - public bool HasToc { get; } - public bool IsVbr { get; } - public uint? Quality { get; } - public static bool TryParse(TagLibSharp2.Core.BinaryData data, int offset, out TagLibSharp2.Mpeg.XingHeader? header) { } - } -} -namespace TagLibSharp2.Musepack -{ - public sealed class MusepackFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public TagLibSharp2.Ape.ApeTag? ApeTag { get; } - public int Channels { get; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public uint FrameCount { get; } - public TagLibSharp2.Core.AudioProperties Properties { get; } - public int SampleRate { get; } - public string? SourcePath { get; } - public int StreamVersion { get; } - public TagLibSharp2.Core.Tag? Tag { get; } - public ulong TotalSamples { get; } - public void Dispose() { } - public TagLibSharp2.Ape.ApeTag EnsureApeTag() { } - public void RemoveApeTag() { } - public byte[] Render(System.ReadOnlySpan originalData) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Musepack.MusepackFileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Musepack.MusepackFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Musepack.MusepackFile? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Musepack.MusepackFile? file) { } - } - public readonly struct MusepackFileReadResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Musepack.MusepackFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Musepack.MusepackFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Musepack.MusepackFileReadResult Failure(string error) { } - public static TagLibSharp2.Musepack.MusepackFileReadResult Success(TagLibSharp2.Musepack.MusepackFile file) { } - public static bool operator !=(TagLibSharp2.Musepack.MusepackFileReadResult left, TagLibSharp2.Musepack.MusepackFileReadResult right) { } - public static bool operator ==(TagLibSharp2.Musepack.MusepackFileReadResult left, TagLibSharp2.Musepack.MusepackFileReadResult right) { } - } -} -namespace TagLibSharp2.Ogg -{ - public static class OggCrc - { - public static uint Calculate(System.ReadOnlySpan data) { } - public static uint Calculate(byte[] data) { } - public static bool Validate(System.ReadOnlySpan data) { } - } - public sealed class OggFlacFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public int BitsPerSample { get; } - public int Channels { get; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public TagLibSharp2.Core.AudioProperties Properties { get; } - public int SampleRate { get; } - public string? SourcePath { get; } - public TagLibSharp2.Core.Tag? Tag { get; } - public ulong TotalSamples { get; } - public TagLibSharp2.Xiph.VorbisComment? VorbisComment { get; } - public void Dispose() { } - public TagLibSharp2.Xiph.VorbisComment EnsureVorbisComment() { } - public void RemoveVorbisComment() { } - public byte[] Render(System.ReadOnlySpan originalData) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Ogg.OggFlacFileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Ogg.OggFlacFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Ogg.OggFlacFile? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Ogg.OggFlacFile? file) { } - } - public readonly struct OggFlacFileReadResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Ogg.OggFlacFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Ogg.OggFlacFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Ogg.OggFlacFileReadResult Failure(string error) { } - public static TagLibSharp2.Ogg.OggFlacFileReadResult Success(TagLibSharp2.Ogg.OggFlacFile file) { } - public static bool operator !=(TagLibSharp2.Ogg.OggFlacFileReadResult left, TagLibSharp2.Ogg.OggFlacFileReadResult right) { } - public static bool operator ==(TagLibSharp2.Ogg.OggFlacFileReadResult left, TagLibSharp2.Ogg.OggFlacFileReadResult right) { } - } - public sealed class OggOpusFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public string? Album { get; set; } - public string? Artist { get; set; } - public string? Comment { get; set; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public string? Genre { get; set; } - public uint InputSampleRate { get; } - public short OutputGain { get; } - public double OutputGainDb { get; } - public ushort PreSkip { get; } - public TagLibSharp2.Core.AudioProperties Properties { get; } - public string? SourcePath { get; } - public TagLibSharp2.Core.Tag? Tag { get; } - public string? Title { get; set; } - public uint? Track { get; set; } - public TagLibSharp2.Xiph.VorbisComment? VorbisComment { get; set; } - public string? Year { get; set; } - public void Dispose() { } - public TagLibSharp2.Core.BinaryData Render(System.ReadOnlySpan originalData) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Ogg.OggOpusFileReadResult Read(System.ReadOnlySpan data, bool validateCrc = false) { } - public static TagLibSharp2.Ogg.OggOpusFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, bool validateCrc = false) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, bool validateCrc = false, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Ogg.OggOpusFile? file, bool validateCrc = false) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Ogg.OggOpusFile? file, bool validateCrc = false) { } - } - public readonly struct OggOpusFileReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Ogg.OggOpusFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Ogg.OggOpusFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Ogg.OggOpusFileReadResult Failure(string error) { } - public static TagLibSharp2.Ogg.OggOpusFileReadResult Success(TagLibSharp2.Ogg.OggOpusFile file, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Ogg.OggOpusFileReadResult left, TagLibSharp2.Ogg.OggOpusFileReadResult right) { } - public static bool operator ==(TagLibSharp2.Ogg.OggOpusFileReadResult left, TagLibSharp2.Ogg.OggOpusFileReadResult right) { } - } - public readonly struct OggPage : System.IEquatable - { - public const int MinHeaderSize = 27; - public OggPage(byte version, TagLibSharp2.Ogg.OggPageFlags flags, ulong granulePosition, uint serialNumber, uint sequenceNumber, uint checksum, System.ReadOnlyMemory data) { } - public uint Checksum { get; } - public System.ReadOnlyMemory Data { get; } - public TagLibSharp2.Ogg.OggPageFlags Flags { get; } - public ulong GranulePosition { get; } - public bool IsBeginOfStream { get; } - public bool IsContinuation { get; } - public bool IsEndOfStream { get; } - public uint SequenceNumber { get; } - public uint SerialNumber { get; } - public byte Version { get; } - public bool Equals(TagLibSharp2.Ogg.OggPage other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Ogg.OggPageReadResult Read(System.ReadOnlySpan data, bool validateCrc = false) { } - public static bool operator !=(TagLibSharp2.Ogg.OggPage left, TagLibSharp2.Ogg.OggPage right) { } - public static bool operator ==(TagLibSharp2.Ogg.OggPage left, TagLibSharp2.Ogg.OggPage right) { } - } - [System.Flags] - public enum OggPageFlags : byte - { - None = 0, - Continuation = 1, - BeginOfStream = 2, - EndOfStream = 4, - } - public readonly struct OggPageReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public TagLibSharp2.Ogg.OggPage Page { get; } - public bool Equals(TagLibSharp2.Ogg.OggPageReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Ogg.OggPageReadResult Failure(string error) { } - public static TagLibSharp2.Ogg.OggPageReadResult Success(TagLibSharp2.Ogg.OggPage page, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Ogg.OggPageReadResult left, TagLibSharp2.Ogg.OggPageReadResult right) { } - public static bool operator ==(TagLibSharp2.Ogg.OggPageReadResult left, TagLibSharp2.Ogg.OggPageReadResult right) { } - } - public sealed class OggVorbisFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public string? Album { get; set; } - public string? Artist { get; set; } - public string? Comment { get; set; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public string? Genre { get; set; } - public TagLibSharp2.Core.AudioProperties Properties { get; } - public string? SourcePath { get; } - public TagLibSharp2.Core.Tag? Tag { get; } - public string? Title { get; set; } - public uint? Track { get; set; } - public TagLibSharp2.Xiph.VorbisComment? VorbisComment { get; set; } - public string? Year { get; set; } - public void Dispose() { } - public TagLibSharp2.Core.BinaryData Render(System.ReadOnlySpan originalData) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Ogg.OggVorbisFileReadResult Read(System.ReadOnlySpan data, bool validateCrc = false) { } - public static TagLibSharp2.Ogg.OggVorbisFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, bool validateCrc = false) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, bool validateCrc = false, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Ogg.OggVorbisFile? file, bool validateCrc = false) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Ogg.OggVorbisFile? file, bool validateCrc = false) { } - } - public readonly struct OggVorbisFileReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Ogg.OggVorbisFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Ogg.OggVorbisFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Ogg.OggVorbisFileReadResult Failure(string error) { } - public static TagLibSharp2.Ogg.OggVorbisFileReadResult Success(TagLibSharp2.Ogg.OggVorbisFile file, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Ogg.OggVorbisFileReadResult left, TagLibSharp2.Ogg.OggVorbisFileReadResult right) { } - public static bool operator ==(TagLibSharp2.Ogg.OggVorbisFileReadResult left, TagLibSharp2.Ogg.OggVorbisFileReadResult right) { } - } -} -namespace TagLibSharp2.Riff -{ - public class BextTag - { - public const string ChunkId = "bext"; - public const int MinimumSize = 602; - public BextTag() { } - public string? CodingHistory { get; set; } - public string? Description { get; set; } - public bool IsEmpty { get; } - public string? OriginationDate { get; set; } - public string? OriginationTime { get; set; } - public string? Originator { get; set; } - public string? OriginatorReference { get; set; } - public ulong TimeReference { get; set; } - public byte[]? Umid { get; set; } - public ushort Version { get; set; } - public TagLibSharp2.Core.BinaryData Render() { } - public static TagLibSharp2.Riff.BextTag? Parse(TagLibSharp2.Core.BinaryData data) { } - } - public readonly struct RiffChunk : System.IEquatable - { - public const int HeaderSize = 8; - public RiffChunk(string fourCC, TagLibSharp2.Core.BinaryData data) { } - public TagLibSharp2.Core.BinaryData Data { get; } - public uint DataSize { get; } - public string FourCC { get; } - public bool IsValid { get; } - public int TotalSize { get; } - public bool Equals(TagLibSharp2.Riff.RiffChunk other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public TagLibSharp2.Core.BinaryData Render() { } - public override string ToString() { } - public static bool TryParse(TagLibSharp2.Core.BinaryData data, int offset, out TagLibSharp2.Riff.RiffChunk chunk) { } - public static bool operator !=(TagLibSharp2.Riff.RiffChunk left, TagLibSharp2.Riff.RiffChunk right) { } - public static bool operator ==(TagLibSharp2.Riff.RiffChunk left, TagLibSharp2.Riff.RiffChunk right) { } - } - public class RiffFile - { - public const int HeaderSize = 12; - public static readonly TagLibSharp2.Core.BinaryData RiffMagic; - public static readonly TagLibSharp2.Core.BinaryData WaveType; - public RiffFile() { } - public System.Collections.Generic.IReadOnlyList AllChunks { get; } - public uint FileSize { get; } - public string FormType { get; } - public bool IsValid { get; } - public TagLibSharp2.Riff.RiffChunk? GetChunk(string fourCC) { } - public System.Collections.Generic.IEnumerable GetChunks(string fourCC) { } - public bool RemoveChunks(string fourCC) { } - public TagLibSharp2.Core.BinaryData Render(string? formType = null) { } - public void SetChunk(TagLibSharp2.Riff.RiffChunk chunk) { } - public static bool TryParse(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Riff.RiffFile file) { } - } - public class RiffInfoTag : TagLibSharp2.Core.Tag - { - public const string IART = "IART"; - public const string ICMT = "ICMT"; - public const string ICOP = "ICOP"; - public const string ICRD = "ICRD"; - public const string IENG = "IENG"; - public const string IGNR = "IGNR"; - public const string IKEY = "IKEY"; - public const string INAM = "INAM"; - public const string IPRD = "IPRD"; - public const string ISBJ = "ISBJ"; - public const string ISFT = "ISFT"; - public const string ISRC = "ISRC"; - public const string ITCH = "ITCH"; - public const string ITRK = "ITRK"; - public RiffInfoTag() { } - public override string? Album { get; set; } - public override string? Artist { get; set; } - public override string? Comment { get; set; } - public override string? Copyright { get; set; } - public System.Collections.Generic.IEnumerable FieldIds { get; } - public override string? Genre { get; set; } - public override string[] Genres { get; set; } - public override bool IsEmpty { get; } - public override string[] Performers { get; set; } - public string? Software { get; set; } - public override TagLibSharp2.Core.TagTypes TagType { get; } - public override string? Title { get; set; } - public override uint? Track { get; set; } - public override string? Year { get; set; } - public override void Clear() { } - public string? GetField(string fourCC) { } - public override TagLibSharp2.Core.BinaryData Render() { } - public void SetField(string fourCC, string? value) { } - public static TagLibSharp2.Riff.RiffInfoTag? Parse(TagLibSharp2.Core.BinaryData data) { } - } - public static class WavAudioPropertiesParser - { - public const ushort FormatExtensible = 65534; - public const ushort FormatIeeeFloat = 3; - public const ushort FormatPcm = 1; - public static string GetFormatDescription(ushort formatCode) { } - public static TagLibSharp2.Core.AudioProperties? Parse(TagLibSharp2.Core.BinaryData fmtData, long dataChunkSize = -1) { } - public static TagLibSharp2.Riff.WavExtendedProperties? ParseExtended(TagLibSharp2.Core.BinaryData fmtData) { } - } - public static class WavChannelMask - { - public const uint BackCenter = 256u; - public const uint BackLeft = 16u; - public const uint BackRight = 32u; - public const uint FrontCenter = 4u; - public const uint FrontLeft = 1u; - public const uint FrontLeftOfCenter = 64u; - public const uint FrontRight = 2u; - public const uint FrontRightOfCenter = 128u; - public const uint LowFrequency = 8u; - public const uint SideLeft = 512u; - public const uint SideRight = 1024u; - public const uint TopBackCenter = 65536u; - public const uint TopBackLeft = 32768u; - public const uint TopBackRight = 131072u; - public const uint TopCenter = 2048u; - public const uint TopFrontCenter = 8192u; - public const uint TopFrontLeft = 4096u; - public const uint TopFrontRight = 16384u; - } - public readonly struct WavExtendedProperties : System.IEquatable - { - public WavExtendedProperties(int channels, int sampleRate, int bitsPerSample, int validBitsPerSample, uint channelMask, TagLibSharp2.Riff.WavSubFormat subFormat) { } - public int BitsPerSample { get; } - public uint ChannelMask { get; } - public int Channels { get; } - public int SampleRate { get; } - public TagLibSharp2.Riff.WavSubFormat SubFormat { get; } - public int ValidBitsPerSample { get; } - public bool Equals(TagLibSharp2.Riff.WavExtendedProperties other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static bool operator !=(TagLibSharp2.Riff.WavExtendedProperties left, TagLibSharp2.Riff.WavExtendedProperties right) { } - public static bool operator ==(TagLibSharp2.Riff.WavExtendedProperties left, TagLibSharp2.Riff.WavExtendedProperties right) { } - } - public sealed class WavFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public const string BextChunkId = "bext"; - public const string DataChunkId = "data"; - public const string FmtChunkId = "fmt "; - public const string Id3ChunkId = "id3 "; - public const string ListChunkId = "LIST"; - public string? Album { get; } - public TagLibSharp2.Riff.BextTag? BextTag { get; set; } - public string? Comment { get; } - public TagLibSharp2.Id3.Id3v2.Frames.PictureFrame? CoverArt { get; } - public TagLibSharp2.Riff.WavExtendedProperties? ExtendedProperties { get; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public string[]? Genres { get; } - public bool HasPictures { get; } - public TagLibSharp2.Id3.Id3v2.Id3v2Tag? Id3v2Tag { get; set; } - public TagLibSharp2.Riff.RiffInfoTag? InfoTag { get; set; } - public bool IsValid { get; } - public string[]? Performers { get; } - public TagLibSharp2.Core.IPicture[] Pictures { get; } - public TagLibSharp2.Core.AudioProperties Properties { get; } - public string? SourcePath { get; } - public string? Title { get; } - public uint? Track { get; } - public string? Year { get; } - public void Dispose() { } - public TagLibSharp2.Core.BinaryData Render() { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Riff.WavFileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Riff.WavFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Riff.WavFile? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Riff.WavFile? file) { } - } - public readonly struct WavFileReadResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Riff.WavFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Riff.WavFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Riff.WavFileReadResult Failure(string error) { } - public static TagLibSharp2.Riff.WavFileReadResult Success(TagLibSharp2.Riff.WavFile file) { } - public static bool operator !=(TagLibSharp2.Riff.WavFileReadResult left, TagLibSharp2.Riff.WavFileReadResult right) { } - public static bool operator ==(TagLibSharp2.Riff.WavFileReadResult left, TagLibSharp2.Riff.WavFileReadResult right) { } - } - public enum WavSubFormat - { - Unknown = 0, - Pcm = 1, - IeeeFloat = 3, - ALaw = 6, - MuLaw = 7, - } -} -namespace TagLibSharp2.WavPack -{ - public sealed class WavPackFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public TagLibSharp2.Ape.ApeTag? ApeTag { get; } - public int BitsPerSample { get; } - public uint BlockSize { get; } - public int Channels { get; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public TagLibSharp2.Core.AudioProperties Properties { get; } - public int SampleRate { get; } - public string? SourcePath { get; } - public TagLibSharp2.Core.Tag? Tag { get; } - public uint TotalSamples { get; } - public int Version { get; } - public void Dispose() { } - public TagLibSharp2.Ape.ApeTag EnsureApeTag() { } - public void RemoveApeTag() { } - public byte[] Render(System.ReadOnlySpan originalData) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.WavPack.WavPackFileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.WavPack.WavPackFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.WavPack.WavPackFile? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.WavPack.WavPackFile? file) { } - } - public readonly struct WavPackFileReadResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.WavPack.WavPackFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.WavPack.WavPackFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.WavPack.WavPackFileReadResult Failure(string error) { } - public static TagLibSharp2.WavPack.WavPackFileReadResult Success(TagLibSharp2.WavPack.WavPackFile file) { } - public static bool operator !=(TagLibSharp2.WavPack.WavPackFileReadResult left, TagLibSharp2.WavPack.WavPackFileReadResult right) { } - public static bool operator ==(TagLibSharp2.WavPack.WavPackFileReadResult left, TagLibSharp2.WavPack.WavPackFileReadResult right) { } - } -} -namespace TagLibSharp2.Xiph -{ - public enum FlacBlockType : byte - { - StreamInfo = 0, - Padding = 1, - Application = 2, - SeekTable = 3, - VorbisComment = 4, - CueSheet = 5, - Picture = 6, - } - public sealed class FlacCueSheet - { - public FlacCueSheet() { } - public bool IsCompactDisc { get; set; } - public ulong LeadInSamples { get; set; } - public string MediaCatalogNumber { get; set; } - public System.Collections.Generic.IReadOnlyList Tracks { get; } - public void AddTrack(TagLibSharp2.Xiph.FlacCueSheetTrack track) { } - public void ClearTracks() { } - public TagLibSharp2.Core.BinaryData Render() { } - public static TagLibSharp2.Xiph.FlacCueSheetReadResult Read(System.ReadOnlySpan data) { } - } - public sealed class FlacCueSheetIndex - { - public FlacCueSheetIndex(byte indexNumber, ulong offset) { } - public byte IndexNumber { get; set; } - public ulong Offset { get; set; } - } - public readonly struct FlacCueSheetReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public TagLibSharp2.Xiph.FlacCueSheet? CueSheet { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Xiph.FlacCueSheetReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Xiph.FlacCueSheetReadResult Failure(string error) { } - public static TagLibSharp2.Xiph.FlacCueSheetReadResult Success(TagLibSharp2.Xiph.FlacCueSheet cueSheet, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Xiph.FlacCueSheetReadResult left, TagLibSharp2.Xiph.FlacCueSheetReadResult right) { } - public static bool operator ==(TagLibSharp2.Xiph.FlacCueSheetReadResult left, TagLibSharp2.Xiph.FlacCueSheetReadResult right) { } - } - public sealed class FlacCueSheetTrack - { - public FlacCueSheetTrack(byte trackNumber, ulong offset) { } - public bool HasPreEmphasis { get; set; } - public System.Collections.Generic.IReadOnlyList Indices { get; } - public bool IsAudio { get; set; } - public string Isrc { get; set; } - public ulong Offset { get; set; } - public byte TrackNumber { get; set; } - public void AddIndex(TagLibSharp2.Xiph.FlacCueSheetIndex index) { } - public void ClearIndices() { } - } - public sealed class FlacFile : System.IDisposable, TagLibSharp2.Core.IMediaFile - { - public string? Album { get; set; } - public string? Artist { get; set; } - public System.ReadOnlySpan AudioMd5Signature { get; } - public string? AudioMd5SignatureHex { get; } - public string? Comment { get; set; } - public TagLibSharp2.Xiph.FlacCueSheet? CueSheet { get; set; } - public TagLibSharp2.Core.MediaFormat Format { get; } - public string? Genre { get; set; } - public bool HasAudioMd5Signature { get; } - public int MetadataSize { get; } - public System.Collections.Generic.IReadOnlyList Pictures { get; } - public System.Collections.Generic.IReadOnlyList PreservedBlocks { get; } - public TagLibSharp2.Core.AudioProperties Properties { get; } - public string? SourcePath { get; } - public TagLibSharp2.Core.BinaryData StreamInfoData { get; } - public TagLibSharp2.Core.Tag? Tag { get; } - public string? Title { get; set; } - public uint? Track { get; set; } - public TagLibSharp2.Xiph.VorbisComment? VorbisComment { get; set; } - public string? Year { get; set; } - public void AddPicture(TagLibSharp2.Xiph.FlacPicture picture) { } - public void Dispose() { } - public void RemoveAllPictures() { } - public void RemovePictures(TagLibSharp2.Core.PictureType pictureType) { } - public TagLibSharp2.Core.BinaryData Render(System.ReadOnlySpan originalData) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public TagLibSharp2.Core.FileWriteResult SaveToFile(string path, System.ReadOnlySpan originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public System.Threading.Tasks.Task SaveToFileAsync(TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public System.Threading.Tasks.Task SaveToFileAsync(string path, System.ReadOnlyMemory originalData, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool IsValidFormat(System.ReadOnlySpan data) { } - public static TagLibSharp2.Xiph.FlacFileReadResult Read(System.ReadOnlySpan data) { } - public static TagLibSharp2.Xiph.FlacFileReadResult ReadFromFile(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null) { } - public static System.Threading.Tasks.Task ReadFromFileAsync(string path, TagLibSharp2.Core.IFileSystem? fileSystem = null, System.Threading.CancellationToken cancellationToken = default) { } - public static bool TryRead(System.ReadOnlySpan data, out TagLibSharp2.Xiph.FlacFile? file) { } - public static bool TryRead(TagLibSharp2.Core.BinaryData data, out TagLibSharp2.Xiph.FlacFile? file) { } - } - public readonly struct FlacFileReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public TagLibSharp2.Xiph.FlacFile? File { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Xiph.FlacFileReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Xiph.FlacFileReadResult Failure(string error) { } - public static TagLibSharp2.Xiph.FlacFileReadResult Success(TagLibSharp2.Xiph.FlacFile file, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Xiph.FlacFileReadResult left, TagLibSharp2.Xiph.FlacFileReadResult right) { } - public static bool operator ==(TagLibSharp2.Xiph.FlacFileReadResult left, TagLibSharp2.Xiph.FlacFileReadResult right) { } - } - public readonly struct FlacMetadataBlockHeader : System.IEquatable - { - public const int HeaderSize = 4; - public FlacMetadataBlockHeader(bool isLast, TagLibSharp2.Xiph.FlacBlockType blockType, int dataLength) { } - public TagLibSharp2.Xiph.FlacBlockType BlockType { get; } - public int DataLength { get; } - public bool IsLast { get; } - public bool Equals(TagLibSharp2.Xiph.FlacMetadataBlockHeader other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public TagLibSharp2.Core.BinaryData Render() { } - public static TagLibSharp2.Xiph.FlacMetadataBlockHeaderReadResult Read(System.ReadOnlySpan data) { } - public static bool operator !=(TagLibSharp2.Xiph.FlacMetadataBlockHeader left, TagLibSharp2.Xiph.FlacMetadataBlockHeader right) { } - public static bool operator ==(TagLibSharp2.Xiph.FlacMetadataBlockHeader left, TagLibSharp2.Xiph.FlacMetadataBlockHeader right) { } - } - public readonly struct FlacMetadataBlockHeaderReadResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Xiph.FlacMetadataBlockHeader Header { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Xiph.FlacMetadataBlockHeaderReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Xiph.FlacMetadataBlockHeaderReadResult Failure(string error) { } - public static TagLibSharp2.Xiph.FlacMetadataBlockHeaderReadResult Success(TagLibSharp2.Xiph.FlacMetadataBlockHeader header) { } - public static bool operator !=(TagLibSharp2.Xiph.FlacMetadataBlockHeaderReadResult left, TagLibSharp2.Xiph.FlacMetadataBlockHeaderReadResult right) { } - public static bool operator ==(TagLibSharp2.Xiph.FlacMetadataBlockHeaderReadResult left, TagLibSharp2.Xiph.FlacMetadataBlockHeaderReadResult right) { } - } - public sealed class FlacPicture : TagLibSharp2.Core.Picture - { - public FlacPicture(string mimeType, TagLibSharp2.Core.PictureType pictureType, string description, TagLibSharp2.Core.BinaryData pictureData, uint width, uint height, uint colorDepth, uint colorCount) { } - public uint ColorCount { get; } - public uint ColorDepth { get; } - public override string Description { get; } - public uint Height { get; } - public override string MimeType { get; } - public override TagLibSharp2.Core.BinaryData PictureData { get; } - public override TagLibSharp2.Core.PictureType PictureType { get; } - public uint Width { get; } - public TagLibSharp2.Core.BinaryData RenderContent() { } - public static TagLibSharp2.Xiph.FlacPicture FromBytes(byte[] imageData, TagLibSharp2.Core.PictureType pictureType = 3, string description = "") { } - public static TagLibSharp2.Xiph.FlacPicture FromFile(string path, TagLibSharp2.Core.PictureType pictureType = 3, string description = "") { } - public static TagLibSharp2.Xiph.FlacPictureReadResult Read(System.ReadOnlySpan data) { } - } - public readonly struct FlacPictureReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public TagLibSharp2.Xiph.FlacPicture? Picture { get; } - public bool Equals(TagLibSharp2.Xiph.FlacPictureReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Xiph.FlacPictureReadResult Failure(string error) { } - public static TagLibSharp2.Xiph.FlacPictureReadResult Success(TagLibSharp2.Xiph.FlacPicture picture, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Xiph.FlacPictureReadResult left, TagLibSharp2.Xiph.FlacPictureReadResult right) { } - public static bool operator ==(TagLibSharp2.Xiph.FlacPictureReadResult left, TagLibSharp2.Xiph.FlacPictureReadResult right) { } - } - public readonly struct FlacPreservedBlock : System.IEquatable - { - public FlacPreservedBlock(TagLibSharp2.Xiph.FlacBlockType blockType, TagLibSharp2.Core.BinaryData data) { } - public TagLibSharp2.Xiph.FlacBlockType BlockType { get; } - public TagLibSharp2.Core.BinaryData Data { get; } - public bool Equals(TagLibSharp2.Xiph.FlacPreservedBlock other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static bool operator !=(TagLibSharp2.Xiph.FlacPreservedBlock left, TagLibSharp2.Xiph.FlacPreservedBlock right) { } - public static bool operator ==(TagLibSharp2.Xiph.FlacPreservedBlock left, TagLibSharp2.Xiph.FlacPreservedBlock right) { } - } - public sealed class VorbisComment : TagLibSharp2.Core.Tag - { - public VorbisComment() { } - public VorbisComment(string vendorString) { } - public override string? AcoustIdFingerprint { get; set; } - public override string? AcoustIdId { get; set; } - public override string? Album { get; set; } - public override string? AlbumArtist { get; set; } - public override string? AlbumArtistSort { get; set; } - public override string[] AlbumArtists { get; set; } - public override string[]? AlbumArtistsSort { get; set; } - public override string? AlbumSort { get; set; } - public override string? AmazonId { get; set; } - public override string? Artist { get; set; } - public override string? ArtistSort { get; set; } - public override string? Barcode { get; set; } - public override uint? BeatsPerMinute { get; set; } - public override string? CatalogNumber { get; set; } - public override string? Comment { get; set; } - public override string? Composer { get; set; } - public override string? ComposerSort { get; set; } - public override string[] Composers { get; set; } - public override string[]? ComposersSort { get; set; } - public override string? Conductor { get; set; } - public override string? Copyright { get; set; } - public override string? DateTagged { get; set; } - public override string? Description { get; set; } - public override uint? DiscNumber { get; set; } - public override string? DiscSubtitle { get; set; } - public override string? EncodedBy { get; set; } - public override string? EncoderSettings { get; set; } - public System.Collections.Generic.IReadOnlyList Fields { get; } - public override string? Genre { get; set; } - public override string[] Genres { get; set; } - public override string? Grouping { get; set; } - public override string? InitialKey { get; set; } - public override bool IsCompilation { get; set; } - public override string? Isrc { get; set; } - public override string? Language { get; set; } - public override string? Lyrics { get; set; } - public override string? MediaType { get; set; } - public override string? Mood { get; set; } - public override string? Movement { get; set; } - public override uint? MovementNumber { get; set; } - public override uint? MovementTotal { get; set; } - public override string? MusicBrainzAlbumArtistId { get; set; } - public override string? MusicBrainzArtistId { get; set; } - public override string? MusicBrainzDiscId { get; set; } - public override string? MusicBrainzRecordingId { get; set; } - public override string? MusicBrainzReleaseCountry { get; set; } - public override string? MusicBrainzReleaseGroupId { get; set; } - public override string? MusicBrainzReleaseId { get; set; } - public override string? MusicBrainzReleaseStatus { get; set; } - public override string? MusicBrainzReleaseType { get; set; } - public override string? MusicBrainzTrackId { get; set; } - public override string? MusicBrainzWorkId { get; set; } - public override string? OriginalReleaseDate { get; set; } - public override string[] Performers { get; set; } - public override string[]? PerformersRole { get; set; } - public override string[]? PerformersSort { get; set; } - public System.Collections.Generic.IReadOnlyList PictureBlocks { get; } - public override TagLibSharp2.Core.IPicture[] Pictures { get; set; } - public override string? PodcastFeedUrl { get; set; } - public override string? Publisher { get; set; } - public override string? R128AlbumGain { get; set; } - public override string? R128TrackGain { get; set; } - public override string? Remixer { get; set; } - public override string? ReplayGainAlbumGain { get; set; } - public override string? ReplayGainAlbumPeak { get; set; } - public override string? ReplayGainTrackGain { get; set; } - public override string? ReplayGainTrackPeak { get; set; } - public override string? Subtitle { get; set; } - public override TagLibSharp2.Core.TagTypes TagType { get; } - public override string? Title { get; set; } - public override string? TitleSort { get; set; } - public override uint? TotalDiscs { get; set; } - public override uint? TotalTracks { get; set; } - public override uint? Track { get; set; } - public string VendorString { get; set; } - public override string? Work { get; set; } - public override string? Year { get; set; } - public void AddField(string name, string value) { } - public void AddPicture(TagLibSharp2.Xiph.FlacPicture picture) { } - public override void Clear() { } - public string? GetValue(string name) { } - public System.Collections.Generic.IReadOnlyList GetValues(string name) { } - public void RemoveAll(string name) { } - public void RemoveAllPictures() { } - public void RemovePictures(TagLibSharp2.Core.PictureType pictureType) { } - public override TagLibSharp2.Core.BinaryData Render() { } - public void SetValue(string name, string? value) { } - public static TagLibSharp2.Xiph.VorbisCommentReadResult Read(System.ReadOnlySpan data) { } - } - public readonly struct VorbisCommentField : System.IEquatable - { - public VorbisCommentField(string name, string value) { } - public string Name { get; } - public string Value { get; } - public bool Equals(TagLibSharp2.Xiph.VorbisCommentField other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public override string ToString() { } - public static TagLibSharp2.Xiph.VorbisCommentFieldParseResult Parse(string fieldString) { } - public static bool operator !=(TagLibSharp2.Xiph.VorbisCommentField left, TagLibSharp2.Xiph.VorbisCommentField right) { } - public static bool operator ==(TagLibSharp2.Xiph.VorbisCommentField left, TagLibSharp2.Xiph.VorbisCommentField right) { } - } - public readonly struct VorbisCommentFieldParseResult : System.IEquatable - { - public string? Error { get; } - public TagLibSharp2.Xiph.VorbisCommentField Field { get; } - public bool IsSuccess { get; } - public bool Equals(TagLibSharp2.Xiph.VorbisCommentFieldParseResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Xiph.VorbisCommentFieldParseResult Failure(string error) { } - public static TagLibSharp2.Xiph.VorbisCommentFieldParseResult Success(TagLibSharp2.Xiph.VorbisCommentField field) { } - public static bool operator !=(TagLibSharp2.Xiph.VorbisCommentFieldParseResult left, TagLibSharp2.Xiph.VorbisCommentFieldParseResult right) { } - public static bool operator ==(TagLibSharp2.Xiph.VorbisCommentFieldParseResult left, TagLibSharp2.Xiph.VorbisCommentFieldParseResult right) { } - } - public readonly struct VorbisCommentReadResult : System.IEquatable - { - public int BytesConsumed { get; } - public string? Error { get; } - public bool IsSuccess { get; } - public TagLibSharp2.Xiph.VorbisComment? Tag { get; } - public bool Equals(TagLibSharp2.Xiph.VorbisCommentReadResult other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public static TagLibSharp2.Xiph.VorbisCommentReadResult Failure(string error) { } - public static TagLibSharp2.Xiph.VorbisCommentReadResult Success(TagLibSharp2.Xiph.VorbisComment tag, int bytesConsumed) { } - public static bool operator !=(TagLibSharp2.Xiph.VorbisCommentReadResult left, TagLibSharp2.Xiph.VorbisCommentReadResult right) { } - public static bool operator ==(TagLibSharp2.Xiph.VorbisCommentReadResult left, TagLibSharp2.Xiph.VorbisCommentReadResult right) { } - } -} \ No newline at end of file diff --git a/tests/TagLibSharp2.Tests/PublicApi/Snapshots/TagLibSharp2.PublicApi.verified.txt b/tests/TagLibSharp2.Tests/PublicApi/Snapshots/TagLibSharp2.PublicApi.verified.txt index 2fbddf3..7c67e02 100644 --- a/tests/TagLibSharp2.Tests/PublicApi/Snapshots/TagLibSharp2.PublicApi.verified.txt +++ b/tests/TagLibSharp2.Tests/PublicApi/Snapshots/TagLibSharp2.PublicApi.verified.txt @@ -874,6 +874,22 @@ namespace TagLibSharp2.Core public byte[] ToArray() { } public TagLibSharp2.Core.BinaryData ToBinaryData() { } } + public class CombinedTag : TagLibSharp2.Core.Tag + { + public CombinedTag(params TagLibSharp2.Core.Tag?[] tags) { } + public override string? Album { get; set; } + public override string? Artist { get; set; } + public override string? Comment { get; set; } + public override string? Genre { get; set; } + public override TagLibSharp2.Core.IPicture[] Pictures { get; set; } + public override TagLibSharp2.Core.TagTypes TagType { get; } + protected System.Collections.Generic.IReadOnlyList Tags { get; } + public override string? Title { get; set; } + public override uint? Track { get; set; } + public override string? Year { get; set; } + public override void Clear() { } + public override TagLibSharp2.Core.BinaryData Render() { } + } public sealed class DefaultFileSystem : TagLibSharp2.Core.IFileSystem { public static TagLibSharp2.Core.DefaultFileSystem Instance { get; } @@ -3172,6 +3188,20 @@ namespace TagLibSharp2.Xiph public static bool operator !=(TagLibSharp2.Xiph.FlacPreservedBlock left, TagLibSharp2.Xiph.FlacPreservedBlock right) { } public static bool operator ==(TagLibSharp2.Xiph.FlacPreservedBlock left, TagLibSharp2.Xiph.FlacPreservedBlock right) { } } + public sealed class FlacTag : TagLibSharp2.Core.Tag + { + public override string? Album { get; set; } + public override string? Artist { get; set; } + public override string? Comment { get; set; } + public override string? Genre { get; set; } + public override TagLibSharp2.Core.IPicture[] Pictures { get; set; } + public override TagLibSharp2.Core.TagTypes TagType { get; } + public override string? Title { get; set; } + public override uint? Track { get; set; } + public override string? Year { get; set; } + public override void Clear() { } + public override TagLibSharp2.Core.BinaryData Render() { } + } public sealed class VorbisComment : TagLibSharp2.Core.Tag { public VorbisComment() { } diff --git a/tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs b/tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs new file mode 100644 index 0000000..c2c62f8 --- /dev/null +++ b/tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs @@ -0,0 +1,246 @@ +// Copyright (c) 2025-2026 Stephen Shaw and contributors +// Licensed under the MIT License. See LICENSE file in the project root for full license information. + +using TagLibSharp2.Core; +using TagLibSharp2.Xiph; + +namespace TagLibSharp2.Tests.Xiph; + +/// +/// Tests for the FLAC tag abstraction surfaced by . +/// +/// +/// FLAC can store pictures in two locations: +/// +/// Native PICTURE metadata blocks (block type 6) — RFC 9639 §8.8. +/// METADATA_BLOCK_PICTURE fields inside the VORBIS_COMMENT block (base64-encoded) — +/// https://wiki.xiph.org/VorbisComment#METADATA_BLOCK_PICTURE. +/// +/// The view must surface pictures from both locations (Issue #6). +/// +[TestClass] +[TestCategory ("Unit")] +[TestCategory ("Xiph")] +public class FlacTagTests +{ + /// + /// Reproduces GitHub Issue #6: a FLAC file with a native PICTURE block must + /// surface that picture through the unified view. + /// + /// + /// Per RFC 9639 §8.8 and https://xiph.org/flac/format.html#metadata_block_picture, + /// the PICTURE metadata block (type 6) is the canonical picture storage for FLAC. + /// Prior to this fix, FlacFile.Tag returned the raw VorbisComment, whose + /// Pictures property only reflects METADATA_BLOCK_PICTURE entries, missing the + /// native PICTURE block. + /// + [TestMethod] + public void Tag_Pictures_IncludesNativePictureBlocks () + { + var data = TestBuilders.Flac.CreateWithPicture (PictureType.FrontCover); + + var result = FlacFile.Read (data); + + Assert.IsTrue (result.IsSuccess); + Assert.AreEqual (1, result.File!.Pictures.Count, "precondition: file has one PICTURE block"); + Assert.IsNotNull (result.File.Tag, "Tag view must be available"); + Assert.AreEqual (1, result.File.Tag!.Pictures.Length, + "Tag.Pictures must surface native PICTURE blocks (Issue #6 / RFC 9639 §8.8)"); + } + + /// + /// A FLAC file whose picture is embedded as a METADATA_BLOCK_PICTURE field inside + /// the VORBIS_COMMENT block (with no separate PICTURE metadata block) must still + /// surface the picture through . + /// + /// + /// Per https://wiki.xiph.org/VorbisComment#METADATA_BLOCK_PICTURE, pictures may be + /// embedded directly in the Vorbis comment as base64-encoded METADATA_BLOCK_PICTURE + /// fields whose decoded payload is identical to a FLAC PICTURE block body. This is + /// the canonical storage for Ogg Vorbis/Opus and is legal (though discouraged) inside + /// FLAC files written by older or Ogg-oriented tools. + /// + [TestMethod] + public void Tag_Pictures_IncludesMetadataBlockPictureFromVorbisComment () + { + var data = BuildFlacWithEmbeddedPicture (); + + var result = FlacFile.Read (data); + + Assert.IsTrue (result.IsSuccess); + Assert.AreEqual (0, result.File!.Pictures.Count, + "precondition: file has no native PICTURE blocks"); + Assert.IsNotNull (result.File.VorbisComment); + Assert.AreEqual (1, result.File.VorbisComment!.Pictures.Length, + "precondition: picture is in VorbisComment via METADATA_BLOCK_PICTURE"); + Assert.AreEqual (1, result.File.Tag!.Pictures.Length, + "Tag.Pictures must surface METADATA_BLOCK_PICTURE entries (Vorbis Comment spec)"); + } + + /// + /// Setting .Pictures must write to the canonical FLAC + /// PICTURE metadata blocks (per RFC 9639 §8.8), not the legacy METADATA_BLOCK_PICTURE + /// entries in the VorbisComment block. The FLAC spec defines PICTURE blocks as the + /// native picture storage for FLAC; METADATA_BLOCK_PICTURE exists primarily for + /// Ogg Vorbis/Opus containers that lack metadata blocks. + /// + [TestMethod] + public void Tag_SetPictures_WritesToNativePictureBlocks () + { + var data = TestBuilders.Flac.CreateMinimal (); + var file = FlacFile.Read (data).File!; + + var picture = new FlacPicture ("image/jpeg", PictureType.FrontCover, "", + new BinaryData (new byte[] { 0xFF, 0xD8, 0xCA, 0xFE }), 10, 10, 24, 0); + file.Tag!.Pictures = [picture]; + + Assert.AreEqual (1, file.Pictures.Count, + "Tag.Pictures setter must write to native PICTURE blocks (RFC 9639 §8.8)"); + Assert.AreEqual (PictureType.FrontCover, file.Pictures[0].PictureType); + } + + /// + /// After setting .Pictures, any pre-existing + /// METADATA_BLOCK_PICTURE entries in the VorbisComment must be stripped so that + /// Tag.Pictures has a single source of truth (the PICTURE metadata blocks) and + /// the file does not carry duplicated/divergent picture data after a round-trip. + /// + [TestMethod] + public void Tag_SetPictures_StripsLegacyMetadataBlockPictureEntries () + { + var seed = TestBuilders.Flac.CreateWithVorbisComment ("seed", "seed"); + var file = FlacFile.Read (seed).File!; + file.VorbisComment!.Pictures = [new FlacPicture ("image/jpeg", PictureType.BackCover, "", + new BinaryData (new byte[] { 0xDE, 0xAD }), 10, 10, 24, 0)]; + Assert.AreEqual (1, file.VorbisComment.Pictures.Length, "precondition: embedded picture present"); + + file.Tag!.Pictures = [new FlacPicture ("image/jpeg", PictureType.FrontCover, "", + new BinaryData (new byte[] { 0xBE, 0xEF }), 10, 10, 24, 0)]; + + Assert.AreEqual (0, file.VorbisComment.Pictures.Length, + "Legacy METADATA_BLOCK_PICTURE entries must be cleared when Tag.Pictures is set"); + Assert.AreEqual (1, file.Pictures.Count, "New picture lives in native PICTURE block"); + } + + /// + /// Text fields read through reflect the values stored + /// in the VorbisComment, since the Vorbis comment block is the only tag-field + /// storage defined for FLAC (RFC 9639 §8.6). Writes must also round-trip through + /// the VorbisComment. + /// + [TestMethod] + public void Tag_TextFields_ReadAndWriteThroughVorbisComment () + { + var data = TestBuilders.Flac.CreateWithVorbisComment ("Original Title", "Original Artist"); + var file = FlacFile.Read (data).File!; + + Assert.AreEqual ("Original Title", file.Tag!.Title); + Assert.AreEqual ("Original Artist", file.Tag.Artist); + + file.Tag.Title = "New Title"; + file.Tag.Album = "New Album"; + + Assert.AreEqual ("New Title", file.VorbisComment!.Title); + Assert.AreEqual ("New Album", file.VorbisComment.Album); + } + + /// + /// When the same picture appears in both a native PICTURE block and as a + /// METADATA_BLOCK_PICTURE entry in the VorbisComment, the unified Tag view + /// must deduplicate — the caller should see one logical picture, not two. + /// + /// + /// This duplicated-storage state is a real-world pattern: some older taggers + /// write to both locations for compatibility, and modern libraries (TagLib, + /// Mutagen, Jaudiotagger) all dedupe on read so callers see one entry per + /// logical picture. The dedup key is (PictureType, MimeType, PictureData). + /// + [TestMethod] + public void Tag_Pictures_DedupesWhenBothSourcesHoldSamePicture () + { + var data = BuildFlacWithPictureInBothLocations (); + + var result = FlacFile.Read (data); + + Assert.IsTrue (result.IsSuccess); + Assert.AreEqual (1, result.File!.Pictures.Count, "precondition: one native PICTURE block"); + Assert.AreEqual (1, result.File.VorbisComment!.Pictures.Length, + "precondition: one METADATA_BLOCK_PICTURE entry"); + Assert.AreEqual (1, result.File.Tag!.Pictures.Length, + "identical pictures in both storage locations must dedupe to one"); + } + + /// + /// When distinct pictures are present in both storage locations, the unified + /// Tag view returns all of them. Dedup applies only to identical content. + /// + [TestMethod] + public void Tag_Pictures_UnionsDistinctPicturesFromBothSources () + { + var seed = TestBuilders.Flac.CreateWithVorbisComment ("seed", "seed"); + var file = FlacFile.Read (seed).File!; + + file.VorbisComment!.Pictures = [new FlacPicture ("image/jpeg", PictureType.BackCover, "", + new BinaryData (new byte[] { 0xCA, 0xFE }), 10, 10, 24, 0)]; + file.AddPicture (new FlacPicture ("image/jpeg", PictureType.FrontCover, "", + new BinaryData (new byte[] { 0xFE, 0xED }), 10, 10, 24, 0)); + + var rendered = file.Render (seed).ToArray (); + var result = FlacFile.Read (rendered); + + Assert.IsTrue (result.IsSuccess); + Assert.AreEqual (2, result.File!.Tag!.Pictures.Length, + "Distinct pictures from both storage locations must union to 2"); + } + + /// + /// Integration: direct reproduction of GitHub Issue #6. Reading a FLAC file via + /// must yield a + /// whose Tag.Pictures matches the underlying file's pictures. + /// + [TestMethod] + public void MediaFile_ReadFromData_Flac_TagPicturesMatchFilePictures () + { + var data = TestBuilders.Flac.CreateWithPicture (PictureType.FrontCover); + + var result = MediaFile.ReadFromData (data); + + Assert.IsTrue (result.IsSuccess); + Assert.IsNotNull (result.File); + Assert.IsNotNull (result.Tag); + + var flac = (FlacFile)result.File!; + Assert.AreEqual (flac.Pictures.Count, result.Tag!.Pictures.Length, + "MediaFileResult.Tag.Pictures must match File.Pictures (Issue #6)"); + } + + static byte[] BuildFlacWithPictureInBothLocations () + { + var seed = TestBuilders.Flac.CreateWithVorbisComment ("seed", "seed"); + var file = FlacFile.Read (seed).File!; + + var pictureBytes = new byte[] { 0xFF, 0xD8, 0xFF, 0xE0, 0x01, 0x02 }; + file.VorbisComment!.Pictures = [new FlacPicture ("image/jpeg", PictureType.FrontCover, "", + new BinaryData (pictureBytes), 10, 10, 24, 0)]; + file.AddPicture (new FlacPicture ("image/jpeg", PictureType.FrontCover, "", + new BinaryData (pictureBytes), 10, 10, 24, 0)); + + return file.Render (seed).ToArray (); + } + + static byte[] BuildFlacWithEmbeddedPicture () + { + // Start from a valid FLAC with a VorbisComment, attach an in-comment picture, + // then round-trip through Render so the result uses METADATA_BLOCK_PICTURE + // (per VorbisComment spec) rather than a separate PICTURE metadata block. + var seed = TestBuilders.Flac.CreateWithVorbisComment ("seed", "seed"); + var seedRead = FlacFile.Read (seed); + Assert.IsTrue (seedRead.IsSuccess); + + var picture = new FlacPicture ("image/jpeg", PictureType.FrontCover, "", + new BinaryData (new byte[] { 0xFF, 0xD8, 0xFF, 0xE0 }), 10, 10, 24, 0); + seedRead.File!.VorbisComment!.Pictures = [picture]; + + return seedRead.File.Render (seed).ToArray (); + } +} From a33bfa0f9961d4a68ba1f4d582c2967027826ada Mon Sep 17 00:00:00 2001 From: Stephen Shaw Date: Sun, 19 Apr 2026 01:36:29 -0600 Subject: [PATCH 2/3] test: Cover remaining CombinedTag and FlacTag members The primary TDD cycle only exercised fields needed for the Issue #6 fix (Title/Genre on CombinedTag; Title/Album/Pictures on FlacTag). Codecov's patch target is ~93%, and the untouched fields were dragging the patch coverage to 75%. These are characterization tests that lock in the expected behavior of the remaining members. CombinedTagTests (+7): - All string fields follow first-non-empty selection - Track follows first-non-null (uint?) pattern - TagType aggregates flags across members via bitwise OR - Pictures unions+dedups across tags (mirrors FlacTag behavior) - Setters on the base facade are no-ops (format subclasses override) - Render returns empty; Clear is a no-op FlacTagTests (+4): - All text fields (Artist/Year/Comment/Genre/Track) delegate to VorbisComment and auto-create it on first write - TagType advertises Xiph | FlacMetadata - Render and Clear are view-level no-ops - Pictures setter accepts null without throwing --- .../Core/CombinedTagTests.cs | 123 ++++++++++++++++++ tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs | 74 +++++++++++ 2 files changed, 197 insertions(+) diff --git a/tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs b/tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs index 31bc0a3..606e346 100644 --- a/tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs +++ b/tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs @@ -4,6 +4,7 @@ using TagLibSharp2.Core; using TagLibSharp2.Id3; using TagLibSharp2.Id3.Id3v2; +using TagLibSharp2.Xiph; namespace TagLibSharp2.Tests.Core; @@ -68,4 +69,126 @@ public void Title_SkipsNullTagsInPriorityList () Assert.AreEqual ("From Secondary", combined.Title); } + + /// + /// All string fields follow the same first-non-empty selection across the + /// priority list. This test locks in the uniform behavior rather than + /// relying on only Title/Genre from earlier tests. + /// + [TestMethod] + public void AllStringFields_ReturnFirstNonEmptyValueAcrossTags () + { + var primary = new Id3v2Tag { Artist = "Primary Artist" }; + var secondary = new Id3v1Tag { + Album = "Secondary Album", + Year = "2001", + Comment = "Secondary Comment", + Genre = "Rock", // must be a valid ID3v1 genre (https://id3.org/ID3v1) + }; + + var combined = new CombinedTag (primary, secondary); + + Assert.AreEqual ("Primary Artist", combined.Artist, "Artist from primary"); + Assert.AreEqual ("Secondary Album", combined.Album, "Album falls back to secondary"); + Assert.AreEqual ("2001", combined.Year, "Year falls back to secondary"); + Assert.AreEqual ("Secondary Comment", combined.Comment, "Comment falls back to secondary"); + Assert.AreEqual ("Rock", combined.Genre, "Genre falls back to secondary"); + } + + /// + /// Track (uint?) follows the same first-non-null pattern as string fields. + /// + [TestMethod] + public void Track_ReturnsFirstNonNullValueAcrossTags () + { + var primary = new Id3v2Tag (); + var secondary = new Id3v1Tag { Track = 7 }; + + var combined = new CombinedTag (primary, secondary); + + Assert.AreEqual ((uint)7, combined.Track); + } + + /// + /// aggregates the tag type flags of every + /// non-null member. This lets callers check "does this file have Xiph data?" + /// via a single bitwise query. + /// + [TestMethod] + public void TagType_AggregatesFlagsAcrossMembers () + { + var combined = new CombinedTag (new Id3v2Tag (), new Id3v1Tag ()); + + Assert.AreEqual (TagTypes.Id3v2 | TagTypes.Id3v1, combined.TagType); + } + + /// + /// unions pictures across member tags and + /// deduplicates on (PictureType, MimeType, PictureData). The dedup behavior + /// mirrors FlacTag's and is the library convention (see also TagLib C++, + /// Jaudiotagger). + /// + [TestMethod] + public void Pictures_UnionsAcrossTagsWithDedup () + { + var sharedBytes = new byte[] { 0x01, 0x02 }; + var primary = new Id3v2Tag (); + primary.Pictures = [new FlacPicture ("image/jpeg", PictureType.FrontCover, "", + new BinaryData (sharedBytes), 0, 0, 0, 0)]; + var secondary = new Id3v2Tag (); + secondary.Pictures = [ + new FlacPicture ("image/jpeg", PictureType.FrontCover, "", + new BinaryData (sharedBytes), 0, 0, 0, 0), + new FlacPicture ("image/jpeg", PictureType.BackCover, "", + new BinaryData (new byte[] { 0x03 }), 0, 0, 0, 0), + ]; + + var combined = new CombinedTag (primary, secondary); + + Assert.AreEqual (2, combined.Pictures.Length, + "duplicate front cover across tags dedupes; distinct back cover remains"); + } + + /// + /// The base exposes writes as no-ops so that it + /// cannot accidentally mutate underlying tags without a subclass making an + /// explicit decision. Format-specific subclasses override individual + /// setters when write-through is the correct behavior. + /// + [TestMethod] + public void Setters_AreNoOpsOnBaseFacade () + { + var primary = new Id3v2Tag { Title = "Original" }; + var combined = new CombinedTag (primary); + + combined.Title = "Changed"; + combined.Track = 42; + combined.Pictures = []; + + Assert.AreEqual ("Original", primary.Title, "Base CombinedTag.Title setter does not mutate members"); + Assert.IsNull (primary.Track, "Base CombinedTag.Track setter does not mutate members"); + } + + [TestMethod] + public void Render_ReturnsEmptyBinaryData () + { + var combined = new CombinedTag (new Id3v2Tag { Title = "x" }); + + var rendered = combined.Render (); + + Assert.IsTrue (rendered.IsEmpty, + "CombinedTag is a view; it does not own bytes and Render returns empty"); + } + + [TestMethod] + public void Clear_IsNoOp () + { + var primary = new Id3v2Tag { Title = "Keep Me" }; + var combined = new CombinedTag (primary); + + combined.Clear (); + + Assert.AreEqual ("Keep Me", primary.Title, + "Base CombinedTag.Clear does not mutate members"); + } } diff --git a/tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs b/tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs index c2c62f8..9807f4b 100644 --- a/tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs +++ b/tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs @@ -214,6 +214,80 @@ public void MediaFile_ReadFromData_Flac_TagPicturesMatchFilePictures () "MediaFileResult.Tag.Pictures must match File.Pictures (Issue #6)"); } + /// + /// All text fields read through reflect the + /// VorbisComment's values, and writes create a VorbisComment if none exists. + /// Extends to + /// every abstract string/uint field defined on . + /// + [TestMethod] + public void Tag_AllTextFields_DelegateToVorbisComment () + { + var file = FlacFile.Read (TestBuilders.Flac.CreateMinimal ()).File!; + Assert.IsNull (file.VorbisComment, "precondition: no VorbisComment yet"); + + // Writes auto-create the VorbisComment, then all subsequent reads match. + file.Tag!.Artist = "A"; + file.Tag.Year = "2026"; + file.Tag.Comment = "C"; + file.Tag.Genre = "Rock"; + file.Tag.Track = 3; + + Assert.IsNotNull (file.VorbisComment, "VorbisComment created on first write"); + Assert.AreEqual ("A", file.Tag.Artist); + Assert.AreEqual ("2026", file.Tag.Year); + Assert.AreEqual ("C", file.Tag.Comment); + Assert.AreEqual ("Rock", file.Tag.Genre); + Assert.AreEqual ((uint)3, file.Tag.Track); + } + + /// + /// advertises both Xiph (the comment block) + /// and FlacMetadata (the native PICTURE/CueSheet blocks it also fronts). + /// + [TestMethod] + public void Tag_TagType_AdvertisesXiphAndFlacMetadata () + { + var file = FlacFile.Read (TestBuilders.Flac.CreateMinimal ()).File!; + + Assert.AreEqual (TagTypes.Xiph | TagTypes.FlacMetadata, file.Tag!.TagType); + } + + /// + /// is a view over the file — it is not itself a + /// serializable block — so Render returns empty and Clear + /// is a no-op. Callers that need to persist changes do so through + /// . + /// + [TestMethod] + public void Tag_RenderAndClear_AreViewLevelNoOps () + { + var data = TestBuilders.Flac.CreateWithVorbisComment ("Keep Me", "Keep Artist"); + var file = FlacFile.Read (data).File!; + + Assert.IsTrue (file.Tag!.Render ().IsEmpty, "Render on the view returns empty"); + + file.Tag.Clear (); + + Assert.AreEqual ("Keep Me", file.VorbisComment!.Title, + "Clear on the view does not wipe the underlying VorbisComment"); + } + + /// + /// Setting Tag.Pictures to null clears pictures rather than throwing. + /// + [TestMethod] + public void Tag_SetPictures_NullValueClearsWithoutThrowing () + { + var data = TestBuilders.Flac.CreateWithPicture (PictureType.FrontCover); + var file = FlacFile.Read (data).File!; + Assert.AreEqual (1, file.Pictures.Count, "precondition: one picture"); + + file.Tag!.Pictures = null!; + + Assert.AreEqual (0, file.Pictures.Count); + } + static byte[] BuildFlacWithPictureInBothLocations () { var seed = TestBuilders.Flac.CreateWithVorbisComment ("seed", "seed"); From 18bbe22b4c684f27918a457cb5d5ec1e59e0c22e Mon Sep 17 00:00:00 2001 From: Stephen Shaw Date: Sun, 19 Apr 2026 10:06:07 -0600 Subject: [PATCH 3/3] review: Address Copilot feedback on unified Tag views Five review comments on #30 identified that the CombinedTag and FlacTag facades had semantics inconsistent with the Tag abstraction and with the rest of the IMediaFile implementations. All five are addressed: 1. CombinedTag.Render was a silent no-op returning empty bytes. A CombinedTag is a view, not a serializable block -- rendering it should surface misuse. Now throws NotSupportedException with a message pointing callers to the owning file or a specific underlying tag. 2. CombinedTag.Clear was a silent no-op. "Clear the tag" must actually zero out the metadata, not succeed while leaving the values intact. Now clears every non-null underlying tag. 3. CombinedTag setters were silent no-ops. Code in this repo and documented examples assume `file.Tag.Title = "x"` mutates the file, so silently dropping writes broke a load-bearing contract. Setters now write through to every non-null underlying tag, which also keeps ID3v2 + ID3v1 consistent on save. 4. FlacFile.Tag and Mp3File.Tag always returned a non-null facade even on files with no metadata. Other IMediaFile implementations (Dsf, Dff, Musepack, WavPack, MonkeysAudio, Ogg*, Asf, Mp4, Aiff) return null when the tag block is absent. Both now match that convention: null when the file has neither an underlying tag nor pictures. 5. FlacTag.Render/Clear had the same issue as #1-2. Render now throws NotSupportedException (a FlacTag spans multiple metadata blocks -- render the FlacFile); Clear now wipes the VorbisComment fields (including embedded METADATA_BLOCK_PICTURE entries via VorbisComment.Clear) and removes native PICTURE blocks. Test updates: * CombinedTagTests: replaced the three no-op characterization tests with their mirror-image positive tests (setters write through, Render throws, Clear clears every member). * FlacTagTests: replaced the combined "Render+Clear are no-ops" test with separate positive tests for Render throwing and Clear clearing. Added Tag_AbsentMetadata_ReturnsNull to lock in the nullability contract. Updated tests that started from a CreateMinimal() FLAC (Tag == null now) to seed with a VorbisComment first. * Mp3FileTests: added Tag_NoTagsPresent_ReturnsNull for the nullability contract and Tag_Setter_WritesThroughToBothIdTags to verify the write-through behavior keeps v2 and v1 in sync. All 3807 functional tests pass on net8.0 and net10.0. --- src/TagLibSharp2/Core/CombinedTag.cs | 53 +++++++++---- src/TagLibSharp2/Mpeg/Mp3File.cs | 10 ++- src/TagLibSharp2/Xiph/FlacFile.cs | 17 ++++- src/TagLibSharp2/Xiph/FlacTag.cs | 22 +++++- .../Core/CombinedTagTests.cs | 53 ++++++++----- tests/TagLibSharp2.Tests/Mpeg/Mp3FileTests.cs | 45 +++++++++++ tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs | 76 ++++++++++++++----- 7 files changed, 218 insertions(+), 58 deletions(-) diff --git a/src/TagLibSharp2/Core/CombinedTag.cs b/src/TagLibSharp2/Core/CombinedTag.cs index e21a692..ce12461 100644 --- a/src/TagLibSharp2/Core/CombinedTag.cs +++ b/src/TagLibSharp2/Core/CombinedTag.cs @@ -14,9 +14,16 @@ namespace TagLibSharp2.Core; /// PictureData). /// /// -/// Writes are no-ops on this base facade; callers wanting mutation should operate -/// on the underlying tags directly. Format-specific subclasses (e.g. the FLAC tag -/// view) override individual members to forward writes to the appropriate storage. +/// Setters write through to every non-null underlying tag so that content +/// stays consistent across formats. This matches user expectations on files that +/// carry redundant metadata (e.g. an MP3 with both ID3v2 and ID3v1) and prevents +/// post-save drift where one tag has the new value and the other has the old one. +/// Format-specific limits still apply per tag (ID3v1 truncates to 30 bytes, etc.). +/// +/// +/// throws because a is a view, not +/// a serializable block: render the owning file or a specific underlying tag instead. +/// clears every non-null underlying tag. /// /// /// The motivating case is an MP3 file that carries both an ID3v2 tag @@ -62,6 +69,14 @@ public CombinedTag (params Tag?[] tags) uint? FirstNonNullUInt (Func selector) => FirstNonDefault (selector, v => !v.HasValue); + void WriteToAll (Action setter) + { + foreach (var tag in _tags) { + if (tag is not null) + setter (tag); + } + } + /// public override TagTypes TagType { get { @@ -77,43 +92,43 @@ public override TagTypes TagType { /// public override string? Title { get => FirstNonEmptyString (t => t.Title); - set { } + set => WriteToAll (t => t.Title = value); } /// public override string? Artist { get => FirstNonEmptyString (t => t.Artist); - set { } + set => WriteToAll (t => t.Artist = value); } /// public override string? Album { get => FirstNonEmptyString (t => t.Album); - set { } + set => WriteToAll (t => t.Album = value); } /// public override string? Year { get => FirstNonEmptyString (t => t.Year); - set { } + set => WriteToAll (t => t.Year = value); } /// public override string? Comment { get => FirstNonEmptyString (t => t.Comment); - set { } + set => WriteToAll (t => t.Comment = value); } /// public override string? Genre { get => FirstNonEmptyString (t => t.Genre); - set { } + set => WriteToAll (t => t.Genre = value); } /// public override uint? Track { get => FirstNonNullUInt (t => t.Track); - set { } + set => WriteToAll (t => t.Track = value); } /// @@ -132,13 +147,25 @@ public override IPicture[] Pictures { } return [.. merged]; } - set { } + set => WriteToAll (t => t.Pictures = value ?? []); } #pragma warning restore CA1819 /// - public override BinaryData Render () => BinaryData.Empty; + /// + /// is a view over multiple tags and does not produce its + /// own serialized representation. Render the owning file or a specific underlying + /// tag instead. + /// + public override BinaryData Render () => + throw new NotSupportedException ( + "CombinedTag is a view over multiple tags; it has no standalone binary representation. " + + "Render the owning file (e.g. Mp3File.Render) or a specific underlying tag instead."); /// - public override void Clear () { } + /// + /// Clears every non-null underlying tag, leaving each instance in place but empty. + /// + public override void Clear () => + WriteToAll (t => t.Clear ()); } diff --git a/src/TagLibSharp2/Mpeg/Mp3File.cs b/src/TagLibSharp2/Mpeg/Mp3File.cs index 5ef70fc..acde173 100644 --- a/src/TagLibSharp2/Mpeg/Mp3File.cs +++ b/src/TagLibSharp2/Mpeg/Mp3File.cs @@ -88,7 +88,15 @@ public sealed class Mp3File : IMediaFile public bool HasId3v2Tag => Id3v2Tag is not null; /// - public Tag? Tag => new CombinedTag (Id3v2Tag, Id3v1Tag); + /// + /// + /// Returns a composing the ID3v2 and ID3v1 tags when at + /// least one is present. ID3v2 takes priority; ID3v1 supplies fallback values for + /// fields not set in v2 (and receives mirrored writes so both tags stay in sync + /// on save). Returns null when neither tag is present. + /// + public Tag? Tag => + (Id3v2Tag is null && Id3v1Tag is null) ? null : new CombinedTag (Id3v2Tag, Id3v1Tag); /// IMediaProperties? IMediaFile.AudioProperties => Properties; diff --git a/src/TagLibSharp2/Xiph/FlacFile.cs b/src/TagLibSharp2/Xiph/FlacFile.cs index f13bbb1..5bd5ca2 100644 --- a/src/TagLibSharp2/Xiph/FlacFile.cs +++ b/src/TagLibSharp2/Xiph/FlacFile.cs @@ -274,7 +274,22 @@ public string? Comment { FlacTag? _tag; /// - public Tag? Tag => _tag ??= new FlacTag (this); + /// + /// Returns null when the file has neither a VorbisComment nor any PICTURE blocks, + /// matching the "tag is absent" semantics used by other + /// implementations. Once instantiated, the is cached so a + /// later setter call (e.g. file.Tag.Title = "..." after creating a + /// VorbisComment) sees the same view. + /// + public Tag? Tag { + get { + if (_tag is not null) + return _tag; + if (VorbisComment is null && _pictures.Count == 0) + return null; + return _tag = new FlacTag (this); + } + } /// IMediaProperties? IMediaFile.AudioProperties => Properties; diff --git a/src/TagLibSharp2/Xiph/FlacTag.cs b/src/TagLibSharp2/Xiph/FlacTag.cs index b28bff9..7835835 100644 --- a/src/TagLibSharp2/Xiph/FlacTag.cs +++ b/src/TagLibSharp2/Xiph/FlacTag.cs @@ -112,8 +112,26 @@ public override IPicture[] Pictures { #pragma warning restore CA1819 /// - public override BinaryData Render () => BinaryData.Empty; + /// + /// A FLAC file's tag state lives in multiple metadata blocks (VORBIS_COMMENT plus + /// zero or more PICTURE blocks) and is rendered as part of the full file layout. + /// It has no standalone binary representation. Render the owning + /// instead. + /// + public override BinaryData Render () => + throw new NotSupportedException ( + "FlacTag is a view over multiple FLAC metadata blocks and has no standalone binary " + + "representation. Render the owning FlacFile instead (FlacFile.Render)."); /// - public override void Clear () { } + /// + /// Clears every metadata source this view surfaces: the VorbisComment fields + /// (including any METADATA_BLOCK_PICTURE entries) and the native PICTURE blocks + /// held on the . + /// + public override void Clear () + { + _file.VorbisComment?.Clear (); + _file.RemoveAllPictures (); + } } diff --git a/tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs b/tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs index 606e346..1723aa4 100644 --- a/tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs +++ b/tests/TagLibSharp2.Tests/Core/CombinedTagTests.cs @@ -150,45 +150,58 @@ public void Pictures_UnionsAcrossTagsWithDedup () } /// - /// The base exposes writes as no-ops so that it - /// cannot accidentally mutate underlying tags without a subclass making an - /// explicit decision. Format-specific subclasses override individual - /// setters when write-through is the correct behavior. + /// Setters write through to every non-null underlying tag so content stays + /// consistent across formats. For MP3, that means a single + /// file.Tag.Title = "x" updates both ID3v2 and ID3v1, matching the + /// round-trip expectation that saving a file emits matching values in both. + /// Per-format length/encoding limits (e.g. ID3v1's 30-byte cap, + /// https://id3.org/ID3v1) still apply when each member stores the value. /// [TestMethod] - public void Setters_AreNoOpsOnBaseFacade () + public void Setters_WriteThroughToEveryMember () { - var primary = new Id3v2Tag { Title = "Original" }; - var combined = new CombinedTag (primary); + var primary = new Id3v2Tag { Title = "Original 2", Track = 1 }; + var secondary = new Id3v1Tag { Title = "Original 1", Track = 2 }; + var combined = new CombinedTag (primary, secondary); combined.Title = "Changed"; combined.Track = 42; - combined.Pictures = []; - Assert.AreEqual ("Original", primary.Title, "Base CombinedTag.Title setter does not mutate members"); - Assert.IsNull (primary.Track, "Base CombinedTag.Track setter does not mutate members"); + Assert.AreEqual ("Changed", primary.Title); + Assert.AreEqual ("Changed", secondary.Title); + Assert.AreEqual ((uint)42, primary.Track); + Assert.AreEqual ((uint)42, secondary.Track); } + /// + /// A is a view — it has no standalone binary + /// representation. Callers should render the owning file or a specific + /// underlying tag; calling on the facade throws + /// to surface the misuse instead of silently returning empty bytes. + /// [TestMethod] - public void Render_ReturnsEmptyBinaryData () + public void Render_ThrowsNotSupported () { var combined = new CombinedTag (new Id3v2Tag { Title = "x" }); - var rendered = combined.Render (); - - Assert.IsTrue (rendered.IsEmpty, - "CombinedTag is a view; it does not own bytes and Render returns empty"); + Assert.ThrowsExactly (() => combined.Render ()); } + /// + /// on the facade clears every non-null underlying + /// tag. Callers expect "clear the tag" to actually zero out the metadata, + /// not silently succeed with the old values intact. + /// [TestMethod] - public void Clear_IsNoOp () + public void Clear_ClearsEveryUnderlyingMember () { - var primary = new Id3v2Tag { Title = "Keep Me" }; - var combined = new CombinedTag (primary); + var primary = new Id3v2Tag { Title = "Wipe Me" }; + var secondary = new Id3v1Tag { Title = "Also Wipe Me" }; + var combined = new CombinedTag (primary, secondary); combined.Clear (); - Assert.AreEqual ("Keep Me", primary.Title, - "Base CombinedTag.Clear does not mutate members"); + Assert.IsTrue (string.IsNullOrEmpty (primary.Title)); + Assert.IsTrue (string.IsNullOrEmpty (secondary.Title)); } } diff --git a/tests/TagLibSharp2.Tests/Mpeg/Mp3FileTests.cs b/tests/TagLibSharp2.Tests/Mpeg/Mp3FileTests.cs index 28e02db..62af183 100644 --- a/tests/TagLibSharp2.Tests/Mpeg/Mp3FileTests.cs +++ b/tests/TagLibSharp2.Tests/Mpeg/Mp3FileTests.cs @@ -124,6 +124,51 @@ public void Tag_BothIdTags_PrefersId3v2ButFallsBackToId3v1 () "Genre should fall back to ID3v1 when ID3v2 has no Genre"); } + /// + /// An MP3 file with no ID3v2 and no ID3v1 must expose Tag == null, + /// matching the "tag is absent" convention used by other + /// implementations in this repo. A Mp3File that + /// always materialized a facade would lie about the absence of metadata. + /// + [TestMethod] + public void Tag_NoTagsPresent_ReturnsNull () + { + var audioOnly = new byte[256]; + + var result = Mp3File.Read (audioOnly); + + Assert.IsTrue (result.IsSuccess); + Assert.IsNull (result.File!.Id3v2Tag); + Assert.IsNull (result.File.Id3v1Tag); + Assert.IsNull (result.File.Tag); + } + + /// + /// Writing through the combined Tag view updates both ID3v2 and ID3v1 so the + /// file saves with consistent metadata in both tags. ID3v1's format-specific + /// limits still apply (30-byte cap per https://id3.org/ID3v1), but the + /// values round-trip as far as each format allows. + /// + [TestMethod] + public void Tag_Setter_WritesThroughToBothIdTags () + { + var id3v2 = new Id3v2Tag { Title = "Before" }; + var id3v1 = new Id3v1Tag { Title = "Before" }; + var v2Data = id3v2.Render (); + var v1Data = id3v1.Render (); + + var audioData = new byte[256]; + var fullData = new byte[v2Data.Length + audioData.Length + v1Data.Length]; + v2Data.Span.CopyTo (fullData); + v1Data.Span.CopyTo (fullData.AsSpan (v2Data.Length + audioData.Length)); + + var file = Mp3File.Read (fullData).File!; + file.Tag!.Title = "After"; + + Assert.AreEqual ("After", file.Id3v2Tag!.Title, "ID3v2 updated"); + Assert.AreEqual ("After", file.Id3v1Tag!.Title, "ID3v1 updated"); + } + [TestMethod] public void Read_BothTags_ParsesBoth () { diff --git a/tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs b/tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs index 9807f4b..f97ed90 100644 --- a/tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs +++ b/tests/TagLibSharp2.Tests/Xiph/FlacTagTests.cs @@ -87,7 +87,9 @@ public void Tag_Pictures_IncludesMetadataBlockPictureFromVorbisComment () [TestMethod] public void Tag_SetPictures_WritesToNativePictureBlocks () { - var data = TestBuilders.Flac.CreateMinimal (); + // Seed with a VorbisComment so Tag is non-null (the reader maps a + // file with no metadata to Tag == null -- see Tag_AbsentMetadata_ReturnsNull). + var data = TestBuilders.Flac.CreateWithVorbisComment ("seed", "seed"); var file = FlacFile.Read (data).File!; var picture = new FlacPicture ("image/jpeg", PictureType.FrontCover, "", @@ -223,22 +225,24 @@ public void MediaFile_ReadFromData_Flac_TagPicturesMatchFilePictures () [TestMethod] public void Tag_AllTextFields_DelegateToVorbisComment () { - var file = FlacFile.Read (TestBuilders.Flac.CreateMinimal ()).File!; - Assert.IsNull (file.VorbisComment, "precondition: no VorbisComment yet"); + // Start from a file with a VorbisComment so Tag is non-null; + // the facade still auto-creates the comment on first write, but + // accessing Tag on a truly empty FLAC returns null (see + // Tag_AbsentMetadata_ReturnsNull). + var data = TestBuilders.Flac.CreateWithVorbisComment ("seed", "seed"); + var file = FlacFile.Read (data).File!; - // Writes auto-create the VorbisComment, then all subsequent reads match. file.Tag!.Artist = "A"; file.Tag.Year = "2026"; file.Tag.Comment = "C"; file.Tag.Genre = "Rock"; file.Tag.Track = 3; - Assert.IsNotNull (file.VorbisComment, "VorbisComment created on first write"); - Assert.AreEqual ("A", file.Tag.Artist); - Assert.AreEqual ("2026", file.Tag.Year); - Assert.AreEqual ("C", file.Tag.Comment); - Assert.AreEqual ("Rock", file.Tag.Genre); - Assert.AreEqual ((uint)3, file.Tag.Track); + Assert.AreEqual ("A", file.VorbisComment!.Artist); + Assert.AreEqual ("2026", file.VorbisComment.Year); + Assert.AreEqual ("C", file.VorbisComment.Comment); + Assert.AreEqual ("Rock", file.VorbisComment.Genre); + Assert.AreEqual ((uint)3, file.VorbisComment.Track); } /// @@ -248,29 +252,59 @@ public void Tag_AllTextFields_DelegateToVorbisComment () [TestMethod] public void Tag_TagType_AdvertisesXiphAndFlacMetadata () { - var file = FlacFile.Read (TestBuilders.Flac.CreateMinimal ()).File!; + var data = TestBuilders.Flac.CreateWithVorbisComment ("seed", "seed"); + var file = FlacFile.Read (data).File!; Assert.AreEqual (TagTypes.Xiph | TagTypes.FlacMetadata, file.Tag!.TagType); } /// - /// is a view over the file — it is not itself a - /// serializable block — so Render returns empty and Clear - /// is a no-op. Callers that need to persist changes do so through - /// . + /// A FLAC file with no VorbisComment and no PICTURE blocks exposes + /// Tag == null, matching the "tag absent" convention used across + /// other implementations in this repo. /// [TestMethod] - public void Tag_RenderAndClear_AreViewLevelNoOps () + public void Tag_AbsentMetadata_ReturnsNull () { - var data = TestBuilders.Flac.CreateWithVorbisComment ("Keep Me", "Keep Artist"); + var file = FlacFile.Read (TestBuilders.Flac.CreateMinimal ()).File!; + + Assert.IsNull (file.VorbisComment); + Assert.AreEqual (0, file.Pictures.Count); + Assert.IsNull (file.Tag); + } + + /// + /// throws because the tag's state is spread + /// across multiple FLAC metadata blocks and is rendered as part of the full + /// file layout. Callers should render via . + /// + [TestMethod] + public void Tag_Render_ThrowsNotSupported () + { + var data = TestBuilders.Flac.CreateWithVorbisComment ("x", "y"); var file = FlacFile.Read (data).File!; - Assert.IsTrue (file.Tag!.Render ().IsEmpty, "Render on the view returns empty"); + Assert.ThrowsExactly (() => file.Tag!.Render ()); + } + + /// + /// clears every metadata source this view surfaces: + /// the VorbisComment fields (including embedded METADATA_BLOCK_PICTURE entries) + /// and the native PICTURE blocks held on the file. + /// + [TestMethod] + public void Tag_Clear_ClearsCommentAndPictureBlocks () + { + var seed = TestBuilders.Flac.CreateWithVorbisComment ("Wipe Me", "Wipe Artist"); + var file = FlacFile.Read (seed).File!; + file.AddPicture (new FlacPicture ("image/jpeg", PictureType.FrontCover, "", + new BinaryData (new byte[] { 0x01 }), 10, 10, 24, 0)); - file.Tag.Clear (); + file.Tag!.Clear (); - Assert.AreEqual ("Keep Me", file.VorbisComment!.Title, - "Clear on the view does not wipe the underlying VorbisComment"); + Assert.IsTrue (string.IsNullOrEmpty (file.VorbisComment!.Title), + "VorbisComment text fields cleared"); + Assert.AreEqual (0, file.Pictures.Count, "Native PICTURE blocks removed"); } ///