Skip to content

Conversation

TobiasFaller
Copy link

@TobiasFaller TobiasFaller commented Jan 5, 2024

Simplified Engine class to allow for simple addition of wrappers in the future and merged duplicated code.
Merge 77 first for correctly tracking changes in pipe handling methods.

This is done via two changes to Engine and FFmpegArgumentBuilder:

1.) Made ExecuteAsync methods the base for calling ffmpeg in Engine:

  • Made Task ExecuteAsync(FFmpegParameters, CancellationToken) public
  • Added public Task ExecuteAsync(FFmpegParameters, Stream, CancellationToken) to stream output (piped)
  • Rewrote wrapper methods (ConvertAsync, etc.) to all call the ExecuteAsync stream/no-stream variants

2.) Added Execute task type to invoke ffpmeg with custom arguments while keeping support for specifying the input and output:

  • Expects CustomArguments to specify operation to perform
  • Has optional input parameter with stdin support (like existing code)
  • Has optional output parameter (used by ConvertAsync(IArgument, Stream, CancellationToken) which requires an output pipe)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant