]> git.ipfire.org Git - thirdparty/asterisk.git/commit
audiohooks: Remove redundant codec translations when using audiohooks 24/4024/2
authorMichael Walton <mike@farsouthnet.com>
Wed, 5 Oct 2016 01:46:17 +0000 (14:46 +1300)
committerMichael Walton <mike@farsouthnet.com>
Wed, 5 Oct 2016 02:41:41 +0000 (15:41 +1300)
commit430f6e5388b6e18b31e1a08582112838f6cc7557
treec1e2c6083a63fd15459e621854a372f92f194f6e
parentb0b106a473dcfe4c26ffd79908b7c4f1794f8987
audiohooks: Remove redundant codec translations when using audiohooks

The main frame read and write handlers in main/channel.c don't use the
optimum placement in the processing flow for calling audiohooks
callbacks, as far as codec translation is concerned. This change places
the audiohooks callback code:
 * After the channel read translation if the frame is not linear before
the translation, thereby increasing the chance that the frame is linear
as required by audiohooks
 * Before the channel write translation if the frame is linear at this
point
This prevents the audiohooks code from instantiating additional
translation paths to/from linear where a linear frame format is already
available, saving valuable CPU cycles

ASTERISK-26419

Change-Id: I6edd5771f0740e758e7eb42558b953f046c01f8f
main/channel.c