[PR #1618] [CLOSED] [FIX] Initialize data structures for the rust CEA-708 decoder and correct Dtvcc #2332

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

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1618
Author: @IshanGrover2004
Created: 6/20/2024
Status: Closed

Base: masterHead: 1499-initialize-dtvcc-ds


📝 Commits (10+)

  • 2a1fce5 feat: Change Dtvcc::new() to create Dtvcc using ccx_decoder_dtvcc_settings
  • 05c6a2f feat: Create ccxr_dtvcc_init & ccxr_dtvcc_free
  • af23301 feat: Create ccxr_dtvcc_set_encoder to set encoder value
  • 92cc3c5 feat: Add dtvcc_rust member in lib_cc_decoder struct for storing dtvcc
  • b9215f5 feat: Initialize extern dtvcc init & free functions in C header
  • fce9fcf feat: Create function to set dtvcc encoder to dtvcc_rust in C
  • e8a2660 feat: Use of dtvcc init & free in C
  • 1ce5ad4 fix: rust build
  • cf2a335 fix: Value of dtvcc_rust.is_active as per C
  • 6cb6f6e refactor: Changed ccxr_flush_decoder to flush decoder of dtvcc_rust

📊 Changes

10 files changed (+264 additions, -52 deletions)

View changed files

📝 src/lib_ccx/ccx_decoders_common.c (+12 -5)
📝 src/lib_ccx/ccx_decoders_common.h (+4 -0)
📝 src/lib_ccx/ccx_decoders_structs.h (+3 -0)
📝 src/lib_ccx/ccx_dtvcc.h (+7 -1)
📝 src/lib_ccx/general_loop.c (+17 -1)
📝 src/lib_ccx/lib_ccx.h (+4 -0)
📝 src/lib_ccx/mp4.c (+8 -0)
📝 src/rust/src/decoder/mod.rs (+110 -31)
📝 src/rust/src/decoder/service_decoder.rs (+7 -6)
📝 src/rust/src/lib.rs (+92 -8)

📄 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.

Closes #1499

Work to be done in this PR:

  • Change Dtvcc::new() to create Dtvcc using ccx_decoder_dtvcc_settings as done here
  • Create a new extern C fn ccxr_dtvcc_init() in lib.rs and use this at all places where dtvcc_init() is being called. (Probably add a new struct field to lib_cc_decode like dtvcc_rust and store Dtvcc there instead of using the dtvcc field)
  • Similar for dtvcc_free()
  • Change ccxr_process_cc_data to use Dtvcc from dec_ctx instead of creating a new one

Additionally to fix mp4 code flow:-

  • Call the corresponding rust function here and pass Dtvcc as done in the above steps

🔄 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/1618 **Author:** [@IshanGrover2004](https://github.com/IshanGrover2004) **Created:** 6/20/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `1499-initialize-dtvcc-ds` --- ### 📝 Commits (10+) - [`2a1fce5`](https://github.com/CCExtractor/ccextractor/commit/2a1fce5397627cf3cabd227e283d8d00411672f7) feat: Change `Dtvcc::new()` to create Dtvcc using `ccx_decoder_dtvcc_settings` - [`05c6a2f`](https://github.com/CCExtractor/ccextractor/commit/05c6a2f7a4e1e4660447bbcd4ce669cabe4c6a52) feat: Create `ccxr_dtvcc_init` & `ccxr_dtvcc_free` - [`af23301`](https://github.com/CCExtractor/ccextractor/commit/af23301b491cb40f7f6a0105f611a3ade12ef6d6) feat: Create `ccxr_dtvcc_set_encoder` to set encoder value - [`92cc3c5`](https://github.com/CCExtractor/ccextractor/commit/92cc3c54c304af5496a9b1288b34940b6392a3bf) feat: Add `dtvcc_rust` member in `lib_cc_decoder` struct for storing dtvcc - [`b9215f5`](https://github.com/CCExtractor/ccextractor/commit/b9215f590d22d4a64b0def381d3bbd0d3143a804) feat: Initialize extern `dtvcc init & free` functions in C header - [`fce9fcf`](https://github.com/CCExtractor/ccextractor/commit/fce9fcfc5d77f3da44c1fad71551335ade10b34c) feat: Create function to set dtvcc encoder to `dtvcc_rust` in C - [`e8a2660`](https://github.com/CCExtractor/ccextractor/commit/e8a2660895073322b0d13e63f7f0e8bc0e49ea4a) feat: Use of dtvcc init & free in C - [`1ce5ad4`](https://github.com/CCExtractor/ccextractor/commit/1ce5ad42326f96564f56791d2fe1cb3a5346f002) fix: rust build - [`cf2a335`](https://github.com/CCExtractor/ccextractor/commit/cf2a335c064745fbfd88a0aabf7675ba888add2f) fix: Value of `dtvcc_rust.is_active` as per C - [`6cb6f6e`](https://github.com/CCExtractor/ccextractor/commit/6cb6f6e346d96466517d855b5e28f980f1ba0716) refactor: Changed `ccxr_flush_decoder` to flush decoder of `dtvcc_rust` ### 📊 Changes **10 files changed** (+264 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `src/lib_ccx/ccx_decoders_common.c` (+12 -5) 📝 `src/lib_ccx/ccx_decoders_common.h` (+4 -0) 📝 `src/lib_ccx/ccx_decoders_structs.h` (+3 -0) 📝 `src/lib_ccx/ccx_dtvcc.h` (+7 -1) 📝 `src/lib_ccx/general_loop.c` (+17 -1) 📝 `src/lib_ccx/lib_ccx.h` (+4 -0) 📝 `src/lib_ccx/mp4.c` (+8 -0) 📝 `src/rust/src/decoder/mod.rs` (+110 -31) 📝 `src/rust/src/decoder/service_decoder.rs` (+7 -6) 📝 `src/rust/src/lib.rs` (+92 -8) </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. - [x] **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. --- Closes #1499 Work to be done in this PR: - [x] Change Dtvcc::new() to create Dtvcc using ccx_decoder_dtvcc_settings as done [here]( https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/ccx_dtvcc.c#L76-L124) - [x] Create a new extern C fn `ccxr_dtvcc_init()` in [lib.rs](https://github.com/CCExtractor/ccextractor/blob/master/src/rust/src/lib.rs) and use this at all places where `dtvcc_init()` is being called. (Probably add a new struct field to lib_cc_decode like `dtvcc_rust` and store Dtvcc there instead of using the dtvcc field) - [x] Similar for `dtvcc_free()` - [x] Change [ccxr_process_cc_data](https://github.com/CCExtractor/ccextractor/blob/master/src/rust/src/lib.rs#L53-L75) to use Dtvcc from `dec_ctx` instead of creating a new one Additionally to fix mp4 code flow:- - [x] Call the corresponding rust function [here](https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/mp4.c#L398) and pass Dtvcc as done in the above steps --- <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:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2332