24 #ifndef _ASTERISK_TRANSLATE_H 25 #define _ASTERISK_TRANSLATE_H 27 #if defined(__cplusplus) || defined(c_plusplus) 228 struct timeval nextin;
229 struct timeval nextout;
257 #define ast_register_translator(t) __ast_register_translator(t, AST_MODULE_SELF) 372 #if defined(__cplusplus) || defined(c_plusplus) struct ast_frame * ast_trans_frameout(struct ast_trans_pvt *pvt, int datalen, int samples)
generic frameout function
int datalen
actual space used in outbuf
int(* newpvt)(struct ast_trans_pvt *)
int ast_translate_init(void)
Initialize the translation matrix and index to format conversion table.
Descriptor of a translator.
void ast_translator_activate(struct ast_translator *t)
Activate a previously deactivated translator.
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...
struct ast_trans_pvt * next
int ast_translator_best_choice(struct ast_format_cap *dst_cap, struct ast_format_cap *src_cap, struct ast_format **dst_fmt_out, struct ast_format **src_fmt_out)
Chooses the best translation path.
struct ast_codec * core_src_codec
void ast_translate_available_formats(struct ast_format_cap *dest, struct ast_format_cap *src, struct ast_format_cap *result)
Find available formats.
int __ast_register_translator(struct ast_translator *t, struct ast_module *module)
Register a translator This registers a codec translator with asterisk.
struct ast_module * module
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.
Asterisk internal frame definitions.
int ast_unregister_translator(struct ast_translator *t)
Unregister a translator Unregisters the given tranlator.
A set of macros to manage forward-linked lists.
int buf_size
size of outbuf, in bytes. Mandatory. The wrapper code will also allocate an AST_FRIENDLY_OFFSET space...
void(* destroy)(struct ast_trans_pvt *pvt)
struct ast_codec dst_codec
void(* feedback)(struct ast_trans_pvt *pvt, struct ast_frame *feedback)
struct ast_translator::@326 list
struct ast_format * explicit_dst
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
Default structure for translators, with the basic fields and buffers, all allocated as part of the sa...
struct ast_codec src_codec
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
void ast_translator_deactivate(struct ast_translator *t)
Deactivate a translator.
ast_trans_cost_table
Translator Cost Table definition.
const char * ast_translate_path_to_str(struct ast_trans_pvt *t, struct ast_str **str)
Puts a string representation of the translation path into outbuf.
SpanDSP - a series of DSP components for telephony.
Data structure associated with a single frame of data.
struct ast_translator * t
struct ast_codec * core_dst_codec
unsigned int ast_translate_path_steps(struct ast_format *dest, struct ast_format *src)
Returns the number of steps required to convert from 'src' to 'dest'.
Represents a media codec within Asterisk.
void ast_translator_free_path(struct ast_trans_pvt *tr)
Frees a translator path Frees the given translator path structure.
int(* framein)(struct ast_trans_pvt *pvt, struct ast_frame *in)
int buffer_samples
size of outbuf, in samples. Leave it 0 if you want the framein callback deal with the frame...