Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b8608b6
xds module : boilerplate created
Dec 24, 2025
b7d7cf0
xds module : added datatypes(structs, enums) and C<->Rust data transf…
steel-bucket Dec 24, 2025
054018b
xds module : added xdsprint(function) rust implementation
steel-bucket Dec 24, 2025
bfbdbb0
xds module : added complete internal rust implementation
Dec 24, 2025
0b41d66
xds module : added ffi implementation
Dec 24, 2025
ee31a01
xds module : fixes requested : 1, 2, 3, 4
Dec 25, 2025
ce31ae4
xds module : fix clippy warnings
Dec 25, 2025
33e41cc
xds module : fixes requested : 5
Dec 26, 2025
3046967
xds module : add setter function for TS_START_OF_XDS from C code
Dec 28, 2025
8ee1bb0
xds module : fix minor issue with timing ctx resulting in missing xds…
Feb 3, 2026
31be6dc
xds module : trying to fix frame timing mismatch in regression test 106
Feb 4, 2026
fd54d85
xds module : fix clippy warnings and fmt errors
Feb 4, 2026
97007a6
remove depreciated DISABLE_RUST flag
Mar 27, 2026
b6247a3
replace libc::malloc,free usage with ffi usage
Mar 27, 2026
e7bc2de
replace log::debug,info usage with libccxr::debug,info
Mar 27, 2026
fbc57db
add unit tests for FromCType and CType
Mar 27, 2026
0e84692
refactor handlers.rs to move structs/constants to top, added XdsPacke…
Mar 27, 2026
32a1372
refactor to move constants, statics, enums to separate file from type…
Mar 27, 2026
ed1af72
refactor to move constants, statics, enums to separate file from type…
Mar 27, 2026
36cd380
fix minor console output regression due to replacement of log::info w…
Mar 27, 2026
d1ca4f0
fix minor windows build issue in ci
Mar 27, 2026
f50e086
fix clippy errors and run cargo fmt
Mar 27, 2026
b01e0c7
revert till f66ab8fd refactor to move constants, statics, enums to se…
Mar 27, 2026
075748a
fix c formatting
Mar 27, 2026
aa6fbe4
run cargo fmt
Mar 27, 2026
b2f5f63
remove usage of free,malloc
Mar 27, 2026
2f7a624
add XdsError enum, replace Result<(), ()> with Result<(), XdsError>
Mar 27, 2026
21b7ad4
run cargo fmt
Mar 27, 2026
78271f1
fix : update handlers.rs to match c code after commit 50b51e4234a86e1…
Mar 30, 2026
01e2780
fix : remove payload_length < 3 guard
Mar 30, 2026
c6c5954
fix : check DECODER_XDS flag
Mar 30, 2026
8195922
remove libc from src/rust/Cargo.toml
Apr 2, 2026
6b4c12c
fix clippy warning
Apr 2, 2026
9667b87
run cargo fmt
Apr 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/lib_ccx/ccx_decoders_xds.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
#include "ccx_common_common.h"
#include "utility.h"

extern void ccxr_process_xds_bytes(
struct ccx_decoders_xds_context *ctx,
unsigned char hi,
int lo);

extern void ccxr_do_end_of_xds(
struct cc_subtitle *sub,
struct ccx_decoders_xds_context *ctx,
unsigned char expected_checksum);

extern void ccxr_set_ts_start_of_xds(long long value);

LLONG ts_start_of_xds = -1; // Time at which we switched to XDS mode, =-1 hasn't happened yet

static const char *XDSclasses[] =
Expand Down Expand Up @@ -238,6 +250,9 @@ void clear_xds_buffer(struct ccx_decoders_xds_context *ctx, int num)

void process_xds_bytes(struct ccx_decoders_xds_context *ctx, const unsigned char hi, int lo)
{
ccxr_process_xds_bytes(ctx, hi, lo);
return; // use the rust implementation

int is_new;
if (!ctx)
return;
Expand Down Expand Up @@ -890,6 +905,10 @@ int xds_do_misc(struct ccx_decoders_xds_context *ctx)

void do_end_of_xds(struct cc_subtitle *sub, struct ccx_decoders_xds_context *ctx, unsigned char expected_checksum)
{
ccxr_set_ts_start_of_xds(ts_start_of_xds);
ccxr_do_end_of_xds(sub, ctx, expected_checksum);
return; // use the rust implementation

int cs = 0;
int i;

Expand Down
2 changes: 2 additions & 0 deletions src/lib_ccx/lib_ccx.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include "avc_functions.h"
#include "teletext.h"

#include "ccx_decoders_xds.h"

#ifdef WITH_LIBCURL
#include <curl/curl.h>
#endif
Expand Down
1 change: 1 addition & 0 deletions src/rust/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ fn main() {
"ccx_encoding_type",
"ccx_decoder_608_settings",
"ccx_decoder_608_report",
"ccx_decoders_xds_context",
"ccx_gxf",
"MXFContext",
"demuxer_data",
Expand Down
5 changes: 5 additions & 0 deletions src/rust/lib_ccxr/src/util/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ impl<'a> CCExtractorLogger {
self.debug_mask.is_debug_mode()
}

/// Check if a specific debug flag is set in the current debug mask
pub fn has_debug_flag(&self, flag: DebugMessageFlag) -> bool {
self.debug_mask.mask().intersects(flag)
}

/// Returns the currently set target for logging messages.
pub fn target(&self) -> OutputTarget {
self.target
Expand Down
1 change: 1 addition & 0 deletions src/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub mod mp4_ffmpeg_exports;
pub mod parser;
pub mod track_lister;
pub mod utils;
pub mod xds;

#[cfg(windows)]
use std::os::windows::io::{FromRawHandle, RawHandle};
Expand Down
6 changes: 3 additions & 3 deletions src/rust/src/libccxr_exports/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ pub unsafe extern "C" fn ccxr_millis_to_time(
/// # Safety
///
/// `ctx` should not be null.
unsafe fn generate_timing_context(ctx: *const ccx_common_timing_ctx) -> TimingContext {
pub unsafe fn generate_timing_context(ctx: *const ccx_common_timing_ctx) -> TimingContext {
let pts_set = match (*ctx).pts_set {
0 => PtsSet::No,
1 => PtsSet::Received,
Expand Down Expand Up @@ -206,7 +206,7 @@ unsafe fn generate_timing_context(ctx: *const ccx_common_timing_ctx) -> TimingCo
/// # Safety
///
/// `ctx` should not be null.
unsafe fn write_back_to_common_timing_ctx(
pub unsafe fn write_back_to_common_timing_ctx(
ctx: *mut ccx_common_timing_ctx,
timing_ctx: &TimingContext,
) {
Expand Down Expand Up @@ -275,7 +275,7 @@ unsafe fn write_back_to_common_timing_ctx(
/// # Safety
///
/// All the static variables should be initialized and in valid state.
unsafe fn apply_timing_info() {
pub(crate) unsafe fn apply_timing_info() {
let Ok(mut timing_info) = GLOBAL_TIMING_INFO.write() else {
// RwLock is poisoned, skip updating
return;
Expand Down
Loading
Loading