Use multiple FileWriter classes #2761
k4pran
started this conversation in
Architecture
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the current implementation we have a single
SceneFileWriter
. This handles all formats, gifs, pngs, mp4 etc. Some of the flows are completely different such as writing images vs videos, and some are quite similar such as mp4 vs mov files.The issue is that we have logic for all of them rolled into one class meaning that we are checking config for the format throughout - an example is
and
We also need special ffmpeg flags for different formats. This makes it difficult to follow and adds a lot of complexity. I propose having a base -
FileWriterBase
class with common functionality across all formats. We can then extend this once for videosVideoFileWriter
and once for images -ImageFileWriter
, and perhaps extend the video for different formats e.g.MP4Writer
.What this will allow us to do is to let
Scene
initialize the writer that is needed based on the format in config and from there on we will never need to check the format and all the logic for each format will be contained in the relevant classes.Beta Was this translation helpful? Give feedback.
All reactions