diff options
author | George Joseph <gjoseph@digium.com> | 2016-05-27 13:49:42 -0600 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2016-06-03 17:31:39 -0500 |
commit | c27c2320574902117b1c2e66f210640eb606a736 (patch) | |
tree | f935a76ee1ca8ed7929406687082baa57cbbca96 /include | |
parent | e3c9ad63828852aec248355d2d49206687fa87fd (diff) |
ari/resource_channels: Add 'formats' to channel create/originate
If you create a local channel and don't specify an originator channel
to take capabilities from, we automatically add all audio formats to
the new channel's capabilities. When we try to make the channel
compatible with another, the "best format" functions pick the best
format available, which in this case will be slin192. While this is
great for preserving quality, it's the worst for performance and
overkill for the vast majority of applications.
In the absense of any other information, adding all formats is the
correct thing to do and it's not always possible to supply an
originator so a new parameter 'formats' has been added to the channel
create/originate functions. It's just a comma separated list of formats
to make availalble for the channel. Example: "ulaw,slin,slin16".
'formats' and 'originator' are mutually exclusive.
To facilitate determination of format names, the format name has been
added to "core show codecs".
ASTERISK-26070 #close
Change-Id: I091b23ecd41c1b4128d85028209772ee139f604b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/codec.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asterisk/codec.h b/include/asterisk/codec.h index 28befec50..fb2b7da38 100644 --- a/include/asterisk/codec.h +++ b/include/asterisk/codec.h @@ -77,6 +77,8 @@ struct ast_codec { unsigned int smooth; /*! \brief The module that registered this codec */ struct ast_module *mod; + /*! \brief A format name for a default sane format using this codec */ + const char *format_name; }; /*! |