Skip to content
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 frame completeness #963

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions include/re_jbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,27 @@ struct jbuf_stat {
uint32_t n_late; /**< Number of frames arriving too late */
uint32_t n_lost; /**< Number of lost frames */
uint32_t n_overflow; /**< Number of overflows */
uint32_t n_underflow; /**< Number of underflows */
uint32_t n_waiting; /**< Number of read waiting */
uint32_t n_flush; /**< Number of times jitter buffer flushed */
};


/** 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);
uint32_t jbuf_frames(const struct jbuf *jb);
uint32_t jbuf_complete_frames(const struct jbuf *jb);
Loading