summaryrefslogtreecommitdiff
path: root/include/asterisk/translate.h
diff options
context:
space:
mode:
authorDavid Vossel <dvossel@digium.com>2010-08-12 20:17:17 +0000
committerDavid Vossel <dvossel@digium.com>2010-08-12 20:17:17 +0000
commitbbb32fe33eb9a0acc1fdacada7cf7f8eafe072f2 (patch)
tree30f1421ea8c3e45cb1063acd31e9d4d0af63f05d /include/asterisk/translate.h
parent2c75d020665a5398ce155eb7feb0130e6def4cfd (diff)
Merged revisions 282047 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r282047 | dvossel | 2010-08-12 15:15:41 -0500 (Thu, 12 Aug 2010) | 35 lines improved translation paths for wideband codecs The problem I'm addressing is that Asterisk's current method of building the least cost translation paths between codecs does not take into account sample rate. For instance, it was possible for siren14 (a 32khz codec), to contain the a translation path to siren7 (a 16khz audio codec) that goes through slin at 8khz. In this case Asterisk takes a 32khz codec, down samples it to 8khz and then up samples it to 16khz which is terrible regardless if it is computationally less expensive. This patch now builds translation paths that give priority to maintaining the best possible sample rate before taking into consideration computational cost. This patch also adds cli commands to expose what translation paths are actually being used. Changes: 1. Translation paths will never contain a step that changes the sample rate unless absolutely necessary. 2. When choosing the best codec to make two channels compatible. Shared codecs with the highest sample rate are given priority. 3. A new cli command to show all translation paths available for a specific codec 'core show translation paths [codec name]' has been added. 4. 'core show translation' which displays the translation matrix now includes the new higher bit audio codecs in the table. 5. 'core show channel [channel name]' now displays the translation paths if translation is used. (closes issue #16841) Reported by: dvossel Review: https://reviewboard.asterisk.org/r/842/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/translate.h')
-rw-r--r--include/asterisk/translate.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asterisk/translate.h b/include/asterisk/translate.h
index 1d87adbf5..821463bf1 100644
--- a/include/asterisk/translate.h
+++ b/include/asterisk/translate.h
@@ -254,6 +254,14 @@ unsigned int ast_translate_path_steps(format_t dest, format_t src);
*/
format_t ast_translate_available_formats(format_t dest, format_t src);
+/*!
+ * \brief Puts a string representation of the translation path into outbuf
+ * \param translator structure containing the translation path
+ * \param ast_str output buffer
+ * \retval on success pointer to beginning of outbuf. on failure "".
+ */
+const char *ast_translate_path_to_str(struct ast_trans_pvt *t, struct ast_str **str);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif