a3a83f3fff3b98a5c87c91f893abb60805cf2175
[framework/multimedia/gst-plugins-base0.10.git] / docs / plugins / html / gst-plugins-base-plugins-giosrc.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>giosrc</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 Plugins Reference Manual">
8 <link rel="up" href="ch01.html" title="gst-plugins-base Elements">
9 <link rel="prev" href="gst-plugins-base-plugins-giosink.html" title="giosink">
10 <link rel="next" href="gst-plugins-base-plugins-giostreamsink.html" title="giostreamsink">
11 <meta name="generator" content="GTK-Doc V1.17 (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="gst-plugins-base-plugins-giosink.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch01.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 Plugins Reference Manual</th>
21 <td><a accesskey="n" href="gst-plugins-base-plugins-giostreamsink.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="#gst-plugins-base-plugins-giosrc.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-base-plugins-giosrc.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gst-plugins-base-plugins-giosrc.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#gst-plugins-base-plugins-giosrc.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
31                    | 
32                   <a href="#gst-plugins-base-plugins-giosrc.properties" class="shortcut">Properties</a>
33 </td></tr>
34 </table>
35 <div class="refentry">
36 <a name="gst-plugins-base-plugins-giosrc"></a><div class="titlepage"></div>
37 <div class="refnamediv"><table width="100%"><tr>
38 <td valign="top">
39 <h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-giosrc.top_of_page"></a>giosrc</span></h2>
40 <p>giosrc — Read from any GIO-supported location</p>
41 </td>
42 <td valign="top" align="right"></td>
43 </tr></table></div>
44 <div class="refsynopsisdiv">
45 <a name="gst-plugins-base-plugins-giosrc.synopsis"></a><h2>Synopsis</h2>
46 <a name="GstGioSrc"></a><pre class="synopsis">struct              <a class="link" href="gst-plugins-base-plugins-giosrc.html#GstGioSrc-struct" title="struct GstGioSrc">GstGioSrc</a>;
47 </pre>
48 </div>
49 <div class="refsect1">
50 <a name="gst-plugins-base-plugins-giosrc.object-hierarchy"></a><h2>Object Hierarchy</h2>
51 <pre class="synopsis">
52   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
53    +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
54          +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
55                +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseSrc.html">GstBaseSrc</a>
56                      +----GstGioBaseSrc
57                            +----GstGioSrc
58 </pre>
59 </div>
60 <div class="refsect1">
61 <a name="gst-plugins-base-plugins-giosrc.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
62 <p>
63 GstGioSrc implements
64  <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstUriHandler.html#GstURIHandler">GstURIHandler</a>.</p>
65 </div>
66 <div class="refsect1">
67 <a name="gst-plugins-base-plugins-giosrc.properties"></a><h2>Properties</h2>
68 <pre class="synopsis">
69   "<a class="link" href="gst-plugins-base-plugins-giosrc.html#GstGioSrc--location" title='The "location" property'>location</a>"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write
70   "<a class="link" href="gst-plugins-base-plugins-giosrc.html#GstGioSrc--file" title='The "file" property'>file</a>"                     <a href="http://library.gnome.org/devel/gio/unstable/GFile.html"><span class="type">GFile</span></a>*                : Read / Write
71 </pre>
72 </div>
73 <div class="refsect1">
74 <a name="gst-plugins-base-plugins-giosrc.description"></a><h2>Description</h2>
75 <p>
76 This plugin reads data from a local or remote location specified
77 by an URI. This location can be specified using any protocol supported by
78 the GIO library or it's VFS backends. Common protocols are 'file', 'http',
79 'ftp', or 'smb'.
80 </p>
81 <p>
82 If an URI or <a href="http://library.gnome.org/devel/gio/unstable/GFile.html"><span class="type">GFile</span></a> is not mounted giosrc will post a message of type
83 <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMessage.html#GST-MESSAGE-ELEMENT:CAPS"><code class="literal">GST_MESSAGE_ELEMENT</code></a> with name "not-mounted" on the bus. The message
84 also contains the <a href="http://library.gnome.org/devel/gio/unstable/GFile.html"><span class="type">GFile</span></a> and the corresponding URI.
85 Applications can use the "not-mounted" message to mount the <a href="http://library.gnome.org/devel/gio/unstable/GFile.html"><span class="type">GFile</span></a>
86 by calling <a href="http://library.gnome.org/devel/gio/unstable/GFile.html#g-file-mount-enclosing-volume"><code class="function">g_file_mount_enclosing_volume()</code></a> and then restart the
87 pipeline after the mounting has succeeded. Note that right after the
88 "not-mounted" message a normal error message is posted on the bus which
89 should be ignored if "not-mounted" is handled by the application, for
90 example by calling gst_bus_set_flushing(bus, TRUE) after the "not-mounted"
91 message was received and gst_bus_set_flushing(bus, FALSE) after the
92 mounting was successful.
93 </p>
94 <p>
95 </p>
96 <div class="refsect2">
97 <a name="idp11463456"></a><h3>Example launch lines</h3>
98 <div class="informalexample">
99   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
100     <tbody>
101       <tr>
102         <td class="listing_lines" align="right"><pre>1</pre></td>
103         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v giosrc location<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///home/joe/foo.xyz ! fakesink</span></pre></td>
104       </tr>
105     </tbody>
106   </table>
107 </div>
108  The above pipeline will simply read a local file and do nothing with the
109 data read. Instead of giosrc, we could just as well have used the
110 filesrc element here.
111 <div class="informalexample">
112   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
113     <tbody>
114       <tr>
115         <td class="listing_lines" align="right"><pre>1</pre></td>
116         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v giosrc location<span class="gtkdoc opt">=</span>smb<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//othercomputer/foo.xyz ! filesink location=/home/joe/foo.xyz</span></pre></td>
117       </tr>
118     </tbody>
119   </table>
120 </div>
121  The above pipeline will copy a file from a remote host to the local file
122 system using the Samba protocol.
123 <div class="informalexample">
124   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
125     <tbody>
126       <tr>
127         <td class="listing_lines" align="right"><pre>1</pre></td>
128         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v giosrc location<span class="gtkdoc opt">=</span>http<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//music.foobar.com/demo.mp3 ! mad ! audioconvert ! audioresample ! alsasink</span></pre></td>
129       </tr>
130     </tbody>
131   </table>
132 </div>
133  The above pipeline will read and decode and play an mp3 file from a
134 web server using the http protocol.
135 </div>
136 <p>
137 </p>
138 <div class="refsynopsisdiv">
139 <h2>Synopsis</h2>
140 <div class="refsect2">
141 <a name="idp11468304"></a><h3>Element Information</h3>
142 <div class="variablelist"><table border="0">
143 <col align="left" valign="top">
144 <tbody>
145 <tr>
146 <td><p><span class="term">plugin</span></p></td>
147 <td>
148             <a class="link" href="gst-plugins-base-plugins-plugin-gio.html#plugin-gio">gio</a>
149           </td>
150 </tr>
151 <tr>
152 <td><p><span class="term">author</span></p></td>
153 <td>René Stadler &lt;mail@renestadler.de&gt;, Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</td>
154 </tr>
155 <tr>
156 <td><p><span class="term">class</span></p></td>
157 <td>Source/File</td>
158 </tr>
159 </tbody>
160 </table></div>
161 </div>
162 <hr>
163 <div class="refsect2">
164 <a name="idp11475824"></a><h3>Element Pads</h3>
165 <div class="variablelist"><table border="0">
166 <col align="left" valign="top">
167 <tbody>
168 <tr>
169 <td><p><span class="term">name</span></p></td>
170 <td>src</td>
171 </tr>
172 <tr>
173 <td><p><span class="term">direction</span></p></td>
174 <td>source</td>
175 </tr>
176 <tr>
177 <td><p><span class="term">presence</span></p></td>
178 <td>always</td>
179 </tr>
180 <tr>
181 <td><p><span class="term">details</span></p></td>
182 <td>ANY</td>
183 </tr>
184 </tbody>
185 </table></div>
186 </div>
187 </div>
188 <p>
189 </p>
190 </div>
191 <div class="refsect1">
192 <a name="gst-plugins-base-plugins-giosrc.details"></a><h2>Details</h2>
193 <div class="refsect2">
194 <a name="GstGioSrc-struct"></a><h3>struct GstGioSrc</h3>
195 <pre class="programlisting">struct GstGioSrc;</pre>
196 <p>
197 Opaque data structure.
198 </p>
199 </div>
200 </div>
201 <div class="refsect1">
202 <a name="gst-plugins-base-plugins-giosrc.property-details"></a><h2>Property Details</h2>
203 <div class="refsect2">
204 <a name="GstGioSrc--location"></a><h3>The <code class="literal">"location"</code> property</h3>
205 <pre class="programlisting">  "location"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write</pre>
206 <p>URI location to read from.</p>
207 <p>Default value: NULL</p>
208 </div>
209 <hr>
210 <div class="refsect2">
211 <a name="GstGioSrc--file"></a><h3>The <code class="literal">"file"</code> property</h3>
212 <pre class="programlisting">  "file"                     <a href="http://library.gnome.org/devel/gio/unstable/GFile.html"><span class="type">GFile</span></a>*                : Read / Write</pre>
213 <p>
214 <a href="http://library.gnome.org/devel/gio/unstable/GFile.html"><code class="literal">GFile</code></a> to read from.
215 </p>
216 <p class="since">Since 0.10.20</p>
217 </div>
218 </div>
219 <div class="refsect1">
220 <a name="gst-plugins-base-plugins-giosrc.see-also"></a><h2>See Also</h2>
221 <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-filesrc.html#GstFileSrc"><span class="type">GstFileSrc</span></a>, <a class="link" href="gst-plugins-base-plugins-gnomevfssrc.html#GstGnomeVFSSrc"><span class="type">GstGnomeVFSSrc</span></a>, <a class="link" href="gst-plugins-base-plugins-giosink.html#GstGioSink"><span class="type">GstGioSink</span></a>
222 </div>
223 </div>
224 <div class="footer">
225 <hr>
226           Generated by GTK-Doc V1.17</div>
227 </body>
228 </html>