-
Notifications
You must be signed in to change notification settings - Fork 450
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
jbuf: adaptive playout time calculation #2757
base: main
Are you sure you want to change the base?
Conversation
/* Update sequence number for 'get' */ | ||
jb->seq_get = f->hdr.seq; | ||
/* Check playout time */ | ||
if (f->playout_time > next_playout) { |
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.
Frame completeness is not checked. Is it already ensured by skew and jitter?
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.
Yes, it's ensured by jitter compensation, it's now a time based buffering delay, this should give the lowest delay which is needed to buffer.
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.
okay, we can compare the plots if you are ready.
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.
Sure, give me some time to prepare and ensure the algorithms are working correctly (wrap-around calculations are tough ;-))
73fcdd3
to
80b2758
Compare
When Then Threads involved for audio:
Thread 2 - audio playback thread
Edit: Your PR looks promising for me. I also think that the jitter compensation should be done in But unit tests will become difficult or have less coverage because |
I implemented a fallback tmr solution here (fallback since we should avoid to many event loop wakeups): 80b2758 |
I think we can use a virtual clock rate and small frames for tests. But yes this increases test time, at least for some milliseconds. |
Okay, let's try this! Also we could try a from |
please resolve the conflicts .. |
c23e8ed
to
23ace5b
Compare
what is the status of this PR ? Can you please rebase it on top of GIT HEAD ? |
23ace5b
to
8f19c65
Compare
I think we should prefer this approach over mine #2754. Currently, studying the mentioned book. |
I will try to complete/cleanup this work soon. Maybe later this week. |
8f19c65
to
e1c3d3d
Compare
2d8b5d6
to
82b2225
Compare
I'll try to fix the sanitizer warning. I think it is not related to this PR. |
PR for sanitizer warning: #2867 |
840fed9
to
ebdda6a
Compare
The failing valgrind looks also unrelated: #2873 |
d713e39
to
fb5b8cf
Compare
Playout time calculation for jitter buffer. It replaces frame calculation, since it uses a local time reference offset (based on clock rate).
It's based on suggestions from this book: https://csperkins.org/standards/rtp-book.html
Future improvements:
JBUF_ADAPTIVE_SPIKE
...)