FFMpegCore/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs
Malte Rosenbjerg b0e3d157d3 Cleanup
Former-commit-id: 6b1e411bfe
2020-10-27 00:49:28 +01:00

18 lines
484 B
C#

using System;
using System.Runtime.InteropServices;
namespace FFMpegCore.Pipes
{
static class PipeHelpers
{
public static string GetUnqiuePipeName() => $"FFMpegCore_{Guid.NewGuid()}";
public static string GetPipePath(string pipeName)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
return $@"\\.\pipe\{pipeName}";
else
return $"unix:/tmp/CoreFxPipe_{pipeName}";
}
}
}