浏览代码

Some test

Jimmy 2 年之前
父节点
当前提交
26cac1650e
共有 2 个文件被更改,包括 25 次插入26 次删除
  1. 24 25
      fis/Utilities/FFMPEG/FFmpegService.cs
  2. 1 1
      fis/Utilities/FFMPEG/Video/FFmpegVideoWriter.cs

+ 24 - 25
fis/Utilities/FFMPEG/FFmpegService.cs

@@ -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();
+            //}
         }
     }
 }

+ 1 - 1
fis/Utilities/FFMPEG/Video/FFmpegVideoWriter.cs

@@ -61,7 +61,7 @@ namespace fis.Win.Dev.Utilities.FFMPEG.Video
            var exportManager = AppManager.Get<IFileExporterManager>();
             if (!exportManager.IsCancelled)
             {
-                FFmpegService.StartFFmpeg(out _ffmpeg, argument);
+               // FFmpegService.StartFFmpeg(out _ffmpeg, argument);
             }
         }