/// <summary> /// Runs avs2pipemod with specified source file. The output will be discarded. /// </summary> /// <param name="path">The path to the script to run.</param> /// <param name="options">The options for starting the process.</param> /// <param name="callback">A method that will be called after the process has been started.</param> /// <returns>The process completion status.</returns> public CompletionStatus RunAvisynth(string path, ProcessOptionsEncoder options = null, ProcessStartedEventHandler callback = null) { if (string.IsNullOrEmpty(path)) { throw new ArgumentException("Path cannot be null or empty.", nameof(path)); } if (!fileSystem.Exists(factory.Config.Avs2PipeMod)) { throw new System.IO.FileNotFoundException($@"File ""{factory.Config.Avs2PipeMod}"" specified by Config.Avs2PipeModPath is not found."); } string Args = $@"""{path}"" -rawvideo > NUL"; IProcessWorker Manager = factory.Create(options, callback); Manager.OutputType = ProcessOutput.Error; string Cmd = $@"""{factory.Config.Avs2PipeMod}"" {Args}"; CompletionStatus Result = Manager.RunAsCommand(Cmd); return(Result); }