-
Notifications
You must be signed in to change notification settings - Fork 517
[FIX] 134 Codes in XDS and General Tests #1708
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
[FIX] 134 Codes in XDS and General Tests #1708
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 reverts the previous fallback logic in Dtvcc::new in favor of directly dereferencing the context pointers and updates the unit tests to initialize those pointers explicitly.
- Switches
Dtvcc::newfrom boxed defaults to unsafe pointer dereferencing - Adds an
initialize_dtvcc_ctxhelper to set updtvcc_ctxfor tests - Updates tests (
test_do_cb,test_process_cc_data, etc.) to use the new helper; changestest_verify_paritysignature
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/rust/src/lib.rs | Made test_verify_parity public and updated one test to use new ctx helper |
| src/rust/src/decoder/mod.rs | Rewrote Dtvcc::new to unsafe-deref pointers; added initialize_dtvcc_ctx and exposed the test module |
Comments suppressed due to low confidence (2)
src/rust/src/lib.rs:324
- This test function no longer has the #[test] attribute, so it won't be run. Please re-add #[test] above the function declaration.
pub fn test_verify_parity() {
src/rust/src/decoder/mod.rs:239
- [nitpick] Making the test module public exposes internal helpers; consider keeping it private (i.e.,
mod test) since it's only used in #[cfg(test)] builds.
pub mod test {
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
* Made pointers valid in Unit Tests of Decoder * fix: test_do_cb * Copilot Suggestions * Suggestions about Redundancy * Suggestions about Redundancy
* feat: added demuxer module * Cargo Lock Update * Completed file_functions and demuxer * Completed file_functions and demuxer * written extern functions for demuxer * Removed libc completely, added tests for gxf and ported gxf to C * Hardsubx error fixed * Fixing format issues * clippy errors fixed * fixing format issues * fixing format issues * Windows failing tests * Windows failing tests * demuxer: added demuxer data transfer functions and removed some structs * made Demuxer and File Functions * Minor formatting changes * Minor Rebasing changes * demuxer: format rust and unit test rust checks * C formatting * Windows Failing test * Windows Failing test * Update CHANGES.TXT * Update CHANGES.TXT * Windows Failing Tests * Windows Failing Tests * Problem in Copy to Rust and some typos that copilot review suggested * Minor Formatting Error * Windows Failing Regressions * Windows Failing Regressions * Minor Comment Change * Data transfer module for DemuxerData added and more rustlike syntax to ctorust.rs * Minor Formatting Changes * demuxer: Rebase and a few tweaks to file_functions * demuxer: Minor Formatting Error * [FIX] 134 Codes in XDS and General Tests (#1708) * Made pointers valid in Unit Tests of Decoder * fix: test_do_cb * Copilot Suggestions * Suggestions about Redundancy * Suggestions about Redundancy * [FEAT] Add `bitstream` module in `lib_ccxr` (#1649) * feat: Add bitstream module * run code formatters * Run cargo clippy --fix * Run cargo fmt --all * refactor: remove rust pointer from C struct * feat: Add bitstream module * run code formatters * Run cargo clippy --fix * Run cargo fmt --all * refactor: remove rust pointer from C struct * Added Bitstream to libccxr_exports * Minor Formatting Issue * Bitstream: Removed redundant CType * bitstream: recommended changes for is_byte_aligned * bitstream: recommended changes for long comments * bitstream: comment fix * bitstream: removed redundant comparism comments --------- Co-authored-by: Deepnarayan Sett <[email protected]> Co-authored-by: Deepnarayan Sett <[email protected]> * demuxer: minor formatting changes * Demuxer: Changes to mistakes in CHANGES.txt * Demuxer: Removed extra newline in ccextractor.c * Demuxer: Changes to Encoding resolved * Demuxer: Moved CCX_NOPTS to common structs and some changes to Demuxer Data regd. MPEG_CLOCK_FREQ * some refactoring to CCX_NOPTS * Demuxer: Minor Mistake regarding CHANGES.txt * Demuxer: Unit test rust failing because of CCX_NOPTS * Demuxer: changed common_structs to common_types * Demuxer: Removed redundant libraries from Cargo.toml and moved tempfile to dev-dependencies * Demuxer: Removed to_vec function and renamed PSIBuffer/PMTEntry from_ctype functions * Demuxer: Renamed Stream_Type, improved Time complexity of the default() function and removed redundant comments * Demuxer: Removed two repeated code blocks and removed redundant comments * Demuxer: Removed two code blocks * Demuxer: Review Changes * Demuxer: Removed redundant tests * Update src/rust/src/demuxer/demux.rs Co-authored-by: Prateek Sunal <[email protected]> * Demuxer: Errors due to Rebase * Demuxer: Removed get_stream_mode * Demuxer: Errors due to rebasing and removing redundant CType Functions * Demuxer: Failing ES regressions * Demuxer: MythTV failing regression * Demuxer: Removed redundant comments * Demuxer: Unplugged ES for now * Demuxer: Replugged in ES * Demuxer: Formatting error * Demuxer: Windows failing CI * Demuxer: Windows failing CI * Demuxer: Windows failing Regressions * Demuxer: Formatting * Demuxer: Minor Cargo Clippy change * Demuxer: running regressions again * Demuxer: Cargo Lockfile Change * Demuxer: running regressions again * Demuxer: running regressions again --------- Co-authored-by: Swastik Patel <[email protected]> Co-authored-by: Prateek Sunal <[email protected]>
* feat: added demuxer module * Cargo Lock Update * Completed file_functions and demuxer * Completed file_functions and demuxer * written extern functions for demuxer * Removed libc completely, added tests for gxf and ported gxf to C * Hardsubx error fixed * Fixing format issues * clippy errors fixed * fixing format issues * fixing format issues * Windows failing tests * Windows failing tests * demuxer: added demuxer data transfer functions and removed some structs * made Demuxer and File Functions * Minor formatting changes * Minor Rebasing changes * demuxer: format rust and unit test rust checks * C formatting * Windows Failing test * Windows Failing test * Update CHANGES.TXT * Update CHANGES.TXT * Windows Failing Tests * Windows Failing Tests * Problem in Copy to Rust and some typos that copilot review suggested * Minor Formatting Error * Windows Failing Regressions * Windows Failing Regressions * Minor Comment Change * Data transfer module for DemuxerData added and more rustlike syntax to ctorust.rs * Minor Formatting Changes * demuxer: Rebase and a few tweaks to file_functions * demuxer: Minor Formatting Error * [FIX] 134 Codes in XDS and General Tests (CCExtractor#1708) * Made pointers valid in Unit Tests of Decoder * fix: test_do_cb * Copilot Suggestions * Suggestions about Redundancy * Suggestions about Redundancy * [FEAT] Add `bitstream` module in `lib_ccxr` (CCExtractor#1649) * feat: Add bitstream module * run code formatters * Run cargo clippy --fix * Run cargo fmt --all * refactor: remove rust pointer from C struct * feat: Add bitstream module * run code formatters * Run cargo clippy --fix * Run cargo fmt --all * refactor: remove rust pointer from C struct * Added Bitstream to libccxr_exports * Minor Formatting Issue * Bitstream: Removed redundant CType * bitstream: recommended changes for is_byte_aligned * bitstream: recommended changes for long comments * bitstream: comment fix * bitstream: removed redundant comparism comments --------- Co-authored-by: Deepnarayan Sett <[email protected]> Co-authored-by: Deepnarayan Sett <[email protected]> * demuxer: minor formatting changes * Demuxer: Changes to mistakes in CHANGES.txt * Demuxer: Removed extra newline in ccextractor.c * Demuxer: Changes to Encoding resolved * Demuxer: Moved CCX_NOPTS to common structs and some changes to Demuxer Data regd. MPEG_CLOCK_FREQ * some refactoring to CCX_NOPTS * Demuxer: Minor Mistake regarding CHANGES.txt * Demuxer: Unit test rust failing because of CCX_NOPTS * Demuxer: changed common_structs to common_types * Demuxer: Removed redundant libraries from Cargo.toml and moved tempfile to dev-dependencies * Demuxer: Removed to_vec function and renamed PSIBuffer/PMTEntry from_ctype functions * Demuxer: Renamed Stream_Type, improved Time complexity of the default() function and removed redundant comments * Demuxer: Removed two repeated code blocks and removed redundant comments * Demuxer: Removed two code blocks * Demuxer: Review Changes * Demuxer: Removed redundant tests * Update src/rust/src/demuxer/demux.rs Co-authored-by: Prateek Sunal <[email protected]> * Demuxer: Errors due to Rebase * Demuxer: Removed get_stream_mode * Demuxer: Errors due to rebasing and removing redundant CType Functions * Demuxer: Failing ES regressions * Demuxer: MythTV failing regression * Demuxer: Removed redundant comments * Demuxer: Unplugged ES for now * Demuxer: Replugged in ES * Demuxer: Formatting error * Demuxer: Windows failing CI * Demuxer: Windows failing CI * Demuxer: Windows failing Regressions * Demuxer: Formatting * Demuxer: Minor Cargo Clippy change * Demuxer: running regressions again * Demuxer: Cargo Lockfile Change * Demuxer: running regressions again * Demuxer: running regressions again --------- Co-authored-by: Swastik Patel <[email protected]> Co-authored-by: Prateek Sunal <[email protected]>
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
I had made some change before to fix the Unit Tests failing, using Fallback values in functions. But this caused problems in a few regression tests. In this PR, I have reverted the function changes done to
Dtvcc::new()and have rather focused on the tests.