document usage of 'transfer' configuration option for ISDN PRI switch-side transfers
[asterisk-bristuff.git] / main / fixedjitterbuf.h
blob541e99d2d597834d0a6dab46ab44daf07840bb2c
1 /*
2 * Copyright (C) 2005, Attractel OOD
4 * Contributors:
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.
20 /*! \file
22 * \brief Jitterbuffering algorithm.
26 #ifndef _FIXEDJITTERBUF_H_
27 #define _FIXEDJITTERBUF_H_
29 #if defined(__cplusplus) || defined(c_plusplus)
30 extern "C" {
31 #endif
34 /* return codes */
35 enum {
36 FIXED_JB_OK,
37 FIXED_JB_DROP,
38 FIXED_JB_INTERP,
39 FIXED_JB_NOFRAME
43 /* defaults */
44 #define FIXED_JB_SIZE_DEFAULT 200
45 #define FIXED_JB_RESYNCH_THRESHOLD_DEFAULT 1000
48 /* jb configuration properties */
49 struct fixed_jb_conf
51 long jbsize;
52 long resync_threshold;
56 struct fixed_jb_frame
58 void *data;
59 long ts;
60 long ms;
61 long delivery;
62 struct fixed_jb_frame *next;
63 struct fixed_jb_frame *prev;
67 struct fixed_jb;
70 /* jb interface */
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);
89 #if defined(__cplusplus) || defined(c_plusplus)
91 #endif
93 #endif /* _FIXEDJITTERBUF_H_ */