mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-01-19 13:06:44 +00:00
b0e3d157d3
Former-commit-id: 6b1e411bfe
18 lines
484 B
C#
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}";
|
|
}
|
|
}
|
|
}
|