summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c50
1 files changed, 7 insertions, 43 deletions
diff --git a/main/channel.c b/main/channel.c
index c7847cbd4..869b29f5e 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -520,12 +520,6 @@ void ast_channel_setwhentohangup_tv(struct ast_channel *chan, struct timeval off
return;
}
-void ast_channel_setwhentohangup(struct ast_channel *chan, time_t offset)
-{
- struct timeval when = { offset, };
- ast_channel_setwhentohangup_tv(chan, when);
-}
-
/*! \brief Compare a offset with when to hangup channel */
int ast_channel_cmpwhentohangup_tv(struct ast_channel *chan, struct timeval offset)
{
@@ -542,12 +536,6 @@ int ast_channel_cmpwhentohangup_tv(struct ast_channel *chan, struct timeval offs
return ast_tvdiff_ms(whentohangup, *ast_channel_whentohangup(chan));
}
-int ast_channel_cmpwhentohangup(struct ast_channel *chan, time_t offset)
-{
- struct timeval when = { offset, };
- return ast_channel_cmpwhentohangup_tv(chan, when);
-}
-
/*! \brief Register a new telephony channel in Asterisk */
int ast_channel_register(const struct ast_channel_tech *tech)
{
@@ -2389,16 +2377,6 @@ static void ast_dummy_channel_destructor(void *obj)
ast_channel_internal_cleanup(chan);
}
-struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_info *info, const char *uid)
-{
- return ast_datastore_alloc(info, uid);
-}
-
-int ast_channel_datastore_free(struct ast_datastore *datastore)
-{
- return ast_datastore_free(datastore);
-}
-
int ast_channel_datastore_inherit(struct ast_channel *from, struct ast_channel *to)
{
struct ast_datastore *datastore = NULL, *datastore2;
@@ -6485,11 +6463,15 @@ static int ast_channel_make_compatible_helper(struct ast_channel *from, struct a
* to use SLINEAR between channels, but only if there is
* no direct conversion available. If generic PLC is
* desired, then transcoding via SLINEAR is a requirement
+ * even if the formats are the same.
*/
- if (ast_format_cmp(best_dst_fmt, best_src_fmt) == AST_FORMAT_CMP_NOT_EQUAL
- && (ast_opt_generic_plc || ast_opt_transcode_via_slin)) {
+ if (ast_opt_generic_plc_on_equal_codecs
+ || (ast_format_cmp(best_dst_fmt, best_src_fmt) == AST_FORMAT_CMP_NOT_EQUAL
+ && (ast_opt_generic_plc || ast_opt_transcode_via_slin))) {
+
int use_slin = (ast_format_cache_is_slinear(best_src_fmt)
- || ast_format_cache_is_slinear(best_dst_fmt)) ? 1 : 0;
+ || ast_format_cache_is_slinear(best_dst_fmt))
+ ? 1 : ast_opt_generic_plc_on_equal_codecs;
if (use_slin || ast_translate_path_steps(best_dst_fmt, best_src_fmt) != 1) {
int best_sample_rate = (ast_format_get_sample_rate(best_src_fmt) > ast_format_get_sample_rate(best_dst_fmt)) ?
@@ -8009,24 +7991,6 @@ void ast_channel_stop_silence_generator(struct ast_channel *chan, struct ast_sil
}
-/*! \ brief Convert channel reloadreason (ENUM) to text string for manager event */
-const char *channelreloadreason2txt(enum channelreloadreason reason)
-{
- switch (reason) {
- case CHANNEL_MODULE_LOAD:
- return "LOAD (Channel module load)";
-
- case CHANNEL_MODULE_RELOAD:
- return "RELOAD (Channel module reload)";
-
- case CHANNEL_CLI_RELOAD:
- return "CLIRELOAD (Channel module reload by CLI command)";
-
- default:
- return "MANAGERRELOAD (Channel module reload by manager)";
- }
-};
-
/*
* Wrappers for various ast_say_*() functions that call the full version
* of the same functions.