コード例 #1
0
        public void WriteCommand(FFprobeCommand command)
        {
            var inputResource = new Input(command.Resource);
            BuilderBase.Append(" ");
            BuilderBase.Append(SettingSerializer.Serialize(inputResource));

            command.Settings.ForEach(WriteSerializerSpecifier);
        }
コード例 #2
0
        private void WriteResource(CommandInput resource)
        {
            if (resource == null)
            {
                throw new ArgumentNullException("resource");
            }

            WriteResourcePreSettings(resource);

            var inputResource = new Input(resource.Resource);
            BuilderBase.Append(" ");
            BuilderBase.Append(SettingSerializer.Serialize(inputResource));

            WriteResourcePostSettings(resource);
        }
コード例 #3
0
        public void Input_Verify()
        {
            var settingWrong1 = new Input(null);
            var setting = new Input(Resource.From("c:\\apple.mp4"));

            Assert.Throws<InvalidOperationException>(() => { var s = settingWrong1.GetAndValidateString(); });
            Assert.DoesNotThrow(() => { var s = setting.GetAndValidateString(); });
            Assert.Equal(setting.GetAndValidateString(), "-i \"c:/apple.mp4\"");
        }
コード例 #4
0
ファイル: SettingTests.cs プロジェクト: kostyll/HudlFfmpeg
        public void Input_Verify()
        {
            var setting = new Input(Resource.From("c:\\apple.mp4"));

            Assert.DoesNotThrow(() => SettingSerializer.Serialize(setting));
            Assert.Equal(SettingSerializer.Serialize(setting), "-i \"c:/apple.mp4\"");
        }
コード例 #5
0
        private void WriteResource(CommandInput resource)
        {
            if (resource == null)
            {
                throw new ArgumentNullException("resource");
            }

            var settingsData = Validate.GetSettingCollectionData(resource.Settings);

            WriteResourcePreSettings(resource, settingsData);

            var inputResource = new Input(resource.Resource);
            _builderBase.Append(" ");
            _builderBase.Append(inputResource);

            WriteResourcePostSettings(resource, settingsData);
        }