コード例 #1
0
        public void SkipFrameTest()
        {
            var target = new FfprobeArgs();
            var value  = "nokey";

            target.SkipFrame = value;
            Assert.Equal(value, target.SkipFrame);
            Assert.Equal("-skip_frame nokey", target.ToString());
        }
コード例 #2
0
        public void LogLevelTest()
        {
            var target = new FfprobeArgs();

            Assert.Equal(LogLevel.Default, target.LogLevel);
            target.LogLevel = LogLevel.Verbose;
            Assert.Equal(LogLevel.Verbose, target.LogLevel);
            Assert.Equal("-loglevel verbose", target.ToString());
        }
コード例 #3
0
        public void RepeatLogTest()
        {
            var target = new FfprobeArgs();

            Assert.False(target.RepeatLog);
            target.RepeatLog = true;
            Assert.True(target.RepeatLog);
            Assert.Equal("-loglevel repeat", target.ToString());
        }
コード例 #4
0
        public void ShowEntriesTest()
        {
            var target = new FfprobeArgs();
            var value  = "default";

            target.ShowEntries = value;
            Assert.Equal(value, target.ShowEntries);
            Assert.Equal("-show_entries default", target.ToString());
        }
コード例 #5
0
        public void PrintFormatTest()
        {
            var target = new FfprobeArgs();
            var value  = "default";

            target.PrintFormat = value;
            Assert.Equal(value, target.PrintFormat);
            Assert.Equal("-of default", target.ToString());
        }
コード例 #6
0
        public void ShowStreamsTest()
        {
            var target = new FfprobeArgs();

            Assert.False(target.ShowStreams);
            target.ShowStreams = true;
            Assert.True(target.ShowStreams);
            Assert.Equal("-show_streams", target.ToString());
        }
コード例 #7
0
        public void ShowFormatTest()
        {
            var target = new FfprobeArgs();

            Assert.False(target.ShowFormat);
            target.ShowFormat = true;
            Assert.True(target.ShowFormat);
            Assert.Equal("-show_format", target.ToString());
        }
コード例 #8
0
        public void RepeatedLogLevelTest()
        {
            var target = new FfprobeArgs();

            target.LogLevel  = LogLevel.Verbose;
            target.RepeatLog = true;
            Assert.Equal(LogLevel.Verbose, target.LogLevel);
            Assert.True(target.RepeatLog);
            Assert.Equal("-loglevel repeat+verbose", target.ToString());
        }
コード例 #9
0
        public void HideBannerTest()
        {
            var target = new FfprobeArgs();

            Assert.False(target.HideBanner);
            target.HideBanner = true;
            Assert.True(target.HideBanner);
            Assert.Equal("-hide_banner", target.ToString());
            target.HideBanner = false;
            Assert.False(target.HideBanner);
        }
コード例 #10
0
        public void FilePathTest()
        {
            var target = new FfprobeArgs();

            Assert.Null(target.FilePath);

            var value = "C:\\t.mp4";

            target.FilePath = value;
            Assert.Equal(value, target.FilePath);
            Assert.Equal($"\"{value}\"", target.ToString());
        }
コード例 #11
0
        public void SelectStreamsTest()
        {
            var target = new FfprobeArgs();

            Assert.True(target.SelectStreams.IsEmpty);

            var value = new StreamSpecifier(FfmpegStreamType.Video, 0);

            target.SelectStreams = value;
            Assert.Equal(value, target.SelectStreams);
            Assert.Equal("-select_streams V:0", target.ToString());
        }