diff options
author | Alexei Gradinari <alex2grad@gmail.com> | 2016-11-15 16:01:27 -0500 |
---|---|---|
committer | Alexei Gradinari <alex2grad@gmail.com> | 2016-11-16 10:14:52 -0500 |
commit | cf6d13180effc92a2483dccc68f2f188689a40fa (patch) | |
tree | 0fbd75717564c5b87d935c49629dcd75a8405605 /include/asterisk | |
parent | a58d3597019f8cc5a503f140671232ae3f8d9119 (diff) |
chan_pjsip: fix switching sending codec when asymmetric_rtp_codec=no
The sending codec is switched to the receiving codec and then
is switched back to the best native codec on EVERY receiving RTP packets.
This is because after call of ast_channel_set_rawwriteformat there is call
of ast_set_write_format which calls set_format which sets rawwriteformat
to the best native format.
This patch adds a new function ast_set_write_format_path which set
specific write path on channel and uses this function to switch
the sending codec.
ASTERISK-26603 #close
Change-Id: I5b7d098f8b254ce8f45546e6c36e5d324737f71d
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/channel.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index a76e606f9..0735119e4 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -2003,6 +2003,21 @@ int ast_prod(struct ast_channel *chan); int ast_set_read_format_path(struct ast_channel *chan, struct ast_format *raw_format, struct ast_format *core_format); /*! + * \brief Set specific write path on channel. + * \since 13.13.0 + * + * \param chan Channel to setup write path. + * \param core_format What the core wants to write. + * \param raw_format Raw write format. + * + * \pre chan is locked + * + * \retval 0 on success. + * \retval -1 on error. + */ +int ast_set_write_format_path(struct ast_channel *chan, struct ast_format *core_format, struct ast_format *raw_format); + +/*! * \brief Sets read format on channel chan from capabilities * Set read format for channel to whichever component of "format" is best. * \param chan channel to change |