[PR #1664] [CLOSED] [FEAT] Migrate detect_stream_type() from C to Rust #2367

Open
opened 2026-01-29 17:21:46 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1664
Author: @vatsalkeshav
Created: 2/15/2025
Status: Closed

Base: masterHead: crabbe


📝 Commits (5)

📊 Changes

5 files changed (+283 additions, -2 deletions)

View changed files

📝 src/lib_ccx/stream_functions.c (+7 -0)
src/rust/lib_ccxr/src/util/stream_detector.rs (+262 -0)
📝 src/rust/src/libccxr_exports/mod.rs (+7 -0)
📝 src/thirdparty/freetype/gzip/ftzconf.h (+6 -1)
📝 src/thirdparty/freetype/gzip/zutil.h (+1 -1)

📄 Description

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(hopefully)

This PR tries to migrate the C function detect_stream_type()(src/lib_ccx/stream_functions.c) that handles the detection of video container to its pure Rust equivalent detect_stream_type(ctx: &mut CcxDemuxer) (src/rust/lib_ccxr/src/util/stream_detector.rs).
This migration follows Rust_migration_guide


🔄 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/1664 **Author:** [@vatsalkeshav](https://github.com/vatsalkeshav) **Created:** 2/15/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `crabbe` --- ### 📝 Commits (5) - [`8dcc9b2`](https://github.com/CCExtractor/ccextractor/commit/8dcc9b24b3a015c0773a4753abc8ac840eeb91ef) prepoc dir u/d in freetype - [`e278abb`](https://github.com/CCExtractor/ccextractor/commit/e278abb3aaf46e9d074f404109e25a8960229e83) updated Byte for macos as char - [`d003d4f`](https://github.com/CCExtractor/ccextractor/commit/d003d4fca4e18e0d38108c150a780480fa316520) stream detection from c to rust - [`be601cb`](https://github.com/CCExtractor/ccextractor/commit/be601cb3739d2c3f21ceeb4d14d1bffe5aedc9a6) improving 1 - [`b93516d`](https://github.com/CCExtractor/ccextractor/commit/b93516dd27921455b1163b86f87103f936d59cb9) improving 2 ### 📊 Changes **5 files changed** (+283 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/lib_ccx/stream_functions.c` (+7 -0) ➕ `src/rust/lib_ccxr/src/util/stream_detector.rs` (+262 -0) 📝 `src/rust/src/libccxr_exports/mod.rs` (+7 -0) 📝 `src/thirdparty/freetype/gzip/ftzconf.h` (+6 -1) 📝 `src/thirdparty/freetype/gzip/zutil.h` (+1 -1) </details> ### 📄 Description <!-- Please prefix your pull request with one of the following: **[FEATURE]** **[FIX]** **[IMPROVEMENT]**. --> **In raising this pull request, I confirm the following (please check boxes):** - [x] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [x] I have checked that another pull request for this purpose does not exist. - [x] I have considered, and confirmed that this submission will be valuable to others. - [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [x] I give this submission freely, and claim no ownership to its content. - [ ] **I have mentioned this change in the [changelog](https://github.com/CCExtractor/ccextractor/blob/master/docs/CHANGES.TXT).** **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. - [x] I am an active contributor to CCExtractor(hopefully) --- This PR tries to migrate the C function `detect_stream_type()`(`src/lib_ccx/stream_functions.c`) that handles the detection of video container to its pure Rust equivalent `detect_stream_type(ctx: &mut CcxDemuxer)` (`src/rust/lib_ccxr/src/util/stream_detector.rs`). This migration follows [Rust_migration_guide](https://github.com/CCExtractor/ccextractor/blob/master/docs/Rust_migration_guide.md) --- <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:21:46 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2367