Skip to content

Conversation

@hrideshmg
Copy link
Contributor

@hrideshmg hrideshmg commented Jun 26, 2025

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.

Cargo tests have been failing on Windows on the master branch for a while now. The primary reason seems to be differences in linking behaviour between the GNU and MSVC ABIs, see here for more info.

The main issue was that when running unit tests, the linker that MSVC uses couldn't resolve several external C symbols, primarily these. This makes sense as when running unit tests, the C side of the codebase never comes into play. To address this, I added a cfg_if block that provides mock implementations during test runs so that the tests can run without requiring linkage to C symbols.

I also noticed that there was an extern declaration in lib_ccxr for MPEG_CLOCK_FREQUENCY, after consulting with @steel-bucket I realized that this is was an oversight as the lib_ccxr crate is meant to be a clean idiomatic rust layer. To fix this, I added a new field to GLOBAL_TIMING_INFO and ensured the MPEG clock frequency is passed explicitly through FFI.

With these changes, all unit tests now run successfully on Windows. This should help with fixing any windows specific bugs in upcoming PRs.

@hrideshmg hrideshmg force-pushed the windows_cargo_fix branch from a89c6ab to 4c3f4fb Compare June 26, 2025 18:23
@hrideshmg
Copy link
Contributor Author

hrideshmg commented Jun 26, 2025

Waiting for #1705 and #1706 to be merged so that the Windows sample platform tests can be run.

@hrideshmg hrideshmg force-pushed the windows_cargo_fix branch from 4c3f4fb to c7eea7e Compare June 27, 2025 13:15
@ccextractor-bot
Copy link
Collaborator

CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 2260165...:

Report Name Tests Passed
Broken 11/13
CEA-708 7/14
DVB 6/7
DVD 0/3
DVR-MS 2/2
General 14/27
Hauppage 1/3
MP4 3/3
NoCC 10/10
Options 79/86
Teletext 7/21
WTV 12/13
XDS 24/34

All tests passing on the master branch were passed completely.

NOTE: The following tests have been failing on the master branch as well as the PR:

Congratulations: Merging this PR would fix the following tests:


Check the result page for more info.

@ccextractor-bot
Copy link
Collaborator

CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 715597e...:

Report Name Tests Passed
Broken 12/13
CEA-708 7/14
DVB 4/7
DVD 3/3
DVR-MS 2/2
General 13/27
Hauppage 3/3
MP4 3/3
NoCC 10/10
Options 84/86
Teletext 21/21
WTV 10/13
XDS 16/34

All tests passing on the master branch were passed completely.

NOTE: The following tests have been failing on the master branch as well as the PR:

Congratulations: Merging this PR would fix the following tests:


Check the result page for more info.

Copy link
Member

@prateekmedia prateekmedia left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks.

@prateekmedia prateekmedia merged commit 77b93e5 into CCExtractor:master Jun 29, 2025
18 checks passed
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