e75f88617a2b1d52147337d57a719189780e0e37
[framework/multimedia/gst-plugins-base0.10.git] / docs / plugins / html / gst-plugins-base-plugins-giosink.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>giosink</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-gdppay.html" title="gdppay">
10 <link rel="next" href="gst-plugins-base-plugins-giosrc.html" title="giosrc">
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-gdppay.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-giosrc.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-giosink.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-base-plugins-giosink.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gst-plugins-base-plugins-giosink.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#gst-plugins-base-plugins-giosink.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
31                    | 
32                   <a href="#gst-plugins-base-plugins-giosink.properties" class="shortcut">Properties</a>
33 </td></tr>
34 </table>
35 <div class="refentry">
36 <a name="gst-plugins-base-plugins-giosink"></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-giosink.top_of_page"></a>giosink</span></h2>
40 <p>giosink — Write to 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-giosink.synopsis"></a><h2>Synopsis</h2>
46 <a name="GstGioSink"></a><pre class="synopsis">struct              <a class="link" href="gst-plugins-base-plugins-giosink.html#GstGioSink-struct" title="struct GstGioSink">GstGioSink</a>;
47 </pre>
48 </div>
49 <div class="refsect1">
50 <a name="gst-plugins-base-plugins-giosink.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/GstBaseSink.html">GstBaseSink</a>
56                      +----GstGioBaseSink
57                            +----GstGioSink
58 </pre>
59 </div>
60 <div class="refsect1">
61 <a name="gst-plugins-base-plugins-giosink.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
62 <p>
63 GstGioSink 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-giosink.properties"></a><h2>Properties</h2>
68 <pre class="synopsis">
69   "<a class="link" href="gst-plugins-base-plugins-giosink.html#GstGioSink--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-giosink.html#GstGioSink--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-giosink.description"></a><h2>Description</h2>
75 <p>
76 This plugin writes incoming data to 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', 'ftp',
79 or 'smb'.
80 </p>
81 <p>
82 If the URI or <a href="http://library.gnome.org/devel/gio/unstable/GFile.html"><span class="type">GFile</span></a> already exists giosink will post a message of
83 type <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 "file-exists" 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 "file-exists" message to notify the user about
86 the problem and to set a different target location or to remove the
87 existing file. Note that right after the "file-exists" message a normal
88 error message is posted on the bus which should be ignored if "file-exists"
89 is handled by the application, for example by calling
90 gst_bus_set_flushing(bus, TRUE) after the "file-exists" message was
91 received and gst_bus_set_flushing(bus, FALSE) after the problem is
92 resolved.
93 </p>
94 <p>
95 Similar to the "file-exist" message a "not-mounted" message is posted
96 on the bus if the target location is not mounted yet and needs to be
97 mounted. This message can be used by application to mount the location
98 and retry after the location was mounted successfully.
99 </p>
100 <p>
101 </p>
102 <div class="refsect2">
103 <a name="idp11111376"></a><h3>Example pipelines</h3>
104 <div class="informalexample">
105   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
106     <tbody>
107       <tr>
108         <td class="listing_lines" align="right"><pre>1</pre></td>
109         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <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>
110       </tr>
111     </tbody>
112   </table>
113 </div>
114  The above pipeline will simply copy a local file. Instead of giosink,
115 we could just as well have used the filesink element here.
116 <div class="informalexample">
117   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
118     <tbody>
119       <tr>
120         <td class="listing_lines" align="right"><pre>1</pre></td>
121         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>foo<span class="gtkdoc opt">.</span>mp3 <span class="gtkdoc opt">!</span> mad <span class="gtkdoc opt">!</span> flacenc <span class="gtkdoc opt">!</span> giosink location<span class="gtkdoc opt">=</span>smb<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//othercomputer/foo.flac</span></pre></td>
122       </tr>
123     </tbody>
124   </table>
125 </div>
126  The above pipeline will re-encode an mp3 file into FLAC format and store
127 it on a remote host using the Samba protocol.
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>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>
134       </tr>
135     </tbody>
136   </table>
137 </div>
138  The above pipeline will encode a 440Hz sine wave to Ogg Vorbis and stores
139 it in the home directory of user foo.
140 </div>
141 <p>
142 </p>
143 <div class="refsynopsisdiv">
144 <h2>Synopsis</h2>
145 <div class="refsect2">
146 <a name="idp10531904"></a><h3>Element Information</h3>
147 <div class="variablelist"><table border="0">
148 <col align="left" valign="top">
149 <tbody>
150 <tr>
151 <td><p><span class="term">plugin</span></p></td>
152 <td>
153             <a class="link" href="gst-plugins-base-plugins-plugin-gio.html#plugin-gio">gio</a>
154           </td>
155 </tr>
156 <tr>
157 <td><p><span class="term">author</span></p></td>
158 <td>René Stadler &lt;mail@renestadler.de&gt;, Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</td>
159 </tr>
160 <tr>
161 <td><p><span class="term">class</span></p></td>
162 <td>Sink/File</td>
163 </tr>
164 </tbody>
165 </table></div>
166 </div>
167 <hr>
168 <div class="refsect2">
169 <a name="idp10539424"></a><h3>Element Pads</h3>
170 <div class="variablelist"><table border="0">
171 <col align="left" valign="top">
172 <tbody>
173 <tr>
174 <td><p><span class="term">name</span></p></td>
175 <td>sink</td>
176 </tr>
177 <tr>
178 <td><p><span class="term">direction</span></p></td>
179 <td>sink</td>
180 </tr>
181 <tr>
182 <td><p><span class="term">presence</span></p></td>
183 <td>always</td>
184 </tr>
185 <tr>
186 <td><p><span class="term">details</span></p></td>
187 <td>ANY</td>
188 </tr>
189 </tbody>
190 </table></div>
191 </div>
192 </div>
193 <p>
194 </p>
195 </div>
196 <div class="refsect1">
197 <a name="gst-plugins-base-plugins-giosink.details"></a><h2>Details</h2>
198 <div class="refsect2">
199 <a name="GstGioSink-struct"></a><h3>struct GstGioSink</h3>
200 <pre class="programlisting">struct GstGioSink;</pre>
201 <p>
202 Opaque data structure.
203 </p>
204 </div>
205 </div>
206 <div class="refsect1">
207 <a name="gst-plugins-base-plugins-giosink.property-details"></a><h2>Property Details</h2>
208 <div class="refsect2">
209 <a name="GstGioSink--location"></a><h3>The <code class="literal">"location"</code> property</h3>
210 <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>
211 <p>URI location to write to.</p>
212 <p>Default value: NULL</p>
213 </div>
214 <hr>
215 <div class="refsect2">
216 <a name="GstGioSink--file"></a><h3>The <code class="literal">"file"</code> property</h3>
217 <pre class="programlisting">  "file"                     <a href="http://library.gnome.org/devel/gio/unstable/GFile.html"><span class="type">GFile</span></a>*                : Read / Write</pre>
218 <p>
219 <a href="http://library.gnome.org/devel/gio/unstable/GFile.html"><code class="literal">GFile</code></a> to write to.
220 </p>
221 <p class="since">Since 0.10.20</p>
222 </div>
223 </div>
224 <div class="refsect1">
225 <a name="gst-plugins-base-plugins-giosink.see-also"></a><h2>See Also</h2>
226 <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-filesink.html#GstFileSink"><span class="type">GstFileSink</span></a>, <a class="link" href="gst-plugins-base-plugins-gnomevfssink.html#GstGnomeVFSSink"><span class="type">GstGnomeVFSSink</span></a>, <a class="link" href="gst-plugins-base-plugins-giosrc.html#GstGioSrc"><span class="type">GstGioSrc</span></a>
227 </div>
228 </div>
229 <div class="footer">
230 <hr>
231           Generated by GTK-Doc V1.17</div>
232 </body>
233 </html>