• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: GStreamer Base Plugins 1.0 Plugins Reference Manual</title>
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 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.28 (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="5"><tr valign="middle">
16<td width="100%" align="left" class="shortcuts">
17<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span18                  <a href="#gst-plugins-base-plugins-giosrc.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span19                  <a href="#gst-plugins-base-plugins-giosrc.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span20                  <a href="#gst-plugins-base-plugins-giosrc.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span21                  <a href="#gst-plugins-base-plugins-giosrc.properties" class="shortcut">Properties</a></span>
22</td>
23<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
24<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
25<td><a accesskey="p" href="gst-plugins-base-plugins-giosink.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
26<td><a accesskey="n" href="gst-plugins-base-plugins-giostreamsink.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
27</tr></table>
28<div class="refentry">
29<a name="gst-plugins-base-plugins-giosrc"></a><div class="titlepage"></div>
30<div class="refnamediv"><table width="100%"><tr>
31<td valign="top">
32<h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-giosrc.top_of_page"></a>giosrc</span></h2>
33<p>giosrc</p>
34</td>
35<td class="gallery_image" valign="top" align="right"></td>
36</tr></table></div>
37<div class="refsect1">
38<a name="gst-plugins-base-plugins-giosrc.properties"></a><h2>Properties</h2>
39<div class="informaltable"><table class="informaltable" border="0">
40<colgroup>
41<col width="150px" class="properties_type">
42<col width="300px" class="properties_name">
43<col width="200px" class="properties_flags">
44</colgroup>
45<tbody>
46<tr>
47<td class="property_type">
48<a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> *</td>
49<td class="property_name"><a class="link" href="gst-plugins-base-plugins-giosrc.html#GstGioSrc--file" title="The “file” property">file</a></td>
50<td class="property_flags">Read / Write</td>
51</tr>
52<tr>
53<td class="property_type">
54<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
55<td class="property_name"><a class="link" href="gst-plugins-base-plugins-giosrc.html#GstGioSrc--location" title="The “location” property">location</a></td>
56<td class="property_flags">Read / Write</td>
57</tr>
58</tbody>
59</table></div>
60</div>
61<a name="GstGioSrc"></a><div class="refsect1">
62<a name="gst-plugins-base-plugins-giosrc.other"></a><h2>Types and Values</h2>
63<div class="informaltable"><table class="informaltable" width="100%" border="0">
64<colgroup>
65<col width="150px" class="name">
66<col class="description">
67</colgroup>
68<tbody><tr>
69<td class="datatype_keyword">struct</td>
70<td class="function_name"><a class="link" href="gst-plugins-base-plugins-giosrc.html#GstGioSrc-struct" title="struct GstGioSrc">GstGioSrc</a></td>
71</tr></tbody>
72</table></div>
73</div>
74<div class="refsect1">
75<a name="gst-plugins-base-plugins-giosrc.object-hierarchy"></a><h2>Object Hierarchy</h2>
76<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
77    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
78        <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a>
79            <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a>
80                <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseSrc.html#GstBaseSrc-struct">GstBaseSrc</a>
81                    <span class="lineart">╰──</span> GstGioBaseSrc
82                        <span class="lineart">╰──</span> GstGioSrc
83</pre>
84</div>
85<div class="refsect1">
86<a name="gst-plugins-base-plugins-giosrc.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
87<p>
88GstGioSrc implements
89 <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstUriHandler.html#GstURIHandler-struct">GstURIHandler</a>.</p>
90</div>
91<div class="refsect1">
92<a name="gst-plugins-base-plugins-giosrc.description"></a><h2>Description</h2>
93<p>This plugin reads data from a local or remote location specified
94by an URI. This location can be specified using any protocol supported by
95the GIO library or it's VFS backends. Common protocols are 'file', 'http',
96'ftp', or 'smb'.</p>
97<p>If an URI or <a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> is not mounted giosrc will post a message of type
98<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstMessage.html#GST-MESSAGE-ELEMENT:CAPS"><code class="literal">GST_MESSAGE_ELEMENT</code></a> with name "not-mounted" on the bus. The message
99also contains the <a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> and the corresponding URI.
100Applications can use the "not-mounted" message to mount the <a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a>
101by calling <a href="/usr/share/gtk-doc/html/gio/GFile.html#g-file-mount-enclosing-volume"><code class="function">g_file_mount_enclosing_volume()</code></a> and then restart the
102pipeline after the mounting has succeeded. Note that right after the
103"not-mounted" message a normal error message is posted on the bus which
104should be ignored if "not-mounted" is handled by the application, for
105example by calling gst_bus_set_flushing(bus, TRUE) after the "not-mounted"
106message was received and gst_bus_set_flushing(bus, FALSE) after the
107mounting was successful.</p>
108<div class="refsect3">
109<a name="id-1.2.21.8.4"></a><h4>Example launch lines</h4>
110<div class="informalexample">
111  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
112    <tbody>
113      <tr>
114        <td class="listing_lines" align="right"><pre>1</pre></td>
115        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <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>
116      </tr>
117    </tbody>
118  </table>
119</div>
120
121<p>
122 The above pipeline will simply read a local file and do nothing with the
123data read. Instead of giosrc, we could just as well have used the
124filesrc element here.</p>
125<div class="informalexample">
126  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
127    <tbody>
128      <tr>
129        <td class="listing_lines" align="right"><pre>1</pre></td>
130        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <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>
131      </tr>
132    </tbody>
133  </table>
134</div>
135
136<p>
137 The above pipeline will copy a file from a remote host to the local file
138system using the Samba protocol.</p>
139<div class="informalexample">
140  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
141    <tbody>
142      <tr>
143        <td class="listing_lines" align="right"><pre>1</pre></td>
144        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v giosrc location<span class="gtkdoc opt">=</span>smb<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//othercomputer/demo.mp3 ! decodebin ! audioconvert ! audioresample ! autoaudiosink</span></pre></td>
145      </tr>
146    </tbody>
147  </table>
148</div>
149
150<p>
151 The above pipeline will read and decode and play an mp3 file from a
152SAMBA server.</p>
153</div>
154<div class="refsynopsisdiv">
155<h2>Synopsis</h2>
156<div class="refsect2">
157<a name="id-1.2.21.8.5.1"></a><h3>Element Information</h3>
158<div class="variablelist"><table border="0" class="variablelist">
159<colgroup>
160<col align="left" valign="top">
161<col>
162</colgroup>
163<tbody>
164<tr>
165<td><p><span class="term">plugin</span></p></td>
166<td>
167            <a class="link" href="gst-plugins-base-plugins-plugin-gio.html#plugin-gio">gio</a>
168          </td>
169</tr>
170<tr>
171<td><p><span class="term">author</span></p></td>
172<td>René Stadler &lt;mail@renestadler.de&gt;, Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</td>
173</tr>
174<tr>
175<td><p><span class="term">class</span></p></td>
176<td>Source/File</td>
177</tr>
178</tbody>
179</table></div>
180</div>
181<hr>
182<div class="refsect2">
183<a name="id-1.2.21.8.5.2"></a><h3>Element Pads</h3>
184<div class="variablelist"><table border="0" class="variablelist">
185<colgroup>
186<col align="left" valign="top">
187<col>
188</colgroup>
189<tbody>
190<tr>
191<td><p><span class="term">name</span></p></td>
192<td>src</td>
193</tr>
194<tr>
195<td><p><span class="term">direction</span></p></td>
196<td>source</td>
197</tr>
198<tr>
199<td><p><span class="term">presence</span></p></td>
200<td>always</td>
201</tr>
202<tr>
203<td><p><span class="term">details</span></p></td>
204<td>ANY</td>
205</tr>
206</tbody>
207</table></div>
208</div>
209</div>
210</div>
211<div class="refsect1">
212<a name="gst-plugins-base-plugins-giosrc.functions_details"></a><h2>Functions</h2>
213<p></p>
214</div>
215<div class="refsect1">
216<a name="gst-plugins-base-plugins-giosrc.other_details"></a><h2>Types and Values</h2>
217<div class="refsect2">
218<a name="GstGioSrc-struct"></a><h3>struct GstGioSrc</h3>
219<pre class="programlisting">struct GstGioSrc;</pre>
220<p>Opaque data structure.</p>
221</div>
222</div>
223<div class="refsect1">
224<a name="gst-plugins-base-plugins-giosrc.property-details"></a><h2>Property Details</h2>
225<div class="refsect2">
226<a name="GstGioSrc--file"></a><h3>The <code class="literal">“file”</code> property</h3>
227<pre class="programlisting">  “file”                     <a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> *</pre>
228<p><a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><code class="literal">GFile</code></a> to read from.</p>
229<p>Flags: Read / Write</p>
230</div>
231<hr>
232<div class="refsect2">
233<a name="GstGioSrc--location"></a><h3>The <code class="literal">“location”</code> property</h3>
234<pre class="programlisting">  “location”                 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
235<p>URI location to read from.</p>
236<p>Flags: Read / Write</p>
237<p>Default value: NULL</p>
238</div>
239</div>
240<div class="refsect1">
241<a name="gst-plugins-base-plugins-giosrc.see-also"></a><h2>See Also</h2>
242<p><a href="/usr/share/gtk-doc/html/gstreamer-plugins-1.0/gstreamer-plugins-filesrc.html#GstFileSrc-struct"><span class="type">GstFileSrc</span></a>, <span class="type">GstGnomeVFSSrc</span>, <a class="link" href="gst-plugins-base-plugins-giosink.html#GstGioSink"><span class="type">GstGioSink</span></a></p>
243</div>
244</div>
245<div class="footer">
246<hr>Generated by GTK-Doc V1.28</div>
247</body>
248</html>