Skip to content

Commit

Permalink
jbuf: replace adaptive mode by frame completeness check
Browse files Browse the repository at this point in the history
A frame is a sequence of RTP packets with equal timestamp. Now `jbuf_get()`
does not pass packets before the oldest frame is complete.
  • Loading branch information
cspiel1 committed Sep 27, 2023
1 parent f081b8a commit 08ab8f9
Show file tree
Hide file tree
Showing 2 changed files with 184 additions and 187 deletions.
5 changes: 2 additions & 3 deletions include/re_jbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@ struct jbuf_stat {
/** Jitter buffer type */
enum jbuf_type {
JBUF_OFF,
JBUF_FIXED,
JBUF_ADAPTIVE
JBUF_FIXED
};


int jbuf_alloc(struct jbuf **jbp, uint32_t min, uint32_t max);
int jbuf_resize(struct jbuf *jb, uint32_t packets);
int jbuf_set_type(struct jbuf *jb, enum jbuf_type jbtype);
int jbuf_put(struct jbuf *jb, const struct rtp_header *hdr, void *mem);
int jbuf_get(struct jbuf *jb, struct rtp_header *hdr, void **mem);
int jbuf_drain(struct jbuf *jb, struct rtp_header *hdr, void **mem);
void jbuf_flush(struct jbuf *jb);
int jbuf_stats(const struct jbuf *jb, struct jbuf_stat *jstat);
int jbuf_debug(struct re_printf *pf, const struct jbuf *jb);
uint32_t jbuf_frames(const struct jbuf *jb);
uint32_t jbuf_packets(const struct jbuf *jb);
Loading

0 comments on commit 08ab8f9

Please sign in to comment.