<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13055">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">test_res_rtp: Enable FIR and REMB nominal tests.<br><br>Now that both FIR and REMB are being sent in compound packets<br>these tests can be enabled.<br><br>This also extends the REMB nominal test to cover the REMB<br>contents itself.<br><br>Change-Id: Ibfee526ad780eefcce5dd787f53785382210024a<br>---<br>M tests/test_res_rtp.c<br>1 file changed, 13 insertions(+), 13 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/test_res_rtp.c b/tests/test_res_rtp.c</span><br><span>index ecedb4f..08c9971 100644</span><br><span>--- a/tests/test_res_rtp.c</span><br><span>+++ b/tests/test_res_rtp.c</span><br><span>@@ -327,6 +327,7 @@</span><br><span> .data.ptr = &feedback,</span><br><span> .datalen = sizeof(feedback),</span><br><span> };</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_rtp_rtcp_feedback *received_feedback;</span><br><span> </span><br><span> switch (cmd) {</span><br><span> case TEST_INIT:</span><br><span>@@ -337,8 +338,7 @@</span><br><span> "Tests sending and receiving a REMB packet";</span><br><span> return AST_TEST_NOT_RUN;</span><br><span> case TEST_EXECUTE:</span><br><span style="color: hsl(0, 100%, 40%);">- /* Disable for now - there's a bug! */</span><br><span style="color: hsl(0, 100%, 40%);">- return AST_TEST_NOT_RUN;</span><br><span style="color: hsl(120, 100%, 40%);">+ break;</span><br><span> }</span><br><span> </span><br><span> test_sched = ast_sched_context_create();</span><br><span>@@ -353,12 +353,7 @@</span><br><span> </span><br><span> ast_rtp_instance_write(instance1, &frame_out);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /*</span><br><span style="color: hsl(0, 100%, 40%);">- * There may be some additional work that needs to be done here, depending on how</span><br><span style="color: hsl(0, 100%, 40%);">- * Asterisk handles the reading in of compound packets. We might get an ast_null_frame</span><br><span style="color: hsl(0, 100%, 40%);">- * here instead of the REMB frame. We'll need to check the frametype to distinguish</span><br><span style="color: hsl(0, 100%, 40%);">- * between them (AST_FRAME_NULL for ast_null_frame, AST_FRAME_RTCP for REMB).</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Verify the high level aspects of the frame */</span><br><span> frame_in = ast_rtp_instance_read(instance2, 0);</span><br><span> ast_test_validate(test, frame_in != NULL, "Did not receive a REMB frame");</span><br><span> ast_test_validate(test, frame_in->frametype == AST_FRAME_RTCP,</span><br><span>@@ -366,6 +361,15 @@</span><br><span> ast_test_validate(test, frame_in->subclass.integer == AST_RTP_RTCP_PSFB,</span><br><span> "REMB frame did not have the expected subclass integer");</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* Verify the actual REMB information itself */</span><br><span style="color: hsl(120, 100%, 40%);">+ received_feedback = frame_in->data.ptr;</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_validate(test, received_feedback->fmt == AST_RTP_RTCP_FMT_REMB,</span><br><span style="color: hsl(120, 100%, 40%);">+ "REMB frame did not have the expected feedback format");</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_validate(test, received_feedback->remb.br_exp == feedback.remb.br_exp,</span><br><span style="color: hsl(120, 100%, 40%);">+ "REMB received exponent did not match sent exponent");</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_validate(test, received_feedback->remb.br_mantissa == feedback.remb.br_mantissa,</span><br><span style="color: hsl(120, 100%, 40%);">+ "REMB received mantissa did not match sent mantissa");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> return AST_TEST_PASS;</span><br><span> }</span><br><span> </span><br><span>@@ -447,8 +451,7 @@</span><br><span> "Tests sending and receiving a FIR packet";</span><br><span> return AST_TEST_NOT_RUN;</span><br><span> case TEST_EXECUTE:</span><br><span style="color: hsl(0, 100%, 40%);">- /* Disable for now - there's a bug! */</span><br><span style="color: hsl(0, 100%, 40%);">- return AST_TEST_NOT_RUN;</span><br><span style="color: hsl(120, 100%, 40%);">+ break;</span><br><span> }</span><br><span> </span><br><span> test_sched = ast_sched_context_create();</span><br><span>@@ -475,9 +478,6 @@</span><br><span> * We only receive one frame, the FIR request. It won't have a subclass integer of</span><br><span> * 206 (PSFB) because ast_rtcp_interpret sets it to 18 (AST_CONTROL_VIDUPDATE), so</span><br><span> * check for that.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * NOTE - similar to REMB, there may be more that needs to be done here when the</span><br><span style="color: hsl(0, 100%, 40%);">- * packet is sent as a compound packet!</span><br><span> */</span><br><span> frame_in = ast_rtp_instance_read(instance2, 0);</span><br><span> ast_test_validate(test, frame_in != NULL, "Did not receive a FIR frame");</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13055">change 13055</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/+/13055"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: Ibfee526ad780eefcce5dd787f53785382210024a </div>
<div style="display:none"> Gerrit-Change-Number: 13055 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>