[PR #1978] [MERGED] Add support for raw CDP (Caption Distribution Packet) files #2778

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

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1978
Author: @cfsmp3
Created: 1/4/2026
Status: Merged
Merged: 1/5/2026
Merged by: @cfsmp3

Base: masterHead: feat/issue-1406-raw-cdp-support


📝 Commits (6)

  • ddf2967 Fix MXF files containing CEA-708 captions not being detected/extracted
  • 04ed95f Fix MXF files containing CEA-708 captions not being detected/extracted
  • 41fb966 Add support for raw CDP (Caption Distribution Packet) files
  • 9004155 Fix Rust formatting and clippy issues
  • b4d8e0f Trigger CI
  • 8692572 Merge remote-tracking branch 'origin/master' into feat/issue-1406-raw-cdp-support

📊 Changes

2 files changed (+120 additions, -9 deletions)

View changed files

📝 src/lib_ccx/general_loop.c (+115 -1)
📝 src/rust/build.rs (+5 -8)

📄 Description

Summary

  • Adds support for processing raw CDP files captured from SDI VANC data
  • CDP packets (from capture cards like Blackmagic Decklink) are automatically detected by their 0x9669 identifier when using -in=raw
  • Extracts and processes both CEA-608 and CEA-708 captions from CDP packets

Dependencies

⚠️ This PR depends on #1977 (MXF CEA-708 fix) which adds the ccxr_dtvcc_set_active function used here.

Changes

  • Added process_raw_cdp() function to parse concatenated CDP packets
  • Added CDP format detection in raw_loop() (checks for 0x9669 header)
  • Extracts cc_data triplets from CDP and processes through process_cc_data()
  • Calculates timing based on CDP frame rate and packet count

Usage

ccextractor -in=raw captured_vanc.bin -o output.srt

Test plan

  • Tested with sample from issue #1406 (sample 180 on sample platform)
  • CDP format is correctly detected and parsed
  • Build passes successfully

Note: The sample on the sample platform contains only null caption data (no actual text content), but the parsing and detection works correctly.

Fixes #1406

🤖 Generated with Claude Code


🔄 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/1978 **Author:** [@cfsmp3](https://github.com/cfsmp3) **Created:** 1/4/2026 **Status:** ✅ Merged **Merged:** 1/5/2026 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `feat/issue-1406-raw-cdp-support` --- ### 📝 Commits (6) - [`ddf2967`](https://github.com/CCExtractor/ccextractor/commit/ddf29672fd5aad970a2c832fc62487eedda378a6) Fix MXF files containing CEA-708 captions not being detected/extracted - [`04ed95f`](https://github.com/CCExtractor/ccextractor/commit/04ed95f8b59fa327c30380ecdef8a7649b4a02ba) Fix MXF files containing CEA-708 captions not being detected/extracted - [`41fb966`](https://github.com/CCExtractor/ccextractor/commit/41fb966f6f71e999e7a1791ec1a2af29d6ef3c4f) Add support for raw CDP (Caption Distribution Packet) files - [`9004155`](https://github.com/CCExtractor/ccextractor/commit/90041554a375a6f651b493772ebf5088f3b82a47) Fix Rust formatting and clippy issues - [`b4d8e0f`](https://github.com/CCExtractor/ccextractor/commit/b4d8e0ffaf14bcd69f24e8ecb59d8b1e7d903a0c) Trigger CI - [`8692572`](https://github.com/CCExtractor/ccextractor/commit/86925727e035882e1b39e83b5f099a88c49db2c2) Merge remote-tracking branch 'origin/master' into feat/issue-1406-raw-cdp-support ### 📊 Changes **2 files changed** (+120 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/lib_ccx/general_loop.c` (+115 -1) 📝 `src/rust/build.rs` (+5 -8) </details> ### 📄 Description ## Summary - Adds support for processing raw CDP files captured from SDI VANC data - CDP packets (from capture cards like Blackmagic Decklink) are automatically detected by their `0x9669` identifier when using `-in=raw` - Extracts and processes both CEA-608 and CEA-708 captions from CDP packets ## Dependencies ⚠️ **This PR depends on #1977** (MXF CEA-708 fix) which adds the `ccxr_dtvcc_set_active` function used here. ## Changes - Added `process_raw_cdp()` function to parse concatenated CDP packets - Added CDP format detection in `raw_loop()` (checks for `0x9669` header) - Extracts cc_data triplets from CDP and processes through `process_cc_data()` - Calculates timing based on CDP frame rate and packet count ## Usage ``` ccextractor -in=raw captured_vanc.bin -o output.srt ``` ## Test plan - [x] Tested with sample from issue #1406 (sample 180 on sample platform) - [x] CDP format is correctly detected and parsed - [x] Build passes successfully Note: The sample on the sample platform contains only null caption data (no actual text content), but the parsing and detection works correctly. Fixes #1406 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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:23:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2778