<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6319">View Change</a></p><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/channel.c<br>M main/core_unreal.c<br>3 files changed, 15 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/19/6319/1</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/channel.c b/main/channel.c<br>index 74de9ca..8294812 100644<br>--- a/main/channel.c<br>+++ b/main/channel.c<br>@@ -1097,6 +1097,7 @@<br>                     }<br>                     /* Fall through */<br>            case AST_CONTROL_HANGUP:<br>+             case AST_CONTROL_VIDUPDATE:<br>                   /* Don't queue anything. */<br>                       ast_channel_unlock(chan);<br>                     return 0;<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/6319">change 6319</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/6319"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Id3f40a6f51b740ae4704003a1800185c0c658ee7 </div>
<div style="display:none"> Gerrit-Change-Number: 6319 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>