public void Video_ToMP4_Args() { var container = new ArgumentsContainer(); container.Add(new VideoCodecArgument(VideoCodec.LibX264)); Convert(VideoType.Mp4, container); }
public void Video_ToOGV_Resize_Args() { var container = new ArgumentsContainer(); container.Add(new ScaleArgument(VideoSize.Ed)); container.Add(new VideoCodecArgument(VideoCodec.LibTheora)); Convert(VideoType.Ogv, container); }
public override void Apply(ArgumentsContainer arguments) { if (arguments.Arguments.Count != 2) { throw new ArgumentException( ); } Performer.Move(( MoveType )arguments.Arguments [0], ( DiceType )arguments.Arguments [1]); }
public void Video_ToTS_Args() { var container = new ArgumentsContainer(); container.Add(new CopyArgument()); container.Add(new BitStreamFilterArgument(Channel.Video, Filter.H264_Mp4ToAnnexB)); container.Add(new ForceFormatArgument(VideoCodec.MpegTs)); Convert(VideoType.Ts, container); }
public VideoInfo Convert(ArgumentsContainer arguments, FileInfo input, FileInfo output) { var args = argumentBuilder.BuildArguments(arguments, input, output); if (!RunProcess(args, output)) { throw new FFMpegException(FFMpegExceptionType.Operation, "Could not replace the video audio."); } return(new VideoInfo(output)); }
public void Builder_BuildString_Concat() { var container = new ArgumentsContainer(); container.Add(new OutputArgument("output.mp4")); container.Add(new ConcatArgument(concatFiles)); var str = builder.BuildArguments(container); Assert.IsTrue(str == "-i \"concat:1.mp4|2.mp4|3.mp4|4.mp4\" \"output.mp4\""); }
public VideoInfo Convert(ArgumentsContainer arguments) { var args = argumentBuilder.BuildArguments(arguments); var output = ((OutputArgument)arguments[typeof(OutputArgument)]).GetAsFileInfo(); if (!RunProcess(args, output)) { throw new FFMpegException(FFMpegExceptionType.Operation, "Could not replace the video audio."); } return(new VideoInfo(output)); }
private string GetArgumentsString(params Argument[] args) { var container = new ArgumentsContainer(); container.Add(new OutputArgument("output.mp4")); container.Add(new InputArgument("input.mp4")); foreach (var a in args) { container.Add(a); } return(builder.BuildArguments(container)); }
public void Convert(VideoType type, ArgumentsContainer container) { var output = Input.OutputLocation(type); try { var input = VideoInfo.FromFileInfo(Input); container.Add(new InputArgument(input)); container.Add(new OutputArgument(output)); var scaling = container.Find <ScaleArgument>(); Encoder.Convert(container); var outputVideo = new VideoInfo(output.FullName); Assert.IsTrue(File.Exists(output.FullName)); Assert.AreEqual(outputVideo.Duration, input.Duration); if (scaling == null) { Assert.AreEqual(outputVideo.Width, input.Width); Assert.AreEqual(outputVideo.Height, input.Height); } else { if (scaling.Value.Width != -1) { Assert.AreEqual(outputVideo.Width, scaling.Value.Width); } if (scaling.Value.Height != -1) { Assert.AreEqual(outputVideo.Height, scaling.Value.Height); } Assert.AreNotEqual(outputVideo.Width, input.Width); Assert.AreNotEqual(outputVideo.Height, input.Height); } } finally { if (File.Exists(output.FullName)) { File.Delete(output.FullName); } } }
public abstract void Use(ArgumentsContainer arguments);
public override void Apply(ArgumentsContainer arguments) { Game.Current.AuctionPerformer.PerformAuction(new AuctionRequest(0, null, null)); }
public override void Apply(ArgumentsContainer arguments) { Card.Use(arguments); }
public void ApplyPlayerCommand(PlayerCommand command, ArgumentsContainer arguments) { }
/// <summary> /// 执行这个指令 /// </summary> public abstract void Apply(ArgumentsContainer arguments);
public override void Use(ArgumentsContainer arguments) { ArgumentsInfo.CheckArgument(arguments); //todo }
public override void Use ( ArgumentsContainer arguments ) { ArgumentsInfo . CheckArgument ( arguments ) ; BlackBuff buff = new BlackBuff ( ( Stock ) arguments . Arguments . Single ( ) , Duration ) ; }
public override void Use(ArgumentsContainer arguments) { throw new NotImplementedException( ); }