Skip to content

Conversation

@steel-bucket
Copy link
Contributor

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

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.

@steel-bucket steel-bucket changed the title [FIX]Xds general 134 errors [FIX] 134 Codes in XDS and General Tests Jul 6, 2025
@prateekmedia prateekmedia requested a review from Copilot July 6, 2025 16:48

This comment was marked as outdated.

@prateekmedia prateekmedia requested a review from Copilot July 6, 2025 17:28
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 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::new from boxed defaults to unsafe pointer dereferencing
  • Adds an initialize_dtvcc_ctx helper to set up dtvcc_ctx for tests
  • Updates tests (test_do_cb, test_process_cc_data, etc.) to use the new helper; changes test_verify_parity signature

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 {

@ccextractor-bot

This comment was marked as off-topic.

@ccextractor-bot

This comment was marked as off-topic.

@prateekmedia prateekmedia merged commit 099fa05 into CCExtractor:master Jul 6, 2025
18 checks passed
steel-bucket added a commit to steel-bucket/ccextractor that referenced this pull request Jul 29, 2025
* Made pointers valid in Unit Tests of Decoder

* fix: test_do_cb

* Copilot Suggestions

* Suggestions about Redundancy

* Suggestions about Redundancy
prateekmedia added a commit that referenced this pull request Dec 8, 2025
* 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]>
x15sr71 pushed a commit to x15sr71/ccextractor that referenced this pull request Dec 9, 2025
* 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]>
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.

3 participants