mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-14 18:15:44 +00:00
26 lines
713 B
C#
26 lines
713 B
C#
using FFMpegCore.FFMPEG.Exceptions;
|
|
|
|
namespace FFMpegCore.Helpers
|
|
{
|
|
public class FFProbeHelper
|
|
{
|
|
public static int Gcd(int first, int second)
|
|
{
|
|
while (first != 0 && second != 0)
|
|
{
|
|
if (first > second)
|
|
first -= second;
|
|
else second -= first;
|
|
}
|
|
return first == 0 ? second : first;
|
|
}
|
|
|
|
public static void RootExceptionCheck(string root)
|
|
{
|
|
if (root == null)
|
|
throw new FFMpegException(FFMpegExceptionType.Dependency,
|
|
"FFProbe root is not configured in app config. Missing key 'ffmpegRoot'.");
|
|
|
|
}
|
|
}
|
|
}
|