|
@@ -1,6 +1,5 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
-using System.Diagnostics;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
@@ -22,32 +21,32 @@ namespace fis.Win.Dev.Utilities.FFMPEG
|
|
|
_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 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();
|
|
|
- }
|
|
|
+ //var fmpegProcess = Process.GetProcessesByName("ffmpeg");
|
|
|
+ //foreach (var f in fmpegProcess)
|
|
|
+ //{
|
|
|
+ // f.Kill();
|
|
|
+ //}
|
|
|
}
|
|
|
}
|
|
|
}
|