Problem
Many FFmpeg constants are defined as C macros (e.g. AV_CODEC_FLAG_*, SWS_*, AV_CH_*). These are generated as individual constants but not grouped into enums, making the API less discoverable and type-unsafe.
Solution
Add a MacroEnumPostProcessor that groups macros by prefix into C# enums:
AV_CODEC_FLAG_ → CodecFlags
AV_CODEC_FLAG2_ → CodecFlags2
SWS_ → SwsFlags (already exists but could be enriched)
AV_CH_ → ChannelFlags
AV_PIX_FMT_FLAG_ → PixFmtFlags
- 48+ total mappings
Complexity: High
New processor class. Needs careful prefix matching, flag detection, type hints (int vs ulong). Breaking API change — constants become enum members.
Reference: SuRGeoNix/Flyleaf.FFmpeg.Generator MacroEnumPostProcessor.cs
Problem
Many FFmpeg constants are defined as C macros (e.g.
AV_CODEC_FLAG_*,SWS_*,AV_CH_*). These are generated as individual constants but not grouped into enums, making the API less discoverable and type-unsafe.Solution
Add a MacroEnumPostProcessor that groups macros by prefix into C# enums:
AV_CODEC_FLAG_→CodecFlagsAV_CODEC_FLAG2_→CodecFlags2SWS_→SwsFlags(already exists but could be enriched)AV_CH_→ChannelFlagsAV_PIX_FMT_FLAG_→PixFmtFlagsComplexity: High
New processor class. Needs careful prefix matching, flag detection, type hints (int vs ulong). Breaking API change — constants become enum members.
Reference: SuRGeoNix/Flyleaf.FFmpeg.Generator MacroEnumPostProcessor.cs