Repository navigation
fix: test segments and replays on a clock of their own - #582
Merged
Merged
Conversation
Stopped right after a segment began with a key frame, the recorder closes it before any audio went in, which the segment tests that stop at an arbitrary moment did not allow for.
The buffer asked for a key frame on every round until one came, and the request held back by the interval between requests went out a second later, bringing a key frame the buffer did not need yet: about one more for every two it asked for.
…heir own The tests recorded a live call for a few seconds and checked what came of it, which depended on how fast the machine ran: each slow runner found a new way to fail, and the loose checks this needed missed real bugs. They now feed the recorder encoded frames through a webrtc-java function table of their own, with a clock they set, and wait for the writer after every step. Where each segment and replay begins and ends then follows from the frames alone, and is checked to the frame. One test of each kind still records a real call, checking only what holds at any speed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The segment and replay tests recorded a live call for a few seconds and checked what came of it, which depended on how fast the machine ran: every slow runner found a new way to fail, and the loose checks this needed missed real bugs.
They now feed the recorder encoded frames through a test-only webrtc-java function table (
JNI_FakeMedia), with a clock they set, and wait for the writer after every step through a new package-privatesync(). Where each segment and replay begins and ends then follows from the frames alone, and is checked to the frame, including late key frames, rotation without a key frame, a second video track draining into the previous segment, a track that joins later, and a last segment that holds only its key frame. One test of each kind still records a real call, checking only what holds at any speed.This turned up a bug in the replay buffer: it kept asking for a key frame until one came, and the request held back by the interval between requests went out a second later, bringing about one extra key frame for every two it asked for. A key frame that arrives now answers the pending request, as it already does for segments.