]> git.ipfire.org Git - thirdparty/asterisk.git/commit
audiohooks: Remove redundant codec translations when using audiohooks 58/4058/1
authorMichael Walton <mike@farsouthnet.com>
Wed, 5 Oct 2016 01:46:17 +0000 (14:46 +1300)
committerJoshua Colp <jcolp@digium.com>
Mon, 10 Oct 2016 16:39:54 +0000 (11:39 -0500)
commit4cf2d9f2618a413cf6b47a3140461b5a03a981b2
treefd3bc48534d67b5fc0d6553b3e8c935d8666ca7e
parent741c2e157096b5c1f38f0c9a9ca08ae8d7197c7e
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