mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
add an API so that translators can activate/deactivate themselves when needed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -108,6 +108,7 @@ struct ast_translator {
|
||||
struct ast_module *module; /* opaque reference to the parent module */
|
||||
|
||||
int cost; /*!< Cost in milliseconds for encoding/decoding 1 second of sound */
|
||||
int active; /*!< Whether this translator should be used or not */
|
||||
AST_LIST_ENTRY(ast_translator) list; /*!< link field */
|
||||
};
|
||||
|
||||
@@ -166,6 +167,24 @@ int __ast_register_translator(struct ast_translator *t, struct ast_module *modul
|
||||
*/
|
||||
int ast_unregister_translator(struct ast_translator *t);
|
||||
|
||||
/*!
|
||||
* \brief Activate a previously deactivated translator
|
||||
* \param t translator to activate
|
||||
* \return nothing
|
||||
*
|
||||
* Enables the specified translator for use.
|
||||
*/
|
||||
void ast_translator_activate(struct ast_translator *t);
|
||||
|
||||
/*!
|
||||
* \brief Deactivate a translator
|
||||
* \param t translator to deactivate
|
||||
* \return nothing
|
||||
*
|
||||
* Disables the specified translator from being used.
|
||||
*/
|
||||
void ast_translator_deactivate(struct ast_translator *t);
|
||||
|
||||
/*!
|
||||
* \brief Chooses the best translation path
|
||||
*
|
||||
|
Reference in New Issue
Block a user