obs-ffmpeg: Refactor muxer file path code #8795
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Refactors parts of the mux outputs which deal with file paths.
General idea:
path
settings field to be unset, provided the appropriatedirectory
,format
, andextension
fields have been setpath
is not set, it will generate its own initial file namestream->path
last_file
field to thefile_changed
output signal for future usage by the UI for auto-remux and other features when file splitting is enabledMotivation and Context
This allows us to optionally move path generation to the output, away from the UI. This has benefits, notable for code deduplication and also for synchronizing behavior. It is also required for other features like inserting the part number into a file name for file splitting.
How Has This Been Tested?
Unfortunately, this does touch a lot of code paths with little immediate user-facing benefits. I've done the best I can do testing this and I am not seeing any changed behavior, crashes, or memory leaks- so that's good I guess.
Types of changes
Checklist: