[svn-commits] rmudgett: branch rmudgett/iax_fracks r419909 - in /team/rmudgett/iax_fracks/c...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Aug 1 15:55:37 CDT 2014
Author: rmudgett
Date: Fri Aug 1 15:55:32 2014
New Revision: 419909
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=419909
Log:
chan_iax2: Remove some dead code.
Modified:
team/rmudgett/iax_fracks/channels/iax2/codec_pref.c
team/rmudgett/iax_fracks/channels/iax2/include/codec_pref.h
Modified: team/rmudgett/iax_fracks/channels/iax2/codec_pref.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/iax_fracks/channels/iax2/codec_pref.c?view=diff&rev=419909&r1=419908&r2=419909
==============================================================================
--- team/rmudgett/iax_fracks/channels/iax2/codec_pref.c (original)
+++ team/rmudgett/iax_fracks/channels/iax2/codec_pref.c Fri Aug 1 15:55:32 2014
@@ -66,10 +66,12 @@
}
pref->order[x] = buf[x] - differential;
+ pref->framing[x] = 0;
}
if (x < ARRAY_LEN(pref->order)) {
pref->order[x] = 0;
+ pref->framing[x] = 0;
}
}
}
@@ -363,37 +365,6 @@
pref->framing[0] = framing;
}
-unsigned int iax2_codec_pref_getsize(struct iax2_codec_pref *pref, int idx)
-{
- if (0 <= idx && idx < ARRAY_LEN(pref->order) && pref->order[idx]) {
- return pref->framing[idx];
- } else {
- return 0;
- }
-}
-
-int iax2_codec_pref_setsize(struct iax2_codec_pref *pref, struct ast_format *format, int framems)
-{
- int idx;
-
- for (idx = 0; idx < ARRAY_LEN(pref->order); ++idx) {
- uint64_t pref_bitfield;
-
- if (!pref->order[idx]) {
- break;
- }
- pref_bitfield = iax2_codec_pref_order_value_to_format_bitfield(pref->order[idx]);
- if (ast_format_cmp(ast_format_compatibility_bitfield2format(pref_bitfield),
- format) != AST_FORMAT_CMP_EQUAL) {
- continue;
- }
- pref->framing[idx] = framems;
- return 0;
- }
-
- return -1;
-}
-
uint64_t iax2_codec_pref_from_bitfield(struct iax2_codec_pref *pref, uint64_t bitfield)
{
int bit;
@@ -421,8 +392,7 @@
/* The best_bitfield should always be convertible to a format. */
ast_assert(format != NULL);
- iax2_codec_pref_append_bitfield(pref, best_bitfield,
- ast_format_get_default_ms(format));
+ iax2_codec_pref_append_bitfield(pref, best_bitfield, 0);
}
/* Add any remaining codecs. */
@@ -438,8 +408,7 @@
continue;
}
- iax2_codec_pref_append_bitfield(pref, mask,
- ast_format_get_default_ms(format));
+ iax2_codec_pref_append_bitfield(pref, mask, 0);
}
}
}
Modified: team/rmudgett/iax_fracks/channels/iax2/include/codec_pref.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/iax_fracks/channels/iax2/include/codec_pref.h?view=diff&rev=419909&r1=419908&r2=419909
==============================================================================
--- team/rmudgett/iax_fracks/channels/iax2/include/codec_pref.h (original)
+++ team/rmudgett/iax_fracks/channels/iax2/include/codec_pref.h Fri Aug 1 15:55:32 2014
@@ -101,14 +101,6 @@
void iax2_codec_pref_prepend(struct iax2_codec_pref *pref, struct ast_format *format, unsigned int framing,
int only_if_existing);
-/*! \brief Get packet size for codec
-*/
-unsigned int iax2_codec_pref_getsize(struct iax2_codec_pref *pref, int index);
-
-/*! \brief Set packet size for codec
-*/
-int iax2_codec_pref_setsize(struct iax2_codec_pref *pref, struct ast_format *format, int framems);
-
/*! \brief Shift an audio codec preference list up or down 65 bytes so that it becomes an ASCII string
* \note Due to a misunderstanding in how codec preferences are stored, this
* list starts at 'B', not 'A'. For backwards compatibility reasons, this
More information about the svn-commits
mailing list