24 #ifndef _ASTERISK_TRANSLATE_H
25 #define _ASTERISK_TRANSLATE_H
27 #define MAX_AUDIO_FORMAT 47
30 #if defined(__cplusplus) || defined(c_plusplus)
150 struct timeval nextin;
151 struct timeval nextout;
170 #define ast_register_translator(t) __ast_register_translator(t, ast_module_info->self)
265 #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
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_register_translator(struct ast_translator *t, struct ast_module *module)
Register a translator This registers a codec translator with asterisk.
struct ast_trans_pvt * ast_translator_build_path(format_t dest, format_t source)
Builds a translator path Build a path (possibly NULL) from source to dest.
struct ast_module * module
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...
format_t ast_translate_available_formats(format_t dest, format_t src)
Mask off unavailable formats from a format bitmask.
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...
int(* newpvt)(struct ast_trans_pvt *)
unsigned int ast_translate_path_steps(format_t dest, format_t src)
Returns the number of steps required to convert from 'src' to 'dest'.
#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.
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.
int(* framein)(struct ast_trans_pvt *pvt, struct ast_frame *in)
SpanDSP - a series of DSP components for telephony.
Data structure associated with a single frame of data.
struct ast_translator * t
struct ast_translator::@212 list
format_t ast_translator_best_choice(format_t *dsts, format_t *srcs)
Chooses the best translation path.
void ast_translator_free_path(struct ast_trans_pvt *tr)
Frees a translator path Frees the given translator path structure.
void(* destroy)(struct ast_trans_pvt *pvt)
int buffer_samples
size of outbuf, in samples. Leave it 0 if you want the framein callback deal with the frame...