FFMpegCore/FFMpegCore/Helpers/FFProbeHelper.cs
Malte Rosenbjerg 45e170f315 Cleanup begun
Former-commit-id: 8ee92a40ab
2020-02-11 22:45:02 +01:00

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'.");
}
}
}