1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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">
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">
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>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-good-plugins-multifilesink.synopsis" class="shortcut">Top</a>
26 <a href="#gst-plugins-good-plugins-multifilesink.description" class="shortcut">Description</a>
28 <a href="#gst-plugins-good-plugins-multifilesink.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#gst-plugins-good-plugins-multifilesink.properties" class="shortcut">Properties</a>
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>
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>
40 <td valign="top" align="right"></td>
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>;
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>
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
69 <div class="refsect1">
70 <a name="gst-plugins-good-plugins-multifilesink.description"></a><h2>Description</h2>
72 Write incoming data to a series of sequentially-named files.
75 The filename property should contain a string with a %d placeholder that will
76 be substituted with the index for each filename.
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
81 <code class="classname">"GstMultiFileSink"</code> after writing each
85 The message's structure contains these fields:
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.
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.
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.
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.
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.
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.
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.
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.
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">
139 <td class="listing_lines" align="right"><pre>1
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">"frame%d"</span></pre></td>
152 Last reviewed on 2009-09-11 (0.10.17)
154 <div class="refsynopsisdiv">
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">
162 <td><p><span class="term">plugin</span></p></td>
164 <a class="link" href="gst-plugins-good-plugins-plugin-multifile.html#plugin-multifile">multifile</a>
168 <td><p><span class="term">author</span></p></td>
169 <td>David Schleef <ds@schleef.org></td>
172 <td><p><span class="term">class</span></p></td>
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">
185 <td><p><span class="term">name</span></p></td>
189 <td><p><span class="term">direction</span></p></td>
193 <td><p><span class="term">presence</span></p></td>
197 <td><p><span class="term">details</span></p></td>
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>
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;
227 File splitting modes.
229 <div class="variablelist"><table border="0">
230 <col align="left" valign="top">
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
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
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)
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)
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)
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>
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: >= 0</p>
278 <p>Default value: 0</p>
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>
285 When to start a new file.
287 <p>Default value: New file for each buffer</p>
288 <p class="since">Since 0.10.17</p>
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>
295 Post a message on the GstBus for each file.
297 <p>Default value: FALSE</p>
298 <p class="since">Since 0.10.17</p>
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>
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.
308 <p>Default value: 0</p>
309 <p class="since">Since 0.10.31</p>
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>
316 Maximum file size before starting a new file in max-size mode.
318 <p>Default value: 2147483648</p>
319 <p class="since">Since 0.10.31</p>
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>
329 Generated by GTK-Doc V1.18</div>