Closed edersondisouza closed 5 years ago
@edersondisouza - thanks for this pull request and all the work that went it to it! Do you think you can address the travis reported errors?
@andrew-elder Sure, I'll take a look.
v2: Fixed travis issues Make travis also build the new examples
@aguedes - I think you should go ahead and merge this PR when you are comfortable with it.
v3:
v4:
Hi Ederson, the PR looks go to me! I'm waiting until early next week to merge it so others have the chance to review it as well. Thanks!
@edersondisouza, I just noticed some code from avtp_stream.h APIs aren't covered by unit tests (e.g. avtp_stream_pdu_get() with NULL 'pdu' or invalid 'field'). Use the coverage report generated by ninja -C build coverage-text
to guide you on what is missing.
Could you please add tests to cover that code?
Oh, true. I had some tests specially for this, but ended up not sending them as I thought the normal tests would cover everything. I'll update the PR with these tests.
v5: Added tests for avtp_stream.h
internal API. This should expand test code coverage a bit (some of it was already being tested by other tests, that's why is not a huge improvement).
@aguedes - any further comments? Looks to me like you are close to merging?
Hi @edersondisouza, I think you added an older version which doesn't take in consideration the previous reviews. For instance, the set() tests are using ntohl() in all fields. Besides that, no need to add code to cover what is already covered. That's what I meant by "Use the coverage report to guide you on what is missing" :)
@aguedes Sure about not "repeating" the tests. I left them there because it is clear it already tests all the internal API - knowing that most of it is already tested indirectly is cool, but makes things harder to understand - don't you think?
The coverage report is pretty clear on what is covered or not so I don't see how it makes things harder to understand. If you want to repeat them, fine by me, just please make sure they are aligned with the other unit tests. Thanks!
The "hard to understand" is somebody going to look at "test-stream.h", then noting that most of the API is not tested there. I guess that people would then (maybe) realise that other stuff is already being tested. Just my 2¢
v6: New tests don't have ntohl(0)
and are correctly indented.
LGTM, merging now. Thanks @edersondisouza!
CVF support for libavtp
Compressed Video Format (CVF) is one of video formats defined by AVTP (IEEE 1722-2016 chapter 8). This pull request adds support to it, focusing on H.264 aspects, so fields related exclusively to MJPEG or JPEG2000 are not done in this PR.
As there is some overlapping fields on both AAF and CVF headers, the first patch in this series factor out common code in a way that no changes are done to AAF API, but enables some code reuse. Some code that is also duplicated on AAF and CVF examples prompted another patch that creates a "common" shared code for the examples, so things like socket configuration are on it.
For the sake of simplicity, this PR does not cover the "sub-packets" defined for aggregation types on AVTP.
This PR also adds unit tests for CVF, and examples for CVF talker and listener.
More information about each patch, on the patch commit message.
Overall code coverage details are: lines......: 97.6% (1321 of 1353 lines) functions..: 100.0% (134 of 134 functions)
Let me know of any questions,