summaryrefslogtreecommitdiff
path: root/main/codec_builtin.c
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-05-28 16:43:12 -0400
committerSean Bright <sean.bright@gmail.com>2017-05-30 15:08:05 -0500
commit70e5887906db8d585892409cde89e5e28111549a (patch)
treef37ba0b9a1555a6097cd02dbf7a4b3277b5a5905 /main/codec_builtin.c
parent1e65857e6f5da8cf0dd84f9a669e11dc79d36513 (diff)
format: Reintroduce smoother flags
In review 4843 (ASTERISK-24858), we added a hack that forced a smoother creation when sending signed linear so that the byte order was adjusted during transmission. This was needed because smoother flags were lost during the new format work that was done in Asterisk 13. Rather than rolling that same hack into res_rtp_multicast, re-introduce smoother flags so that formats can dictate their own options. Change-Id: I77b835fba0e539c6ce50014a984766f63cab2c16
Diffstat (limited to 'main/codec_builtin.c')
-rw-r--r--main/codec_builtin.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/main/codec_builtin.c b/main/codec_builtin.c
index da03cce6b..5fdfa7e12 100644
--- a/main/codec_builtin.c
+++ b/main/codec_builtin.c
@@ -37,6 +37,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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);
@@ -264,7 +265,7 @@ static struct ast_codec slin8 = {
.minimum_bytes = 160,
.samples_count = slin_samples,
.get_length = slin_length,
- .smooth = 1,
+ .smooth = AST_SMOOTHER_FLAGS_PACK(AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED),
};
static struct ast_codec slin12 = {
@@ -278,7 +279,7 @@ static struct ast_codec slin12 = {
.minimum_bytes = 240,
.samples_count = slin_samples,
.get_length = slin_length,
- .smooth = 1,
+ .smooth = AST_SMOOTHER_FLAGS_PACK(AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED),
};
static struct ast_codec slin16 = {
@@ -292,7 +293,7 @@ static struct ast_codec slin16 = {
.minimum_bytes = 320,
.samples_count = slin_samples,
.get_length = slin_length,
- .smooth = 1,
+ .smooth = AST_SMOOTHER_FLAGS_PACK(AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED),
};
static struct ast_codec slin24 = {
@@ -306,7 +307,7 @@ static struct ast_codec slin24 = {
.minimum_bytes = 480,
.samples_count = slin_samples,
.get_length = slin_length,
- .smooth = 1,
+ .smooth = AST_SMOOTHER_FLAGS_PACK(AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED),
};
static struct ast_codec slin32 = {
@@ -320,7 +321,7 @@ static struct ast_codec slin32 = {
.minimum_bytes = 640,
.samples_count = slin_samples,
.get_length = slin_length,
- .smooth = 1,
+ .smooth = AST_SMOOTHER_FLAGS_PACK(AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED),
};
static struct ast_codec slin44 = {
@@ -334,7 +335,7 @@ static struct ast_codec slin44 = {
.minimum_bytes = 882,
.samples_count = slin_samples,
.get_length = slin_length,
- .smooth = 1,
+ .smooth = AST_SMOOTHER_FLAGS_PACK(AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED),
};
static struct ast_codec slin48 = {
@@ -348,7 +349,7 @@ static struct ast_codec slin48 = {
.minimum_bytes = 960,
.samples_count = slin_samples,
.get_length = slin_length,
- .smooth = 1,
+ .smooth = AST_SMOOTHER_FLAGS_PACK(AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED),
};
static struct ast_codec slin96 = {
@@ -362,7 +363,7 @@ static struct ast_codec slin96 = {
.minimum_bytes = 1920,
.samples_count = slin_samples,
.get_length = slin_length,
- .smooth = 1,
+ .smooth = AST_SMOOTHER_FLAGS_PACK(AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED),
};
static struct ast_codec slin192 = {
@@ -376,7 +377,7 @@ static struct ast_codec slin192 = {
.minimum_bytes = 3840,
.samples_count = slin_samples,
.get_length = slin_length,
- .smooth = 1,
+ .smooth = AST_SMOOTHER_FLAGS_PACK(AST_SMOOTHER_FLAG_BE | AST_SMOOTHER_FLAG_FORCED),
};
static int lpc10_samples(struct ast_frame *frame)