41 memset(sf, 0,
sizeof(*sf));
48 memset(sf, 0,
sizeof(*sf));
79 struct ast_frame *begin_frame = f, *duped_frame =
NULL, *frame_ptr;
118 if (duped_frame != begin_frame) {
148 unsigned int sofar = 0, ineed, remain;
172 frame_data = frame_ptr->
data.
ptr;
174 if (frame_ptr->
samples <= ineed) {
179 remain = frame_ptr->
samples - ineed;
186 memcpy(sf->
hold, frame_data, remain *
sizeof(*
offset));
Asterisk main include file. File version handling, generic pbx functions.
#define ao2_replace(dst, src)
Replace one object reference with another cleaning up the original.
#define ao2_bump(obj)
Bump refcount on an AO2 object by one, returning the object.
Asterisk internal frame definitions.
#define ast_frisolate(fr)
Makes a frame independent of any static storage.
#define ast_frdup(fr)
Copies a frame.
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
#define AST_LIST_NEXT(elm, field)
Returns the next entry in the list after the given entry.
void ast_slinfactory_init(struct ast_slinfactory *sf)
Initialize a slinfactory.
int ast_slinfactory_init_with_format(struct ast_slinfactory *sf, struct ast_format *slin_out)
Initialize a slinfactory.
unsigned int ast_slinfactory_available(const struct ast_slinfactory *sf)
Retrieve number of samples currently in a slinfactory.
int ast_slinfactory_read(struct ast_slinfactory *sf, short *buf, size_t samples)
Read samples from a slinfactory.
void ast_slinfactory_flush(struct ast_slinfactory *sf)
Flush the contents of a slinfactory.
int ast_slinfactory_feed(struct ast_slinfactory *sf, struct ast_frame *f)
Feed audio into a slinfactory.
void ast_slinfactory_destroy(struct ast_slinfactory *sf)
Destroy the contents of a slinfactory.
A machine to gather up arbitrary frames and convert them to raw slinear on demand.
#define AST_SLINFACTORY_MAX_HOLD
struct ast_format * format
Data structure associated with a single frame of data.
struct ast_frame_subclass subclass
union ast_frame::@226 data
struct ast_format * output_format
struct ast_format * format
struct ast_trans_pvt * trans
short hold[AST_SLINFACTORY_MAX_HOLD]
Support for translation of data formats. translate.c.
struct ast_frame * ast_translate(struct ast_trans_pvt *tr, struct ast_frame *f, int consume)
translates one or more frames Apply an input frame into the translator and receive zero or one output...
void ast_translator_free_path(struct ast_trans_pvt *tr)
Frees a translator path Frees the given translator path structure.
struct ast_trans_pvt * ast_translator_build_path(struct ast_format *dest, struct ast_format *source)
Builds a translator path Build a path (possibly NULL) from source to dest.