-
Notifications
You must be signed in to change notification settings - Fork 425
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
[WIP] [FIX] #1499 Persistent Dtvcc
struct for CEA-708 decoding in Rust
#1501
[WIP] [FIX] #1499 Persistent Dtvcc
struct for CEA-708 decoding in Rust
#1501
Conversation
2ae1735
to
88c238a
Compare
@PunitLodha This builds but segfaults when ran on this sample. I'll try to diagnose this but could you go over the changes when you get the time? |
Using ugly debug statements I have pinned down the segfault to here. It's exactly where the rust function is called. Not inside it as I put a debug statement on the Rust side but that did not get triggered. Any ideas why? |
I'd run it with valgrind, it will give you a good idea. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Is there a way to disable this longer check for a draft PR XD |
No, but that'd be a good addition for the SP so that Drafts aren't tested anymore (unless @cfsmp3 sees value in testing draft PR's?) |
Not much :-) |
It works?! It does not seem perfect (lacks the "footer" for one) but it does produce a file! |
I had a nasty bug where the program just crashed when I added a single line |
This comment was marked as outdated.
This comment was marked as outdated.
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.
You'll need to define all the 708 structs/enums in rust itself as the next step, before moving forward with any other changes.
pub decoders: Vec<&'a mut dtvcc_service_decoder>, | ||
pub packet: Vec<u8>, | ||
pub report: *mut ccx_decoder_dtvcc_report, | ||
pub decoders: [Option<Box<dtvcc_service_decoder>>; CCX_DTVCC_MAX_SERVICES], |
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.
There is no longer a need to use bindings for any 708 related structs/enums, we can define them now in rust itself. We still need to use bindings for encoder
, timing
and report
. But all others should be defined in rust.
This is going to be somewhat bigger and comprehensive change
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.
Should that be a separate PR since it seems to be independent of this one?
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.
Should be in this PR as I think it will allow you to remove the additional Boxing required here, and also will make the code more idiomatic rust as we can stop relying on the C bindings
This commit conditionally switches between the two. Oh yes, I have not fixed the encoder assignment for mp4. Should I do that too? |
This comment was marked as outdated.
This comment was marked as outdated.
Wait a minute... does this fix #1500 ? I ran this on the link mentioned on the video mentioned here and it works. Here's the SMI output: video.p0.svc01.smi.txt (It's in lowercase!) |
Yes |
That sounds great. Ig all 708 problems stem from the same issue |
ad65396
to
c9d9e23
Compare
This comment was marked as outdated.
This comment was marked as outdated.
I just noticed that there is a difference between the 608 and 708 output, is this expected? 8e8229b88bc6b3cecabe6d90e6243922fc8a0e947062a7abedec54055e21c2bf.p1.svc01.smi.txt 8e8229b88bc6b3cecabe6d90e6243922fc8a0e947062a7abedec54055e21c2bf.smi.txt Footer: When I made this comment I was specifically referring to the difference in timings but there's a slight difference in timings too. And 708 doesn't have a footer. |
Oh and I forgot to inform you. @PunitLodha I've removed the formatting changes from |
@PunitLodha I mean the only other on I'm sure porting them over to Rust would be better than calling them over FFI. I still think a PR started to specifically fix the persistence of the |
c9d9e23
to
22f5684
Compare
Dammit another formatting change slipped in. Basically I made some changes to |
This comment was marked as outdated.
This comment was marked as outdated.
Currently there's a lot of unnecessary unsafe code, which can be avoided if we move away from the bindings |
Seems correct, just need to revert the formatting changes |
Closing since #1618 implements this |
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
{pull request content here}