diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2017-06-06 08:59:37 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-06-06 08:59:37 -0500 |
commit | 452e6315bb8be7578937de279aa1d906662faa20 (patch) | |
tree | 04af862a33045c6167d58756c776e65e18e9fd73 /main | |
parent | 1a24543124bb06ec0cb0d0b174287323bbe83815 (diff) | |
parent | 5c27fe218776b499cff772660f2b4b7ee42b3802 (diff) |
Merge "format: Reintroduce smoother flags"
Diffstat (limited to 'main')
-rw-r--r-- | main/codec_builtin.c | 10 | ||||
-rw-r--r-- | main/format.c | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/main/codec_builtin.c b/main/codec_builtin.c index 3320900c2..32ec12d3d 100644 --- a/main/codec_builtin.c +++ b/main/codec_builtin.c @@ -36,6 +36,7 @@ #include "asterisk/format.h" #include "asterisk/format_cache.h" #include "asterisk/frame.h" +#include "asterisk/smoother.h" int __ast_codec_register_with_format(struct ast_codec *codec, const char *format_name, struct ast_module *mod); @@ -288,6 +289,7 @@ static struct ast_codec slin8 = { .samples_count = slin_samples, .get_length = slin_length, .smooth = 1, + .smoother_flags = AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED, }; static struct ast_codec slin12 = { @@ -302,6 +304,7 @@ static struct ast_codec slin12 = { .samples_count = slin_samples, .get_length = slin_length, .smooth = 1, + .smoother_flags = AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED, }; static struct ast_codec slin16 = { @@ -316,6 +319,7 @@ static struct ast_codec slin16 = { .samples_count = slin_samples, .get_length = slin_length, .smooth = 1, + .smoother_flags = AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED, }; static struct ast_codec slin24 = { @@ -330,6 +334,7 @@ static struct ast_codec slin24 = { .samples_count = slin_samples, .get_length = slin_length, .smooth = 1, + .smoother_flags = AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED, }; static struct ast_codec slin32 = { @@ -344,6 +349,7 @@ static struct ast_codec slin32 = { .samples_count = slin_samples, .get_length = slin_length, .smooth = 1, + .smoother_flags = AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED, }; static struct ast_codec slin44 = { @@ -358,6 +364,7 @@ static struct ast_codec slin44 = { .samples_count = slin_samples, .get_length = slin_length, .smooth = 1, + .smoother_flags = AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED, }; static struct ast_codec slin48 = { @@ -372,6 +379,7 @@ static struct ast_codec slin48 = { .samples_count = slin_samples, .get_length = slin_length, .smooth = 1, + .smoother_flags = AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED, }; static struct ast_codec slin96 = { @@ -386,6 +394,7 @@ static struct ast_codec slin96 = { .samples_count = slin_samples, .get_length = slin_length, .smooth = 1, + .smoother_flags = AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED, }; static struct ast_codec slin192 = { @@ -400,6 +409,7 @@ static struct ast_codec slin192 = { .samples_count = slin_samples, .get_length = slin_length, .smooth = 1, + .smoother_flags = AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED, }; static int lpc10_samples(struct ast_frame *frame) diff --git a/main/format.c b/main/format.c index 5ae5ad986..09e736cf5 100644 --- a/main/format.c +++ b/main/format.c @@ -391,6 +391,11 @@ int ast_format_can_be_smoothed(const struct ast_format *format) return format->codec->smooth; } +int ast_format_get_smoother_flags(const struct ast_format *format) +{ + return format->codec->smoother_flags; +} + enum ast_media_type ast_format_get_type(const struct ast_format *format) { return format->codec->type; |