Merge branch 'main' into feature/custom-ffprob-arguments

This commit is contained in:
Malte Rosenbjerg 2023-10-05 09:21:21 +02:00 committed by GitHub
commit 54e5d0860c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 18 deletions

View file

@ -12,8 +12,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="SkiaSharp" Version="2.88.3" /> <PackageReference Include="SkiaSharp" Version="2.88.6" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.3" /> <PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.6" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -8,19 +8,19 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.2.0"> <PackageReference Include="coverlet.collector" Version="6.0.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="FluentAssertions" Version="6.10.0" /> <PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1"> <PackageReference Include="GitHubActionsTestLogger" Version="2.3.3">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" /> <PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" /> <PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="SkiaSharp" Version="2.88.3" /> <PackageReference Include="SkiaSharp" Version="2.88.6" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -46,7 +46,7 @@ public async Task PacketAnalysis_Async()
var packets = packetAnalysis.Packets; var packets = packetAnalysis.Packets;
Assert.AreEqual(96, packets.Count); Assert.AreEqual(96, packets.Count);
Assert.IsTrue(packets.All(f => f.CodecType == "video")); 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); Assert.AreEqual(1362, packets.Last().Size);
} }
@ -57,7 +57,7 @@ public void PacketAnalysis_Sync()
Assert.AreEqual(96, packets.Count); Assert.AreEqual(96, packets.Count);
Assert.IsTrue(packets.All(f => f.CodecType == "video")); 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); Assert.AreEqual(1362, packets.Last().Size);
} }
@ -70,7 +70,7 @@ public void PacketAnalysisAudioVideo_Sync()
var actual = packets.Select(f => f.CodecType).Distinct().ToList(); var actual = packets.Select(f => f.CodecType).Distinct().ToList();
var expected = new List<string> { "audio", "video" }; var expected = new List<string> { "audio", "video" };
CollectionAssert.AreEquivalent(expected, actual); 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(75, packets.Count(t => t.CodecType == "video"));
Assert.AreEqual(141, packets.Count(t => t.CodecType == "audio")); Assert.AreEqual(141, packets.Count(t => t.CodecType == "audio"));
} }

View file

@ -18,7 +18,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Instances" Version="3.0.0" /> <PackageReference Include="Instances" Version="3.0.0" />
<PackageReference Include="System.Text.Json" Version="7.0.2" /> <PackageReference Include="System.Text.Json" Version="7.0.3" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -87,7 +87,7 @@ public class FFProbeStream : ITagsContainer, IDispositionContainer
public Dictionary<string, int> Disposition { get; set; } = null!; public Dictionary<string, int> Disposition { get; set; } = null!;
[JsonPropertyName("tags")] [JsonPropertyName("tags")]
public Dictionary<string, string> Tags { get; set; } = null!; public Dictionary<string, string>? Tags { get; set; }
[JsonPropertyName("side_data_list")] [JsonPropertyName("side_data_list")]
public List<Dictionary<string, JsonValue>> SideData { get; set; } = null!; public List<Dictionary<string, JsonValue>> SideData { get; set; } = null!;
@ -126,7 +126,7 @@ public class Format : ITagsContainer
public int ProbeScore { get; set; } public int ProbeScore { get; set; }
[JsonPropertyName("tags")] [JsonPropertyName("tags")]
public Dictionary<string, string> Tags { get; set; } = null!; public Dictionary<string, string>? Tags { get; set; }
} }
public interface IDispositionContainer public interface IDispositionContainer
@ -136,7 +136,7 @@ public interface IDispositionContainer
public interface ITagsContainer public interface ITagsContainer
{ {
Dictionary<string, string> Tags { get; set; } Dictionary<string, string>? Tags { get; set; }
} }
public static class TagExtensions public static class TagExtensions

View file

@ -1,6 +1,6 @@
namespace FFMpegCore namespace FFMpegCore
{ {
public class MediaFormat public class MediaFormat : ITagsContainer
{ {
public TimeSpan Duration { get; set; } public TimeSpan Duration { get; set; }
public TimeSpan StartTime { get; set; } public TimeSpan StartTime { get; set; }

View file

@ -2,7 +2,7 @@
namespace FFMpegCore namespace FFMpegCore
{ {
public abstract class MediaStream public abstract class MediaStream : ITagsContainer
{ {
public int Index { get; set; } public int Index { get; set; }
public string CodecName { get; set; } = null!; public string CodecName { get; set; } = null!;