mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
parent
726c0f9800
commit
ac82e17d25
4 changed files with 2 additions and 3 deletions
|
@ -38,7 +38,7 @@ public void Audio_Save()
|
|||
[TestMethod]
|
||||
public async Task Audio_FromRaw()
|
||||
{
|
||||
await using var file = File.Open(VideoLibrary.LocalAudioRaw.FullName, FileMode.Open);
|
||||
await using var file = File.Open(TestResources.RawAudio, FileMode.Open);
|
||||
var memoryStream = new MemoryStream();
|
||||
await FFMpegArguments
|
||||
.FromPipeInput(new StreamPipeSource(file), options => options.ForceFormat("s16le"))
|
||||
|
|
|
@ -20,6 +20,7 @@ public static class TestResources
|
|||
public static readonly string WebmVideo = "./Resources/input_3sec.webm";
|
||||
public static readonly string Mp4WithoutVideo = "./Resources/input_audio_only_10sec.mp4";
|
||||
public static readonly string Mp4WithoutAudio = "./Resources/input_video_only_3sec.mp4";
|
||||
public static readonly string RawAudio = "./Resources/audio.raw";
|
||||
public static readonly string Mp3Audio = "./Resources/audio.mp3";
|
||||
public static readonly string PngImage = "./Resources/cover.png";
|
||||
public static readonly string ImageCollection = "./Resources/images";
|
||||
|
|
|
@ -25,7 +25,6 @@ protected override async Task ProcessDataAsync(CancellationToken token)
|
|||
if (!Pipe.IsConnected)
|
||||
throw new TaskCanceledException();
|
||||
await Writer.WriteAsync(Pipe, token).ConfigureAwait(false);
|
||||
Pipe.Disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ protected override async Task ProcessDataAsync(CancellationToken token)
|
|||
if (!Pipe.IsConnected)
|
||||
throw new TaskCanceledException();
|
||||
await Reader.ReadAsync(Pipe, token).ConfigureAwait(false);
|
||||
Pipe.Disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue