1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>gstrtppayloads</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GStreamer Base Plugins 0.10 Library Reference Manual">
8 <link rel="up" href="gstreamer-rtp.html" title="RTP Library">
9 <link rel="prev" href="gst-plugins-base-libs-gstrtcpbuffer.html" title="gstrtcpbuffer">
10 <link rel="next" href="gstreamer-rtsp.html" title="RTSP Library">
11 <meta name="generator" content="GTK-Doc V1.17 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="gst-plugins-base-libs-gstrtcpbuffer.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="gstreamer-rtp.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GStreamer Base Plugins 0.10 Library Reference Manual</th>
21 <td><a accesskey="n" href="gstreamer-rtsp.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-base-libs-gstrtppayloads.synopsis" class="shortcut">Top</a>
26 <a href="#gst-plugins-base-libs-gstrtppayloads.description" class="shortcut">Description</a>
29 <div class="refentry">
30 <a name="gst-plugins-base-libs-gstrtppayloads"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
33 <h2><span class="refentrytitle"><a name="gst-plugins-base-libs-gstrtppayloads.top_of_page"></a>gstrtppayloads</span></h2>
34 <p>gstrtppayloads — Helper methods for dealing with RTP payloads</p>
36 <td valign="top" align="right"></td>
38 <div class="refsynopsisdiv">
39 <a name="gst-plugins-base-libs-gstrtppayloads.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis">
41 #include <gst/rtp/gstrtppayload.h>
43 enum <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#GstRTPPayload" title="enum GstRTPPayload">GstRTPPayload</a>;
44 #define <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#GST-RTP-PAYLOAD-IS-DYNAMIC:CAPS" title="GST_RTP_PAYLOAD_IS_DYNAMIC()">GST_RTP_PAYLOAD_IS_DYNAMIC</a> (pt)
45 struct <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#GstRTPPayloadInfo" title="struct GstRTPPayloadInfo">GstRTPPayloadInfo</a>;
46 const <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#GstRTPPayloadInfo" title="struct GstRTPPayloadInfo"><span class="returnvalue">GstRTPPayloadInfo</span></a> * <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#gst-rtp-payload-info-for-name" title="gst_rtp_payload_info_for_name ()">gst_rtp_payload_info_for_name</a>
47 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *media</code></em>,
48 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *encoding_name</code></em>);
49 const <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#GstRTPPayloadInfo" title="struct GstRTPPayloadInfo"><span class="returnvalue">GstRTPPayloadInfo</span></a> * <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#gst-rtp-payload-info-for-pt" title="gst_rtp_payload_info_for_pt ()">gst_rtp_payload_info_for_pt</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> payload_type</code></em>);
52 <div class="refsect1">
53 <a name="gst-plugins-base-libs-gstrtppayloads.description"></a><h2>Description</h2>
56 <div class="refsect2">
57 <a name="idp17281392"></a><p>
58 The GstRTPPayloads helper functions makes it easy to deal with static and dynamic
59 payloads. Its main purpose is to retrieve properties such as the default clock-rate
60 and get session bandwidth information.
66 Last reviewed on 2007-10-01 (0.10.15)
69 <div class="refsect1">
70 <a name="gst-plugins-base-libs-gstrtppayloads.details"></a><h2>Details</h2>
71 <div class="refsect2">
72 <a name="GstRTPPayload"></a><h3>enum GstRTPPayload</h3>
73 <pre class="programlisting">typedef enum
76 GST_RTP_PAYLOAD_PCMU = 0,
77 GST_RTP_PAYLOAD_1016 = 1, /* RFC 3551 says reserved */
78 GST_RTP_PAYLOAD_G721 = 2, /* RFC 3551 says reserved */
79 GST_RTP_PAYLOAD_GSM = 3,
80 GST_RTP_PAYLOAD_G723 = 4,
81 GST_RTP_PAYLOAD_DVI4_8000 = 5,
82 GST_RTP_PAYLOAD_DVI4_16000 = 6,
83 GST_RTP_PAYLOAD_LPC = 7,
84 GST_RTP_PAYLOAD_PCMA = 8,
85 GST_RTP_PAYLOAD_G722 = 9,
86 GST_RTP_PAYLOAD_L16_STEREO = 10,
87 GST_RTP_PAYLOAD_L16_MONO = 11,
88 GST_RTP_PAYLOAD_QCELP = 12,
89 GST_RTP_PAYLOAD_CN = 13,
90 GST_RTP_PAYLOAD_MPA = 14,
91 GST_RTP_PAYLOAD_G728 = 15,
92 GST_RTP_PAYLOAD_DVI4_11025 = 16,
93 GST_RTP_PAYLOAD_DVI4_22050 = 17,
94 GST_RTP_PAYLOAD_G729 = 18,
98 GST_RTP_PAYLOAD_CELLB = 25,
99 GST_RTP_PAYLOAD_JPEG = 26,
100 GST_RTP_PAYLOAD_NV = 28,
101 GST_RTP_PAYLOAD_H261 = 31,
102 GST_RTP_PAYLOAD_MPV = 32,
103 GST_RTP_PAYLOAD_MP2T = 33,
104 GST_RTP_PAYLOAD_H263 = 34,
110 Standard predefined fixed payload types.
113 The official list is at:
114 http://www.iana.org/assignments/rtp-parameters
123 unassigned: 24, 27, 29, 30, 35-71, 77-95
124 Reserved for RTCP conflict avoidance: 72-76
126 <div class="variablelist"><table border="0">
127 <col align="left" valign="top">
130 <td><p><a name="GST-RTP-PAYLOAD-PCMU:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_PCMU</code></span></p></td>
131 <td>ITU-T G.711. mu-law audio (RFC 3551)
135 <td><p><a name="GST-RTP-PAYLOAD-1016:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_1016</code></span></p></td>
136 <td>RFC 3551 says reserved
140 <td><p><a name="GST-RTP-PAYLOAD-G721:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_G721</code></span></p></td>
141 <td>RFC 3551 says reserved
145 <td><p><a name="GST-RTP-PAYLOAD-GSM:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_GSM</code></span></p></td>
150 <td><p><a name="GST-RTP-PAYLOAD-G723:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_G723</code></span></p></td>
151 <td>ITU G.723.1 audio
155 <td><p><a name="GST-RTP-PAYLOAD-DVI4-8000:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_DVI4_8000</code></span></p></td>
156 <td>IMA ADPCM wave type (RFC 3551)
160 <td><p><a name="GST-RTP-PAYLOAD-DVI4-16000:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_DVI4_16000</code></span></p></td>
161 <td>IMA ADPCM wave type (RFC 3551)
165 <td><p><a name="GST-RTP-PAYLOAD-LPC:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_LPC</code></span></p></td>
166 <td>experimental linear predictive encoding
170 <td><p><a name="GST-RTP-PAYLOAD-PCMA:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_PCMA</code></span></p></td>
171 <td>ITU-T G.711 A-law audio (RFC 3551)
175 <td><p><a name="GST-RTP-PAYLOAD-G722:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_G722</code></span></p></td>
176 <td>ITU-T G.722 (RFC 3551)
180 <td><p><a name="GST-RTP-PAYLOAD-L16-STEREO:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_L16_STEREO</code></span></p></td>
185 <td><p><a name="GST-RTP-PAYLOAD-L16-MONO:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_L16_MONO</code></span></p></td>
190 <td><p><a name="GST-RTP-PAYLOAD-QCELP:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_QCELP</code></span></p></td>
191 <td>EIA & TIA standard IS-733
195 <td><p><a name="GST-RTP-PAYLOAD-CN:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_CN</code></span></p></td>
196 <td>Comfort Noise (RFC 3389)
200 <td><p><a name="GST-RTP-PAYLOAD-MPA:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_MPA</code></span></p></td>
205 <td><p><a name="GST-RTP-PAYLOAD-G728:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_G728</code></span></p></td>
206 <td>ITU-T G.728 Speech coder (RFC 3551)
210 <td><p><a name="GST-RTP-PAYLOAD-DVI4-11025:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_DVI4_11025</code></span></p></td>
211 <td>IMA ADPCM wave type (RFC 3551)
215 <td><p><a name="GST-RTP-PAYLOAD-DVI4-22050:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_DVI4_22050</code></span></p></td>
216 <td>IMA ADPCM wave type (RFC 3551)
220 <td><p><a name="GST-RTP-PAYLOAD-G729:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_G729</code></span></p></td>
221 <td>ITU-T G.729 Speech coder (RFC 3551)
225 <td><p><a name="GST-RTP-PAYLOAD-CELLB:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_CELLB</code></span></p></td>
230 <td><p><a name="GST-RTP-PAYLOAD-JPEG:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_JPEG</code></span></p></td>
231 <td>ISO Standards 10918-1 and 10918-2 (RFC 2435)
235 <td><p><a name="GST-RTP-PAYLOAD-NV:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_NV</code></span></p></td>
236 <td>nv encoding by Ron Frederick
240 <td><p><a name="GST-RTP-PAYLOAD-H261:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_H261</code></span></p></td>
241 <td>ITU-T Recommendation H.261 (RFC 2032)
245 <td><p><a name="GST-RTP-PAYLOAD-MPV:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_MPV</code></span></p></td>
246 <td>Video MPEG 1 & 2 (RFC 2250)
250 <td><p><a name="GST-RTP-PAYLOAD-MP2T:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_MP2T</code></span></p></td>
251 <td>MPEG-2 transport stream (RFC 2250)
255 <td><p><a name="GST-RTP-PAYLOAD-H263:CAPS"></a><span class="term"><code class="literal">GST_RTP_PAYLOAD_H263</code></span></p></td>
256 <td>Video H263 (RFC 2190)
263 <div class="refsect2">
264 <a name="GST-RTP-PAYLOAD-IS-DYNAMIC:CAPS"></a><h3>GST_RTP_PAYLOAD_IS_DYNAMIC()</h3>
265 <pre class="programlisting">#define GST_RTP_PAYLOAD_IS_DYNAMIC(pt) ((pt) >= 96 && (pt) <= 127)
268 Check if <em class="parameter"><code>pt</code></em> is a dynamic payload type.
270 <div class="variablelist"><table border="0">
271 <col align="left" valign="top">
273 <td><p><span class="term"><em class="parameter"><code>pt</code></em> :</span></p></td>
274 <td>a payload type</td>
279 <div class="refsect2">
280 <a name="GstRTPPayloadInfo"></a><h3>struct GstRTPPayloadInfo</h3>
281 <pre class="programlisting">struct GstRTPPayloadInfo {
284 const gchar *encoding_name;
286 const gchar *encoding_parameters;
291 Structure holding default payload type information.
293 <div class="variablelist"><table border="0">
294 <col align="left" valign="top">
297 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> <em class="structfield"><code><a name="GstRTPPayloadInfo.payload-type"></a>payload_type</code></em>;</span></p></td>
298 <td>payload type, -1 means dynamic</td>
301 <td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GstRTPPayloadInfo.media"></a>media</code></em>;</span></p></td>
302 <td>the media type(s), usually "audio", "video", "application", "text",
306 <td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GstRTPPayloadInfo.encoding-name"></a>encoding_name</code></em>;</span></p></td>
307 <td>the encoding name of <em class="parameter"><code>pt</code></em>
311 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstRTPPayloadInfo.clock-rate"></a>clock_rate</code></em>;</span></p></td>
312 <td>default clock rate, 0 = unknown/variable</td>
315 <td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GstRTPPayloadInfo.encoding-parameters"></a>encoding_parameters</code></em>;</span></p></td>
316 <td>encoding parameters. For audio this is the number of
317 channels. NULL = not applicable.</td>
320 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstRTPPayloadInfo.bitrate"></a>bitrate</code></em>;</span></p></td>
321 <td>the bitrate of the media. 0 = unknown/variable.</td>
327 <div class="refsect2">
328 <a name="gst-rtp-payload-info-for-name"></a><h3>gst_rtp_payload_info_for_name ()</h3>
329 <pre class="programlisting">const <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#GstRTPPayloadInfo" title="struct GstRTPPayloadInfo"><span class="returnvalue">GstRTPPayloadInfo</span></a> * gst_rtp_payload_info_for_name
330 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *media</code></em>,
331 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *encoding_name</code></em>);</pre>
333 Get the <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#GstRTPPayloadInfo" title="struct GstRTPPayloadInfo"><span class="type">GstRTPPayloadInfo</span></a> for <em class="parameter"><code>media</code></em> and <em class="parameter"><code>encoding_name</code></em>. This function is
334 mostly used to get the default clock-rate and bandwidth for dynamic payload
335 types specified with <em class="parameter"><code>media</code></em> and <em class="parameter"><code>encoding</code></em> name.
338 The search for <em class="parameter"><code>encoding_name</code></em> will be performed in a case insensitve way.
340 <div class="variablelist"><table border="0">
341 <col align="left" valign="top">
344 <td><p><span class="term"><em class="parameter"><code>media</code></em> :</span></p></td>
345 <td>the media to find</td>
348 <td><p><span class="term"><em class="parameter"><code>encoding_name</code></em> :</span></p></td>
349 <td>the encoding name to find</td>
352 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
353 <td>a <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#GstRTPPayloadInfo" title="struct GstRTPPayloadInfo"><span class="type">GstRTPPayloadInfo</span></a> or NULL when no info could be found.</td>
359 <div class="refsect2">
360 <a name="gst-rtp-payload-info-for-pt"></a><h3>gst_rtp_payload_info_for_pt ()</h3>
361 <pre class="programlisting">const <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#GstRTPPayloadInfo" title="struct GstRTPPayloadInfo"><span class="returnvalue">GstRTPPayloadInfo</span></a> * gst_rtp_payload_info_for_pt (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> payload_type</code></em>);</pre>
363 Get the <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#GstRTPPayloadInfo" title="struct GstRTPPayloadInfo"><span class="type">GstRTPPayloadInfo</span></a> for <em class="parameter"><code>payload_type</code></em>. This function is
364 mostly used to get the default clock-rate and bandwidth for static payload
365 types specified with <em class="parameter"><code>payload_type</code></em>.
367 <div class="variablelist"><table border="0">
368 <col align="left" valign="top">
371 <td><p><span class="term"><em class="parameter"><code>payload_type</code></em> :</span></p></td>
372 <td>the payload_type to find</td>
375 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
376 <td>a <a class="link" href="gst-plugins-base-libs-gstrtppayloads.html#GstRTPPayloadInfo" title="struct GstRTPPayloadInfo"><span class="type">GstRTPPayloadInfo</span></a> or NULL when no info could be found.</td>
382 <div class="refsect1">
383 <a name="gst-plugins-base-libs-gstrtppayloads.see-also"></a><h2>See Also</h2>
389 Generated by GTK-Doc V1.17</div>