mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-14 10:05:44 +00:00
19 lines
608 B
C#
19 lines
608 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace FFMpegCore.FFMPEG.Pipes
|
|
{
|
|
static class PipeHelpers
|
|
{
|
|
public static string GetUnqiuePipeName() => "FFMpegCore_Pipe_" + Guid.NewGuid();
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|