aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/translate.h
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-24 03:45:42 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-24 03:45:42 +0000
commit6a53ae2cd676fa9045c0ef44b5dcb6c1fa6e6508 (patch)
treeede51de306059523a1018419c8ee2375fcb11778 /include/asterisk/translate.h
parent3dc74cbf263fca4835576cb1e247f3c7e8d63e20 (diff)
add an API call to allow channel drivers to determine which media formats are compatible (passthrough or transcode) with the format an existing channel is already using
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46082 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/translate.h')
-rw-r--r--include/asterisk/translate.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/asterisk/translate.h b/include/asterisk/translate.h
index 07c0ae1c2..a03f54ef2 100644
--- a/include/asterisk/translate.h
+++ b/include/asterisk/translate.h
@@ -205,12 +205,26 @@ struct ast_frame *ast_translate(struct ast_trans_pvt *tr, struct ast_frame *f, i
/*!
* \brief Returns the number of steps required to convert from 'src' to 'dest'.
- * \param dest Destination format
- * \param src Source format
+ * \param dest destination format
+ * \param src source format
* \return the number of translation steps required, or -1 if no path is available
*/
unsigned int ast_translate_path_steps(unsigned int dest, unsigned int src);
+/*!
+ * \brief Mask off unavailable formats from a format bitmask
+ * \param dest possible destination formats
+ * \param src source formats
+ * \return the destination formats that are available in the source or translatable
+ *
+ * The result will include all formats from 'dest' that are either present
+ * in 'src' or translatable from a format present in 'src'.
+ *
+ * Note that only a single audio format and a single video format can be
+ * present in 'src', or the function will produce unexpected results.
+ */
+unsigned int ast_translate_available_formats(unsigned int dest, unsigned int src);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif