30 #ifndef _ABSTRACT_JB_H_ 31 #define _ABSTRACT_JB_H_ 37 #if defined(__cplusplus) || defined(c_plusplus) 64 #define AST_JB_IMPL_NAME_SIZE 12 85 #define AST_JB_CONF_PREFIX "jb" 86 #define AST_JB_CONF_ENABLE "enable" 87 #define AST_JB_CONF_FORCE "force" 88 #define AST_JB_CONF_MAX_SIZE "maxsize" 89 #define AST_JB_CONF_RESYNCH_THRESHOLD "resyncthreshold" 90 #define AST_JB_CONF_TARGET_EXTRA "targetextra" 91 #define AST_JB_CONF_IMPL "impl" 92 #define AST_JB_CONF_LOG "log" 93 #define AST_JB_CONF_SYNC_VIDEO "syncvideo" 97 typedef void * (*jb_create_impl)(
struct ast_jb_conf *general_config);
149 struct timeval timebase;
308 #if defined(__cplusplus) || defined(c_plusplus) int(* jb_remove_impl)(void *jb, struct ast_frame **fout)
Remove first frame.
Main Channel structure associated with a channel.
void ast_jb_create_framehook(struct ast_channel *chan, struct ast_jb_conf *jb_conf, int prefer_existing)
Applies a jitterbuffer framehook to a channel based on a provided jitterbuffer config.
void(* jb_empty_and_reset_impl)(void *jb)
Empty and reset jb.
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
const struct ast_jb_impl * impl
Jitterbuffer implementation to be used.
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.
void(* jb_force_resynch_impl)(void *jb)
Force resynch.
#define AST_JB_IMPL_NAME_SIZE
unsigned int flags
Jitterbuffer internal state flags.
All configuration options for statsd client.
void ast_jb_conf_default(struct ast_jb_conf *conf)
Sets the contents of an ast_jb_conf struct to the default jitterbuffer settings.
long resync_threshold
Resynchronization threshold of the jitterbuffer implementation.
void ast_jb_enable_for_channel(struct ast_channel *chan)
Sets a jitterbuffer frame hook on the channel based on the channel's stored jitterbuffer configuratio...
jb_force_resynch_impl force_resync
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.
const struct ast_jb_impl * ast_jb_get_impl(enum ast_jb_type type)
int(* jb_put_first_impl)(void *jb, struct ast_frame *fin, long now)
Put first frame.
void ast_jb_get_config(const struct ast_channel *chan, struct ast_jb_conf *conf)
Copies a channel's jitterbuffer configuration.
jb_put_first_impl put_first
General jitterbuffer state.
void(* jb_destroy_impl)(void *jb)
Destroy.
FILE * logfile
File for frame timestamp tracing.
void *(* jb_create_impl)(struct ast_jb_conf *general_config)
Create.
unsigned int flags
Combination of the AST_JB_ENABLED, AST_JB_FORCED and AST_JB_LOG flags.
long(* jb_next_impl)(void *jb)
Get next.
void ast_jb_configure(struct ast_channel *chan, const struct ast_jb_conf *conf)
Configures a jitterbuffer on a channel.
jb_empty_and_reset_impl empty_and_reset
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.
int(* jb_get_impl)(void *jb, struct ast_frame **fout, long now, long interpl)
Get frame for now.
Data structure associated with a single frame of data.
struct ast_format * last_format
Voice format of the last frame in.
int(* jb_is_late_impl)(void *jb, long ts)
Check if late.
int(* jb_put_impl)(void *jb, struct ast_frame *fin, long now)
Put frame.
int ast_jb_do_usecheck(struct ast_channel *c0, struct ast_channel *c1)
Checks the need of a jb use in a generic bridge.
long max_size
Max size of the jitterbuffer implementation.
Jitterbuffer implementation struct.
General jitterbuffer configuration.
long next
The time the next frame should be played.