00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _FIXEDJITTERBUF_H_
00027 #define _FIXEDJITTERBUF_H_
00028
00029 #if defined(__cplusplus) || defined(c_plusplus)
00030 extern "C" {
00031 #endif
00032
00033
00034
00035 enum {
00036 FIXED_JB_OK,
00037 FIXED_JB_DROP,
00038 FIXED_JB_INTERP,
00039 FIXED_JB_NOFRAME
00040 };
00041
00042
00043
00044 #define FIXED_JB_SIZE_DEFAULT 200
00045 #define FIXED_JB_RESYNCH_THRESHOLD_DEFAULT 1000
00046
00047
00048
00049 struct fixed_jb_conf
00050 {
00051 long jbsize;
00052 long resync_threshold;
00053 };
00054
00055
00056 struct fixed_jb_frame
00057 {
00058 void *data;
00059 long ts;
00060 long ms;
00061 long delivery;
00062 struct fixed_jb_frame *next;
00063 struct fixed_jb_frame *prev;
00064 };
00065
00066
00067 struct fixed_jb;
00068
00069
00070
00071
00072 struct fixed_jb * fixed_jb_new(struct fixed_jb_conf *conf);
00073
00074 void fixed_jb_destroy(struct fixed_jb *jb);
00075
00076 int fixed_jb_put_first(struct fixed_jb *jb, void *data, long ms, long ts, long now);
00077
00078 int fixed_jb_put(struct fixed_jb *jb, void *data, long ms, long ts, long now);
00079
00080 int fixed_jb_get(struct fixed_jb *jb, struct fixed_jb_frame *frame, long now, long interpl);
00081
00082 long fixed_jb_next(struct fixed_jb *jb);
00083
00084 int fixed_jb_remove(struct fixed_jb *jb, struct fixed_jb_frame *frameout);
00085
00086 void fixed_jb_set_force_resynch(struct fixed_jb *jb);
00087
00088 #if defined(__cplusplus) || defined(c_plusplus)
00089 }
00090 #endif
00091
00092 #endif