Skip to content
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

cleanup amf0 crate #246

Merged
merged 6 commits into from
Jan 12, 2025
Merged

cleanup amf0 crate #246

merged 6 commits into from
Jan 12, 2025

Conversation

TroyKomodo
Copy link
Member

Cleans up the AMF0 decoder / encoder crate and adds some documentation around its usage.

CLOUD-24

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 98.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 49.21%. Comparing base (ff39b23) to head (c5264fc).
Report is 7 commits behind head on main.

Current head c5264fc differs from pull request most recent head f1e9b86

Please upload reports for the commit f1e9b86 to get more accurate results.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/amf0/src/encode.rs 91.83% 4 Missing ⚠️
crates/amf0/src/decode.rs 98.96% 1 Missing ⚠️
crates/flv/src/errors.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #246      +/-   ##
==========================================
- Coverage   49.70%   49.21%   -0.50%     
==========================================
  Files         196      194       -2     
  Lines       16033    15876     -157     
==========================================
- Hits         7970     7813     -157     
  Misses       8063     8063              
Files with missing lines Coverage Δ
crates/amf0/src/define.rs 100.00% <100.00%> (ø)
crates/flv/src/define.rs 62.50% <ø> (ø)
crates/flv/src/flv.rs 81.28% <100.00%> (+0.11%) ⬆️
crates/rtmp/src/messages/define.rs 100.00% <ø> (ø)
crates/rtmp/src/messages/errors.rs 100.00% <ø> (ø)
crates/rtmp/src/messages/parser.rs 100.00% <100.00%> (ø)
crates/rtmp/src/messages/tests.rs 93.82% <100.00%> (-0.30%) ⬇️
crates/rtmp/src/netconnection/errors.rs 100.00% <ø> (ø)
crates/rtmp/src/netconnection/tests.rs 100.00% <100.00%> (ø)
crates/rtmp/src/netconnection/writer.rs 100.00% <100.00%> (ø)
... and 11 more

... and 1 file with indirect coverage changes

Components Coverage Δ
scuffle-batching 100.00% <ø> (ø)
scuffle-bootstrap 27.15% <ø> (ø)
scuffle-context 100.00% <ø> (ø)
scuffle-ffmpeg 0.00% <ø> (ø)
scuffle-h3-webtransport 0.00% <ø> (ø)
scuffle-http 0.00% <ø> (ø)
scuffle-metrics 42.69% <ø> (ø)
scuffle-pprof 0.00% <ø> (ø)
scuffle-settings 0.00% <ø> (ø)
scuffle-signal 100.00% <ø> (ø)
postcompile 0.00% <ø> (ø)
scuffle-image-processor ∅ <ø> (∅)

@TroyKomodo TroyKomodo force-pushed the troy/amf0 branch 2 times, most recently from 1296703 to 881da72 Compare January 10, 2025 22:37
Copy link
Member

@lennartkloock lennartkloock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thing I noticed: Don't we have to support amf0 references?

crates/amf0/src/decode.rs Outdated Show resolved Hide resolved
crates/amf0/src/decode.rs Outdated Show resolved Hide resolved
crates/amf0/src/decode.rs Outdated Show resolved Hide resolved
crates/rtmp/src/messages/parser.rs Show resolved Hide resolved
@TroyKomodo
Copy link
Member Author

TroyKomodo commented Jan 11, 2025

amf0 references

I have never seen an example of video data which produces them, which is why I didnt implement them. They are also a bit tricky to implement given the structure is stateless. Never mind, i read the spec incorrectly, they are specifically for arrays. We dont even support strict arrays. I think if we need this we will add it later.

@lennartkloock
Copy link
Member

?brawl merge

@scuffle-brawl
Copy link
Contributor

scuffle-brawl bot commented Jan 11, 2025

📌 Commit b8b63c8 has been approved and added to the merge queue.

Requested by: @lennartkloock

Approved by: @lennartkloock

@scuffle-brawl
Copy link
Contributor

scuffle-brawl bot commented Jan 11, 2025

🔒 Merge conflict
This pull request and the main branch have diverged in a way
that cannot be automatically merged. Please rebase your branch ontop of the
latest main branch and let the reviewer approve again.

Attempted merge from b8b63c8 into ff39b23

How do I rebase?
  1. git checkout troy/amf0 (Switch to your branch)
  2. git fetch upstream main (Fetch the latest changes from the
    upstream)
  3. git rebase upstream/main -p (Rebase your branch onto the
    upstream branch)
  4. Follow the prompts to resolve any conflicts (use git status if you get
    lost).
  5. git push self troy/amf0 --force-with-lease (Update this PR)`

You may also read
Git Rebasing to Resolve Conflicts by Drew Blessing
for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub.
It uses git merge instead of git rebase which makes the PR commit
history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually
due to difference between how Cargo.lock conflict is handled during merge
and rebase. This is normal, and you should still perform step 5 to update
this PR.

@TroyKomodo
Copy link
Member Author

?brawl merge

@scuffle-brawl
Copy link
Contributor

scuffle-brawl bot commented Jan 12, 2025

📌 Commit f1e9b86 has been approved and added to the merge queue.

Requested by: @TroyKomodo

Approved by: @lennartkloock

@scuffle-brawl
Copy link
Contributor

scuffle-brawl bot commented Jan 12, 2025

⌛ Trying commit f1e9b86 with merge 38b399b...

@scuffle-brawl
Copy link
Contributor

scuffle-brawl bot commented Jan 12, 2025

🎉 Build successful!
Completed in 9:03

Approved by: @lennartkloock
Pushing 38b399b to main

@scuffle-brawl scuffle-brawl bot merged commit 38b399b into main Jan 12, 2025
8 checks passed
@scuffle-brawl scuffle-brawl bot deleted the troy/amf0 branch January 12, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants