7#include <osmocom/core/timer.h>
17typedef void (*osmo_jibuf_dequeue_cb)(
struct msgb *msg,
void *data);
23 struct osmo_timer_list timer;
24 struct llist_head msg_list;
27 uint32_t threshold_delay;
29 osmo_jibuf_dequeue_cb dequeue_cb;
30 void *dequeue_cb_data;
33 uint32_t last_dropped;
34 uint32_t consecutive_drops;
40 struct timeval last_enqueue_time;
41 struct timeval next_dequeue_time;
47 uint32_t total_enqueued;
48 uint64_t total_dropped;
void osmo_jibuf_enable_skew_compensation(struct osmo_jibuf *jb, bool enable)
Toggle use of skew detection and compensation mechanism.
Definition: jibuf.c:450
struct osmo_jibuf * osmo_jibuf_alloc(void *talloc_ctx)
Allocate a new jitter buffer instance.
Definition: jibuf.c:299
void osmo_jibuf_set_dequeue_cb(struct osmo_jibuf *jb, osmo_jibuf_dequeue_cb dequeue_cb, void *cb_data)
Set dequeue callback for the jitter buffer.
Definition: jibuf.c:461
int osmo_jibuf_enqueue(struct osmo_jibuf *jb, struct msgb *msg)
Try to enqueue a packet into the jitter buffer.
Definition: jibuf.c:343
void osmo_jibuf_set_max_delay(struct osmo_jibuf *jb, uint32_t max_delay)
Set maximum buffer size for the jitter buffer.
Definition: jibuf.c:438
void osmo_jibuf_set_min_delay(struct osmo_jibuf *jb, uint32_t min_delay)
Set minimum buffer size for the jitter buffer.
Definition: jibuf.c:428
void osmo_jibuf_delete(struct osmo_jibuf *jb)
Destroy a previously allocated jitter buffer instance.
Definition: jibuf.c:321
bool osmo_jibuf_empty(struct osmo_jibuf *jb)
Check whether the jitter buffer instance has packets queued or not.
Definition: jibuf.c:419
A structure representing a single instance of a jitter buffer.
Definition: jibuf.h:20