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>GstUriHandler</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GStreamer 0.10 Core Reference Manual">
8 <link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
9 <link rel="prev" href="GstTypeFindFactory.html" title="GstTypeFindFactory">
10 <link rel="next" href="gstreamer-GstUtils.html" title="GstUtils">
11 <meta name="generator" content="GTK-Doc V1.18 (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="GstTypeFindFactory.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="libgstreamer.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 0.10 Core Reference Manual</th>
21 <td><a accesskey="n" href="gstreamer-GstUtils.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="#gstreamer-GstUriHandler.synopsis" class="shortcut">Top</a>
26 <a href="#gstreamer-GstUriHandler.description" class="shortcut">Description</a>
28 <a href="#gstreamer-GstUriHandler.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#gstreamer-GstUriHandler.signals" class="shortcut">Signals</a>
33 <div class="refentry">
34 <a name="gstreamer-GstUriHandler"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
37 <h2><span class="refentrytitle"><a name="gstreamer-GstUriHandler.top_of_page"></a>GstUriHandler</span></h2>
38 <p>GstUriHandler — Interface to ease URI handling in plugins.</p>
40 <td valign="top" align="right"></td>
42 <div class="refsynopsisdiv">
43 <a name="gstreamer-GstUriHandler.synopsis"></a><h2>Synopsis</h2>
44 <a name="GstURIHandler"></a><pre class="synopsis">
45 #include <gst/gst.h>
47 <a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler-struct" title="GstURIHandler">GstURIHandler</a>;
48 struct <a class="link" href="gstreamer-GstUriHandler.html#GstURIHandlerInterface" title="struct GstURIHandlerInterface">GstURIHandlerInterface</a>;
49 enum <a class="link" href="gstreamer-GstUriHandler.html#GstURIType" title="enum GstURIType">GstURIType</a>;
50 #define <a class="link" href="gstreamer-GstUriHandler.html#GST-URI-TYPE-IS-VALID:CAPS" title="GST_URI_TYPE_IS_VALID()">GST_URI_TYPE_IS_VALID</a> (type)
51 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-protocol-is-valid" title="gst_uri_protocol_is_valid ()">gst_uri_protocol_is_valid</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> *protocol</code></em>);
52 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-protocol-is-supported" title="gst_uri_protocol_is_supported ()">gst_uri_protocol_is_supported</a> (<em class="parameter"><code>const <a class="link" href="gstreamer-GstUriHandler.html#GstURIType" title="enum GstURIType"><span class="type">GstURIType</span></a> type</code></em>,
53 <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> *protocol</code></em>);
54 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-is-valid" title="gst_uri_is_valid ()">gst_uri_is_valid</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> *uri</code></em>);
55 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-has-protocol" title="gst_uri_has_protocol ()">gst_uri_has_protocol</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> *uri</code></em>,
56 <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> *protocol</code></em>);
57 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-get-protocol" title="gst_uri_get_protocol ()">gst_uri_get_protocol</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> *uri</code></em>);
58 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-get-location" title="gst_uri_get_location ()">gst_uri_get_location</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> *uri</code></em>);
59 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-construct" title="gst_uri_construct ()">gst_uri_construct</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> *protocol</code></em>,
60 <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> *location</code></em>);
61 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gstreamer-GstUriHandler.html#gst-filename-to-uri" title="gst_filename_to_uri ()">gst_filename_to_uri</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> *filename</code></em>,
62 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
63 <a class="link" href="GstElement.html" title="GstElement"><span class="returnvalue">GstElement</span></a> * <a class="link" href="gstreamer-GstUriHandler.html#gst-element-make-from-uri" title="gst_element_make_from_uri ()">gst_element_make_from_uri</a> (<em class="parameter"><code>const <a class="link" href="gstreamer-GstUriHandler.html#GstURIType" title="enum GstURIType"><span class="type">GstURIType</span></a> type</code></em>,
64 <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> *uri</code></em>,
65 <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> *elementname</code></em>);
66 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-handler-get-uri-type" title="gst_uri_handler_get_uri_type ()">gst_uri_handler_get_uri_type</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> *handler</code></em>);
67 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-handler-get-protocols" title="gst_uri_handler_get_protocols ()">gst_uri_handler_get_protocols</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> *handler</code></em>);
68 const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-handler-get-uri" title="gst_uri_handler_get_uri ()">gst_uri_handler_get_uri</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> *handler</code></em>);
69 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-handler-set-uri" title="gst_uri_handler_set_uri ()">gst_uri_handler_set_uri</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> *handler</code></em>,
70 <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> *uri</code></em>);
71 <span class="returnvalue">void</span> <a class="link" href="gstreamer-GstUriHandler.html#gst-uri-handler-new-uri" title="gst_uri_handler_new_uri ()">gst_uri_handler_new_uri</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> *handler</code></em>,
72 <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> *uri</code></em>);
75 <div class="refsect1">
76 <a name="gstreamer-GstUriHandler.object-hierarchy"></a><h2>Object Hierarchy</h2>
77 <pre class="synopsis">
82 <div class="refsect1">
83 <a name="gstreamer-GstUriHandler.signals"></a><h2>Signals</h2>
84 <pre class="synopsis">
85 "<a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler-new-uri" title='The "new-uri" signal'>new-uri</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
88 <div class="refsect1">
89 <a name="gstreamer-GstUriHandler.description"></a><h2>Description</h2>
91 The URIHandler is an interface that is implemented by Source and Sink
92 <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a> to simplify then handling of URI.
95 An application can use the following functions to quickly get an element
96 that handles the given URI for reading or writing
97 (<a class="link" href="gstreamer-GstUriHandler.html#gst-element-make-from-uri" title="gst_element_make_from_uri ()"><code class="function">gst_element_make_from_uri()</code></a>).
100 Source and Sink plugins should implement this interface when possible.
103 Last reviewed on 2005-11-09 (0.9.4)
106 <div class="refsect1">
107 <a name="gstreamer-GstUriHandler.details"></a><h2>Details</h2>
108 <div class="refsect2">
109 <a name="GstURIHandler-struct"></a><h3>GstURIHandler</h3>
110 <pre class="programlisting">typedef struct _GstURIHandler GstURIHandler;</pre>
112 Opaque <a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> structure.
116 <div class="refsect2">
117 <a name="GstURIHandlerInterface"></a><h3>struct GstURIHandlerInterface</h3>
118 <pre class="programlisting">struct GstURIHandlerInterface {
119 GTypeInterface parent;
121 /* querying capabilities */
122 GstURIType (* get_type) (void);
123 gchar ** (* get_protocols) (void);
125 /* using the interface */
126 const gchar * (* get_uri) (GstURIHandler * handler);
127 gboolean (* set_uri) (GstURIHandler * handler,
130 GstURIType (* get_type_full) (GType type);
131 gchar ** (* get_protocols_full) (GType type);
135 Any <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a> using this interface should implement these methods.
137 <div class="variablelist"><table border="0">
138 <col align="left" valign="top">
141 <td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GstURIHandlerInterface.parent"></a>parent</code></em>;</span></p></td>
142 <td>The parent interface type</td>
145 <td><p><span class="term"><em class="structfield"><code><a name="GstURIHandlerInterface.get-type"></a>get_type</code></em> ()</span></p></td>
146 <td>Method to tell whether the element handles source or sink URI.</td>
149 <td><p><span class="term"><em class="structfield"><code><a name="GstURIHandlerInterface.get-protocols"></a>get_protocols</code></em> ()</span></p></td>
150 <td>Method to return the list of protocols handled by the element.</td>
153 <td><p><span class="term"><em class="structfield"><code><a name="GstURIHandlerInterface.get-uri"></a>get_uri</code></em> ()</span></p></td>
154 <td>Method to return the URI currently handled by the element.</td>
157 <td><p><span class="term"><em class="structfield"><code><a name="GstURIHandlerInterface.set-uri"></a>set_uri</code></em> ()</span></p></td>
158 <td>Method to set a new URI.</td>
161 <td><p><span class="term"><em class="structfield"><code><a name="GstURIHandlerInterface.get-type-full"></a>get_type_full</code></em> ()</span></p></td>
162 <td>Variant of get_type which takes a GType argument. This is
163 for use by bindings that need to pass context when creating a URI Handler.
164 If implemented, get_type will be used in preference to get_type_full.
168 <td><p><span class="term"><em class="structfield"><code><a name="GstURIHandlerInterface.get-protocols-full"></a>get_protocols_full</code></em> ()</span></p></td>
169 <td>Variant of get_protocols which takes a GType argument.
170 This is for use by bindings that need to pass context when creating a URI
171 Handler. If implemented, get_protocols will be used in preference to
172 get_protocols_full. Since: 0.10.15.</td>
178 <div class="refsect2">
179 <a name="GstURIType"></a><h3>enum GstURIType</h3>
180 <pre class="programlisting">typedef enum {
187 The different types of URI direction.
189 <div class="variablelist"><table border="0">
190 <col align="left" valign="top">
193 <td><p><a name="GST-URI-UNKNOWN:CAPS"></a><span class="term"><code class="literal">GST_URI_UNKNOWN</code></span></p></td>
194 <td>The URI direction is unknown
198 <td><p><a name="GST-URI-SINK:CAPS"></a><span class="term"><code class="literal">GST_URI_SINK</code></span></p></td>
199 <td>The URI is a consumer.
203 <td><p><a name="GST-URI-SRC:CAPS"></a><span class="term"><code class="literal">GST_URI_SRC</code></span></p></td>
204 <td>The URI is a producer.
211 <div class="refsect2">
212 <a name="GST-URI-TYPE-IS-VALID:CAPS"></a><h3>GST_URI_TYPE_IS_VALID()</h3>
213 <pre class="programlisting">#define GST_URI_TYPE_IS_VALID(type) ((type) == GST_URI_SRC || (type) == GST_URI_SINK)
216 Tests if the type direction is valid.
218 <div class="variablelist"><table border="0">
219 <col align="left" valign="top">
221 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
222 <td>A <a class="link" href="gstreamer-GstUriHandler.html#GstURIType" title="enum GstURIType"><span class="type">GstURIType</span></a>
228 <div class="refsect2">
229 <a name="gst-uri-protocol-is-valid"></a><h3>gst_uri_protocol_is_valid ()</h3>
230 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_uri_protocol_is_valid (<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> *protocol</code></em>);</pre>
232 Tests if the given string is a valid protocol identifier. Protocols
233 must consist of alphanumeric characters, '+', '-' and '.' and must
234 start with a alphabetic character. See RFC 3986 Section 3.1.
236 <div class="variablelist"><table border="0">
237 <col align="left" valign="top">
240 <td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
244 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
245 <td>TRUE if the string is a valid protocol identifier, FALSE otherwise.</td>
251 <div class="refsect2">
252 <a name="gst-uri-protocol-is-supported"></a><h3>gst_uri_protocol_is_supported ()</h3>
253 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_uri_protocol_is_supported (<em class="parameter"><code>const <a class="link" href="gstreamer-GstUriHandler.html#GstURIType" title="enum GstURIType"><span class="type">GstURIType</span></a> type</code></em>,
254 <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> *protocol</code></em>);</pre>
256 Checks if an element exists that supports the given URI protocol. Note
257 that a positive return value does not imply that a subsequent call to
258 <a class="link" href="gstreamer-GstUriHandler.html#gst-element-make-from-uri" title="gst_element_make_from_uri ()"><code class="function">gst_element_make_from_uri()</code></a> is guaranteed to work.
260 <div class="variablelist"><table border="0">
261 <col align="left" valign="top">
264 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
265 <td>Whether to check for a source or a sink</td>
268 <td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
269 <td>Protocol that should be checked for (e.g. "http" or "smb")</td>
272 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
277 <p class="since">Since 0.10.13</p>
280 <div class="refsect2">
281 <a name="gst-uri-is-valid"></a><h3>gst_uri_is_valid ()</h3>
282 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_uri_is_valid (<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> *uri</code></em>);</pre>
284 Tests if the given string is a valid URI identifier. URIs start with a valid
285 scheme followed by ":" and maybe a string identifying the location.
287 <div class="variablelist"><table border="0">
288 <col align="left" valign="top">
291 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
292 <td>A URI string</td>
295 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
296 <td>TRUE if the string is a valid URI</td>
302 <div class="refsect2">
303 <a name="gst-uri-has-protocol"></a><h3>gst_uri_has_protocol ()</h3>
304 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_uri_has_protocol (<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> *uri</code></em>,
305 <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> *protocol</code></em>);</pre>
307 Checks if the protocol of a given valid URI matches <em class="parameter"><code>protocol</code></em>.
309 <div class="variablelist"><table border="0">
310 <col align="left" valign="top">
313 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
314 <td>a URI string</td>
317 <td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
318 <td>a protocol string (e.g. "http")</td>
321 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
323 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the protocol matches.</td>
327 <p class="since">Since 0.10.4</p>
330 <div class="refsect2">
331 <a name="gst-uri-get-protocol"></a><h3>gst_uri_get_protocol ()</h3>
332 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_uri_get_protocol (<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> *uri</code></em>);</pre>
334 Extracts the protocol out of a given valid URI. The returned string must be
335 freed using <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.
337 <div class="variablelist"><table border="0">
338 <col align="left" valign="top">
341 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
342 <td>A URI string</td>
345 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
346 <td>The protocol for this URI.</td>
352 <div class="refsect2">
353 <a name="gst-uri-get-location"></a><h3>gst_uri_get_location ()</h3>
354 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_uri_get_location (<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> *uri</code></em>);</pre>
356 Extracts the location out of a given valid URI, ie. the protocol and "://"
357 are stripped from the URI, which means that the location returned includes
358 the hostname if one is specified. The returned string must be freed using
359 <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.
362 Free-function: g_free
364 <div class="variablelist"><table border="0">
365 <col align="left" valign="top">
368 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
369 <td>A URI string</td>
372 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
373 <td>the location for this
374 URI. Returns NULL if the URI isn't valid. If the URI does not contain
375 a location, an empty string is returned. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
382 <div class="refsect2">
383 <a name="gst-uri-construct"></a><h3>gst_uri_construct ()</h3>
384 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_uri_construct (<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> *protocol</code></em>,
385 <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> *location</code></em>);</pre>
387 Constructs a URI for a given valid protocol and location.
390 Free-function: g_free
392 <div class="variablelist"><table border="0">
393 <col align="left" valign="top">
396 <td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
397 <td>Protocol for URI</td>
400 <td><p><span class="term"><em class="parameter"><code>location</code></em> :</span></p></td>
401 <td>Location for URI. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
405 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
406 <td>a new string for this
407 URI. Returns NULL if the given URI protocol is not valid, or the given
408 location is NULL. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
415 <div class="refsect2">
416 <a name="gst-filename-to-uri"></a><h3>gst_filename_to_uri ()</h3>
417 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_filename_to_uri (<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> *filename</code></em>,
418 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
420 Similar to <a href="http://library.gnome.org/devel/glib/unstable/glib-URI-Functions.html#g-filename-to-uri"><code class="function">g_filename_to_uri()</code></a>, but attempts to handle relative file paths
421 as well. Before converting <em class="parameter"><code>filename</code></em> into an URI, it will be prefixed by
422 the current working directory if it is a relative path, and then the path
423 will be canonicalised so that it doesn't contain any './' or '../' segments.
426 On Windows <span class="type">filename</span> should be in UTF-8 encoding.
428 <div class="variablelist"><table border="0">
429 <col align="left" valign="top">
432 <td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
433 <td>absolute or relative file name path</td>
436 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
437 <td>pointer to error, or NULL</td>
441 <p class="since">Since 0.10.33</p>
444 <div class="refsect2">
445 <a name="gst-element-make-from-uri"></a><h3>gst_element_make_from_uri ()</h3>
446 <pre class="programlisting"><a class="link" href="GstElement.html" title="GstElement"><span class="returnvalue">GstElement</span></a> * gst_element_make_from_uri (<em class="parameter"><code>const <a class="link" href="gstreamer-GstUriHandler.html#GstURIType" title="enum GstURIType"><span class="type">GstURIType</span></a> type</code></em>,
447 <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> *uri</code></em>,
448 <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> *elementname</code></em>);</pre>
450 Creates an element for handling the given URI.
452 <div class="variablelist"><table border="0">
453 <col align="left" valign="top">
456 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
457 <td>Whether to create a source or a sink</td>
460 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
461 <td>URI to create an element for</td>
464 <td><p><span class="term"><em class="parameter"><code>elementname</code></em> :</span></p></td>
465 <td>Name of created element, can be NULL. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
469 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
470 <td>a new element or NULL if none could be created. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
477 <div class="refsect2">
478 <a name="gst-uri-handler-get-uri-type"></a><h3>gst_uri_handler_get_uri_type ()</h3>
479 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gst_uri_handler_get_uri_type (<em class="parameter"><code><a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> *handler</code></em>);</pre>
481 Gets the type of the given URI handler
483 <div class="variablelist"><table border="0">
484 <col align="left" valign="top">
487 <td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
488 <td>A <a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a>.</td>
491 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
492 <td>the <a class="link" href="gstreamer-GstUriHandler.html#GstURIType" title="enum GstURIType"><span class="type">GstURIType</span></a> of the URI handler.
493 Returns <a class="link" href="gstreamer-GstUriHandler.html#GST-URI-UNKNOWN:CAPS"><span class="type">GST_URI_UNKNOWN</span></a> if the <em class="parameter"><code>handler</code></em> isn't implemented correctly.</td>
499 <div class="refsect2">
500 <a name="gst-uri-handler-get-protocols"></a><h3>gst_uri_handler_get_protocols ()</h3>
501 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> ** gst_uri_handler_get_protocols (<em class="parameter"><code><a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> *handler</code></em>);</pre>
503 Gets the list of protocols supported by <em class="parameter"><code>handler</code></em>. This list may not be
506 <div class="variablelist"><table border="0">
507 <col align="left" valign="top">
510 <td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
511 <td>A <a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a>.</td>
514 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
516 supported protocols. Returns NULL if the <em class="parameter"><code>handler</code></em> isn't implemented
517 properly, or the <em class="parameter"><code>handler</code></em> doesn't support any protocols. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span>
524 <div class="refsect2">
525 <a name="gst-uri-handler-get-uri"></a><h3>gst_uri_handler_get_uri ()</h3>
526 <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_uri_handler_get_uri (<em class="parameter"><code><a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> *handler</code></em>);</pre>
528 Gets the currently handled URI.
530 <div class="variablelist"><table border="0">
531 <col align="left" valign="top">
534 <td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
535 <td>A <a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a>
539 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
540 <td>the URI currently handled by the <em class="parameter"><code>handler</code></em>.
541 Returns NULL if there are no URI currently handled. The
542 returned string must not be modified or freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
549 <div class="refsect2">
550 <a name="gst-uri-handler-set-uri"></a><h3>gst_uri_handler_set_uri ()</h3>
551 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_uri_handler_set_uri (<em class="parameter"><code><a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> *handler</code></em>,
552 <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> *uri</code></em>);</pre>
554 Tries to set the URI of the given handler.
556 <div class="variablelist"><table border="0">
557 <col align="left" valign="top">
560 <td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
561 <td>A <a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a>
565 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
569 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
570 <td>TRUE if the URI was set successfully, else FALSE.</td>
576 <div class="refsect2">
577 <a name="gst-uri-handler-new-uri"></a><h3>gst_uri_handler_new_uri ()</h3>
578 <pre class="programlisting"><span class="returnvalue">void</span> gst_uri_handler_new_uri (<em class="parameter"><code><a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> *handler</code></em>,
579 <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> *uri</code></em>);</pre>
581 Emits the new-uri signal for a given handler, when that handler has a new URI.
582 This function should only be called by URI handlers themselves.
584 <div class="variablelist"><table border="0">
585 <col align="left" valign="top">
588 <td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
589 <td>A <a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a>
593 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
594 <td>new URI or NULL if it was unset</td>
600 <div class="refsect1">
601 <a name="gstreamer-GstUriHandler.signal-details"></a><h2>Signal Details</h2>
602 <div class="refsect2">
603 <a name="GstURIHandler-new-uri"></a><h3>The <code class="literal">"new-uri"</code> signal</h3>
604 <pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> *handler,
605 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri,
606 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
608 The URI of the given <em class="parameter"><code>handler</code></em> has changed.
610 <div class="variablelist"><table border="0">
611 <col align="left" valign="top">
614 <td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
615 <td>The <a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> which emitted the signal</td>
618 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
619 <td>The new URI, or NULL if the URI was removed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
623 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
624 <td>user data set when the signal handler was connected.</td>
633 Generated by GTK-Doc V1.18</div>