基路径

This commit is contained in:
lxmou666 2021-02-22 18:31:32 +08:00
parent 5cac0bf044
commit a012185146
4 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ namespace JianGongYun.TRTC.Utils
public static bool IsTestEnv() public static bool IsTestEnv()
{ {
string path = Environment.CurrentDirectory + "\\ShowTestEnv.txt"; string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ShowTestEnv.txt");
return File.Exists(path); return File.Exists(path);
} }

View File

@ -654,7 +654,7 @@ namespace JianGongYun.TRTC
vw.Dispose(); vw.Dispose();
//合并视频 //合并视频
var arguments = $@"-i ""{VideoTempPath}"" -i ""{AudioTempPath}"" -c:v copy -c:a copy -strict experimental -y ""{ResultFilePath}"""; 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.Start();
prc.WaitForExit(); prc.WaitForExit();
CurrentLiveWindow.Dispatcher.Invoke(new Action(() => CurrentLiveWindow.Dispatcher.Invoke(new Action(() =>

View File

@ -53,7 +53,7 @@ namespace JianGongYun.TRTC.Utils
public static bool IsTestEnv() public static bool IsTestEnv()
{ {
string path = Environment.CurrentDirectory + "\\ShowTestEnv.txt"; string path =Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ShowTestEnv.txt");
return File.Exists(path); return File.Exists(path);
} }

View File

@ -114,7 +114,7 @@ namespace JianGongYun.TRTC.Windows
item.Kill(); 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(); prc.Start();
} }
catch (Exception ex) catch (Exception ex)