-
Notifications
You must be signed in to change notification settings - Fork 571
[RUST] Added XDS module #2088
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
base: master
Are you sure you want to change the base?
[RUST] Added XDS module #2088
Changes from 12 commits
94095a5
f03ff26
801ce5e
5c168d0
32e3f20
e81a5f3
4e252c2
1215985
46ab8e6
450654d
9a548ef
bb55f8a
251605a
86aba32
6d6a952
6a8381d
e5f1a86
5b900a2
f66ab8f
9ec38fa
23f6ae7
f2bca52
9e59457
c1ca3a3
4f6fb20
8f5bb19
c0f44dc
81082a6
1957894
8f20d6c
d4b1e56
ed3cc1f
43bc019
717822c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,21 @@ | |
| #include "ccx_common_common.h" | ||
| #include "utility.h" | ||
|
|
||
| // declare rust implementation of process_xds_bytes (function) | ||
| extern void ccxr_process_xds_bytes( | ||
| struct ccx_decoders_xds_context *ctx, | ||
| unsigned char hi, | ||
| int lo); | ||
|
|
||
| // declare rust implementation of do_end_of_xds (function) | ||
| extern void ccxr_do_end_of_xds( | ||
| struct cc_subtitle *sub, | ||
| struct ccx_decoders_xds_context *ctx, | ||
| unsigned char expected_checksum); | ||
|
|
||
| // declare setter function for TS_START_OF_XDS from C code | ||
| 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[] = | ||
|
|
@@ -238,6 +253,10 @@ 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) | ||
| { | ||
| #ifndef DISABLE_RUST | ||
| ccxr_process_xds_bytes(ctx, hi, lo); // use the rust implementation | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove DISABLE_RUST, we deprecated that
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| return; | ||
| #endif | ||
| int is_new; | ||
| if (!ctx) | ||
| return; | ||
|
|
@@ -890,6 +909,11 @@ 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) | ||
| { | ||
| #ifndef DISABLE_RUST | ||
| ccxr_set_ts_start_of_xds(ts_start_of_xds); | ||
| ccxr_do_end_of_xds(sub, ctx, expected_checksum); // use the rust implementation | ||
| return; | ||
| #endif | ||
| int cs = 0; | ||
| int i; | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ lib_ccxr = { path = "lib_ccxr" } | |
| url = "2.5.4" | ||
| serial_test = "3.2.0" | ||
| encoding_rs = "0.8.35" | ||
| libc = "0.2.178" | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove libc
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| # Use CCExtractor's forked rsmpeg with FFmpeg 7 | ||
| # All platforms use ffmpeg7 feature with prebuilt bindings for API consistency | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done