From 2fcf389aba4834f9d834506765d7574268adcf8d Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 21 Aug 2020 20:10:57 +0900 Subject: [PATCH 1/2] Fix pipe path for unix. Replace fixed '/tmp' with Path.GetTempPath(). Former-commit-id: 4ecf05ec79f5ffba5b1606aaad552ce6f982b593 --- FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs index ddd788c..1b2ae9d 100644 --- a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs +++ b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs @@ -5,6 +5,8 @@ namespace FFMpegCore.Pipes { static class PipeHelpers { + static readonly string PipePrefix = Path.Combine(Path.GetTempPath(), "CoreFxPipe_"); + public static string GetUnqiuePipeName() => "FFMpegCore_" + Guid.NewGuid(); public static string GetPipePath(string pipeName) @@ -12,7 +14,7 @@ public static string GetPipePath(string pipeName) if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return $@"\\.\pipe\{pipeName}"; else - return $"unix:/tmp/CoreFxPipe_{pipeName}"; // dotnet uses unix sockets on unix, for more see https://github.com/dotnet/runtime/issues/24390 + return $"unix:{PipePrefix}{pipeName}"; // dotnet uses unix sockets on unix, for more see https://github.com/dotnet/runtime/issues/24390 } } } From e49a17bab15f36cebc4acc8e019a806cef13969b Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 21 Aug 2020 21:39:28 +0900 Subject: [PATCH 2/2] Add using System.IO Former-commit-id: e99b1b106f75a280c8872a0f0b68332e5c803c4f --- FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs index 1b2ae9d..7e79f55 100644 --- a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs +++ b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using System.Runtime.InteropServices; namespace FFMpegCore.Pipes