[PR #1458] [CLOSED] [WIP] Set up a Rust native version of Hardsubx context and rewrite hardsubx.c #2197

Closed
opened 2026-01-29 17:20:47 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1458
Author: @shashwat1002
Created: 10/31/2022
Status: Closed

Base: masterHead: struct_rewrite


📝 Commits (10+)

  • f3b331b Set up a Rust native version of Hardsubx context
  • a3fd49c format fixes
  • 0935934 clippy changes
  • 6e378e1 fix bugs during initialization of native hardsubx context
  • dc56463 change from Option reference types to raw pointers for Hardsubx context and define AVPacket
  • 304d1c3 add main file for hardsubx
  • 58f6334 add function for deinitializing hardsubx context
  • 3c56b24 change all hardsubx context raw pointers to use native HardsubxContext
  • 2d4083f for all helper functions return string and not C character array
  • 2465d1e change sub_color to a native enum

📊 Changes

11 files changed (+1458 additions, -144 deletions)

View changed files

📝 src/lib_ccx/hardsubx.c (+4 -2)
📝 src/rust/Cargo.lock (+83 -2)
📝 src/rust/Cargo.toml (+4 -0)
📝 src/rust/build.rs (+27 -0)
📝 src/rust/src/hardsubx/classifier.rs (+33 -81)
📝 src/rust/src/hardsubx/decoder.rs (+731 -58)
src/rust/src/hardsubx/main.rs (+215 -0)
📝 src/rust/src/hardsubx/mod.rs (+340 -1)
📝 src/rust/src/hardsubx/utility.rs (+13 -0)
📝 src/rust/src/lib.rs (+7 -0)
📝 src/rust/wrapper.h (+1 -0)

📄 Description

  • constructor function (new) made that takes options as argument [this will replace init_hardsubx]
  • default function for hardsubx context
  • default function for cc_subtitle

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1458 **Author:** [@shashwat1002](https://github.com/shashwat1002) **Created:** 10/31/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `struct_rewrite` --- ### 📝 Commits (10+) - [`f3b331b`](https://github.com/CCExtractor/ccextractor/commit/f3b331b8cfae16383af4ef50c086ea18291861ea) Set up a Rust native version of Hardsubx context - [`a3fd49c`](https://github.com/CCExtractor/ccextractor/commit/a3fd49c2b5a45463b71fb4619a1c23abcf294221) format fixes - [`0935934`](https://github.com/CCExtractor/ccextractor/commit/09359348e5f007fdff5dbb2fffe82d4f6375b1a4) clippy changes - [`6e378e1`](https://github.com/CCExtractor/ccextractor/commit/6e378e1ed88da6806b3b79b91eae2fda00a4465e) fix bugs during initialization of native hardsubx context - [`dc56463`](https://github.com/CCExtractor/ccextractor/commit/dc564637966fc1ab3d4493372ae9eb824b945609) change from Option reference types to raw pointers for Hardsubx context and define AVPacket - [`304d1c3`](https://github.com/CCExtractor/ccextractor/commit/304d1c37456067ff6ed22ab958d1f8fe085980b1) add main file for hardsubx - [`58f6334`](https://github.com/CCExtractor/ccextractor/commit/58f6334bc3e4bb9a3f12e6f7fd9a26e04fb83042) add function for deinitializing hardsubx context - [`3c56b24`](https://github.com/CCExtractor/ccextractor/commit/3c56b24692d51a6881094ea798993d5b4afeda07) change all hardsubx context raw pointers to use native HardsubxContext - [`2d4083f`](https://github.com/CCExtractor/ccextractor/commit/2d4083f54434c681b5a4c819b67aa5aa6ca44821) for all helper functions return string and not C character array - [`2465d1e`](https://github.com/CCExtractor/ccextractor/commit/2465d1e23c09b2b4ce3cb3f7a80de1c810e7d025) change sub_color to a native enum ### 📊 Changes **11 files changed** (+1458 additions, -144 deletions) <details> <summary>View changed files</summary> 📝 `src/lib_ccx/hardsubx.c` (+4 -2) 📝 `src/rust/Cargo.lock` (+83 -2) 📝 `src/rust/Cargo.toml` (+4 -0) 📝 `src/rust/build.rs` (+27 -0) 📝 `src/rust/src/hardsubx/classifier.rs` (+33 -81) 📝 `src/rust/src/hardsubx/decoder.rs` (+731 -58) ➕ `src/rust/src/hardsubx/main.rs` (+215 -0) 📝 `src/rust/src/hardsubx/mod.rs` (+340 -1) 📝 `src/rust/src/hardsubx/utility.rs` (+13 -0) 📝 `src/rust/src/lib.rs` (+7 -0) 📝 `src/rust/wrapper.h` (+1 -0) </details> ### 📄 Description - constructor function (new) made that takes options as argument [this will replace init_hardsubx] - default function for hardsubx context - default function for cc_subtitle --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:20:47 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2197