mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
parent
4624378d0e
commit
fee7d6f450
1 changed files with 2 additions and 4 deletions
|
@ -6,16 +6,14 @@ namespace FFMpegCore.Pipes
|
|||
{
|
||||
static class PipeHelpers
|
||||
{
|
||||
static readonly string PipePrefix = Path.Combine(Path.GetTempPath(), "CoreFxPipe_");
|
||||
|
||||
public static string GetUnqiuePipeName() => $"FFMpegCore_{Guid.NewGuid().ToString("N").Substring(0, 5)}";
|
||||
public static string GetUnqiuePipeName() => $"FFMpegCore_{Guid.NewGuid()}";
|
||||
|
||||
public static string GetPipePath(string pipeName)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
return $@"\\.\pipe\{pipeName}";
|
||||
else
|
||||
return $"unix:{PipePrefix}{pipeName}"; // dotnet uses unix sockets on unix, for more see https://github.com/dotnet/runtime/issues/24390
|
||||
return $"unix:/run/CoreFxPipe_{pipeName}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue