30 #ifndef _ABSTRACT_JB_H_
31 #define _ABSTRACT_JB_H_
37 #if defined(__cplusplus) || defined(c_plusplus)
50 #define AST_JB_IMPL_NAME_SIZE 12
71 #define AST_JB_CONF_PREFIX "jb"
72 #define AST_JB_CONF_ENABLE "enable"
73 #define AST_JB_CONF_FORCE "force"
74 #define AST_JB_CONF_MAX_SIZE "maxsize"
75 #define AST_JB_CONF_RESYNCH_THRESHOLD "resyncthreshold"
76 #define AST_JB_CONF_TARGET_EXTRA "targetextra"
77 #define AST_JB_CONF_IMPL "impl"
78 #define AST_JB_CONF_LOG "log"
227 #if defined(__cplusplus) || defined(c_plusplus)
Main Channel structure associated with a channel.
int ast_jb_put(struct ast_channel *chan, struct ast_frame *f)
Puts a frame into a channel jitterbuffer.
void ast_jb_empty_and_reset(struct ast_channel *c0, struct ast_channel *c1)
drops all frames from a jitterbuffer and resets it
int ast_jb_read_conf(struct ast_jb_conf *conf, const char *varname, const char *value)
Sets jitterbuffer configuration property.
int ast_jb_get_when_to_wakeup(struct ast_channel *c0, struct ast_channel *c1, int time_left)
Calculates the time, left to the closest delivery moment in a bridge.
struct ast_jb_conf conf
Jitterbuffer configuration.
#define AST_JB_IMPL_NAME_SIZE
unsigned int flags
Jitterbuffer internal state flags.
long resync_threshold
Resynchronization threshold of the jitterbuffer implementation.
void ast_jb_destroy(struct ast_channel *chan)
Destroys jitterbuffer on a channel.
void * jbobj
Jitterbuffer object, passed to the implementation.
long target_extra
amount of additional jitterbuffer adjustment
char impl[AST_JB_IMPL_NAME_SIZE]
Name of the jitterbuffer implementation to be used.
void ast_jb_get_config(const struct ast_channel *chan, struct ast_jb_conf *conf)
Copies a channel's jitterbuffer configuration.
struct ast_jb_impl * impl
Jitterbuffer implementation to be used.
General jitterbuffer state.
FILE * logfile
File for frame timestamp tracing.
format_t last_format
Voice format of the last frame in.
unsigned int flags
Combination of the AST_JB_ENABLED, AST_JB_FORCED and AST_JB_LOG flags.
void ast_jb_configure(struct ast_channel *chan, const struct ast_jb_conf *conf)
Configures a jitterbuffer on a channel.
void ast_jb_get_and_deliver(struct ast_channel *c0, struct ast_channel *c1)
Deliver the queued frames that should be delivered now for both channels.
Data structure associated with a single frame of data.
struct timeval timebase
The time the jitterbuffer was created.
int ast_jb_do_usecheck(struct ast_channel *c0, struct ast_channel *c1)
Checks the need of a jb use in a generic bridge.
Asterisk internal frame definitions.
long max_size
Max size of the jitterbuffer implementation.
Jitterbuffer implementation private struct.
General jitterbuffer configuration.
long next
The time the next frame should be played.