Exemple #1
0
        public void AspectRatio_Verify()
        {
            var settingWrong1 = new AspectRatio();
            var setting       = new AspectRatio(FFmpegRatio.Create(1, 1));

            Assert.Throws <InvalidOperationException>(() => { var s = settingWrong1.GetAndValidateString(); });
            Assert.DoesNotThrow(() => { var s = setting.GetAndValidateString(); });
            Assert.Equal(setting.GetAndValidateString(), "-aspect 1:1");
        }
Exemple #2
0
        public SetSar(FFmpegRatio ratio)
            : this()
        {
            if (ratio == null)
            {
                throw new ArgumentException("Ratio cannot be null.", "ratio");
            }

            Ratio = ratio;
        }
Exemple #3
0
        public AspectRatio(FFmpegRatio ratio)
            : this()
        {
            if (ratio == null)
            {
                throw new ArgumentNullException("ratio");
            }

            Ratio = ratio;
        }