<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/1104/">https://reviewboard.asterisk.org/r/1104/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Just noting a couple of things I've found and fixed.</pre>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/1104/diff/1/?file=15484#file15484line401" style="color: black; font-weight: bold; text-decoration: underline;">/codecs/codec_speex.c</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static struct ast_translator lin32tospeexuwb = {</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">401</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="p">.</span><span class="n">name</span> <span class="o">=</span> <span class="s">"lin32tospeexwb"</span><span class="p">,</span><span class="ew"> </span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This should read "lib32tospeexuwb". Thanks to malcolmd for pointing that out to me.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/1104/diff/1/?file=15497#file15497line1170" style="color: black; font-weight: bold; text-decoration: underline;">/main/format.c</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static int load_format_config(void)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1169</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                        <span class="p">}</span> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">strcasecmp</span><span class="p">(</span><span class="n">var</span><span class="o">-></span><span class="n">name</span><span class="p">,</span> <span class="s">"packetloss_percentage"</span><span class="p">))</span> <span class="p">{</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1170</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                <span class="k">if</span> <span class="p">((</span><span class="n">sscanf</span><span class="p">(</span><span class="n">var</span><span class="o">-></span><span class="n">value</span><span class="p">,</span> <span class="s">"%30u"</span><span class="p">,</span> <span class="o">&</span><span class="n">settings</span><span class="p">.</span><span class="n">packetloss_percentage</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">1</span><span class="p">)</span> <span class="o">||</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1171</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                        <span class="p">(</span><span class="n">settings</span><span class="p">.</span><span class="n">packetloss_percentage</span> <span class="o">>=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">||</span> <span class="p">(</span><span class="n">settings</span><span class="p">.</span><span class="n">packetloss_percentage</span> <span class="o"><=</span> <span class="mi">100</span><span class="p">))</span> <span class="p">{</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This bounds checking logic is not correct.</pre>
</div>
<br />
<p>- David</p>
<br />
<p>On February 11th, 2011, 12:09 p.m., David Vossel wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By David Vossel.</div>
<p style="color: grey;"><i>Updated 2011-02-11 12:09:35</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">-Functional Changes
Dynamic global format list build by codecs defined in codecs.conf
SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf
Negotiation of SILK attributes in chan_sip.
SPEEX 32khz with translation
SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation using codec_resample.c
Various changes to RTP code required to properly handle the dynamic format list and formats with attributes.
-Organizational changes
Global format list is moved from frame.c to format.c
Various format specific functions moved from frame.c to format.c
-MIS
There were several changes that I opted not to do during phase 1 that involved the proper use of formats with attributes. I felt that the phase 1 patch was too complex to attempt these changes so I have included them here. The primary change I held off doing the first time around was in the rtp_engine.c Payload and MIME type lists. These lists were statically defined which made it impossible to set formats with attributes in them. I have gone back and revised these lists to allow the flexibility required for the new architecture.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I used the same testing I did for phase1 with phase2. This includes load testing with various codec negotiation scenarios. Speex 32 and its translators were verified using Asterisk back to back. I verified SILK using a codec translator module I'm working with. The new slinear resample code was exercised with both Speex32 and SILK 12khz/24khz translation.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/CHANGES <span style="color: grey">(307672)</span></li>
<li>/trunk/channels/chan_gtalk.c <span style="color: grey">(307672)</span></li>
<li>/trunk/channels/chan_iax2.c <span style="color: grey">(307672)</span></li>
<li>/trunk/channels/chan_jingle.c <span style="color: grey">(307672)</span></li>
<li>/trunk/channels/chan_sip.c <span style="color: grey">(307672)</span></li>
<li>/trunk/channels/chan_skinny.c <span style="color: grey">(307672)</span></li>
<li>/trunk/channels/iax2.h <span style="color: grey">(307672)</span></li>
<li>/trunk/codecs/codec_resample.c <span style="color: grey">(307672)</span></li>
<li>/trunk/codecs/codec_speex.c <span style="color: grey">(307672)</span></li>
<li>/trunk/configs/codecs.conf.sample <span style="color: grey">(307672)</span></li>
<li>/trunk/formats/format_attr_silk.c <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/include/asterisk/format.h <span style="color: grey">(307672)</span></li>
<li>/trunk/include/asterisk/format_cap.h <span style="color: grey">(307672)</span></li>
<li>/trunk/include/asterisk/frame.h <span style="color: grey">(307672)</span></li>
<li>/trunk/include/asterisk/rtp_engine.h <span style="color: grey">(307672)</span></li>
<li>/trunk/include/asterisk/silk.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/include/asterisk/time.h <span style="color: grey">(307672)</span></li>
<li>/trunk/include/asterisk/translate.h <span style="color: grey">(307672)</span></li>
<li>/trunk/main/asterisk.c <span style="color: grey">(307672)</span></li>
<li>/trunk/main/channel.c <span style="color: grey">(307672)</span></li>
<li>/trunk/main/data.c <span style="color: grey">(307672)</span></li>
<li>/trunk/main/format.c <span style="color: grey">(307672)</span></li>
<li>/trunk/main/format_cap.c <span style="color: grey">(307672)</span></li>
<li>/trunk/main/format_pref.c <span style="color: grey">(307672)</span></li>
<li>/trunk/main/frame.c <span style="color: grey">(307672)</span></li>
<li>/trunk/main/rtp_engine.c <span style="color: grey">(307672)</span></li>
<li>/trunk/main/translate.c <span style="color: grey">(307672)</span></li>
<li>/trunk/res/res_rtp_asterisk.c <span style="color: grey">(307672)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1104/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>