2 * Copyright (C) 2005, Attractel OOD
5 * Slav Klenov <slav@securax.org>
7 * Copyright on this file is disclaimed to Digium for inclusion in Asterisk
9 * See http://www.asterisk.org for more information about
10 * the Asterisk project. Please do not directly contact
11 * any of the maintainers of this project for assistance;
12 * the project provides a web site, mailing lists and IRC
13 * channels for your use.
15 * This program is free software, distributed under the terms of
16 * the GNU General Public License Version 2. See the LICENSE file
17 * at the top of the source tree.
22 * \brief Jitterbuffering algorithm.
26 #ifndef _FIXEDJITTERBUF_H_
27 #define _FIXEDJITTERBUF_H_
29 #if defined(__cplusplus) || defined(c_plusplus)
44 #define FIXED_JB_SIZE_DEFAULT 200
45 #define FIXED_JB_RESYNCH_THRESHOLD_DEFAULT 1000
48 /* jb configuration properties */
52 long resync_threshold
;
62 struct fixed_jb_frame
*next
;
63 struct fixed_jb_frame
*prev
;
72 struct fixed_jb
* fixed_jb_new(struct fixed_jb_conf
*conf
);
74 void fixed_jb_destroy(struct fixed_jb
*jb
);
76 int fixed_jb_put_first(struct fixed_jb
*jb
, void *data
, long ms
, long ts
, long now
);
78 int fixed_jb_put(struct fixed_jb
*jb
, void *data
, long ms
, long ts
, long now
);
80 int fixed_jb_get(struct fixed_jb
*jb
, struct fixed_jb_frame
*frame
, long now
, long interpl
);
82 long fixed_jb_next(struct fixed_jb
*jb
);
84 int fixed_jb_remove(struct fixed_jb
*jb
, struct fixed_jb_frame
*frameout
);
86 void fixed_jb_set_force_resynch(struct fixed_jb
*jb
);
88 #if defined(__cplusplus) || defined(c_plusplus)
92 #endif /* _FIXEDJITTERBUF_H_ */