瀏覽代碼

modules/sdpops: update documentation sdp_[with|remove]_transport

Victor Seva 12 年之前
父節點
當前提交
2a855d384d
共有 1 個文件被更改,包括 46 次插入0 次删除
  1. 46 0
      modules/sdpops/doc/sdpops_admin.xml

+ 46 - 0
modules/sdpops/doc/sdpops_admin.xml

@@ -248,6 +248,52 @@ if(sdp_with_media("video"))
 # remove video stream
 sdp_remove_media("video");
 ...
+</programlisting>
+	    </example>
+	</section>
+	<section>
+	    <title>
+		<function moreinfo="none">sdp_with_transport(type)</function>
+	    </title>
+	    <para>
+		Return true of the SDP has 'media=media port type ...' line. Useful to check
+		the transport of the RTP sessions, such as 'RTP/AVP', 'RTP/SAVP' or 'RTP/SAVPF'. The
+		parameter can be static string or variable holding the transport type.
+	    </para>
+		<para>
+			This function can be used from ANY_ROUTE.
+	    </para>
+		<example>
+		<title><function>sdp_with_transport</function> usage</title>
+		<programlisting format="linespecific">
+...
+# check for RTP/SAVP stream
+if(sdp_with_transport("RTP/SAVP"))
+{
+    # the session has a SRTP/SAVP stream
+}
+...
+</programlisting>
+	    </example>
+	</section>
+	<section>
+	    <title>
+		<function moreinfo="none">sdp_remove_transport(type)</function>
+	    </title>
+	    <para>
+		Remove the streams that match on 'm=media port type ...' line. The
+		parameter can be static string or variable holding the transport type.
+	    </para>
+		<para>
+			This function can be used from ANY_ROUTE.
+	    </para>
+		<example>
+		<title><function>sdp_remove_transport</function> usage</title>
+		<programlisting format="linespecific">
+...
+# remove stream with transport RTP/AVP
+sdp_remove_transport("RTP/AVP");
+...
 </programlisting>
 	    </example>
 	</section>