[FEAT] added `demuxer` and `file_functions` module
In raising this pull request, I confirm the following (please check boxes):
- [x] I have read and understood the contributors guide.
- [x] I have checked that another pull request for this purpose does not exist.
- [x] I have considered, and confirmed that this submission will be valuable to others.
- [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
- [x] I give this submission freely, and claim no ownership to its content.
- [x] I have mentioned this change in the changelog.
My familiarity with the project is as follows (check one):
- [ ] I have never used CCExtractor.
- [ ] I have used CCExtractor just a couple of times.
- [ ] I absolutely love CCExtractor, but have not contributed previously.
- [x] I am an active contributor to CCExtractor(2 previous contributions).
In this PR, I have attempted to port the large demuxer module to Rust, the primary logic of the heavily interconnected C libraries file_functions.c and, ccx_demuxer.c and their corresponding header files has aleady been implemented here.
This PR was inspired by the ones done for the 708 Decoder in CCextractor.
The part of the codebase that the demuxer part of this PR migrates to Rust is the part that Opens a File(ccx_demuxer_open), points the codebase towards that file, detects the stream type and some other parameters like myth, and then closes the file or gets the file size.
The file_functions part of this PR is tested locally, and in unit tests, but integrating it into C made the codebase really slow, due to the constant copying back and forth C and Rust, so it was left to be used in future Rust Libraries like MythTV, MXF, GXF, etc.
Any criticism or suggestion is wholeheartedly welcome.
- It is built and ready to be reviewed now.
@steel-bucket Is it still WIP?
@steel-bucket Is it still WIP?
Yes, I'm done with the hard part though, file_functions module is fully tested and ready. And the demuxer module just needs a couple more tests. Then I just have the gxf one to do. It won't be long though. Sorry to be late with it, I had some exams which are cleared out now.
Hi, @prateekmedia the builds and tests are all working(other than regression). Please review it if time permits. Also should I squash the commits together? Thank you so much.
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit c2a1f0d...:
| Report Name | Tests Passed |
| Broken | 13/13 |
| CEA-708 | 14/14 |
| DVB | 7/7 |
| DVD | 3/3 |
| DVR-MS | 2/2 |
| General | 27/27 |
| Hardsubx | 0/1 |
| Hauppage | 3/3 |
| MP4 | 3/3 |
| NoCC | 10/10 |
| Options | 86/86 |
| Teletext | 21/21 |
| WTV | 13/13 |
| XDS | 33/34 |
Your PR breaks these cases:
- ccextractor --autoprogram --out=ttxt --xds --latin1 --ucla e274a73653...
NOTE: The following tests have been failing on the master branch as well as the PR:
- ccextractor --hardsubx 1a0302f7fd..., Last passed:
Never
Congratulations: Merging this PR would fix the following tests:
- ccextractor --autoprogram --out=srt --latin1 f1422b8bfe..., Last passed: Never
- ccextractor --datapid 5603 --autoprogram --out=srt --latin1 --teletext 85c7fc1ad7..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 c0d2fba8c0..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 006fdc391a..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 e92a1d4d2a..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 7e4ebf7fd7..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 9256a60e4b..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 27d7a43dd6..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 297a44921a..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 efbe129086..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 eae0077731..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 e2e2b501e0..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 c6407fb294..., Last passed: Never
- ccextractor --autoprogram --out=ttxt --latin1 --datets dcada745de..., Last passed: Never
- ccextractor --autoprogram --out=srt --latin1 --tpage 398 5d5838bde9..., Last passed: Never
- ccextractor --autoprogram --out=srt --latin1 --teletext --tpage 398 3b276ad8bf..., Last passed: Never
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you).
Check the result page for more info.
The windows compiling is separate and can be resolved separately.
@steel-bucket Can you merge main?
@prateekmedia Done, I think we might have to find an alternative solution to the windows problem.
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 42d7509...:
| Report Name | Tests Passed |
| Broken | 13/13 |
| CEA-708 | 14/14 |
| DVB | 7/7 |
| DVD | 3/3 |
| DVR-MS | 2/2 |
| General | 27/27 |
| Hardsubx | 1/1 |
| Hauppage | 3/3 |
| MP4 | 3/3 |
| NoCC | 10/10 |
| Options | 86/86 |
| Teletext | 21/21 |
| WTV | 13/13 |
| XDS | 34/34 |
Congratulations: Merging this PR would fix the following tests:
- ccextractor --hardsubx 1a0302f7fd..., Last passed: Never
All tests passing on the master branch were passed completely.
Check the result page for more info.