/// <summary> /// Renders the command stream with a new command processor /// </summary> internal List <CommandOutput> RenderWith <TProcessor>() where TProcessor : class, ICommandProcessor, new() { var commandProcessor = new TProcessor(); if (!commandProcessor.Open()) { throw new FFmpegRenderingException(commandProcessor.Error); } var returnType = RenderWith(commandProcessor); if (!commandProcessor.Close()) { throw new FFmpegRenderingException(commandProcessor.Error); } return(returnType); }
public ICommandProcessor ExecuteWith <TProcessor>() where TProcessor : class, ICommandProcessor, new() { var commandProcessor = new TProcessor(); if (!commandProcessor.Open()) { throw new FFmpegRenderingException(commandProcessor.Error); } var returnType = ExecuteWith(commandProcessor); if (!commandProcessor.Close()) { throw new FFmpegRenderingException(commandProcessor.Error); } return(returnType); }