From a012185146f568800aed477c78e8f939d2664faf Mon Sep 17 00:00:00 2001 From: lxmou666 <772765102@qq.com> Date: Mon, 22 Feb 2021 18:31:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ClientDemo/Util.cs | 2 +- JianGongYun/TRTC/LiveClassroom.cs | 2 +- JianGongYun/TRTC/Utils/Util.cs | 2 +- JianGongYun/TRTC/Windows/LiveWindowTopBlock.xaml.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ClientDemo/Util.cs b/ClientDemo/Util.cs index f1b9559..52311ba 100644 --- a/ClientDemo/Util.cs +++ b/ClientDemo/Util.cs @@ -53,7 +53,7 @@ namespace JianGongYun.TRTC.Utils public static bool IsTestEnv() { - string path = Environment.CurrentDirectory + "\\ShowTestEnv.txt"; + string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ShowTestEnv.txt"); return File.Exists(path); } diff --git a/JianGongYun/TRTC/LiveClassroom.cs b/JianGongYun/TRTC/LiveClassroom.cs index 110e284..fd0768d 100644 --- a/JianGongYun/TRTC/LiveClassroom.cs +++ b/JianGongYun/TRTC/LiveClassroom.cs @@ -654,7 +654,7 @@ namespace JianGongYun.TRTC vw.Dispose(); //合并视频 var arguments = $@"-i ""{VideoTempPath}"" -i ""{AudioTempPath}"" -c:v copy -c:a copy -strict experimental -y ""{ResultFilePath}"""; - Process prc = new Process { StartInfo = new ProcessStartInfo { FileName = Path.Combine(Environment.CurrentDirectory, "ffmpeg.exe"), Arguments = arguments, CreateNoWindow = true, UseShellExecute = false } }; + Process prc = new Process { StartInfo = new ProcessStartInfo { FileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ffmpeg.exe"), Arguments = arguments, CreateNoWindow = true, UseShellExecute = false } }; prc.Start(); prc.WaitForExit(); CurrentLiveWindow.Dispatcher.Invoke(new Action(() => diff --git a/JianGongYun/TRTC/Utils/Util.cs b/JianGongYun/TRTC/Utils/Util.cs index f1b9559..58be87e 100644 --- a/JianGongYun/TRTC/Utils/Util.cs +++ b/JianGongYun/TRTC/Utils/Util.cs @@ -53,7 +53,7 @@ namespace JianGongYun.TRTC.Utils public static bool IsTestEnv() { - string path = Environment.CurrentDirectory + "\\ShowTestEnv.txt"; + string path =Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ShowTestEnv.txt"); return File.Exists(path); } diff --git a/JianGongYun/TRTC/Windows/LiveWindowTopBlock.xaml.cs b/JianGongYun/TRTC/Windows/LiveWindowTopBlock.xaml.cs index 7c489d6..a03ccbf 100644 --- a/JianGongYun/TRTC/Windows/LiveWindowTopBlock.xaml.cs +++ b/JianGongYun/TRTC/Windows/LiveWindowTopBlock.xaml.cs @@ -114,7 +114,7 @@ namespace JianGongYun.TRTC.Windows item.Kill(); } } - Process prc = new Process { StartInfo = new ProcessStartInfo { FileName = System.IO.Path.Combine(Environment.CurrentDirectory, "Pointofix.exe"), CreateNoWindow = false, UseShellExecute = false } }; + Process prc = new Process { StartInfo = new ProcessStartInfo { FileName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Pointofix.exe"), CreateNoWindow = false, UseShellExecute = false } }; prc.Start(); } catch (Exception ex)