-
Notifications
You must be signed in to change notification settings - Fork 37
feat: add AVChannelLayout definitions and update to 0.16.5 #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds channel layout definitions as Rust equivalents of libavutil's channel layout macros and updates the crate version to 0.16.5. It introduces comprehensive support for FFmpeg's audio channel layout system.
Key changes:
- Added comprehensive channel layout definitions with Rust macros mirroring FFmpeg's C preprocessor macros
- Introduced feature flag for FFmpeg 8.* support with conditional compilation for new binaural channel types
- Updated crate version from 0.16.4 to 0.16.5
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib.rs | Exports the new channel_layout module in the public FFI interface |
| src/avutil/pixfmt.rs | Removes unused allow directive for non_upper_case_globals |
| src/avutil/mod.rs | Declares the new channel_layout module with rustfmt skip directive |
| src/avutil/channel_layout.rs | Complete implementation of channel layout constants and macros |
| Cargo.toml | Version bump and addition of ffmpeg8 feature flag |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| pub const AV_CHANNEL_LAYOUT_7POINT1_WIDE: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(8, AV_CH_LAYOUT_7POINT1_WIDE); | ||
| pub const AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(8, AV_CH_LAYOUT_7POINT1_WIDE_BACK); | ||
| pub const AV_CHANNEL_LAYOUT_5POINT1POINT2: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(8, AV_CH_LAYOUT_5POINT1POINT2); | ||
| pub const AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK: AVChannelLayout= AV_CHANNEL_LAYOUT_MASK!(8, AV_CH_LAYOUT_5POINT1POINT2_BACK); |
Copilot
AI
Aug 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before equals sign in type annotation. Should be consistent with other constant declarations that have a space before the equals sign.
| pub const AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK: AVChannelLayout= AV_CHANNEL_LAYOUT_MASK!(8, AV_CH_LAYOUT_5POINT1POINT2_BACK); | |
| pub const AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(8, AV_CH_LAYOUT_5POINT1POINT2_BACK); |
| pub const AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK: AVChannelLayout= AV_CHANNEL_LAYOUT_MASK!(8, AV_CH_LAYOUT_5POINT1POINT2_BACK); | ||
| pub const AV_CHANNEL_LAYOUT_OCTAGONAL: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(8, AV_CH_LAYOUT_OCTAGONAL); | ||
| pub const AV_CHANNEL_LAYOUT_CUBE: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(8, AV_CH_LAYOUT_CUBE); | ||
| pub const AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK: AVChannelLayout= AV_CHANNEL_LAYOUT_MASK!(10, AV_CH_LAYOUT_5POINT1POINT4_BACK); |
Copilot
AI
Aug 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before equals sign in type annotation. Should be consistent with other constant declarations that have a space before the equals sign.
| pub const AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK: AVChannelLayout= AV_CHANNEL_LAYOUT_MASK!(10, AV_CH_LAYOUT_5POINT1POINT4_BACK); | |
| pub const AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(10, AV_CH_LAYOUT_5POINT1POINT4_BACK); |
| pub const AV_CHANNEL_LAYOUT_CUBE: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(8, AV_CH_LAYOUT_CUBE); | ||
| pub const AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK: AVChannelLayout= AV_CHANNEL_LAYOUT_MASK!(10, AV_CH_LAYOUT_5POINT1POINT4_BACK); | ||
| pub const AV_CHANNEL_LAYOUT_7POINT1POINT2: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(10, AV_CH_LAYOUT_7POINT1POINT2); | ||
| pub const AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK: AVChannelLayout= AV_CHANNEL_LAYOUT_MASK!(12, AV_CH_LAYOUT_7POINT1POINT4_BACK); |
Copilot
AI
Aug 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before equals sign in type annotation. Should be consistent with other constant declarations that have a space before the equals sign.
| pub const AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK: AVChannelLayout= AV_CHANNEL_LAYOUT_MASK!(12, AV_CH_LAYOUT_7POINT1POINT4_BACK); | |
| pub const AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(12, AV_CH_LAYOUT_7POINT1POINT4_BACK); |
| pub const AV_CHANNEL_LAYOUT_7POINT1POINT2: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(10, AV_CH_LAYOUT_7POINT1POINT2); | ||
| pub const AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK: AVChannelLayout= AV_CHANNEL_LAYOUT_MASK!(12, AV_CH_LAYOUT_7POINT1POINT4_BACK); | ||
| pub const AV_CHANNEL_LAYOUT_7POINT2POINT3: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(12, AV_CH_LAYOUT_7POINT2POINT3); | ||
| pub const AV_CHANNEL_LAYOUT_9POINT1POINT4_BACK: AVChannelLayout= AV_CHANNEL_LAYOUT_MASK!(14, AV_CH_LAYOUT_9POINT1POINT4_BACK); |
Copilot
AI
Aug 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before equals sign in type annotation. Should be consistent with other constant declarations that have a space before the equals sign.
| pub const AV_CHANNEL_LAYOUT_9POINT1POINT4_BACK: AVChannelLayout= AV_CHANNEL_LAYOUT_MASK!(14, AV_CH_LAYOUT_9POINT1POINT4_BACK); | |
| pub const AV_CHANNEL_LAYOUT_9POINT1POINT4_BACK: AVChannelLayout = AV_CHANNEL_LAYOUT_MASK!(14, AV_CH_LAYOUT_9POINT1POINT4_BACK); |
No description provided.