Ejemplo n.º 1
0
        public void WriteCommand(FFprobeCommand command)
        {
            var inputResource = new Input(command.Resource);
            BuilderBase.Append(" ");
            BuilderBase.Append(SettingSerializer.Serialize(inputResource));

            command.Settings.ForEach(WriteSerializerSpecifier);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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\"");
        }
Ejemplo n.º 4
0
        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\"");
        }
Ejemplo n.º 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);
        }