⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtpsessionapi.sgml

📁 ortp协议栈(实时传输协议)
💻 SGML
📖 第 1 页 / 共 3 页
字号:
<entry> a boolean</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="rtp-session-set-profile">rtp_session_set_profile ()</title><programlisting>void        rtp_session_set_profile         (<link linkend="RtpSession">RtpSession</link> *session,                                             <link linkend="RtpProfile">RtpProfile</link> *profile);</programlisting><para>Set the RTP profile to be used for the session. By default, all session are created by<link linkend="rtp-session-new">rtp_session_new</link>() are initialized with the AV profile, as defined in RFC 1890. The applicationcan set any other profile instead using that function.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>session</parameter>&nbsp;:</entry><entry> a rtp session</entry></row><row><entry align="right"><parameter>profile</parameter>&nbsp;:</entry><entry> a rtp profile</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="rtp-session-set-local-addr">rtp_session_set_local_addr ()</title><programlisting>int         rtp_session_set_local_addr      (<link linkend="RtpSession">RtpSession</link> *session,                                             <link linkend="gchar">gchar</link> *addr,                                             <link linkend="gint">gint</link> port);</programlisting><para>Specify the local addr to be use to listen for rtp packets or to send rtp packet from.In case where the rtp session is send-only, then it is not required to call this function:when calling <link linkend="rtp-session-set-remote-addr">rtp_session_set_remote_addr</link>(), if no local address has been set, then the default INADRR_ANY (0.0.0.0) IP address with a random port will be used. Calling <link linkend="rtp-sesession-set-local-addr">rtp_sesession_set_local_addr</link>() is mandatory when the session is send-only or duplex.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>session</parameter>&nbsp;:</entry><entry>		a rtp session freshly created.</entry></row><row><entry align="right"><parameter>addr</parameter>&nbsp;:</entry><entry>		a local IP address in the xxx.xxx.xxx.xxx form.</entry></row><row><entry align="right"><parameter>port</parameter>&nbsp;:</entry><entry>		a local port.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> 0 on success.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="rtp-session-set-remote-addr">rtp_session_set_remote_addr ()</title><programlisting><link linkend="gint">gint</link>        rtp_session_set_remote_addr     (<link linkend="RtpSession">RtpSession</link> *session,                                             struct <link linkend="sockaddr-in">sockaddr_in</link> *dest);</programlisting><para>Sets the remote address of the rtp session, ie the destination address where rtp packetare sent. If the session is recv-only or duplex, it sets also the origin of incoming RTP packets. Rtp packets that don't come from addr:port are discarded.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>session</parameter>&nbsp;:</entry><entry>		a rtp session freshly created.</entry></row><row><entry align="right"><parameter>dest</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> 0 on success.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="rtp-session-set-jitter-compensation">rtp_session_set_jitter_compensation ()</title><programlisting>void        rtp_session_set_jitter_compensation                                            (<link linkend="RtpSession">RtpSession</link> *session,                                             int milisec);</programlisting><para>Sets the time interval for which packet are buffered instead of being delivered to the application.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>session</parameter>&nbsp;:</entry><entry> a RtpSession</entry></row><row><entry align="right"><parameter>milisec</parameter>&nbsp;:</entry><entry> the time interval in milisec to be jitter compensed.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="rtp-session-set-ssrc">rtp_session_set_ssrc ()</title><programlisting>void        rtp_session_set_ssrc            (<link linkend="RtpSession">RtpSession</link> *session,                                             <link linkend="guint32">guint32</link> ssrc);</programlisting><para>Sets the SSRC of the session.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>session</parameter>&nbsp;:</entry><entry> a rtp session.</entry></row><row><entry align="right"><parameter>ssrc</parameter>&nbsp;:</entry><entry> an unsigned 32bit integer representing the synchronisation source identifier (SSRC).</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="rtp-session-set-payload-type">rtp_session_set_payload_type ()</title><programlisting>int         rtp_session_set_payload_type    (<link linkend="RtpSession">RtpSession</link> *session,                                             int paytype);</programlisting><para>Sets the payload type of the rtp session. It decides of the payload types written in theof the rtp header for the outgoing stream, if the session is SENDRECV or SENDONLY.For the incoming stream, it sets the waited payload type. If that value does not matchat any time this waited value, then the application can be informed by registeringfor the "payload_type_changed" signal, so that it can make the necessary changeson the downstream decoder that deals with the payload of the packets.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>session</parameter>&nbsp;:</entry><entry> a rtp session</entry></row><row><entry align="right"><parameter>paytype</parameter>&nbsp;:</entry><entry> the payload type</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> 0 on success, -1 if the payload is not defined.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="rtp-session-signal-connect">rtp_session_signal_connect ()</title><programlisting>int         rtp_session_signal_connect      (<link linkend="RtpSession">RtpSession</link> *session,                                             char *signal,                                             <link linkend="RtpCallback">RtpCallback</link> cb,                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting><para>This function provides the way for an application to be informed of various events thatmay occur during a rtp session. <parameter>signal</parameter> is a string identifying the event, and <parameter>cb</parameter> is a user supplied function in charge of processing it. The application can registerseveral callbacks for the same signal, in the limit of <link linkend="RTP-CALLBACK-TABLE-MAX-ENTRIES-CAPS">RTP_CALLBACK_TABLE_MAX_ENTRIES</link>.Here are name and meaning of supported signals types:</para><para>"ssrc_changed" : the SSRC of the incoming stream has changed.</para><para>"payload_type_changed" : the payload type of the incoming stream has changed.</para><para>"telephone-event_packet" : a telephone-event rtp packet (RFC1833) is received.</para><para>"telephone-event" : a telephone event has occured. This is a shortcut for "telephone-event_packet".</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>session</parameter>&nbsp;:</entry><entry> 	a rtp session</entry></row><row><entry align="right"><parameter>signal</parameter>&nbsp;:</entry><entry>		the name of a signal</entry></row><row><entry align="right"><parameter>cb</parameter>&nbsp;:</entry><entry>			a <link linkend="RtpCallback">RtpCallback</link></entry></row><row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry><entry>	a pointer to any data to be passed when invoking the callback.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> 0 on success, -EOPNOTSUPP if the signal does not exists, -1 if no more callbackscan be assigned to the signal type.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="rtp-session-signal-disconnect-by-callback">rtp_session_signal_disconnect_by_callback ()</title><programlisting>int         rtp_session_signal_disconnect_by_callback                                            (<link linkend="RtpSession">RtpSession</link> *session,                                             char *signal,                                             <link linkend="RtpCallback">RtpCallback</link> cb);</programlisting><para>Removes callback function <parameter>cb</parameter> to the list of callbacks for signal <parameter>signal</parameter>.</para><para></para><informaltable pgwide="1" frame="none" role="params">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -