-
Notifications
You must be signed in to change notification settings - Fork 51
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
Support negative time deltas in BWE #615
Conversation
Looks good. Yeah. So I want to replace as much as possible of the Our external API is however std-lib I'd prefer if the |
Might be worth adopting something like https://github.com/obi1kenobi/cargo-semver-checks to ensure changes to the public API are automatically linted! |
Well in this specific case |
Given the findings in #617. Let's go further with this PR by making the negative-time handling variants local to the BWE module. And again, sorry for making you doing a wild goose chase in a direction that doesn't work. |
That's how a similar thing was named before. I would probably go with |
Let's rename and stick closer to libWebRTC. |
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.
LGTM! Some minor comments
@alexlapa Thanks!!! |
So first of all we should be able to handle negative send deltas in
ArrivalGroup
as discussed before: 0, 1, 2So this is pretty much what this PR does so far, but it might be extended as discussed here.
So, I can leave it as it is, right now it only affects
packet/bwe
and these new types are only used where it's expected that negative time deltas are possible. Alternatively:Timestamp
andTimeDelta
so they should fit.not_happening()
,already_happened()
? I haven't really though about it but first thing that comes to mind is just usingSuperInstant
instead of thoseInstant
s that can bealready_happened
ornot_happening
with some simple conversionSuperInstant::as_instant() -> Instant
that will just returnalready_happened
||Exact(Instatnt)
||not_happening
. Might also just put aDeref -> &Instant
on it.So let me know what you think about this.
Also I've returned that
ArrivalGroupAccumulator
test on libwebrtc captured data, but now it also runs on negative send deltas. Ill remove it before merge.