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

Pch07/ffmpeg non io tests #261

Merged
merged 32 commits into from
Jan 28, 2025

Conversation

philipch07
Copy link
Member

@philipch07 philipch07 commented Jan 21, 2025

Added tests to the non io files in the ffmpeg crate.

So far I have only run into one issue:
In the logs.rs file, I updated some log levels to their respective names in log_callback_tracing(), let me know if this change is appropriate. Additionally, test_log_callback_tracing() excludes the tracing::warn! case because it doesn't work for some reason; I couldn't figure this out.

In the frame.rs file, the last test is incorrect due to is_audio() returning false instead of true. I left it commented for now.

In the encoder.rs file, I didn't include tests for the Encoder::send_frame(), Encoder::receive_packet(), MuxerEncoder::send_eof(), MuxerEncoder::send_frame(), or MuxerEncoder::handle_packets() functions.

In the decoder.rs file, I didn't include tests for GenericDecoder::send_packet(), GenericDecoder::send_eof(), or GenericDecoder::receive_frame() functions.

The untested functions are due to them being kinda complex (also they seem to be related to the untested functions in the ffmpeg/io folder. It would probably be better to work on all of those in one go since it seems pretty technical.

@philipch07 philipch07 force-pushed the pch07/ffmpeg_non_io_tests branch from d716411 to edc6a64 Compare January 23, 2025 04:08
@philipch07 philipch07 marked this pull request as ready for review January 23, 2025 04:13
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.75%. Comparing base (6457685) to head (aa4dbab).
Report is 33 commits behind head on main.

Current head aa4dbab differs from pull request most recent head 34c6271

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #261      +/-   ##
==========================================
+ Coverage   63.92%   72.75%   +8.83%     
==========================================
  Files         203      203              
  Lines       15846    15792      -54     
==========================================
+ Hits        10129    11489    +1360     
+ Misses       5717     4303    -1414     
Files with missing lines Coverage Δ
crates/ffmpeg/src/codec.rs 100.00% <ø> (+100.00%) ⬆️
crates/ffmpeg/src/consts.rs 100.00% <ø> (+57.14%) ⬆️
crates/ffmpeg/src/decoder.rs 80.79% <ø> (+80.79%) ⬆️
crates/ffmpeg/src/dict.rs 98.52% <100.00%> (+61.81%) ⬆️
crates/ffmpeg/src/encoder.rs 73.68% <100.00%> (+73.68%) ⬆️
crates/ffmpeg/src/error.rs 100.00% <ø> (+94.02%) ⬆️
crates/ffmpeg/src/filter_graph.rs 96.20% <ø> (+96.20%) ⬆️
crates/ffmpeg/src/frame.rs 100.00% <100.00%> (+100.00%) ⬆️
crates/ffmpeg/src/io/input.rs 98.07% <100.00%> (+0.05%) ⬆️
crates/ffmpeg/src/limiter.rs 100.00% <ø> (+100.00%) ⬆️
... and 5 more

... and 1 file with indirect coverage changes

Components Coverage Δ
scuffle-aac 89.65% <ø> (ø)
scuffle-amf0 100.00% <ø> (ø)
scuffle-av1 98.66% <ø> (ø)
scuffle-batching 100.00% <ø> (ø)
scuffle-bootstrap 86.50% <ø> (ø)
scuffle-bytes-util 100.00% <ø> (ø)
scuffle-context 100.00% <ø> (ø)
scuffle-expgolomb 100.00% <ø> (ø)
scuffle-ffmpeg 90.71% <100.00%> (+58.90%) ⬆️
scuffle-flv 94.76% <ø> (ø)
scuffle-future-ext 50.00% <ø> (ø)
scuffle-h3-webtransport 0.00% <ø> (ø)
scuffle-http 22.48% <ø> (ø)
scuffle-metrics 66.39% <ø> (ø)
postcompile 79.36% <ø> (ø)
scuffle-pprof 100.00% <ø> (ø)
scuffle-settings 93.66% <ø> (ø)
scuffle-signal 100.00% <ø> (ø)

@philipch07 philipch07 force-pushed the pch07/ffmpeg_non_io_tests branch from 5af54c9 to 68cf0da Compare January 23, 2025 23:57
@philipch07 philipch07 requested a review from TroyKomodo January 27, 2025 17:08
@TroyKomodo
Copy link
Member

?brawl merge

@scuffle-brawl
Copy link
Contributor

scuffle-brawl bot commented Jan 28, 2025

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

Requested by: @TroyKomodo

Approved by:

@TroyKomodo
Copy link
Member

?brawl cancel

scuffle-brawl bot added a commit that referenced this pull request Jan 28, 2025
Pch07/ffmpeg non io tests
Added tests to the non io files in the ffmpeg crate.

So far I have only run into one issue:
In the `logs.rs` file, I updated some log levels to their respective names in `log_callback_tracing()`, let me know if this change is appropriate. Additionally, `test_log_callback_tracing()` excludes the `tracing::warn!` case because it doesn't work for some reason; I couldn't figure this out.

In the `frame.rs` file, the last test is incorrect due to `is_audio()` returning `false` instead of `true`. I left it commented for now.

In the `encoder.rs` file, I didn't include tests for the `Encoder::send_frame()`, `Encoder::receive_packet()`, `MuxerEncoder::send_eof()`, `MuxerEncoder::send_frame()`, or `MuxerEncoder::handle_packets()` functions.

In the `decoder.rs` file, I didn't include tests for `GenericDecoder::send_packet()`, `GenericDecoder::send_eof()`, or `GenericDecoder::receive_frame()` functions.

The untested functions are due to them being kinda complex (also they seem to be related to the untested functions in the ffmpeg/io folder. It would probably be better to work on all of those in one go since it seems pretty technical.

Requested-by: TroyKomodo <49777269+TroyKomodo@users.noreply.github.com>
@scuffle-brawl
Copy link
Contributor

scuffle-brawl bot commented Jan 28, 2025

⌛ Trying commit 34c6271 with merge 9718268...

@scuffle-brawl
Copy link
Contributor

scuffle-brawl bot commented Jan 28, 2025

🚨 Cancelled CI run

@TroyKomodo
Copy link
Member

?brawl merge

@scuffle-brawl
Copy link
Contributor

scuffle-brawl bot commented Jan 28, 2025

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

Requested by: @TroyKomodo

Approved by: @TroyKomodo

@scuffle-brawl
Copy link
Contributor

scuffle-brawl bot commented Jan 28, 2025

⌛ Trying commit 34c6271 with merge 1776e79...

@scuffle-brawl
Copy link
Contributor

scuffle-brawl bot commented Jan 28, 2025

🎉 Build successful!
Completed in 8:28

Approved by: @TroyKomodo
Pushing 1776e79 to main

@scuffle-brawl scuffle-brawl bot merged commit 1776e79 into ScuffleCloud:main Jan 28, 2025
1 check passed
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.

None yet

2 participants