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) {
143 ast_log(
LOG_WARNING,
"Smoother was working on %s format frames, now trying to feed %s?\n",
Prototypes for public functions only of internal interest,.
Asterisk main include file. File version handling, generic pbx functions.
#define ast_calloc(num, len)
A wrapper for calloc()
#define ao2_bump(obj)
Bump refcount on an AO2 object by one, returning the object.
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
Asterisk internal frame definitions.
#define AST_FRIENDLY_OFFSET
Offset into a frame's data buffer.
void ast_swapcopy_samples(void *dst, const void *src, int samples)
int ast_smoother_get_flags(struct ast_smoother *s)
struct ast_smoother * ast_smoother_new(int size)
void ast_smoother_reconfigure(struct ast_smoother *s, int bytes)
Reconfigure an existing smoother to output a different number of bytes per frame.
void ast_smoother_set_flags(struct ast_smoother *s, int flags)
int ast_smoother_test_flag(struct ast_smoother *s, int flag)
void ast_smoother_free(struct ast_smoother *s)
struct ast_frame * ast_smoother_read(struct ast_smoother *s)
int __ast_smoother_feed(struct ast_smoother *s, struct ast_frame *f, int swap)
static int smoother_frame_feed(struct ast_smoother *s, struct ast_frame *f, int swap)
void ast_smoother_reset(struct ast_smoother *s, int bytes)
Asterisk internal frame definitions.
#define AST_SMOOTHER_FLAG_G729
struct ast_format * format
Data structure associated with a single frame of data.
struct ast_frame_subclass subclass
union ast_frame::@226 data
enum ast_frame_type frametype
char framedata[SMOOTHER_SIZE+AST_FRIENDLY_OFFSET]
unsigned int opt_needs_swap
struct ast_format * format
Time-related functions and macros.
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 ...
int ast_tvzero(const struct timeval t)
Returns true if the argument is 0,0.
struct timeval ast_tvadd(struct timeval a, struct timeval b)
Returns the sum of two timevals a + b.