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>giosink: 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-encodebin.html" title="encodebin"> 10<link rel="next" href="gst-plugins-base-plugins-giosrc.html" title="giosrc"> 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">|</span> 18 <a href="#gst-plugins-base-plugins-giosink.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#gst-plugins-base-plugins-giosink.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> 20 <a href="#gst-plugins-base-plugins-giosink.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span> 21 <a href="#gst-plugins-base-plugins-giosink.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-encodebin.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-giosrc.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-giosink"></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-giosink.top_of_page"></a>giosink</span></h2> 33<p>giosink</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-giosink.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-giosink.html#GstGioSink--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-giosink.html#GstGioSink--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="GstGioSink"></a><div class="refsect1"> 62<a name="gst-plugins-base-plugins-giosink.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-giosink.html#GstGioSink-struct" title="struct GstGioSink">GstGioSink</a></td> 71</tr></tbody> 72</table></div> 73</div> 74<div class="refsect1"> 75<a name="gst-plugins-base-plugins-giosink.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/GstBaseSink.html#GstBaseSink-struct">GstBaseSink</a> 81 <span class="lineart">╰──</span> GstGioBaseSink 82 <span class="lineart">╰──</span> GstGioSink 83</pre> 84</div> 85<div class="refsect1"> 86<a name="gst-plugins-base-plugins-giosink.implemented-interfaces"></a><h2>Implemented Interfaces</h2> 87<p> 88GstGioSink 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-giosink.description"></a><h2>Description</h2> 93<p>This plugin writes incoming data to 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', 'ftp', 96or 'smb'.</p> 97<p>If the URI or <a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> already exists giosink will post a message of 98type <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 "file-exists" 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 "file-exists" message to notify the user about 101the problem and to set a different target location or to remove the 102existing file. Note that right after the "file-exists" message a normal 103error message is posted on the bus which should be ignored if "file-exists" 104is handled by the application, for example by calling 105gst_bus_set_flushing(bus, TRUE) after the "file-exists" message was 106received and gst_bus_set_flushing(bus, FALSE) after the problem is 107resolved.</p> 108<p>Similar to the "file-exist" message a "not-mounted" message is posted 109on the bus if the target location is not mounted yet and needs to be 110mounted. This message can be used by application to mount the location 111and retry after the location was mounted successfully.</p> 112<div class="refsect3"> 113<a name="id-1.2.20.8.5"></a><h4>Example pipelines</h4> 114<div class="informalexample"> 115 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> 116 <tbody> 117 <tr> 118 <td class="listing_lines" align="right"><pre>1</pre></td> 119 <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 filesrc location<span class="gtkdoc opt">=</span>input<span class="gtkdoc opt">.</span>xyz <span class="gtkdoc opt">!</span> giosink location<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///home/joe/out.xyz</span></pre></td> 120 </tr> 121 </tbody> 122 </table> 123</div> 124 125<p> 126 The above pipeline will simply copy a local file. Instead of giosink, 127we could just as well have used the filesink element here.</p> 128<div class="informalexample"> 129 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> 130 <tbody> 131 <tr> 132 <td class="listing_lines" align="right"><pre>1</pre></td> 133 <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 uridecodebin uri<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///path/to/audio.file ! audioconvert ! flacenc ! giosink location=smb://othercomputer/foo.flac</span></pre></td> 134 </tr> 135 </tbody> 136 </table> 137</div> 138 139<p> 140 The above pipeline will re-encode an audio file into FLAC format and store 141it on a remote host using the Samba protocol.</p> 142<div class="informalexample"> 143 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> 144 <tbody> 145 <tr> 146 <td class="listing_lines" align="right"><pre>1</pre></td> 147 <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 audiotestsrc num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">100</span> <span class="gtkdoc opt">!</span> vorbisenc <span class="gtkdoc opt">!</span> oggmux <span class="gtkdoc opt">!</span> giosink location<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///home/foo/bar.ogg</span></pre></td> 148 </tr> 149 </tbody> 150 </table> 151</div> 152 153<p> 154 The above pipeline will encode a 440Hz sine wave to Ogg Vorbis and stores 155it in the home directory of user foo.</p> 156</div> 157<div class="refsynopsisdiv"> 158<h2>Synopsis</h2> 159<div class="refsect2"> 160<a name="id-1.2.20.8.6.1"></a><h3>Element Information</h3> 161<div class="variablelist"><table border="0" class="variablelist"> 162<colgroup> 163<col align="left" valign="top"> 164<col> 165</colgroup> 166<tbody> 167<tr> 168<td><p><span class="term">plugin</span></p></td> 169<td> 170 <a class="link" href="gst-plugins-base-plugins-plugin-gio.html#plugin-gio">gio</a> 171 </td> 172</tr> 173<tr> 174<td><p><span class="term">author</span></p></td> 175<td>René Stadler <mail@renestadler.de>, Sebastian Dröge <sebastian.droege@collabora.co.uk></td> 176</tr> 177<tr> 178<td><p><span class="term">class</span></p></td> 179<td>Sink/File</td> 180</tr> 181</tbody> 182</table></div> 183</div> 184<hr> 185<div class="refsect2"> 186<a name="id-1.2.20.8.6.2"></a><h3>Element Pads</h3> 187<div class="variablelist"><table border="0" class="variablelist"> 188<colgroup> 189<col align="left" valign="top"> 190<col> 191</colgroup> 192<tbody> 193<tr> 194<td><p><span class="term">name</span></p></td> 195<td>sink</td> 196</tr> 197<tr> 198<td><p><span class="term">direction</span></p></td> 199<td>sink</td> 200</tr> 201<tr> 202<td><p><span class="term">presence</span></p></td> 203<td>always</td> 204</tr> 205<tr> 206<td><p><span class="term">details</span></p></td> 207<td>ANY</td> 208</tr> 209</tbody> 210</table></div> 211</div> 212</div> 213</div> 214<div class="refsect1"> 215<a name="gst-plugins-base-plugins-giosink.functions_details"></a><h2>Functions</h2> 216<p></p> 217</div> 218<div class="refsect1"> 219<a name="gst-plugins-base-plugins-giosink.other_details"></a><h2>Types and Values</h2> 220<div class="refsect2"> 221<a name="GstGioSink-struct"></a><h3>struct GstGioSink</h3> 222<pre class="programlisting">struct GstGioSink;</pre> 223<p>Opaque data structure.</p> 224</div> 225</div> 226<div class="refsect1"> 227<a name="gst-plugins-base-plugins-giosink.property-details"></a><h2>Property Details</h2> 228<div class="refsect2"> 229<a name="GstGioSink--file"></a><h3>The <code class="literal">“file”</code> property</h3> 230<pre class="programlisting"> “file” <a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> *</pre> 231<p><a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><code class="literal">GFile</code></a> to write to.</p> 232<p>Flags: Read / Write</p> 233</div> 234<hr> 235<div class="refsect2"> 236<a name="GstGioSink--location"></a><h3>The <code class="literal">“location”</code> property</h3> 237<pre class="programlisting"> “location” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre> 238<p>URI location to write to.</p> 239<p>Flags: Read / Write</p> 240<p>Default value: NULL</p> 241</div> 242</div> 243<div class="refsect1"> 244<a name="gst-plugins-base-plugins-giosink.see-also"></a><h2>See Also</h2> 245<p><a href="/usr/share/gtk-doc/html/gstreamer-plugins-1.0/gstreamer-plugins-filesink.html#GstFileSink-struct"><span class="type">GstFileSink</span></a>, <span class="type">GstGnomeVFSSink</span>, <a class="link" href="gst-plugins-base-plugins-giosrc.html#GstGioSrc"><span class="type">GstGioSrc</span></a></p> 246</div> 247</div> 248<div class="footer"> 249<hr>Generated by GTK-Doc V1.28</div> 250</body> 251</html>