Add support for raw CDP (Caption Distribution Packet) files#1978
Merged
Add support for raw CDP (Caption Distribution Packet) files#1978
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Collaborator
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. |
Collaborator
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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