Initialize Tizen 2.3
[framework/multimedia/gstreamer0.10.git] / wearable / docs / gst / html / gstreamer-GstUriHandler.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
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">
13 </head>
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">
16 <tr valign="middle">
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>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gstreamer-GstUriHandler.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gstreamer-GstUriHandler.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gstreamer-GstUriHandler.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#gstreamer-GstUriHandler.signals" class="shortcut">Signals</a>
31 </td></tr>
32 </table>
33 <div class="refentry">
34 <a name="gstreamer-GstUriHandler"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
36 <td valign="top">
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>
39 </td>
40 <td valign="top" align="right"></td>
41 </tr></table></div>
42 <div class="refsynopsisdiv">
43 <a name="gstreamer-GstUriHandler.synopsis"></a><h2>Synopsis</h2>
44 <a name="GstURIHandler"></a><pre class="synopsis">
45 #include &lt;gst/gst.h&gt;
46
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>);
73 </pre>
74 </div>
75 <div class="refsect1">
76 <a name="gstreamer-GstUriHandler.object-hierarchy"></a><h2>Object Hierarchy</h2>
77 <pre class="synopsis">
78   GInterface
79    +----GstURIHandler
80 </pre>
81 </div>
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>
86 </pre>
87 </div>
88 <div class="refsect1">
89 <a name="gstreamer-GstUriHandler.description"></a><h2>Description</h2>
90 <p>
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.
93 </p>
94 <p>
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>).
98 </p>
99 <p>
100 Source and Sink plugins should implement this interface when possible.
101 </p>
102 <p>
103 Last reviewed on 2005-11-09 (0.9.4)
104 </p>
105 </div>
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>
111 <p>
112 Opaque <a class="link" href="gstreamer-GstUriHandler.html#GstURIHandler"><span class="type">GstURIHandler</span></a> structure.
113 </p>
114 </div>
115 <hr>
116 <div class="refsect2">
117 <a name="GstURIHandlerInterface"></a><h3>struct GstURIHandlerInterface</h3>
118 <pre class="programlisting">struct GstURIHandlerInterface {
119   GTypeInterface parent;
120
121   /* querying capabilities */
122   GstURIType            (* get_type)            (void);
123   gchar **              (* get_protocols) (void);
124
125   /* using the interface */
126   const gchar *         (* get_uri)             (GstURIHandler * handler);
127   gboolean              (* set_uri)             (GstURIHandler * handler,
128                                                  const gchar *   uri);
129
130   GstURIType            (* get_type_full) (GType type);
131   gchar **              (* get_protocols_full) (GType type);
132 };
133 </pre>
134 <p>
135 Any <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a> using this interface should implement these methods.
136 </p>
137 <div class="variablelist"><table border="0">
138 <col align="left" valign="top">
139 <tbody>
140 <tr>
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>
143 </tr>
144 <tr>
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>
147 </tr>
148 <tr>
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>
151 </tr>
152 <tr>
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>
155 </tr>
156 <tr>
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>
159 </tr>
160 <tr>
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.
165 Since: 0.10.15.</td>
166 </tr>
167 <tr>
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>
173 </tr>
174 </tbody>
175 </table></div>
176 </div>
177 <hr>
178 <div class="refsect2">
179 <a name="GstURIType"></a><h3>enum GstURIType</h3>
180 <pre class="programlisting">typedef enum {
181   GST_URI_UNKNOWN,
182   GST_URI_SINK,
183   GST_URI_SRC
184 } GstURIType;
185 </pre>
186 <p>
187 The different types of URI direction.
188 </p>
189 <div class="variablelist"><table border="0">
190 <col align="left" valign="top">
191 <tbody>
192 <tr>
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
195 </td>
196 </tr>
197 <tr>
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.
200 </td>
201 </tr>
202 <tr>
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.
205 </td>
206 </tr>
207 </tbody>
208 </table></div>
209 </div>
210 <hr>
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)
214 </pre>
215 <p>
216 Tests if the type direction is valid.
217 </p>
218 <div class="variablelist"><table border="0">
219 <col align="left" valign="top">
220 <tbody><tr>
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>
223 </td>
224 </tr></tbody>
225 </table></div>
226 </div>
227 <hr>
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>
231 <p>
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.
235 </p>
236 <div class="variablelist"><table border="0">
237 <col align="left" valign="top">
238 <tbody>
239 <tr>
240 <td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
241 <td>A string</td>
242 </tr>
243 <tr>
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>
246 </tr>
247 </tbody>
248 </table></div>
249 </div>
250 <hr>
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>
255 <p>
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.
259 </p>
260 <div class="variablelist"><table border="0">
261 <col align="left" valign="top">
262 <tbody>
263 <tr>
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>
266 </tr>
267 <tr>
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>
270 </tr>
271 <tr>
272 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
273 <td>TRUE</td>
274 </tr>
275 </tbody>
276 </table></div>
277 <p class="since">Since 0.10.13</p>
278 </div>
279 <hr>
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>
283 <p>
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.
286 </p>
287 <div class="variablelist"><table border="0">
288 <col align="left" valign="top">
289 <tbody>
290 <tr>
291 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
292 <td>A URI string</td>
293 </tr>
294 <tr>
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>
297 </tr>
298 </tbody>
299 </table></div>
300 </div>
301 <hr>
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>
306 <p>
307 Checks if the protocol of a given valid URI matches <em class="parameter"><code>protocol</code></em>.
308 </p>
309 <div class="variablelist"><table border="0">
310 <col align="left" valign="top">
311 <tbody>
312 <tr>
313 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
314 <td>a URI string</td>
315 </tr>
316 <tr>
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>
319 </tr>
320 <tr>
321 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
322 <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>
324 </tr>
325 </tbody>
326 </table></div>
327 <p class="since">Since 0.10.4</p>
328 </div>
329 <hr>
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>
333 <p>
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>.
336 </p>
337 <div class="variablelist"><table border="0">
338 <col align="left" valign="top">
339 <tbody>
340 <tr>
341 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
342 <td>A URI string</td>
343 </tr>
344 <tr>
345 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
346 <td>The protocol for this URI.</td>
347 </tr>
348 </tbody>
349 </table></div>
350 </div>
351 <hr>
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>
355 <p>
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>.
360 </p>
361 <p>
362 Free-function: g_free
363 </p>
364 <div class="variablelist"><table border="0">
365 <col align="left" valign="top">
366 <tbody>
367 <tr>
368 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
369 <td>A URI string</td>
370 </tr>
371 <tr>
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>
376 </td>
377 </tr>
378 </tbody>
379 </table></div>
380 </div>
381 <hr>
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>
386 <p>
387 Constructs a URI for a given valid protocol and location.
388 </p>
389 <p>
390 Free-function: g_free
391 </p>
392 <div class="variablelist"><table border="0">
393 <col align="left" valign="top">
394 <tbody>
395 <tr>
396 <td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
397 <td>Protocol for URI</td>
398 </tr>
399 <tr>
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>
402 </td>
403 </tr>
404 <tr>
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>
409 </td>
410 </tr>
411 </tbody>
412 </table></div>
413 </div>
414 <hr>
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>
419 <p>
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.
424 </p>
425 <p>
426 On Windows <span class="type">filename</span> should be in UTF-8 encoding.
427 </p>
428 <div class="variablelist"><table border="0">
429 <col align="left" valign="top">
430 <tbody>
431 <tr>
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>
434 </tr>
435 <tr>
436 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
437 <td>pointer to error, or NULL</td>
438 </tr>
439 </tbody>
440 </table></div>
441 <p class="since">Since 0.10.33</p>
442 </div>
443 <hr>
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>
449 <p>
450 Creates an element for handling the given URI.
451 </p>
452 <div class="variablelist"><table border="0">
453 <col align="left" valign="top">
454 <tbody>
455 <tr>
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>
458 </tr>
459 <tr>
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>
462 </tr>
463 <tr>
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>
466 </td>
467 </tr>
468 <tr>
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>
471 </td>
472 </tr>
473 </tbody>
474 </table></div>
475 </div>
476 <hr>
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>
480 <p>
481 Gets the type of the given URI handler
482 </p>
483 <div class="variablelist"><table border="0">
484 <col align="left" valign="top">
485 <tbody>
486 <tr>
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>
489 </tr>
490 <tr>
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>
494 </tr>
495 </tbody>
496 </table></div>
497 </div>
498 <hr>
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>
502 <p>
503 Gets the list of protocols supported by <em class="parameter"><code>handler</code></em>. This list may not be
504 modified.
505 </p>
506 <div class="variablelist"><table border="0">
507 <col align="left" valign="top">
508 <tbody>
509 <tr>
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>
512 </tr>
513 <tr>
514 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
515 <td>the
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>
518 </td>
519 </tr>
520 </tbody>
521 </table></div>
522 </div>
523 <hr>
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>
527 <p>
528 Gets the currently handled URI.
529 </p>
530 <div class="variablelist"><table border="0">
531 <col align="left" valign="top">
532 <tbody>
533 <tr>
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>
536 </td>
537 </tr>
538 <tr>
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>
543 </td>
544 </tr>
545 </tbody>
546 </table></div>
547 </div>
548 <hr>
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>
553 <p>
554 Tries to set the URI of the given handler.
555 </p>
556 <div class="variablelist"><table border="0">
557 <col align="left" valign="top">
558 <tbody>
559 <tr>
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>
562 </td>
563 </tr>
564 <tr>
565 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
566 <td>URI to set</td>
567 </tr>
568 <tr>
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>
571 </tr>
572 </tbody>
573 </table></div>
574 </div>
575 <hr>
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>
580 <p>
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.
583 </p>
584 <div class="variablelist"><table border="0">
585 <col align="left" valign="top">
586 <tbody>
587 <tr>
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>
590 </td>
591 </tr>
592 <tr>
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>
595 </tr>
596 </tbody>
597 </table></div>
598 </div>
599 </div>
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>
607 <p>
608 The URI of the given <em class="parameter"><code>handler</code></em> has changed.
609 </p>
610 <div class="variablelist"><table border="0">
611 <col align="left" valign="top">
612 <tbody>
613 <tr>
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>
616 </tr>
617 <tr>
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>
620 </td>
621 </tr>
622 <tr>
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>
625 </tr>
626 </tbody>
627 </table></div>
628 </div>
629 </div>
630 </div>
631 <div class="footer">
632 <hr>
633           Generated by GTK-Doc V1.18</div>
634 </body>
635 </html>