-
Notifications
You must be signed in to change notification settings - Fork 13
implement prft box #91
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
|
Note Reviews pausedUse the following commands to manage reviews:
WalkthroughAdds a new PRFT atom implementation and integrates it into the public API. Introduces Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom Pre-merge Checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (4)**/*.rs📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/**/*.rs📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/any.rs📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/test/**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-08-31T04:06:57.364ZApplied to files:
📚 Learning: 2025-08-31T04:06:57.364ZApplied to files:
🔇 Additional comments (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @src/prft.rs:
- Around line 18-50: ReferenceTime is missing serde derives causing Prft (which
derives Serialize/Deserialize under the serde feature) to fail; add conditional
serde derives to the ReferenceTime enum using cfg_attr(feature = "serde",
derive(serde::Serialize, serde::Deserialize)) so the enum is
serializable/deserializable when the serde feature is enabled, keeping its
existing Debug/Clone/PartialEq/Eq/Default derives intact; update the
ReferenceTime definition (the enum symbol ReferenceTime) to include this
cfg_attr so the build succeeds with the serde feature.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/any.rssrc/lib.rssrc/prft.rssrc/test/h264.rs
🧰 Additional context used
📓 Path-based instructions (4)
**/*.rs
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.rs: Code must be clippy-clean (cargo clippy --all-targets --all-features -- -D warnings)
Code must be formatted with rustfmt (cargo fmt) and pass formatting checks (cargo fmt -- --check)
Write unit tests inline within modules using #[cfg(test)]
Files:
src/lib.rssrc/any.rssrc/prft.rssrc/test/h264.rs
src/**/*.rs
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.rs: Each MP4 atom type must implement the Atom trait with KIND, decode_body(), and encode_body()
Use Header::read_from() to handle large atoms without loading entire contents into memory
All operations should return Result using custom error types defined in error.rs
Use the custom Buf/BufMut traits for contiguous byte slices instead of ad-hoc buffer handling
Files:
src/lib.rssrc/any.rssrc/prft.rssrc/test/h264.rs
src/any.rs
📄 CodeRabbit inference engine (CLAUDE.md)
Register new atom types in the Any enum (src/any.rs) to enable flexible decoding
Files:
src/any.rs
src/test/**
📄 CodeRabbit inference engine (CLAUDE.md)
Put integration tests under src/test/ with sample MP4 files for different codecs
Files:
src/test/h264.rs
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: kixelated/mp4-atom PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-31T04:06:57.364Z
Learning: Applies to src/**/*.rs : Each MP4 atom type must implement the Atom trait with KIND, decode_body(), and encode_body()
Learnt from: CR
Repo: kixelated/mp4-atom PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-31T04:06:57.364Z
Learning: Applies to src/any.rs : Register new atom types in the Any enum (src/any.rs) to enable flexible decoding
📚 Learning: 2025-08-31T04:06:57.364Z
Learnt from: CR
Repo: kixelated/mp4-atom PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-31T04:06:57.364Z
Learning: Applies to src/any.rs : Register new atom types in the Any enum (src/any.rs) to enable flexible decoding
Applied to files:
src/any.rssrc/test/h264.rs
📚 Learning: 2025-08-31T04:06:57.364Z
Learnt from: CR
Repo: kixelated/mp4-atom PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-31T04:06:57.364Z
Learning: Applies to src/**/*.rs : Each MP4 atom type must implement the Atom trait with KIND, decode_body(), and encode_body()
Applied to files:
src/any.rssrc/prft.rssrc/test/h264.rs
🪛 GitHub Actions: PR
src/prft.rs
[error] 53-53: the trait bound prft::ReferenceTime: Serialize is not satisfied.
🪛 GitHub Check: build
src/prft.rs
[failure] 53-53:
the trait bound prft::ReferenceTime: Deserialize<'_> is not satisfied
[failure] 53-53:
the trait bound ReferenceTime: Deserialize<'_> is not satisfied
[failure] 58-58:
the trait bound prft::ReferenceTime: Deserialize<'_> is not satisfied
[failure] 58-58:
the trait bound ReferenceTime: Deserialize<'_> is not satisfied
[failure] 58-58:
the trait bound prft::ReferenceTime: Deserialize<'_> is not satisfied
[failure] 58-58:
the trait bound ReferenceTime: Deserialize<'_> is not satisfied
[failure] 53-53:
the trait bound ReferenceTime: Serialize is not satisfied
[failure] 53-53:
the trait bound prft::ReferenceTime: Serialize is not satisfied
🔇 Additional comments (7)
src/prft.rs (4)
6-16: LGTM!The
ext!macro invocation correctly defines the PRFT extension with version support (V0/V1) and the appropriate flag bits matching the ISO/IEC 14496-12 specification.
66-98: LGTM!The decoding logic correctly handles:
- Field order (reference_track_id, ntp_timestamp, then version-dependent media_time)
- Flag precedence for
utc_time_semanticsderivation- V0/V1 version selection for 32-bit vs 64-bit
media_time
100-133: LGTM!The encoding logic correctly:
- Maps
ReferenceTimevariants to the appropriate flag combinations- Auto-selects V0/V1 based on whether
media_timefits in au32- Maintains symmetry with the decode path
136-213: LGTM!The test suite provides good coverage:
- V1 decode/encode with conformance data
- V0 round-trip at the boundary (
u32::MAX)RealTimesemantics with combined flagssrc/lib.rs (1)
155-155: LGTM!The module declaration and public re-export follow the existing crate conventions. Based on learnings, this correctly integrates the new PRFT atom type into the crate's public API.
Also applies to: 174-174
src/any.rs (1)
332-332: LGTM!The
Prftvariant is correctly registered in theAnyenum's basic list, enabling flexible decoding. As per coding guidelines, new atom types should be registered in theAnyenum insrc/any.rs.src/test/h264.rs (1)
653-666: LGTM!The test correctly validates the new
Prftdecoding path with concrete field assertions, replacing the previousUnknownvariant handling. This confirms the end-to-end integration of the PRFT box implementation.
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
CodeRabbit configuration file (
|
|
@coderabbitai pause |
✅ Actions performedReviews paused. |
This is from ISO/IEC 14496-12:2022 Section 8.16.5, and is useful in CMAF and DASH. We already had a test file that includes it, but the checking was manual.
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
This is from ISO/IEC 14496-12:2022 Section 8.16.5, and is useful in CMAF and DASH. We already had a test file that includes it, but the checking was manual.