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
This commit is contained in:
Sean Bright
2017-05-28 16:43:12 -04:00
parent 1e65857e6f
commit 70e5887906
7 changed files with 125 additions and 51 deletions

View File

@@ -377,7 +377,13 @@ const char *ast_format_get_codec_name(const struct ast_format *format)
int ast_format_can_be_smoothed(const struct ast_format *format)
{
return format->codec->smooth;
/* Coalesce to 1 if non-zero */
return format->codec->smooth ? 1 : 0;
}
int ast_format_get_smoother_flags(const struct ast_format *format)
{
return AST_SMOOTHER_FLAGS_UNPACK(format->codec->smooth);
}
enum ast_media_type ast_format_get_type(const struct ast_format *format)