Merged revisions 99004 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99004 | russell | 2008-01-17 16:37:22 -0600 (Thu, 17 Jan 2008) | 10 lines

Have IAX2 optimize the codec translation path just like chan_sip does it.  If
the caller's codec is in our codec list, move it to the top to avoid transcoding.

(closes issue #10500)
Reported by: stevedavies
Patches:
      iax-prefer-current-codec.patch uploaded by stevedavies (license 184)
      iax-prefer-current-codec.1.4.patch uploaded by stevedavies (license 184)
Tested by: stevedavies, pj, sheldonh

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2008-01-17 22:50:13 +00:00
parent fdc76e87bf
commit 2a91da6613
3 changed files with 59 additions and 8 deletions

View File

@@ -531,6 +531,10 @@ void ast_codec_pref_remove(struct ast_codec_pref *pref, int format);
*/
int ast_codec_pref_append(struct ast_codec_pref *pref, int format);
/*! \brief Prepend an audio codec to a preference list, removing it first if it was already there
*/
void ast_codec_pref_prepend(struct ast_codec_pref *pref, int format, int only_if_existing);
/*! \brief Select the best audio format according to preference list from supplied options.
If "find_best" is non-zero then if nothing is found, the "Best" format of
the format list is selected, otherwise 0 is returned. */