OdessaGUIProject.Workers.AvidStudioExportWorker.CalculateIsNTSC C# (CSharp) Method

CalculateIsNTSC() private static method

private static CalculateIsNTSC ( double framesPerSecond ) : bool
framesPerSecond double
return bool
        private static bool CalculateIsNTSC(double framesPerSecond)
        {
            // based on https://developer.apple.com/library/mac/#documentation/AppleApplications/Reference/FinalCutPro_XML/FrameRate/FrameRate.html#//apple_ref/doc/uid/TP30001158-TPXREF103
            int roundedFPS = (int)Math.Round(framesPerSecond, 0);

            if (framesPerSecond < 24)
                return true;

            if (roundedFPS == 24 || roundedFPS == 25)
                return false;

            if (framesPerSecond < 30)
                return true;

            if (roundedFPS == 30 || roundedFPS == 50)
                return false;

            if (framesPerSecond < 60)
                return true;

            if (roundedFPS == 60)
                return false;

            Logger.Error("Couldn't figure out NTSC!");
            Debug.Assert(false, "Couldn't figure out NTSC!");

            return true;
        }