-
Notifications
You must be signed in to change notification settings - Fork 515
Add support for raw CDP (Caption Distribution Packet) files #1978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8f9561b to
eb16874
Compare
Root cause: CCX_RAW_TYPE data from MXF demuxer was not being passed to the DTVCC decoder, only to the legacy 608 decoder via process_raw_with_field. Changes: - general_loop.c: Changed CCX_RAW_TYPE handling to use process_cc_data instead of process_raw_with_field to properly invoke DTVCC decoder - general_loop.c: Added DTVCC activation for MXF/GXF sources since they may contain 708 captions - general_loop.c: Initialize timing from caption PTS when not set - ccx_dtvcc.h: Added ccxr_dtvcc_set_active FFI declaration - lib.rs: Added ccxr_dtvcc_set_active function to enable DTVCC decoder - decoder/mod.rs: Fixed flush logic to always process visible windows - ccx_demuxer_mxf.c: Fixed PTS calculation to use 90kHz units based on edit_rate, and changed verbose logging to debug() Fixes #1647 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Root cause: CCX_RAW_TYPE data from MXF demuxer was not being passed to the DTVCC decoder, only to the legacy 608 decoder via process_raw_with_field. Changes: - general_loop.c: Changed CCX_RAW_TYPE handling to use process_cc_data instead of process_raw_with_field to properly invoke DTVCC decoder - general_loop.c: Added DTVCC activation for MXF/GXF sources since they may contain 708 captions - general_loop.c: Initialize timing from caption PTS when not set - ccx_dtvcc.h: Added ccxr_dtvcc_set_active FFI declaration - lib.rs: Added ccxr_dtvcc_set_active function to enable DTVCC decoder - decoder/mod.rs: Fixed flush logic to always process visible windows - ccx_demuxer_mxf.c: Fixed PTS calculation to use 90kHz units based on edit_rate, and changed verbose logging to debug() Fixes #1647 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds support for processing raw CDP files captured from SDI VANC (e.g., from Blackmagic Decklink capture cards). CDP packets are automatically detected by their 0x9669 identifier when using -in=raw. 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 packets and processes them through process_cc_data() for both CEA-608 and CEA-708 support - Calculates timing based on CDP frame rate and packet count Usage: ccextractor -in=raw captured_vanc.bin -o output.srt Fixes #1406 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
eb16874 to
41fb966
Compare
- Apply cargo fmt to decoder/mod.rs - Fix clippy manual_flatten warning in build.rs by using .flatten() 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 1c75156...:
NOTE: The following tests have been failing on the master branch as well as the PR:
This PR does not introduce any new test failures. However, some tests are failing on both master and this PR (see above). Check the result page for more info. |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 1c75156...:
NOTE: The following tests have been failing on the master branch as well as the PR:
This PR does not introduce any new test failures. However, some tests are failing on both master and this PR (see above). Check the result page for more info. |
Summary
0x9669identifier when using-in=rawDependencies
ccxr_dtvcc_set_activefunction used here.Changes
process_raw_cdp()function to parse concatenated CDP packetsraw_loop()(checks for0x9669header)process_cc_data()Usage
Test plan
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