zmwangx / rust-ffmpeg

Safe FFmpeg wrapper.
Do What The F*ck You Want To Public License
1.3k stars 203 forks source link

Provide bindings for AV_CHANNEL_LAYOUT_MASK and AvChannelLayout macros #182

Open dmtrKovalenko opened 5 months ago

dmtrKovalenko commented 5 months ago

Right now the bindings for the struct AVChannelLayout is provided but the actual way to create the struct are not.

Here is a part of sources that are not covered https://github.com/FFmpeg/FFmpeg/blob/2f8bf90054a5f7455f35b8705163f81c4413d779/libavutil/channel_layout.h#L363-L423

I know that this is a C macro which is annoying to declare but we can at least provide bindings to the costs defined below or at max replicate the macro with rust macro_rules.

If you think this is valuable I can open a PR for that