#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_frame * | ast_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) |
Definition in file translate.h.
int ast_register_translator | ( | struct ast_translator * | t | ) |
t | populated ast_translator structure This registers a codec translator with asterisk Returns 0 on success, -1 on failure |
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 | |||
) |
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 | ) |
tr | translator path to get rid of Frees the given translator path structure |
int ast_unregister_translator | ( | struct ast_translator * | t | ) |
t | translator to unregister Unregisters the given tranlator Returns 0 on success, -1 on failure |