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>gstrtspurl</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-rtsp.html" title="RTSP Library">
9 <link rel="prev" href="gst-plugins-base-libs-gstrtsptransport.html" title="gstrtsptransport">
10 <link rel="next" href="gstreamer-sdp.html" title="SDP 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-gstrtsptransport.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="gstreamer-rtsp.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-sdp.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-gstrtspurl.synopsis" class="shortcut">Top</a>
26 <a href="#gst-plugins-base-libs-gstrtspurl.description" class="shortcut">Description</a>
29 <div class="refentry">
30 <a name="gst-plugins-base-libs-gstrtspurl"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
33 <h2><span class="refentrytitle"><a name="gst-plugins-base-libs-gstrtspurl.top_of_page"></a>gstrtspurl</span></h2>
34 <p>gstrtspurl — handling RTSP urls</p>
36 <td valign="top" align="right"></td>
38 <div class="refsynopsisdiv">
39 <a name="gst-plugins-base-libs-gstrtspurl.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis">
41 #include <gst/rtsp/gstrtspurl.h>
43 #define <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GST-RTSP-DEFAULT-PORT:CAPS" title="GST_RTSP_DEFAULT_PORT">GST_RTSP_DEFAULT_PORT</a>
44 struct <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl">GstRTSPUrl</a>;
45 <a class="link" href="gst-plugins-base-libs-gstrtspdefs.html#GstRTSPResult" title="enum GstRTSPResult"><span class="returnvalue">GstRTSPResult</span></a> <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#gst-rtsp-url-parse" title="gst_rtsp_url_parse ()">gst_rtsp_url_parse</a> (<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> *urlstr</code></em>,
46 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> **url</code></em>);
47 <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="returnvalue">GstRTSPUrl</span></a> * <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#gst-rtsp-url-copy" title="gst_rtsp_url_copy ()">gst_rtsp_url_copy</a> (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>);
48 <span class="returnvalue">void</span> <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#gst-rtsp-url-free" title="gst_rtsp_url_free ()">gst_rtsp_url_free</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>);
49 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#gst-rtsp-url-get-request-uri" title="gst_rtsp_url_get_request_uri ()">gst_rtsp_url_get_request_uri</a> (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>);
50 <a class="link" href="gst-plugins-base-libs-gstrtspdefs.html#GstRTSPResult" title="enum GstRTSPResult"><span class="returnvalue">GstRTSPResult</span></a> <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#gst-rtsp-url-set-port" title="gst_rtsp_url_set_port ()">gst_rtsp_url_set_port</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>,
51 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> port</code></em>);
52 <a class="link" href="gst-plugins-base-libs-gstrtspdefs.html#GstRTSPResult" title="enum GstRTSPResult"><span class="returnvalue">GstRTSPResult</span></a> <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#gst-rtsp-url-get-port" title="gst_rtsp_url_get_port ()">gst_rtsp_url_get_port</a> (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>,
53 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> *port</code></em>);
54 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#gst-rtsp-url-decode-path-components" title="gst_rtsp_url_decode_path_components ()">gst_rtsp_url_decode_path_components</a> (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>);
57 <div class="refsect1">
58 <a name="gst-plugins-base-libs-gstrtspurl.description"></a><h2>Description</h2>
60 Provides helper functions to handle RTSP urls.
62 Last reviewed on 2007-07-25 (0.10.14)
65 <div class="refsect1">
66 <a name="gst-plugins-base-libs-gstrtspurl.details"></a><h2>Details</h2>
67 <div class="refsect2">
68 <a name="GST-RTSP-DEFAULT-PORT:CAPS"></a><h3>GST_RTSP_DEFAULT_PORT</h3>
69 <pre class="programlisting">#define GST_RTSP_DEFAULT_PORT 554
72 The default RTSP port to connect to.
76 <div class="refsect2">
77 <a name="GstRTSPUrl"></a><h3>struct GstRTSPUrl</h3>
78 <pre class="programlisting">struct GstRTSPUrl {
79 GstRTSPLowerTrans transports;
90 This structure contains the result of a parsed RTSP URL
92 <div class="variablelist"><table border="0">
93 <col align="left" valign="top">
96 <td><p><span class="term"><a class="link" href="gst-plugins-base-libs-gstrtsptransport.html#GstRTSPLowerTrans" title="enum GstRTSPLowerTrans"><span class="type">GstRTSPLowerTrans</span></a> <em class="structfield"><code><a name="GstRTSPUrl.transports"></a>transports</code></em>;</span></p></td>
97 <td>the transports allowed</td>
100 <td><p><span class="term"><a class="link" href="gst-plugins-base-libs-gstrtspdefs.html#GstRTSPFamily" title="enum GstRTSPFamily"><span class="type">GstRTSPFamily</span></a> <em class="structfield"><code><a name="GstRTSPUrl.family"></a>family</code></em>;</span></p></td>
104 <td><p><span class="term"><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="GstRTSPUrl.user"></a>user</code></em>;</span></p></td>
108 <td><p><span class="term"><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="GstRTSPUrl.passwd"></a>passwd</code></em>;</span></p></td>
109 <td>the password</td>
112 <td><p><span class="term"><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="GstRTSPUrl.host"></a>host</code></em>;</span></p></td>
116 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> <em class="structfield"><code><a name="GstRTSPUrl.port"></a>port</code></em>;</span></p></td>
120 <td><p><span class="term"><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="GstRTSPUrl.abspath"></a>abspath</code></em>;</span></p></td>
121 <td>the absolute path</td>
124 <td><p><span class="term"><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="GstRTSPUrl.query"></a>query</code></em>;</span></p></td>
125 <td>additional query parameters</td>
131 <div class="refsect2">
132 <a name="gst-rtsp-url-parse"></a><h3>gst_rtsp_url_parse ()</h3>
133 <pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gstrtspdefs.html#GstRTSPResult" title="enum GstRTSPResult"><span class="returnvalue">GstRTSPResult</span></a> gst_rtsp_url_parse (<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> *urlstr</code></em>,
134 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> **url</code></em>);</pre>
136 Parse the RTSP <em class="parameter"><code>urlstr</code></em> into a newly allocated <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a>. Free after usage
137 with <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#gst-rtsp-url-free" title="gst_rtsp_url_free ()"><code class="function">gst_rtsp_url_free()</code></a>.
139 <div class="variablelist"><table border="0">
140 <col align="left" valign="top">
143 <td><p><span class="term"><em class="parameter"><code>urlstr</code></em> :</span></p></td>
144 <td>the url string to parse</td>
147 <td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
148 <td>location to hold the result.</td>
151 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
152 <td>a <a class="link" href="gst-plugins-base-libs-gstrtspdefs.html#GstRTSPResult" title="enum GstRTSPResult"><span class="type">GstRTSPResult</span></a>.</td>
158 <div class="refsect2">
159 <a name="gst-rtsp-url-copy"></a><h3>gst_rtsp_url_copy ()</h3>
160 <pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="returnvalue">GstRTSPUrl</span></a> * gst_rtsp_url_copy (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>);</pre>
162 Make a copy of <em class="parameter"><code>url</code></em>.
164 <div class="variablelist"><table border="0">
165 <col align="left" valign="top">
168 <td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
169 <td>a <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a>
173 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
174 <td>a copy of <em class="parameter"><code>url</code></em>. Free with <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#gst-rtsp-url-free" title="gst_rtsp_url_free ()"><code class="function">gst_rtsp_url_free()</code></a> after usage.</td>
178 <p class="since">Since 0.10.22</p>
181 <div class="refsect2">
182 <a name="gst-rtsp-url-free"></a><h3>gst_rtsp_url_free ()</h3>
183 <pre class="programlisting"><span class="returnvalue">void</span> gst_rtsp_url_free (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>);</pre>
185 Free the memory used by <em class="parameter"><code>url</code></em>.
187 <div class="variablelist"><table border="0">
188 <col align="left" valign="top">
190 <td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
191 <td>a <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a>
197 <div class="refsect2">
198 <a name="gst-rtsp-url-get-request-uri"></a><h3>gst_rtsp_url_get_request_uri ()</h3>
199 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_rtsp_url_get_request_uri (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>);</pre>
201 Get a newly allocated string describing the request URI for <em class="parameter"><code>url</code></em>.
203 <div class="variablelist"><table border="0">
204 <col align="left" valign="top">
207 <td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
208 <td>a <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a>
212 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
213 <td>a string with the request URI. <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> after usage.</td>
219 <div class="refsect2">
220 <a name="gst-rtsp-url-set-port"></a><h3>gst_rtsp_url_set_port ()</h3>
221 <pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gstrtspdefs.html#GstRTSPResult" title="enum GstRTSPResult"><span class="returnvalue">GstRTSPResult</span></a> gst_rtsp_url_set_port (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>,
222 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> port</code></em>);</pre>
224 Set the port number in <em class="parameter"><code>url</code></em> to <em class="parameter"><code>port</code></em>.
226 <div class="variablelist"><table border="0">
227 <col align="left" valign="top">
230 <td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
231 <td>a <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a>
235 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
239 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
241 <a class="link" href="gst-plugins-base-libs-gstrtspdefs.html#GST-RTSP-OK:CAPS"><span class="type">GST_RTSP_OK</span></a>.</td>
247 <div class="refsect2">
248 <a name="gst-rtsp-url-get-port"></a><h3>gst_rtsp_url_get_port ()</h3>
249 <pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gstrtspdefs.html#GstRTSPResult" title="enum GstRTSPResult"><span class="returnvalue">GstRTSPResult</span></a> gst_rtsp_url_get_port (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>,
250 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> *port</code></em>);</pre>
252 Get the port number of <em class="parameter"><code>url</code></em>.
254 <div class="variablelist"><table border="0">
255 <col align="left" valign="top">
258 <td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
259 <td>a <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a>
263 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
264 <td>location to hold the port</td>
267 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
269 <a class="link" href="gst-plugins-base-libs-gstrtspdefs.html#GST-RTSP-OK:CAPS"><span class="type">GST_RTSP_OK</span></a>.</td>
275 <div class="refsect2">
276 <a name="gst-rtsp-url-decode-path-components"></a><h3>gst_rtsp_url_decode_path_components ()</h3>
277 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> ** gst_rtsp_url_decode_path_components (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a> *url</code></em>);</pre>
279 Splits the path of <em class="parameter"><code>url</code></em> on '/' boundaries, decoding the resulting components,
282 The decoding performed by this routine is "URI decoding", as defined in RFC
283 3986, commonly known as percent-decoding. For example, a string "foo<code class="literal">2fbar</code>"
284 will decode to "foo/bar" -- the <code class="literal">2f</code> being replaced by the corresponding byte
285 with hex value 0x2f. Note that there is no guarantee that the resulting byte
286 sequence is valid in any given encoding. As a special case, <code class="literal">00</code> is not
287 unescaped to NUL, as that would prematurely terminate the string.
290 Also note that since paths usually start with a slash, the first component
291 will usually be the empty string.
293 <div class="variablelist"><table border="0">
294 <col align="left" valign="top">
297 <td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
298 <td>a <a class="link" href="gst-plugins-base-libs-gstrtspurl.html#GstRTSPUrl" title="struct GstRTSPUrl"><span class="type">GstRTSPUrl</span></a>
302 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
303 <td>a string vector. <a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> after usage.</td>
307 <p class="since">Since 0.10.32</p>
313 Generated by GTK-Doc V1.17</div>