Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made ExecuteAsync method public and added overload to stream output via pipe #79

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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