Refactor option group #733
Merged
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.
This pull request refactors the handling of codec and muxer options in the
ffmpegmodule to simplify the code and improve consistency. The most significant changes include removing thekwargsparameter fromFFMpegMuxerOptionand directly passing merged options, as well as updating related functions to reflect this change.Refactoring of codec and muxer options:
src/ffmpeg/codecs/schema.py: Removed the@dataclassdecorator fromFFMpegEncoderOptionandFFMpegDecoderOption, simplifying their definitions.src/ffmpeg/dag/io/_input.py: Updated theinputfunction to passdecoder_optionsanddemuxer_optionsdirectly instead of accessing theirkwargsattributes.src/ffmpeg/dag/io/_output.py: Updated theoutputfunction to passencoder_optionsandmuxer_optionsdirectly instead of accessing theirkwargsattributes. [1] [2]Simplification of
FFMpegMuxerOption:src/ffmpeg/formats/muxers.py: Removed thekwargsparameter fromFFMpegMuxerOptionin multiple functions, directly passing merged options instead. This change affects functions such as_3g2,_3gp,a64,ac3,ac4, and many others. [1] [2] [3] [4] [5] and more)