-
Notifications
You must be signed in to change notification settings - Fork 41
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
Video encoder timing test #110
Conversation
Codecov Report
@@ Coverage Diff @@
## video_encoder_timing #110 +/- ##
========================================================
+ Coverage 73.90% 75.20% +1.29%
========================================================
Files 69 69
Lines 9427 9429 +2
========================================================
+ Hits 6967 7091 +124
+ Misses 2460 2338 -122
Continue to review full report at Codecov.
|
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
797aa0e
to
4a8a4b4
Compare
I believe that the Windows failure here is somewhat expected, being that |
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
test/integration/encoder_timing.cc
Outdated
durationTest(vidEncoder, video, 30, 2); | ||
durationTest(vidEncoder, video, 25, 5); | ||
|
||
delete [] kFrame; |
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.
I think you either want to:
a) Allocate and deallocate this frame completely within the test, and pass it to duration test.
b) Allocate the deallocate the frame globally and don't do any memory management in the test.
Mixing the two could potentially make it easy to introduce bugs if more tests are ever added here.
Since this is also an array, you may consider using std::array<unsigned char, kSize*kSize>
, or a std::vector
to not have to deal with memory allocation at all.
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.
Thanks for the feedback. Better? 39ccc6a
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.
Looks great, just looks like you need to include <array>
to make MacOS happy.
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 67db98b. Is there a way to check things like this beforehand?
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.
Sometimes codecheck can catch it. There are some explicit tools that will do it as well such as: https://include-what-you-use.org/
In this case it's generally good practice to do, but some compilers are a bit more picky about it. There are many cases where an extra iteration or two may be spent appeasing Windows or Mac...
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Test that verifies video encoder timing, which uses VideoEncoder to encode several frames to a video file and verifies the duration using the Video class with a new Duration() function. Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> Co-authored-by: Ian Chen <ichen@osrfoundation.org>
* fix frame number in video encoding Signed-off-by: Ian Chen <ichen@osrfoundation.org> * encode duplicate frames to ensure continuous pts Signed-off-by: Ian Chen <ichen@osrfoundation.org> * fix resetting video recording Signed-off-by: Ian Chen <ichen@osrfoundation.org> * Video encoder timing test (#110) Test that verifies video encoder timing, which uses VideoEncoder to encode several frames to a video file and verifies the duration using the Video class with a new Duration() function. Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> Co-authored-by: Ian Chen <ichen@osrfoundation.org> * Little fixes for video encoder (#115) * VideoEncoder: Reset also timePrev and timeStart. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Do not skip the very first frame in case the first timestamp should really be zero. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> * Disable AV integration test when component not available (#124) This disables an integration test that depends on the `av` component when that component is not build. This is currently the case on Windows where the `ffmpeg` dependencies are not in the buildfarm. Signed-off-by: Michael Carroll <michael@openrobotics.org> Co-authored-by: Jenn Nguyen <jenn@openrobotics.org> Co-authored-by: Michael Carroll <michael@openrobotics.org> Co-authored-by: Louise Poubel <louise@openrobotics.org> Co-authored-by: Martin Pecka <peckama2@fel.cvut.cz>
Test that verifies video encoder timing, which uses VideoEncoder to encode several frames to a video file and verifies the duration using the Video class with a new
Duration()
function.