codecs: Add Codec 2 mode 2400.

ASTERISK-26217 #close

Change-Id: I1e45d8084683fab5f2b272bf35f4a149cea8b8d6
This commit is contained in:
Alexander Traud
2016-07-19 20:14:21 +02:00
parent 943bb48b59
commit 2e79f52d71
10 changed files with 446 additions and 1 deletions

View File

@@ -217,6 +217,11 @@ struct ast_format *ast_format_siren7;
*/
struct ast_format *ast_format_opus;
/*!
* \brief Built-in cached codec2 format.
*/
struct ast_format *ast_format_codec2;
/*!
* \brief Built-in cached t140 format.
*/
@@ -328,6 +333,7 @@ static void format_cache_shutdown(void)
ao2_replace(ast_format_testlaw, NULL);
ao2_replace(ast_format_g719, NULL);
ao2_replace(ast_format_opus, NULL);
ao2_replace(ast_format_codec2, NULL);
ao2_replace(ast_format_jpeg, NULL);
ao2_replace(ast_format_png, NULL);
ao2_replace(ast_format_h261, NULL);
@@ -360,7 +366,9 @@ int ast_format_cache_init(void)
static void set_cached_format(const char *name, struct ast_format *format)
{
if (!strcmp(name, "g723")) {
if (!strcmp(name, "codec2")) {
ao2_replace(ast_format_codec2, format);
} else if (!strcmp(name, "g723")) {
ao2_replace(ast_format_g723, format);
} else if (!strcmp(name, "ulaw")) {
ao2_replace(ast_format_ulaw, format);