Fix Palette typos

This commit is contained in:
Rafael Carvalho 2023-03-07 16:55:11 +13:00
parent 62a9ed6281
commit 7569669f52
4 changed files with 8 additions and 8 deletions

View file

@ -540,7 +540,7 @@ public void Builder_BuildString_PadFilter_Alt()
}
[TestMethod]
public void Builder_BuildString_GifPallet()
public void Builder_BuildString_GifPalette()
{
var streamIndex = 0;
var size = new Size(640, 480);
@ -548,7 +548,7 @@ public void Builder_BuildString_GifPallet()
var str = FFMpegArguments
.FromFileInput("input.mp4")
.OutputToFile("output.gif", false, opt => opt
.WithGifPalettArgument(streamIndex, size))
.WithGifPaletteArgument(streamIndex, size))
.Arguments;
Assert.AreEqual($"""
@ -557,14 +557,14 @@ public void Builder_BuildString_GifPallet()
}
[TestMethod]
public void Builder_BuildString_GifPallet_NullSize_FpsSupplied()
public void Builder_BuildString_GifPalette_NullSize_FpsSupplied()
{
var streamIndex = 1;
var str = FFMpegArguments
.FromFileInput("input.mp4")
.OutputToFile("output.gif", false, opt => opt
.WithGifPalettArgument(streamIndex, null, 10))
.WithGifPaletteArgument(streamIndex, null, 10))
.Arguments;
Assert.AreEqual($"""

View file

@ -2,7 +2,7 @@
namespace FFMpegCore.Arguments
{
public class GifPalettArgument : IArgument
public class GifPaletteArgument : IArgument
{
private readonly int _streamIndex;
@ -10,7 +10,7 @@ public class GifPalettArgument : IArgument
private readonly Size? _size;
public GifPalettArgument(int streamIndex, int fps, Size? size)
public GifPaletteArgument(int streamIndex, int fps, Size? size)
{
_streamIndex = streamIndex;
_fps = fps;

View file

@ -76,7 +76,7 @@ public FFMpegArgumentOptions DeselectStreams(IEnumerable<int> streamIndices, int
public FFMpegArgumentOptions WithAudibleEncryptionKeys(string key, string iv) => WithArgument(new AudibleEncryptionKeyArgument(key, iv));
public FFMpegArgumentOptions WithAudibleActivationBytes(string activationBytes) => WithArgument(new AudibleEncryptionKeyArgument(activationBytes));
public FFMpegArgumentOptions WithTagVersion(int id3v2Version = 3) => WithArgument(new ID3V2VersionArgument(id3v2Version));
public FFMpegArgumentOptions WithGifPalettArgument(int streamIndex, Size? size, int fps = 12) => WithArgument(new GifPalettArgument(streamIndex, fps, size));
public FFMpegArgumentOptions WithGifPaletteArgument(int streamIndex, Size? size, int fps = 12) => WithArgument(new GifPaletteArgument(streamIndex, fps, size));
public FFMpegArgumentOptions WithArgument(IArgument argument)
{

View file

@ -53,7 +53,7 @@ public static (FFMpegArguments, Action<FFMpegArgumentOptions> outputOptions) Bui
.Seek(captureTime)
.WithDuration(duration)),
options => options
.WithGifPalettArgument((int)streamIndex, size, fps));
.WithGifPaletteArgument((int)streamIndex, size, fps));
}
private static Size? PrepareSnapshotSize(IMediaAnalysis source, Size? wantedSize)