41 #define SMOOTHER_SIZE 8000 61 ast_log(
LOG_NOTICE,
"Dropping extra frame of G.729 since we already have a VAD frame at the end\n");
82 memset(s, 0,
sizeof(*s));
89 if (s->
size == bytes) {
130 return (s->
flags & flag);
143 ast_log(
LOG_WARNING,
"Smoother was working on %s format frames, now trying to feed %s?\n",
int ast_smoother_test_flag(struct ast_smoother *s, int flag)
Asterisk main include file. File version handling, generic pbx functions.
#define AST_SMOOTHER_FLAG_G729
struct ast_frame * ast_smoother_read(struct ast_smoother *s)
Time-related functions and macros.
int ast_smoother_get_flags(struct ast_smoother *s)
void ast_smoother_reset(struct ast_smoother *s, int bytes)
int ast_tvzero(const struct timeval t)
Returns true if the argument is 0,0.
void ast_swapcopy_samples(void *dst, const void *src, int samples)
Asterisk internal frame definitions.
struct ast_frame_subclass subclass
int __ast_smoother_feed(struct ast_smoother *s, struct ast_frame *f, int swap)
void ast_smoother_set_flags(struct ast_smoother *s, int flags)
#define AST_FRIENDLY_OFFSET
Offset into a frame's data buffer.
static int smoother_frame_feed(struct ast_smoother *s, struct ast_frame *f, int swap)
Asterisk internal frame definitions.
struct timeval ast_samp2tv(unsigned int _nsamp, unsigned int _rate)
Returns a timeval corresponding to the duration of n samples at rate r. Useful to convert samples to ...
struct timeval ast_tvadd(struct timeval a, struct timeval b)
Returns the sum of two timevals a + b.
void ast_smoother_reconfigure(struct ast_smoother *s, int bytes)
Reconfigure an existing smoother to output a different number of bytes per frame. ...
#define ast_calloc(num, len)
A wrapper for calloc()
Prototypes for public functions only of internal interest,.
unsigned int opt_needs_swap
struct ast_format * format
struct ast_smoother * ast_smoother_new(int size)
Data structure associated with a single frame of data.
char framedata[SMOOTHER_SIZE+AST_FRIENDLY_OFFSET]
union ast_frame::@263 data
enum ast_frame_type frametype
struct ast_format * format
void ast_smoother_free(struct ast_smoother *s)