|
@@ -1,52 +0,0 @@
|
|
|
-using System;
|
|
|
-using System.Collections.Generic;
|
|
|
-using System.Linq;
|
|
|
-using System.Text;
|
|
|
-using System.Threading.Tasks;
|
|
|
-
|
|
|
-namespace fis.Win.Dev.Utilities.FFMPEG
|
|
|
-{
|
|
|
- public class FFmpegException : Exception
|
|
|
- {
|
|
|
- public FFmpegException(int exitCode, Exception innerException = null)
|
|
|
- : base($"Exit Code: {exitCode}.\nSee FFmpeg Log for more info.", innerException) { }
|
|
|
- }
|
|
|
-
|
|
|
- public static class FFmpegService
|
|
|
- {
|
|
|
- private static string _ffmpegPath = "ffmpeg";
|
|
|
-
|
|
|
- public static void SetFFmpegPath(string ffmpegPath)
|
|
|
- {
|
|
|
- _ffmpegPath = ffmpegPath;
|
|
|
- }
|
|
|
-
|
|
|
- //public static void StartFFmpeg(out Process process, string arguments)
|
|
|
- //{
|
|
|
- // process = new Process
|
|
|
- // {
|
|
|
- // StartInfo =
|
|
|
- // {
|
|
|
- // FileName = _ffmpegPath,
|
|
|
- // Arguments = arguments,
|
|
|
- // UseShellExecute = false,
|
|
|
- // Verb = "runas",
|
|
|
- // CreateNoWindow = true,
|
|
|
- // RedirectStandardError = true,
|
|
|
- // RedirectStandardInput = true
|
|
|
- // },
|
|
|
- // EnableRaisingEvents = true
|
|
|
- // };
|
|
|
- // process.Start();
|
|
|
- // process.BeginErrorReadLine();
|
|
|
- //}
|
|
|
- public static void ForceCloseFFmpegIfStillAlive()
|
|
|
- {
|
|
|
- //var fmpegProcess = Process.GetProcessesByName("ffmpeg");
|
|
|
- //foreach (var f in fmpegProcess)
|
|
|
- //{
|
|
|
- // f.Kill();
|
|
|
- //}
|
|
|
- }
|
|
|
- }
|
|
|
-}
|