<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 />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 22nd, 2011, 4:36 p.m., <b>Russell Bryant</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<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/3-4/?file=15568#file15568line366" style="color: black; font-weight: bold; text-decoration: underline;">/bridges/bridge_softmix.c</a>
    <span style="font-weight: normal;">

     (Diff revisions 3 - 4)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static int softmix_bridge_thread(struct ast_bridge *bridge)</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">362</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                        <span class="n">ast_log</span><span class="p">(</span><span class="n">LOG_NOTICE</span><span class="p">,</span> <span class="s">&quot; UPDATED FROM %d to %d</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">bridge_data</span><span class="o">-&gt;</span><span class="n">internal_rate</span><span class="p">,</span> <span class="n">best_rate</span><span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">ast_debug() ?</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">done</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 22nd, 2011, 4:36 p.m., <b>Russell Bryant</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<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/3-4/?file=15568#file15568line373" style="color: black; font-weight: bold; text-decoration: underline;">/bridges/bridge_softmix.c</a>
    <span style="font-weight: normal;">

     (Diff revisions 3 - 4)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static int softmix_bridge_thread(struct ast_bridge *bridge)</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">369</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                        <span class="n">ast_log</span><span class="p">(</span><span class="n">LOG_NOTICE</span><span class="p">,</span> <span class="s">&quot; UPDATED FROM %d to %d</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">bridge_data</span><span class="o">-&gt;</span><span class="n">internal_rate</span><span class="p">,</span> <span class="n">stats</span><span class="p">.</span><span class="n">highest_supported_rate</span><span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">ast_debug() here too?</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">done</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 22nd, 2011, 4:36 p.m., <b>Russell Bryant</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<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/3-4/?file=15576#file15576line130" style="color: black; font-weight: bold; text-decoration: underline;">/codecs/codec_resample.c</a>
    <span style="font-weight: normal;">

     (Diff revisions 3 - 4)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static int load_module(void)</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">130</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                        <span class="n">translators</span><span class="p">[</span><span class="n">idx</span><span class="p">].</span><span class="n">desc_size</span> <span class="o">=</span> <span class="k">sizeof</span><span class="p">(</span><span class="k"><span class="hl">struct</span></span><span class="hl"> </span><span class="n"><span class="hl">r</span>esamp<span class="hl">_pvt</span></span><span class="p">);</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">125</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                        <span class="n">translators</span><span class="p">[</span><span class="n">idx</span><span class="p">].</span><span class="n">desc_size</span> <span class="o">=</span> <span class="k">sizeof</span><span class="p">(</span><span class="n"><span class="hl">SpeexR</span>esamp<span class="hl">lerState</span></span><span class="hl"> </span><span class="o"><span class="hl">*</span></span><span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">So does the translator core allocate this much memory for you?  What if you put 0 here?  In this case, it&#39;s providing you no benefit and is just a wasted extra allocation.

It would be nice if you could just specify 0 and have full control over the pvt pointer and not have it do any magic for you.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">You can just put 0 there and everything is fine. </pre>
<br />




<p>- David</p>


<br />
<p>On February 22nd, 2011, 3:03 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-22 15:03:26</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&#39;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">(308571)</span></li>

 <li>/trunk/apps/app_chanspy.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/apps/app_jack.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/apps/app_mixmonitor.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/bridges/bridge_multiplexed.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/bridges/bridge_softmix.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/channels/chan_gtalk.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/channels/chan_iax2.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/channels/chan_jingle.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/channels/chan_sip.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/channels/chan_skinny.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/channels/iax2.h <span style="color: grey">(308571)</span></li>

 <li>/trunk/codecs/Makefile <span style="color: grey">(308571)</span></li>

 <li>/trunk/codecs/codec_resample.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/codecs/codec_speex.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/codecs/speex/arch.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/codecs/speex/fixed_generic.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/codecs/speex/resample.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/codecs/speex/resample_sse.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/codecs/speex/speex_resampler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/codecs/speex/stack_alloc.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/configs/codecs.conf.sample <span style="color: grey">(308571)</span></li>

 <li>/trunk/formats/format_attr_silk.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/funcs/func_pitchshift.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/funcs/func_speex.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/funcs/func_volume.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/include/asterisk/_private.h <span style="color: grey">(308571)</span></li>

 <li>/trunk/include/asterisk/audiohook.h <span style="color: grey">(308571)</span></li>

 <li>/trunk/include/asterisk/format.h <span style="color: grey">(308571)</span></li>

 <li>/trunk/include/asterisk/format_cap.h <span style="color: grey">(308571)</span></li>

 <li>/trunk/include/asterisk/frame.h <span style="color: grey">(308571)</span></li>

 <li>/trunk/include/asterisk/rtp_engine.h <span style="color: grey">(308571)</span></li>

 <li>/trunk/include/asterisk/silk.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/include/asterisk/slinfactory.h <span style="color: grey">(308571)</span></li>

 <li>/trunk/include/asterisk/time.h <span style="color: grey">(308571)</span></li>

 <li>/trunk/include/asterisk/translate.h <span style="color: grey">(308571)</span></li>

 <li>/trunk/main/asterisk.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/main/audiohook.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/main/channel.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/main/data.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/main/format.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/main/format_cap.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/main/format_pref.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/main/frame.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/main/rtp_engine.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/main/slinfactory.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/main/translate.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/res/res_mutestream.c <span style="color: grey">(308571)</span></li>

 <li>/trunk/res/res_rtp_asterisk.c <span style="color: grey">(308571)</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>