-
Notifications
You must be signed in to change notification settings - Fork 426
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
Initialize data structures correctly for the rust CEA-708 decoder #1499
Comments
I was on the first task. Any idea how the |
It should start with NULL - please send a PR to correct that in the C code :-) Just a matter of hygiene. https://github.com/CCExtractor/ccextractor/search?q=dtvcc-%3Eencoder There a couple of places in which it happens. But it should start with NULL when the context is created. |
As @cfsmp3 mentioned, it should be initialized to NULL. You should also add a function to set the value for On a side note, If you are working on this issue, I recommend you to open a draft PR and keep pushing your changes there, so that I can review each step individually. This issue is quite a bit of work, and reviewing a huge PR would be difficult |
If could push my progress but because of how I'm working, the commits themselves would fail to build. Is that okay? |
Also how do I approach the compatibility issue. The |
And other issue is stuff like Edit: For now I have added Edit 2: This conflicts with the manually defined |
@PunitLodha here's the PR #1501. For now I've just rewritten |
Hey @cfsmp3. Of the 3 code results in the link you have sent only the first two, |
I haven't tracked it down, but in general any structure should have all its fields initialized with something when it's created :-) |
@PunitLodha for the mp4 part, do I just expose another extern function from Rust to call this or somehow reuse this? |
You'll need to expose another extern function |
I have started working on this issue & I have raised a Draft PR #1599 as it is WIP. Feedbacks are appreciated |
Currently, the entry point for the rust decoder is here where we create a new
Dtvcc
struct each time. This causes the data to be reset each timeccxr_process_cc_data()
is called.Instead, we want to initialize
Dtvcc
only once at the start of the program and then use it for all subsequent function calls.Steps:-
Dtvcc::new()
to createDtvcc
usingccx_decoder_dtvcc_settings
as done here, https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/ccx_dtvcc.c#L76-L124ccxr_dtvcc_init()
in lib.rs and use this at all places wheredtvcc_init()
is being called. (Probably add a new struct field tolib_cc_decode
likedtvcc_rust
and storeDtvcc
there instead of using thedtvcc
field)dtvcc_free()
Dtvcc
fromdec_ctx
instead of creating a new oneAdditionally to fix mp4 code flow:-
Dtvcc
as done in the above stepsThe text was updated successfully, but these errors were encountered: