Sat Mar 24 23:51:54 2007

Asterisk developer's documentation


translate.h File Reference

Translate via the use of pseudo channels. More...

#include "asterisk/frame.h"
#include "asterisk/plc.h"

Include dependency graph for translate.h:

Go to the source code of this file.

Data Structures

struct  ast_translator

Defines

#define MAX_FORMAT   32

Functions

int ast_register_translator (struct ast_translator *t)
ast_frameast_translate (struct ast_trans_pvt *tr, struct ast_frame *f, int consume)
int ast_translator_best_choice (int *dsts, int *srcs)
ast_trans_pvt * ast_translator_build_path (int dest, int source)
void ast_translator_free_path (struct ast_trans_pvt *tr)
int ast_unregister_translator (struct ast_translator *t)


Detailed Description

Translate via the use of pseudo channels.

Definition in file translate.h.


Function Documentation

int ast_register_translator ( struct ast_translator t  ) 

Parameters:
t populated ast_translator structure This registers a codec translator with asterisk Returns 0 on success, -1 on failure

struct ast_frame* ast_translate ( struct ast_trans_pvt *  tr,
struct ast_frame f,
int  consume 
)

Parameters:
tr translator structure to use for translation
f frame to translate
consume Whether or not to free the original frame Apply an input frame into the translator and receive zero or one output frames. Consume determines whether the original frame should be freed Returns an ast_frame of the new translation format on success, NULL on failure

int ast_translator_best_choice ( int *  dsts,
int *  srcs 
)

Given a list of sources, and a designed destination format, which should I choose? Returns 0 on success, -1 if no path could be found. Modifies dests and srcs in place

struct ast_trans_pvt* ast_translator_build_path ( int  dest,
int  source 
)

Parameters:
dest destination format
source source format Build a path (possibly NULL) from source to dest Returns ast_trans_pvt on success, NULL on failure

void ast_translator_free_path ( struct ast_trans_pvt *  tr  ) 

Parameters:
tr translator path to get rid of Frees the given translator path structure

int ast_unregister_translator ( struct ast_translator t  ) 

Parameters:
t translator to unregister Unregisters the given tranlator Returns 0 on success, -1 on failure


Generated on Sat Mar 24 23:51:54 2007 for Asterisk - the Open Source PBX by  doxygen 1.5.1