diff --git a/FFMpegCore.Extensions.SkiaSharp/FFMpegCore.Extensions.SkiaSharp.csproj b/FFMpegCore.Extensions.SkiaSharp/FFMpegCore.Extensions.SkiaSharp.csproj index d15a7bd..87710cc 100644 --- a/FFMpegCore.Extensions.SkiaSharp/FFMpegCore.Extensions.SkiaSharp.csproj +++ b/FFMpegCore.Extensions.SkiaSharp/FFMpegCore.Extensions.SkiaSharp.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/FFMpegCore.Test/FFMpegCore.Test.csproj b/FFMpegCore.Test/FFMpegCore.Test.csproj index 220f05c..addaaf8 100644 --- a/FFMpegCore.Test/FFMpegCore.Test.csproj +++ b/FFMpegCore.Test/FFMpegCore.Test.csproj @@ -8,19 +8,19 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + diff --git a/FFMpegCore.Test/FFProbeTests.cs b/FFMpegCore.Test/FFProbeTests.cs index 9da819a..ff7aafc 100644 --- a/FFMpegCore.Test/FFProbeTests.cs +++ b/FFMpegCore.Test/FFProbeTests.cs @@ -46,7 +46,7 @@ public async Task PacketAnalysis_Async() var packets = packetAnalysis.Packets; Assert.AreEqual(96, packets.Count); Assert.IsTrue(packets.All(f => f.CodecType == "video")); - Assert.AreEqual("K_", packets[0].Flags); + Assert.IsTrue(packets[0].Flags.StartsWith("K_")); Assert.AreEqual(1362, packets.Last().Size); } @@ -57,7 +57,7 @@ public void PacketAnalysis_Sync() Assert.AreEqual(96, packets.Count); Assert.IsTrue(packets.All(f => f.CodecType == "video")); - Assert.AreEqual("K_", packets[0].Flags); + Assert.IsTrue(packets[0].Flags.StartsWith("K_")); Assert.AreEqual(1362, packets.Last().Size); } @@ -70,7 +70,7 @@ public void PacketAnalysisAudioVideo_Sync() var actual = packets.Select(f => f.CodecType).Distinct().ToList(); var expected = new List { "audio", "video" }; CollectionAssert.AreEquivalent(expected, actual); - Assert.IsTrue(packets.Where(t => t.CodecType == "audio").All(f => f.Flags == "K_")); + Assert.IsTrue(packets.Where(t => t.CodecType == "audio").All(f => f.Flags.StartsWith("K_"))); Assert.AreEqual(75, packets.Count(t => t.CodecType == "video")); Assert.AreEqual(141, packets.Count(t => t.CodecType == "audio")); } diff --git a/FFMpegCore/FFMpegCore.csproj b/FFMpegCore/FFMpegCore.csproj index 2af7f16..ed3b71c 100644 --- a/FFMpegCore/FFMpegCore.csproj +++ b/FFMpegCore/FFMpegCore.csproj @@ -18,7 +18,7 @@ - + diff --git a/FFMpegCore/FFProbe/FFProbeAnalysis.cs b/FFMpegCore/FFProbe/FFProbeAnalysis.cs index b053d98..0b32da7 100644 --- a/FFMpegCore/FFProbe/FFProbeAnalysis.cs +++ b/FFMpegCore/FFProbe/FFProbeAnalysis.cs @@ -87,7 +87,7 @@ public class FFProbeStream : ITagsContainer, IDispositionContainer public Dictionary Disposition { get; set; } = null!; [JsonPropertyName("tags")] - public Dictionary Tags { get; set; } = null!; + public Dictionary? Tags { get; set; } [JsonPropertyName("side_data_list")] public List> SideData { get; set; } = null!; @@ -126,7 +126,7 @@ public class Format : ITagsContainer public int ProbeScore { get; set; } [JsonPropertyName("tags")] - public Dictionary Tags { get; set; } = null!; + public Dictionary? Tags { get; set; } } public interface IDispositionContainer @@ -136,7 +136,7 @@ public interface IDispositionContainer public interface ITagsContainer { - Dictionary Tags { get; set; } + Dictionary? Tags { get; set; } } public static class TagExtensions diff --git a/FFMpegCore/FFProbe/MediaFormat.cs b/FFMpegCore/FFProbe/MediaFormat.cs index c588165..7269a95 100644 --- a/FFMpegCore/FFProbe/MediaFormat.cs +++ b/FFMpegCore/FFProbe/MediaFormat.cs @@ -1,6 +1,6 @@ namespace FFMpegCore { - public class MediaFormat + public class MediaFormat : ITagsContainer { public TimeSpan Duration { get; set; } public TimeSpan StartTime { get; set; } diff --git a/FFMpegCore/FFProbe/MediaStream.cs b/FFMpegCore/FFProbe/MediaStream.cs index 008390e..48d1f38 100644 --- a/FFMpegCore/FFProbe/MediaStream.cs +++ b/FFMpegCore/FFProbe/MediaStream.cs @@ -2,7 +2,7 @@ namespace FFMpegCore { - public abstract class MediaStream + public abstract class MediaStream : ITagsContainer { public int Index { get; set; } public string CodecName { get; set; } = null!;