[IMPROVEMENT] Rescue of PR #1927: SRT encoder port to Rust#2188
Closed
Atul-Chahar wants to merge 10 commits intoCCExtractor:masterfrom
Closed
[IMPROVEMENT] Rescue of PR #1927: SRT encoder port to Rust#2188Atul-Chahar wants to merge 10 commits intoCCExtractor:masterfrom
Atul-Chahar wants to merge 10 commits intoCCExtractor:masterfrom
Conversation
- Renamed CcxSWriteRust to ccxr_s_write for consistency - Renamed EncoderCtxRust to ccxr_encoder_ctx - Changed out field from raw pointer to Vec<ccxr_s_write> - Unified encode_line functions into single optimal version - Added ccxr_write_cc_bitmap_as_srt (OCR stub) - Added ccxr_write_cc_subtitle_as_srt with proper cleanup - Added ccxr_write_cc_buffer_as_srt using Rust context - Updated C code to call Rust implementations - Improved type safety and eliminated unsafe pointer dereferencing
…ompatibility - wrote_ccd_channel_header: i8 -> u8 - millis_separator: i8 -> u8 - Added type casts in from_ctype conversion This fixes compilation errors on Linux where char is unsigned by default.
The Rust function was calling C which called Rust again, causing infinite recursion. Removed the wrapper since OCR functionality stays in C for now.
Contributor
Author
|
Tested locally on Linux ✅: The C build compiles flawlessly and |
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 90128d8...:
Your PR breaks these cases:
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:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Summary
This is a rescue of the stale/closed PR #1927 by @VivianVRodrigues. The original PR successfully ported the SRT encoder to Rust but was abandoned due to a Linux build failure caused by C-header
#includeordering and missing struct forward declarations inutility.h.I have:
master.Cargo.tomland C files.utility.hinclude issue by adding the properstruct encoder_ctx;,struct cc_subtitle;, andstruct eia608_screen;forward declarations as requested by the reviewers.E0603(private trait import) compiler error insrc/rust/src/libccxr_exports/encoder_ctx.rs.cargo testsuite pass flawlessly.All credit for the hard porting work goes to Vivian. I merely fixed the compilation bugs, resolved conflicts, and completed the last mile so this feature can merge.
Co-authored-by: Vivian Rodrigues vivianrodrigues@Vivians-Laptop.local
AI disclosure: 🟡 AI-assisted — I reviewed, tested, and resolved the merge conflicts and C-header build failures.
Fixes #1927 requirements.