<p>Joshua Colp <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8604">View Change</a></p><p>Patch set 4:</p><p style="white-space: pre-wrap; word-wrap: break-word;">There's two use cases for this. The one currently being tackled is for a buffer for RTP sending, where you are asked for an arbitrary packet and retransmit it. New packets get added, old ones go away.</p><p style="white-space: pre-wrap; word-wrap: break-word;">For this case where you always have n number of packets in the buffer then caching data structures that you know you are going to end up using is a good. Thus why I originally stuffed a cache in there.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The second case is where you are reordering received packets - in this case you do take the head of the buffer out (or potentially wait a bit for other packets to come in so it gets reordered). I don't think we should try to make this API support this just yet until it is further fully worked out and used.</p><p style="white-space: pre-wrap; word-wrap: break-word;">As is made evident, trying to keep both in mind at once confuses things. It may even be that we can't reuse the data butter for the receive case (although I THINK we can with an API addition).</p><p style="white-space: pre-wrap; word-wrap: break-word;">Using a different data structure is possible - for example a vector - but the complexity goes up. You either have to enforce that position starts at 0 and goes up (which pushes mapping logic into res_rtp_asterisk to sustain that) or you have to establish some kind of mapping internally so that you know your index.</p><ul style="list-style: none; padding-left: 20px;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8604">change 8604</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8604"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Iff13c5d4795d52356959fe2a57360cd57dfade07 </div>
<div style="display:none"> Gerrit-Change-Number: 8604 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 21 Mar 2018 17:19:09 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>