<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19662">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span></span><br></pre><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">rtp_engine.h: Update examples using ast_format_set.<br><br>This file includes some doxygen comments referencing<br>ast_format_set. This is an obsolete API that was<br>removed years back, but documentation was not fully<br>updated to reflect that. These examples are<br>updated to the current way of doing things<br>(using the format cache).<br><br>ASTERISK-30327 #close<br><br>Change-Id: I570f3b8007fa17ba470cc7117f44bfe7c555d2f7<br>---<br>M include/asterisk/rtp_engine.h<br>1 file changed, 24 insertions(+), 6 deletions(-)<br><br></pre>
<pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h</span><br><span>index 833cd2b..50e2a7b 100644</span><br><span>--- a/include/asterisk/rtp_engine.h</span><br><span>+++ b/include/asterisk/rtp_engine.h</span><br><span>@@ -1719,7 +1719,7 @@</span><br><span> * Example usage:</span><br><span> *</span><br><span> * \code</span><br><span style="color: hsl(0, 100%, 40%);">- * int payload = ast_rtp_codecs_payload_code(&codecs, 1, ast_format_set(&tmp_fmt, AST_FORMAT_ULAW, 0), 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ * int payload = ast_rtp_codecs_payload_code(&codecs, 1, ast_format_ulaw, 0);</span><br><span> * \endcode</span><br><span> *</span><br><span> * This looks for the numerical payload for ULAW in the codecs structure.</span><br><span>@@ -1788,7 +1788,7 @@</span><br><span> * Example usage:</span><br><span> *</span><br><span> * \code</span><br><span style="color: hsl(0, 100%, 40%);">- * const char *subtype = ast_rtp_lookup_mime_subtype2(1, ast_format_set(&tmp_fmt, AST_FORMAT_ULAW, 0), 0, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ * const char *subtype = ast_rtp_lookup_mime_subtype2(1, ast_format_ulaw, 0, 0);</span><br><span> * \endcode</span><br><span> *</span><br><span> * This looks up the mime subtype for the ULAW format.</span><br><span>@@ -1816,8 +1816,8 @@</span><br><span> * char buf[256] = "";</span><br><span> * struct ast_format tmp_fmt;</span><br><span> * struct ast_format_cap *cap = ast_format_cap_alloc_nolock();</span><br><span style="color: hsl(0, 100%, 40%);">- * ast_format_cap_append(cap, ast_format_set(&tmp_fmt, AST_FORMAT_ULAW, 0));</span><br><span style="color: hsl(0, 100%, 40%);">- * ast_format_cap_append(cap, ast_format_set(&tmp_fmt, AST_FORMAT_GSM, 0));</span><br><span style="color: hsl(120, 100%, 40%);">+ * ast_format_cap_append(cap, ast_format_ulaw, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ * ast_format_cap_append(cap, ast_format_ulaw, 0);</span><br><span> * char *mime = ast_rtp_lookup_mime_multiple2(&buf, sizeof(buf), cap, 0, 1, 0);</span><br><span> * ast_format_cap_destroy(cap);</span><br><span> * \endcode</span><br><span>@@ -2220,7 +2220,7 @@</span><br><span> *</span><br><span> * \code</span><br><span> * struct ast_format tmp_fmt;</span><br><span style="color: hsl(0, 100%, 40%);">- * ast_rtp_instance_set_read_format(instance, ast_format_set(&tmp_fmt, AST_FORMAT_ULAW, 0));</span><br><span style="color: hsl(120, 100%, 40%);">+ * ast_rtp_instance_set_read_format(instance, ast_format_ulaw);</span><br><span> * \endcode</span><br><span> *</span><br><span> * This requests that the RTP engine provide audio frames in the ULAW format.</span><br><span>@@ -2242,7 +2242,7 @@</span><br><span> *</span><br><span> * \code</span><br><span> * struct ast_format tmp_fmt;</span><br><span style="color: hsl(0, 100%, 40%);">- * ast_rtp_instance_set_write_format(instance, ast_format_set(&tmp_fmt, AST_FORMAT_ULAW, 0));</span><br><span style="color: hsl(120, 100%, 40%);">+ * ast_rtp_instance_set_write_format(instance, ast_format_ulaw);</span><br><span> * \endcode</span><br><span> *</span><br><span> * This tells the underlying RTP engine that audio frames will be provided to it in ULAW format.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19662">change 19662</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/+/19662"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: I570f3b8007fa17ba470cc7117f44bfe7c555d2f7 </div>
<div style="display:none"> Gerrit-Change-Number: 19662 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: N A <asterisk@phreaknet.org> </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@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>