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
Adding some new functionality and documentation to DummyReader #527
Conversation
…g the ability to add test frames, with fake image and audio data. This will can be used in unittests, and will soon be used to verify some new audio improvements (coming soon).
@musteresel Please take a look and let me know what you think. |
Codecov Report
@@ Coverage Diff @@
## develop #527 +/- ##
===========================================
+ Coverage 48.30% 48.81% +0.50%
===========================================
Files 128 129 +1
Lines 9967 10042 +75
===========================================
+ Hits 4815 4902 +87
+ Misses 5152 5140 -12
Continue to review full report at Codecov.
|
This PR is loosely related to #447, and is related to some timeline audio merging improvements being worked on by @musteresel. |
I have to say, I really hate that idea. Adding a write-API to the dummy reader? That's... I don't see the point of unit-testing something if it has to be fitted with special APIs that make no sense in the rest of the codebase. What is that even testing? Let me propose a slightly less invasive approach. Instead of adding That way, the "special" API is limited to a constructor overload, and the rest of it is just a normal reader. |
@ferdnyc 👍 I like that as well. Let me tweak things real quick. |
We are going to be generating Frame objects with artificial audio data, such as an always incrementing numbers, and then build unit-tests which pass these frames through the Timeline with different FPS and sample rates. The idea is to verify audio data being truncated in the Timeline when combining Frames of different amounts of audio samples, and then correct the behavior once we can verify the failures. Hope that makes sense, haha. |
Like I said in the inline comments, this part suddenly makes me nervous: Lines 737 to 756 in 7831cfe
If calling |
…t a CacheBase* pointer, for instances where a DummyReader needs some specific test Frame objects
Just adding a quick note: This works great so far :) Using the constructor is also definitively the saner way to pass the artificial frames to the reader. Regarding the modification made in |
Adding the ability to add test frames
WriteFrame()
, with fake image and audio data. This will can be used in unit-tests, and will soon be used to verify some new audio improvements (coming soon).