mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Add missing usings on tests
This commit is contained in:
parent
ad5dca3cd6
commit
02d2b4261b
1 changed files with 14 additions and 14 deletions
|
@ -413,7 +413,7 @@ public void Video_Snapshot_InMemory()
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(10000)]
|
||||||
public void Video_Snapshot_PersistSnapshot()
|
public void Video_Snapshot_PersistSnapshot()
|
||||||
{
|
{
|
||||||
var outputPath = new TemporaryFile("out.png");
|
using var outputPath = new TemporaryFile("out.png");
|
||||||
var input = FFProbe.Analyse(TestResources.Mp4Video);
|
var input = FFProbe.Analyse(TestResources.Mp4Video);
|
||||||
|
|
||||||
FFMpeg.Snapshot(TestResources.Mp4Video, outputPath);
|
FFMpeg.Snapshot(TestResources.Mp4Video, outputPath);
|
||||||
|
@ -427,10 +427,10 @@ public void Video_Snapshot_PersistSnapshot()
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(10000)]
|
||||||
public void Video_Join()
|
public void Video_Join()
|
||||||
{
|
{
|
||||||
var inputCopy = new TemporaryFile("copy-input.mp4");
|
using var inputCopy = new TemporaryFile("copy-input.mp4");
|
||||||
File.Copy(TestResources.Mp4Video, inputCopy);
|
File.Copy(TestResources.Mp4Video, inputCopy);
|
||||||
|
|
||||||
var outputPath = new TemporaryFile("out.mp4");
|
using var outputPath = new TemporaryFile("out.mp4");
|
||||||
var input = FFProbe.Analyse(TestResources.Mp4Video);
|
var input = FFProbe.Analyse(TestResources.Mp4Video);
|
||||||
var success = FFMpeg.Join(outputPath, TestResources.Mp4Video, inputCopy);
|
var success = FFMpeg.Join(outputPath, TestResources.Mp4Video, inputCopy);
|
||||||
Assert.IsTrue(success);
|
Assert.IsTrue(success);
|
||||||
|
@ -461,7 +461,7 @@ public void Video_Join_Image_Sequence()
|
||||||
});
|
});
|
||||||
var imageAnalysis = FFProbe.Analyse(imageSet.First());
|
var imageAnalysis = FFProbe.Analyse(imageSet.First());
|
||||||
|
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
using var outputFile = new TemporaryFile("out.mp4");
|
||||||
var success = FFMpeg.JoinImageSequence(outputFile, frameRate: 10, images: imageSet.ToArray());
|
var success = FFMpeg.JoinImageSequence(outputFile, frameRate: 10, images: imageSet.ToArray());
|
||||||
Assert.IsTrue(success);
|
Assert.IsTrue(success);
|
||||||
var result = FFProbe.Analyse(outputFile);
|
var result = FFProbe.Analyse(outputFile);
|
||||||
|
@ -484,7 +484,7 @@ public void Video_With_Only_Audio_Should_Extract_Metadata()
|
||||||
public void Video_Duration()
|
public void Video_Duration()
|
||||||
{
|
{
|
||||||
var video = FFProbe.Analyse(TestResources.Mp4Video);
|
var video = FFProbe.Analyse(TestResources.Mp4Video);
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
using var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
|
||||||
FFMpegArguments
|
FFMpegArguments
|
||||||
.FromFileInput(TestResources.Mp4Video)
|
.FromFileInput(TestResources.Mp4Video)
|
||||||
|
@ -503,7 +503,7 @@ public void Video_Duration()
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(10000)]
|
||||||
public void Video_UpdatesProgress()
|
public void Video_UpdatesProgress()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
using var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
|
||||||
var percentageDone = 0.0;
|
var percentageDone = 0.0;
|
||||||
var timeDone = TimeSpan.Zero;
|
var timeDone = TimeSpan.Zero;
|
||||||
|
@ -544,7 +544,7 @@ void OnTimeProgess(TimeSpan time)
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(10000)]
|
||||||
public void Video_OutputsData()
|
public void Video_OutputsData()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
using var outputFile = new TemporaryFile("out.mp4");
|
||||||
var dataReceived = false;
|
var dataReceived = false;
|
||||||
|
|
||||||
GlobalFFOptions.Configure(opt => opt.Encoding = Encoding.UTF8);
|
GlobalFFOptions.Configure(opt => opt.Encoding = Encoding.UTF8);
|
||||||
|
@ -604,7 +604,7 @@ public void Video_TranscodeToMemory()
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(10000)]
|
||||||
public async Task Video_Cancel_Async()
|
public async Task Video_Cancel_Async()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
using var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
|
||||||
var task = FFMpegArguments
|
var task = FFMpegArguments
|
||||||
.FromFileInput("testsrc2=size=320x240[out0]; sine[out1]", false, args => args
|
.FromFileInput("testsrc2=size=320x240[out0]; sine[out1]", false, args => args
|
||||||
|
@ -628,7 +628,7 @@ public async Task Video_Cancel_Async()
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(10000)]
|
||||||
public void Video_Cancel()
|
public void Video_Cancel()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
using var outputFile = new TemporaryFile("out.mp4");
|
||||||
var task = FFMpegArguments
|
var task = FFMpegArguments
|
||||||
.FromFileInput("testsrc2=size=320x240[out0]; sine[out1]", false, args => args
|
.FromFileInput("testsrc2=size=320x240[out0]; sine[out1]", false, args => args
|
||||||
.WithCustomArgument("-re")
|
.WithCustomArgument("-re")
|
||||||
|
@ -649,7 +649,7 @@ public void Video_Cancel()
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(10000)]
|
||||||
public async Task Video_Cancel_Async_With_Timeout()
|
public async Task Video_Cancel_Async_With_Timeout()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
using var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
|
||||||
var task = FFMpegArguments
|
var task = FFMpegArguments
|
||||||
.FromFileInput("testsrc2=size=320x240[out0]; sine[out1]", false, args => args
|
.FromFileInput("testsrc2=size=320x240[out0]; sine[out1]", false, args => args
|
||||||
|
@ -679,7 +679,7 @@ public async Task Video_Cancel_Async_With_Timeout()
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(10000)]
|
||||||
public async Task Video_Cancel_CancellationToken_Async()
|
public async Task Video_Cancel_CancellationToken_Async()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
using var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
|
||||||
var cts = new CancellationTokenSource();
|
var cts = new CancellationTokenSource();
|
||||||
|
|
||||||
|
@ -704,7 +704,7 @@ public async Task Video_Cancel_CancellationToken_Async()
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(10000)]
|
||||||
public async Task Video_Cancel_CancellationToken_Async_Throws()
|
public async Task Video_Cancel_CancellationToken_Async_Throws()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
using var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
|
||||||
var cts = new CancellationTokenSource();
|
var cts = new CancellationTokenSource();
|
||||||
|
|
||||||
|
@ -727,7 +727,7 @@ public async Task Video_Cancel_CancellationToken_Async_Throws()
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(10000)]
|
||||||
public void Video_Cancel_CancellationToken_Throws()
|
public void Video_Cancel_CancellationToken_Throws()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
using var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
|
||||||
var cts = new CancellationTokenSource();
|
var cts = new CancellationTokenSource();
|
||||||
|
|
||||||
|
@ -749,7 +749,7 @@ public void Video_Cancel_CancellationToken_Throws()
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(10000)]
|
||||||
public async Task Video_Cancel_CancellationToken_Async_With_Timeout()
|
public async Task Video_Cancel_CancellationToken_Async_With_Timeout()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
using var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
|
||||||
var cts = new CancellationTokenSource();
|
var cts = new CancellationTokenSource();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue