<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6318">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Joshua Colp: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">core: Reduce video update queueing.<br><br>A video update frame is used to indicate that a channel<br>with video negotiated should provide a full frame so the<br>decoder decoding the stream is able to do so. In situations<br>where a queue is used to store frames it makes no sense<br>for the queue to contain multiple video update frames. One<br>is sufficient to have a full frame be sent.<br><br>ASTERISK-27222<br><br>Change-Id: Id3f40a6f51b740ae4704003a1800185c0c658ee7<br>---<br>M main/autoservice.c<br>M main/core_unreal.c<br>2 files changed, 14 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/autoservice.c b/main/autoservice.c<br>index d1a0156..cd7388b 100644<br>--- a/main/autoservice.c<br>+++ b/main/autoservice.c<br>@@ -58,6 +58,7 @@<br> * it gets stopped for the last time. */<br> unsigned int use_count;<br> unsigned int orig_end_dtmf_flag:1;<br>+ unsigned int video_update:1;<br> unsigned int ignore_frame_types;<br> /*! Frames go on at the head of deferred_frames, so we have the frames<br> * from newest to oldest. As we put them at the head of the readq, we'll<br>@@ -161,6 +162,17 @@<br> AST_LIST_INSERT_HEAD(&ents[i]->deferred_frames, dup_f, frame_list);<br> }<br> } else {<br>+ if (defer_frame->frametype == AST_FRAME_CONTROL &&<br>+ defer_frame->subclass.integer == AST_CONTROL_VIDUPDATE) {<br>+<br>+ /* If a video update is already queued don't needlessly queue another */<br>+ if (ents[i]->video_update) {<br>+ ast_frfree(defer_frame);<br>+ break;<br>+ }<br>+<br>+ ents[i]->video_update = 1;<br>+ }<br> if ((dup_f = ast_frisolate(defer_frame))) {<br> AST_LIST_INSERT_HEAD(&ents[i]->deferred_frames, dup_f, frame_list);<br> }<br>diff --git a/main/core_unreal.c b/main/core_unreal.c<br>index 3db6a4d..763be4f 100644<br>--- a/main/core_unreal.c<br>+++ b/main/core_unreal.c<br>@@ -330,7 +330,8 @@<br> if (!ast_channel_get_default_stream(ast, AST_MEDIA_TYPE_AUDIO)) {<br> return 0;<br> }<br>- } else if (f->frametype == AST_FRAME_VIDEO) {<br>+ } else if (f->frametype == AST_FRAME_VIDEO ||<br>+ (f->frametype == AST_FRAME_CONTROL && f->subclass.integer == AST_CONTROL_VIDUPDATE)) {<br> if (!ast_channel_get_default_stream(ast, AST_MEDIA_TYPE_VIDEO)) {<br> return 0;<br> }<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6318">change 6318</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/6318"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15.0 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Id3f40a6f51b740ae4704003a1800185c0c658ee7 </div>
<div style="display:none"> Gerrit-Change-Number: 6318 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@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: Richard Mudgett <rmudgett@digium.com> </div>