-
Notifications
You must be signed in to change notification settings - Fork 83
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: refactor frame calculation #788
Conversation
900fd8a
to
a135ec9
Compare
@@ -153,7 +154,7 @@ static void jbuf_destructor(void *data) | |||
* | |||
* @param jbp Pointer to returned jitter buffer | |||
* @param min Minimum delay in [frames] |
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.
frames --> packets. Also here?
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.
No, because there should be at least min
frames (f->nf
) in the buffer to make sure the video codec can use them. The max
must be packets, because we can't pre-calculate how many video packets are one frame (this varies a lot by codec, image size, state...).
Is this still correct that |
Fixed, is now renamed to |
I think this one should be ready to merge. apart from that, if we want to be more pragmatic, we could make a separate PR only |
I rebased and cleaned up, so renaming is separate commit now. I will rebase merge to keep these commits. |
* config: add different options for audio and video jitter buffer * fix audio.jbtype fallback * update min/max config description baresip/re#788
A video frame is usually divided into smaller packets. Since the rtp marker bit is not very reliable (packet can be lost) or has a different meaning for audio codecs (talk spurt), frames should be detected by timestamp after sequence deduplication and ordering.