Replies: 4 comments 7 replies
-
Thanks for this @andcscott ! Indeed, we've added a few classes along the way to better share and define the closely related but distinct functionality. In the end, I believe this will provide a stable and extensible interface for us! As you may have seen, I've already made a first implementation of the FFmpegSettingsManager. I plan to take a second look at it tonight, before merging. I may have missed a few settings, haven't really doubled checked yet, but it's easily extensible. There is no longer an FFmpegConfigManager to do, this idea was replaced with the FFmpegSettingsManager I described above. For configs, we remain to use the ConfigManager. Then, we need 2 classes that use directly the FFmpegSettingsManager:
I'd propose for you to implement first "1", then "2", due to the dependency nature in between the two. Does this sound good to you? I'm happy to go over any aspect again, just let me know! |
Beta Was this translation helpful? Give feedback.
-
I was working on I'll start with the easier one: should I be using Second, I wanted to share some code before opening a PR. Hopefully I'm on the right track this time but we'll see ;) Example header:
Example implementation:
How does that look to you? Edit: I also had the idea of either overloading the "add" methods or maybe making the parameters optional, with the values from |
Beta Was this translation helpful? Give feedback.
-
Hey there @omeryusufyagci, hope you're not tired of hearing from me yet ;) I put some time into First - I've been adding methods to
I'm wondering if those parameters might actually be something that Second - Should the controller have logic for adding (or not adding) the overwrite flag? I recall that you didn't want the command builder making decisions, so I want to check here too. Since the position of the arguments is important a conditional could disrupt the flow of method chaining, but there's really no way around FFmpeg's positional arguments. Third - Did you want me to take care of Ok... I think that last edit is everything, it's been a long day and I may think of something else later haha. Anyway, thanks for your help! |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for the great work on this @andcscott! In the end, this initial implementation consisted of:
Overall, this serves as a solid base that should allow us to easily make changes if and when we might need to. Special thanks to your perseverance and openness as the design went through a few iterations! |
Beta Was this translation helpful? Give feedback.
-
For reference:
FFmpegController
Abstraction Layer #4FFmpegCommandBuilder
toMediaProcessor
#31FFmpegController
to core #60FFmpegControllerBuilder
class #41FFmpegCommandBuilder
class #51Proposed classes:
FFmpegConfigManager
: This is the global configuration manager for paths and thread settings, acting as a single source of truth.FFmpegCommandBuilder
: This guy builds individual FFmpeg commands, mainly an abstraction from the low-level string manipulations. Particularly useful for cross-platform compatabilityFFmpegControllerBuilder
: This builds the controller with configurations from the FFmpegConfigManager and commands from FFmpegCommandBuilder.FFmpegController
: This is our public API that orchestrates operations like extractAudio(), etc. This is what the user interacts with, while everything else happens under the hood.FFmpegSettingsManager
:A singleton thatManages global, audio and video settings specific to ffmpeg. It does not manage configurations -that is done via the ConfigManager. It has some limited internal utility to smooth out implementations.I wanted to start this discussion so we/I can stay on the same page for these improvements. It has expanded quite a bit beyond the initial issues, and your suggestion to silo our conversation seemed reasonable. It seems like FFmpegConfigManager and FFmpegCommandBuilder need to be handled before I can fix up FFmpegControllerBuilder, so my primary question at this point is how do you want me to proceed?
Beta Was this translation helpful? Give feedback.
All reactions