Tizen 2.0 Release
[framework/multimedia/gst-plugins-good0.10.git] / docs / plugins / html / gst-plugins-good-plugins-multifilesink.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>multifilesink</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GStreamer Good Plugins 0.10 Plugins Reference Manual">
8 <link rel="up" href="ch01.html" title="gst-plugins-good Elements">
9 <link rel="prev" href="gst-plugins-good-plugins-mulawenc.html" title="mulawenc">
10 <link rel="next" href="gst-plugins-good-plugins-multifilesrc.html" title="multifilesrc">
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="gst-plugins-good-plugins-mulawenc.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 Good Plugins 0.10 Plugins Reference Manual</th>
21 <td><a accesskey="n" href="gst-plugins-good-plugins-multifilesrc.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-good-plugins-multifilesink.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-good-plugins-multifilesink.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gst-plugins-good-plugins-multifilesink.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#gst-plugins-good-plugins-multifilesink.properties" class="shortcut">Properties</a>
31 </td></tr>
32 </table>
33 <div class="refentry">
34 <a name="gst-plugins-good-plugins-multifilesink"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
36 <td valign="top">
37 <h2><span class="refentrytitle"><a name="gst-plugins-good-plugins-multifilesink.top_of_page"></a>multifilesink</span></h2>
38 <p>multifilesink — Write buffers to a sequentially named set of files</p>
39 </td>
40 <td valign="top" align="right"></td>
41 </tr></table></div>
42 <div class="refsynopsisdiv">
43 <a name="gst-plugins-good-plugins-multifilesink.synopsis"></a><h2>Synopsis</h2>
44 <a name="GstMultiFileSink"></a><pre class="synopsis">struct              <a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink-struct" title="struct GstMultiFileSink">GstMultiFileSink</a>;
45 enum                <a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSinkNext" title="enum GstMultiFileSinkNext">GstMultiFileSinkNext</a>;
46 </pre>
47 </div>
48 <div class="refsect1">
49 <a name="gst-plugins-good-plugins-multifilesink.object-hierarchy"></a><h2>Object Hierarchy</h2>
50 <pre class="synopsis">
51   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
52    +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
53          +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
54                +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseSink.html">GstBaseSink</a>
55                      +----GstMultiFileSink
56 </pre>
57 </div>
58 <div class="refsect1">
59 <a name="gst-plugins-good-plugins-multifilesink.properties"></a><h2>Properties</h2>
60 <pre class="synopsis">
61   "<a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--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
62   "<a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--index" title='The "index" property'>index</a>"                    <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write
63   "<a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--next-file" title='The "next-file" property'>next-file</a>"                <a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSinkNext" title="enum GstMultiFileSinkNext"><span class="type">GstMultiFileSinkNext</span></a>  : Read / Write
64   "<a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--post-messages" title='The "post-messages" property'>post-messages</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
65   "<a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--max-files" title='The "max-files" property'>max-files</a>"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write
66   "<a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--max-file-size" title='The "max-file-size" property'>max-file-size</a>"            <span class="type">guint64</span>               : Read / Write
67 </pre>
68 </div>
69 <div class="refsect1">
70 <a name="gst-plugins-good-plugins-multifilesink.description"></a><h2>Description</h2>
71 <p>
72 Write incoming data to a series of sequentially-named files.
73 </p>
74 <p>
75 The filename property should contain a string with a %d placeholder that will
76 be substituted with the index for each filename.
77 </p>
78 <p>
79 If the <a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--post-messages" title='The "post-messages" property'><span class="type">"post-messages"</span></a> property is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a>, it sends an application
80 message named
81 <code class="classname">"GstMultiFileSink"</code> after writing each
82 buffer.
83 </p>
84 <p>
85 The message's structure contains these fields:
86 </p>
87 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
88 <li class="listitem"><p>
89   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *
90   <code class="classname">"filename"</code>:
91   the filename where the buffer was written.
92   </p></li>
93 <li class="listitem"><p>
94   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>
95   <code class="classname">"index"</code>:
96   the index of the buffer.
97   </p></li>
98 <li class="listitem"><p>
99   <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a>
100   <code class="classname">"timestamp"</code>:
101   the timestamp of the buffer.
102   </p></li>
103 <li class="listitem"><p>
104   <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a>
105   <code class="classname">"stream-time"</code>:
106   the stream time of the buffer.
107   </p></li>
108 <li class="listitem"><p>
109   <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a>
110   <code class="classname">"running-time"</code>:
111   the running_time of the buffer.
112   </p></li>
113 <li class="listitem"><p>
114   <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a>
115   <code class="classname">"duration"</code>:
116   the duration of the buffer.
117   </p></li>
118 <li class="listitem"><p>
119   <span class="type">guint64</span>
120   <code class="classname">"offset"</code>:
121   the offset of the buffer that triggered the message.
122   </p></li>
123 <li class="listitem"><p>
124   <span class="type">guint64</span>
125   <code class="classname">"offset-end"</code>:
126   the offset-end of the buffer that triggered the message.
127   </p></li>
128 </ul></div>
129 <p>
130 </p>
131 <p>
132 </p>
133 <div class="refsect2">
134 <a name="idp14636848"></a><h3>Example launch line</h3>
135 <div class="informalexample">
136   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
137     <tbody>
138       <tr>
139         <td class="listing_lines" align="right"><pre>1
140 2</pre></td>
141         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch audiotestsrc <span class="gtkdoc opt">!</span> multifilesink
142 gst<span class="gtkdoc opt">-</span>launch videotestsrc <span class="gtkdoc opt">!</span> multifilesink post<span class="gtkdoc opt">-</span>messages<span class="gtkdoc opt">=</span><span class="keyword">true</span> filename<span class="gtkdoc opt">=</span><span class="string">&quot;frame%d&quot;</span></pre></td>
143       </tr>
144     </tbody>
145   </table>
146 </div>
147
148 </div>
149 <p>
150 </p>
151 <p>
152 Last reviewed on 2009-09-11 (0.10.17)
153 </p>
154 <div class="refsynopsisdiv">
155 <h2>Synopsis</h2>
156 <div class="refsect2">
157 <a name="idp17249696"></a><h3>Element Information</h3>
158 <div class="variablelist"><table border="0">
159 <col align="left" valign="top">
160 <tbody>
161 <tr>
162 <td><p><span class="term">plugin</span></p></td>
163 <td>
164             <a class="link" href="gst-plugins-good-plugins-plugin-multifile.html#plugin-multifile">multifile</a>
165           </td>
166 </tr>
167 <tr>
168 <td><p><span class="term">author</span></p></td>
169 <td>David Schleef &lt;ds@schleef.org&gt;</td>
170 </tr>
171 <tr>
172 <td><p><span class="term">class</span></p></td>
173 <td>Sink/File</td>
174 </tr>
175 </tbody>
176 </table></div>
177 </div>
178 <hr>
179 <div class="refsect2">
180 <a name="idp13190480"></a><h3>Element Pads</h3>
181 <div class="variablelist"><table border="0">
182 <col align="left" valign="top">
183 <tbody>
184 <tr>
185 <td><p><span class="term">name</span></p></td>
186 <td>sink</td>
187 </tr>
188 <tr>
189 <td><p><span class="term">direction</span></p></td>
190 <td>sink</td>
191 </tr>
192 <tr>
193 <td><p><span class="term">presence</span></p></td>
194 <td>always</td>
195 </tr>
196 <tr>
197 <td><p><span class="term">details</span></p></td>
198 <td>ANY</td>
199 </tr>
200 </tbody>
201 </table></div>
202 </div>
203 </div>
204 <p>
205 </p>
206 </div>
207 <div class="refsect1">
208 <a name="gst-plugins-good-plugins-multifilesink.details"></a><h2>Details</h2>
209 <div class="refsect2">
210 <a name="GstMultiFileSink-struct"></a><h3>struct GstMultiFileSink</h3>
211 <pre class="programlisting">struct GstMultiFileSink;</pre>
212 <p>
213 </p>
214 </div>
215 <hr>
216 <div class="refsect2">
217 <a name="GstMultiFileSinkNext"></a><h3>enum GstMultiFileSinkNext</h3>
218 <pre class="programlisting">typedef enum {
219   GST_MULTI_FILE_SINK_NEXT_BUFFER,
220   GST_MULTI_FILE_SINK_NEXT_DISCONT,
221   GST_MULTI_FILE_SINK_NEXT_KEY_FRAME,
222   GST_MULTI_FILE_SINK_NEXT_KEY_UNIT_EVENT,
223   GST_MULTI_FILE_SINK_NEXT_MAX_SIZE
224 } GstMultiFileSinkNext;
225 </pre>
226 <p>
227 File splitting modes.
228 </p>
229 <div class="variablelist"><table border="0">
230 <col align="left" valign="top">
231 <tbody>
232 <tr>
233 <td><p><a name="GST-MULTI-FILE-SINK-NEXT-BUFFER:CAPS"></a><span class="term"><code class="literal">GST_MULTI_FILE_SINK_NEXT_BUFFER</code></span></p></td>
234 <td>New file for each buffer
235 </td>
236 </tr>
237 <tr>
238 <td><p><a name="GST-MULTI-FILE-SINK-NEXT-DISCONT:CAPS"></a><span class="term"><code class="literal">GST_MULTI_FILE_SINK_NEXT_DISCONT</code></span></p></td>
239 <td>New file after each discontinuity
240 </td>
241 </tr>
242 <tr>
243 <td><p><a name="GST-MULTI-FILE-SINK-NEXT-KEY-FRAME:CAPS"></a><span class="term"><code class="literal">GST_MULTI_FILE_SINK_NEXT_KEY_FRAME</code></span></p></td>
244 <td>New file at each key frame
245  (Useful for MPEG-TS segmenting)
246 </td>
247 </tr>
248 <tr>
249 <td><p><a name="GST-MULTI-FILE-SINK-NEXT-KEY-UNIT-EVENT:CAPS"></a><span class="term"><code class="literal">GST_MULTI_FILE_SINK_NEXT_KEY_UNIT_EVENT</code></span></p></td>
250 <td>New file after a force key unit
251  event (Since: 0.10.31)
252 </td>
253 </tr>
254 <tr>
255 <td><p><a name="GST-MULTI-FILE-SINK-NEXT-MAX-SIZE:CAPS"></a><span class="term"><code class="literal">GST_MULTI_FILE_SINK_NEXT_MAX_SIZE</code></span></p></td>
256 <td>New file when the configured maximum file
257  size would be exceeded with the next buffer or buffer list (Since: 0.10.31)
258 </td>
259 </tr>
260 </tbody>
261 </table></div>
262 </div>
263 </div>
264 <div class="refsect1">
265 <a name="gst-plugins-good-plugins-multifilesink.property-details"></a><h2>Property Details</h2>
266 <div class="refsect2">
267 <a name="GstMultiFileSink--location"></a><h3>The <code class="literal">"location"</code> property</h3>
268 <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>
269 <p>Location of the file to write.</p>
270 <p>Default value: NULL</p>
271 </div>
272 <hr>
273 <div class="refsect2">
274 <a name="GstMultiFileSink--index"></a><h3>The <code class="literal">"index"</code> property</h3>
275 <pre class="programlisting">  "index"                    <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write</pre>
276 <p>Index to use with location property to create file names.  The index is incremented by one for each buffer written.</p>
277 <p>Allowed values: &gt;= 0</p>
278 <p>Default value: 0</p>
279 </div>
280 <hr>
281 <div class="refsect2">
282 <a name="GstMultiFileSink--next-file"></a><h3>The <code class="literal">"next-file"</code> property</h3>
283 <pre class="programlisting">  "next-file"                <a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSinkNext" title="enum GstMultiFileSinkNext"><span class="type">GstMultiFileSinkNext</span></a>  : Read / Write</pre>
284 <p>
285 When to start a new file.
286 </p>
287 <p>Default value: New file for each buffer</p>
288 <p class="since">Since 0.10.17</p>
289 </div>
290 <hr>
291 <div class="refsect2">
292 <a name="GstMultiFileSink--post-messages"></a><h3>The <code class="literal">"post-messages"</code> property</h3>
293 <pre class="programlisting">  "post-messages"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
294 <p>
295 Post a message on the GstBus for each file.
296 </p>
297 <p>Default value: FALSE</p>
298 <p class="since">Since 0.10.17</p>
299 </div>
300 <hr>
301 <div class="refsect2">
302 <a name="GstMultiFileSink--max-files"></a><h3>The <code class="literal">"max-files"</code> property</h3>
303 <pre class="programlisting">  "max-files"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write</pre>
304 <p>
305 Maximum number of files to keep on disk. Once the maximum is reached, old
306 files start to be deleted to make room for new ones.
307 </p>
308 <p>Default value: 0</p>
309 <p class="since">Since 0.10.31</p>
310 </div>
311 <hr>
312 <div class="refsect2">
313 <a name="GstMultiFileSink--max-file-size"></a><h3>The <code class="literal">"max-file-size"</code> property</h3>
314 <pre class="programlisting">  "max-file-size"            <span class="type">guint64</span>               : Read / Write</pre>
315 <p>
316 Maximum file size before starting a new file in max-size mode.
317 </p>
318 <p>Default value: 2147483648</p>
319 <p class="since">Since 0.10.31</p>
320 </div>
321 </div>
322 <div class="refsect1">
323 <a name="gst-plugins-good-plugins-multifilesink.see-also"></a><h2>See Also</h2>
324 <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-filesrc.html#GstFileSrc"><span class="type">GstFileSrc</span></a>
325 </div>
326 </div>
327 <div class="footer">
328 <hr>
329           Generated by GTK-Doc V1.18</div>
330 </body>
331 </html>