<p>Josh Soref has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/17166">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">spelling: resync<br><br>Change-Id: Iaf8f32b154246b0a5c4630481471bd8421c77ff7<br>---<br>M include/asterisk/abstract_jb.h<br>M main/fixedjitterbuf.c<br>M tests/test_jitterbuf.c<br>3 files changed, 12 insertions(+), 12 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/66/17166/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/asterisk/abstract_jb.h b/include/asterisk/abstract_jb.h</span><br><span>index eab571b..7ceb9f5 100644</span><br><span>--- a/include/asterisk/abstract_jb.h</span><br><span>+++ b/include/asterisk/abstract_jb.h</span><br><span>@@ -107,7 +107,7 @@</span><br><span> typedef long (*jb_next_impl)(void *jb);</span><br><span> /*! \brief Remove first frame */</span><br><span> typedef int (*jb_remove_impl)(void *jb, struct ast_frame **fout);</span><br><span style="color: hsl(0, 100%, 40%);">-/*! \brief Force resynch */</span><br><span style="color: hsl(120, 100%, 40%);">+/*! \brief Force resync */</span><br><span> typedef void (*jb_force_resynch_impl)(void *jb);</span><br><span> /*! \brief Empty and reset jb */</span><br><span> typedef void (*jb_empty_and_reset_impl)(void *jb);</span><br><span>diff --git a/main/fixedjitterbuf.c b/main/fixedjitterbuf.c</span><br><span>index 6c92329..3601e26 100644</span><br><span>--- a/main/fixedjitterbuf.c</span><br><span>+++ b/main/fixedjitterbuf.c</span><br><span>@@ -156,11 +156,11 @@</span><br><span> offset */</span><br><span> offset = diff - jb->tail->ms;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Do we really need to resynch, or this is just a frame for dropping? */</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Do we really need to resync, or this is just a frame for dropping? */</span><br><span> if (!jb->force_resynch && (offset < jb->conf.resync_threshold && offset > -jb->conf.resync_threshold))</span><br><span> return FIXED_JB_DROP;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Reset the force resynch flag */</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Reset the force resync flag */</span><br><span> jb->force_resynch = 0;</span><br><span> </span><br><span> /* apply the offset to the jb state */</span><br><span>@@ -211,7 +211,7 @@</span><br><span> /* check if the new frame is not too late */</span><br><span> if (delivery < jb->next_delivery) {</span><br><span> /* should drop the frame, but let first resynch_jb() check if this is not a jump in ts, or</span><br><span style="color: hsl(0, 100%, 40%);">- the force resynch flag was not set. */</span><br><span style="color: hsl(120, 100%, 40%);">+ the force resync flag was not set. */</span><br><span> return resynch_jb(jb, data, ms, ts, now);</span><br><span> }</span><br><span> </span><br><span>@@ -219,7 +219,7 @@</span><br><span> However, allow more resync_threshold ms in advance */</span><br><span> if (delivery > jb->next_delivery + jb->delay + jb->conf.resync_threshold) {</span><br><span> /* should drop the frame, but let first resynch_jb() check if this is not a jump in ts, or</span><br><span style="color: hsl(0, 100%, 40%);">- the force resynch flag was not set. */</span><br><span style="color: hsl(120, 100%, 40%);">+ the force resync flag was not set. */</span><br><span> return resynch_jb(jb, data, ms, ts, now);</span><br><span> }</span><br><span> </span><br><span>@@ -234,15 +234,15 @@</span><br><span> delivery < frame->delivery + frame->ms ||</span><br><span> (frame->next && delivery + ms > frame->next->delivery)))</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- /* TODO: Should we check for resynch here? Be careful to do not allow threshold smaller than</span><br><span style="color: hsl(120, 100%, 40%);">+ /* TODO: Should we check for resync here? Be careful to do not allow threshold smaller than</span><br><span> the size of the jb */</span><br><span> </span><br><span> /* should drop the frame, but let first resynch_jb() check if this is not a jump in ts, or</span><br><span style="color: hsl(0, 100%, 40%);">- the force resynch flag was not set. */</span><br><span style="color: hsl(120, 100%, 40%);">+ the force resync flag was not set. */</span><br><span> return resynch_jb(jb, data, ms, ts, now);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Reset the force resynch flag */</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Reset the force resync flag */</span><br><span> jb->force_resynch = 0;</span><br><span> </span><br><span> /* Get a new frame */</span><br><span>diff --git a/tests/test_jitterbuf.c b/tests/test_jitterbuf.c</span><br><span>index 76fb3c4..dd7334d 100644</span><br><span>--- a/tests/test_jitterbuf.c</span><br><span>+++ b/tests/test_jitterbuf.c</span><br><span>@@ -1067,7 +1067,7 @@</span><br><span> </span><br><span> /*!</span><br><span> * \internal</span><br><span style="color: hsl(0, 100%, 40%);">- * \brief Insert frames into the jitter buffer for the resynch tests</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Insert frames into the jitter buffer for the resync tests</span><br><span> */</span><br><span> static void test_jb_resynch_frame_insertion(struct jitterbuf *jb, enum jb_frame_type frame_type)</span><br><span> {</span><br><span>@@ -1096,7 +1096,7 @@</span><br><span> case TEST_INIT:</span><br><span> info->name = "jitterbuffer_resynch_control";</span><br><span> info->category = "/main/jitterbuf/";</span><br><span style="color: hsl(0, 100%, 40%);">- info->summary = "Tests sending control frames that force a resynch";</span><br><span style="color: hsl(120, 100%, 40%);">+ info->summary = "Tests sending control frames that force a resync";</span><br><span> info->description = "Control frames are sent to a jitter buffer. After some "</span><br><span> "number of frames, the source timestamps jump, forcing a resync of "</span><br><span> "the jitter buffer. Since the frames are control, the resync happens "</span><br><span>@@ -1171,7 +1171,7 @@</span><br><span> case TEST_INIT:</span><br><span> info->name = "jitterbuffer_resynch_voice";</span><br><span> info->category = "/main/jitterbuf/";</span><br><span style="color: hsl(0, 100%, 40%);">- info->summary = "Tests sending voice frames that force a resynch";</span><br><span style="color: hsl(120, 100%, 40%);">+ info->summary = "Tests sending voice frames that force a resync";</span><br><span> info->description = "Voice frames are sent to a jitter buffer. After some "</span><br><span> "number of frames, the source timestamps jump, forcing a resync of "</span><br><span> "the jitter buffer. Since the frames are voice, the resync happens "</span><br><span>@@ -1272,7 +1272,7 @@</span><br><span> AST_TEST_REGISTER(jitterbuffer_overflow_voice);</span><br><span> AST_TEST_REGISTER(jitterbuffer_overflow_control);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Buffer resynch */</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Buffer resync */</span><br><span> AST_TEST_REGISTER(jitterbuffer_resynch_voice);</span><br><span> AST_TEST_REGISTER(jitterbuffer_resynch_control);</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/17166">change 17166</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/17166"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Iaf8f32b154246b0a5c4630481471bd8421c77ff7 </div>
<div style="display:none"> Gerrit-Change-Number: 17166 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Josh Soref <jsoref@gmail.com> </div>
<div style="display:none"> Gerrit-CC: Friendly Automation </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>