这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ldm0
Copy link
Member

@ldm0 ldm0 commented Aug 19, 2025

No description provided.

@ldm0 ldm0 requested a review from Copilot August 19, 2025 21:04
Copy link

Copilot AI left a 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);
Copy link

Copilot AI Aug 19, 2025

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.

Suggested change
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);

Copilot uses AI. Check for mistakes.
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);
Copy link

Copilot AI Aug 19, 2025

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.

Suggested change
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);

Copilot uses AI. Check for mistakes.
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);
Copy link

Copilot AI Aug 19, 2025

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.

Suggested change
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);

Copilot uses AI. Check for mistakes.
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);
Copy link

Copilot AI Aug 19, 2025

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.

Suggested change
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);

Copilot uses AI. Check for mistakes.
@ldm0 ldm0 merged commit 63699f4 into CCExtractor:master Aug 19, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant