tizen 2.0 init
[framework/multimedia/gst-plugins-base0.10.git] / docs / plugins / html / gst-plugins-base-plugins-encodebin.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>encodebin</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
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-decodebin2.html" title="decodebin2">
10 <link rel="next" href="gst-plugins-base-plugins-ffmpegcolorspace.html" title="ffmpegcolorspace">
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-base-plugins-decodebin2.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-ffmpegcolorspace.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-encodebin.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-base-plugins-encodebin.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gst-plugins-base-plugins-encodebin.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#gst-plugins-base-plugins-encodebin.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
31                    | 
32                   <a href="#gst-plugins-base-plugins-encodebin.properties" class="shortcut">Properties</a>
33                    | 
34                   <a href="#gst-plugins-base-plugins-encodebin.signals" class="shortcut">Signals</a>
35 </td></tr>
36 </table>
37 <div class="refentry">
38 <a name="gst-plugins-base-plugins-encodebin"></a><div class="titlepage"></div>
39 <div class="refnamediv"><table width="100%"><tr>
40 <td valign="top">
41 <h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-encodebin.top_of_page"></a>encodebin</span></h2>
42 <p>encodebin — Convenience encoding/muxing element</p>
43 </td>
44 <td valign="top" align="right"></td>
45 </tr></table></div>
46 <div class="refsynopsisdiv">
47 <a name="gst-plugins-base-plugins-encodebin.synopsis"></a><h2>Synopsis</h2>
48 <a name="GstEncodeBin"></a><pre class="synopsis">                    <a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin-struct" title="GstEncodeBin">GstEncodeBin</a>;
49 </pre>
50 </div>
51 <div class="refsect1">
52 <a name="gst-plugins-base-plugins-encodebin.object-hierarchy"></a><h2>Object Hierarchy</h2>
53 <pre class="synopsis">
54   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
55    +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
56          +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
57                +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBin.html">GstBin</a>
58                      +----GstEncodeBin
59 </pre>
60 </div>
61 <div class="refsect1">
62 <a name="gst-plugins-base-plugins-encodebin.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
63 <p>
64 GstEncodeBin implements
65  <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstChildProxy.html">GstChildProxy</a>.</p>
66 </div>
67 <div class="refsect1">
68 <a name="gst-plugins-base-plugins-encodebin.properties"></a><h2>Properties</h2>
69 <pre class="synopsis">
70   "<a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin--audio-jitter-tolerance" title='The "audio-jitter-tolerance" property'>audio-jitter-tolerance</a>"   <span class="type">guint64</span>               : Read / Write
71   "<a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin--avoid-reencoding" title='The "avoid-reencoding" property'>avoid-reencoding</a>"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
72   "<a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin--profile" title='The "profile" property'>profile</a>"                  <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-encoding-profile.html#GstEncodingProfile"><span class="type">GstEncodingProfile</span></a>*   : Read / Write
73   "<a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin--queue-buffers-max" title='The "queue-buffers-max" property'>queue-buffers-max</a>"        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write
74   "<a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin--queue-bytes-max" title='The "queue-bytes-max" property'>queue-bytes-max</a>"          <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write
75   "<a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin--queue-time-max" title='The "queue-time-max" property'>queue-time-max</a>"           <span class="type">guint64</span>               : Read / Write
76   "<a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin--flags" title='The "flags" property'>flags</a>"                    <span class="type">GstEncFlags</span>           : Read / Write
77 </pre>
78 </div>
79 <div class="refsect1">
80 <a name="gst-plugins-base-plugins-encodebin.signals"></a><h2>Signals</h2>
81 <pre class="synopsis">
82   "<a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin-request-pad" title='The "request-pad" signal'>request-pad</a>"                                    : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a>
83 </pre>
84 </div>
85 <div class="refsect1">
86 <a name="gst-plugins-base-plugins-encodebin.description"></a><h2>Description</h2>
87 <p>
88 EncodeBin provides a bin for encoding/muxing various streams according to
89 a specified <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-encoding-profile.html#GstEncodingProfile"><span class="type">GstEncodingProfile</span></a>.
90 </p>
91 <p>
92 Based on the profile that was set (via the <a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin--profile" title='The "profile" property'><span class="type">"profile"</span></a> property),
93 EncodeBin will internally select and configure the required elements
94 (encoders, muxers, but also audio and video converters) so that you can
95 provide it raw or pre-encoded streams of data in input and have your
96 encoded/muxed/converted stream in output.
97 </p>
98 <p>
99 </p>
100 <div class="refsect2">
101 <a name="idp7547488"></a><h3>Features</h3>
102 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
103 <li class="listitem">
104 Automatic encoder and muxer selection based on elements available on the
105 system.
106 </li>
107 <li class="listitem">
108 Conversion of raw audio/video streams (scaling, framerate conversion,
109 colorspace conversion, samplerate conversion) to conform to the profile
110 output format.
111 </li>
112 <li class="listitem">
113 Variable number of streams. If the presence property for a stream encoding
114 profile is 0, you can request any number of sink pads for it via the
115 standard request pad gstreamer API or the <a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin-request-pad" title='The "request-pad" signal'><span class="type">"request-pad"</span></a> action
116 signal.
117 </li>
118 <li class="listitem">
119 Avoid reencoding (passthrough). If the input stream is already encoded and is
120 compatible with what the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-encoding-profile.html#GstEncodingProfile"><span class="type">GstEncodingProfile</span></a> expects, then the stream won't
121 be re-encoded but just passed through downstream to the muxer or the output.
122 </li>
123 <li class="listitem">
124 Mix pre-encoded and raw streams as input. In addition to the passthrough
125 feature above, you can feed both raw audio/video *AND* already-encoded data
126 to a pad. <a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin"><span class="type">GstEncodeBin</span></a> will take care of passing through the compatible
127 segments and re-encoding the segments of media that need encoding.
128 </li>
129 <li class="listitem">
130 Standard behaviour is to use a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-encoding-profile.html#GstEncodingContainerProfile"><span class="type">GstEncodingContainerProfile</span></a> to have both
131 encoding and muxing performed. But you can also provide a single stream
132 profile (like <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-encoding-profile.html#GstEncodingAudioProfile"><span class="type">GstEncodingAudioProfile</span></a>) to only have the encoding done and
133 handle the encoded output yourself.
134 </li>
135 <li class="listitem">
136 Audio imperfection corrections. Incoming audio streams can have non perfect
137 timestamps (jitter), like the streams coming from ASF files. <a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin"><span class="type">GstEncodeBin</span></a>
138 will automatically fix those imperfections for you. See
139 <a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin--audio-jitter-tolerance" title='The "audio-jitter-tolerance" property'><span class="type">"audio-jitter-tolerance"</span></a> for more details.
140 </li>
141 <li class="listitem">
142 Variable or Constant video framerate. If your <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-encoding-profile.html#GstEncodingVideoProfile"><span class="type">GstEncodingVideoProfile</span></a> has
143 the variableframerate property deactivated (default), then the incoming
144 raw video stream will be retimestampped in order to produce a constant
145 framerate.
146 </li>
147 <li class="listitem">
148 Cross-boundary re-encoding. When feeding compatible pre-encoded streams that
149 fall on segment boundaries, and for supported formats (right now only H263),
150 the GOP will be decoded/reencoded when needed to produce an encoded output
151 that fits exactly within the request GstSegment.
152 </li>
153 <li class="listitem">
154 Missing plugin support. If a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> is missing to encode/mux to the
155 request profile formats, a missing-plugin <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMessage.html#GstMessage"><span class="type">GstMessage</span></a> will be posted on the
156 <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBus.html"><span class="type">GstBus</span></a>, allowing systems that support the missing-plugin system to offer the
157 user a way to install the missing element.
158 </li>
159 </ul></div>
160 </div>
161 <p>
162 </p>
163 <div class="refsynopsisdiv">
164 <h2>Synopsis</h2>
165 <div class="refsect2">
166 <a name="idp5633232"></a><h3>Element Information</h3>
167 <div class="variablelist"><table border="0">
168 <col align="left" valign="top">
169 <tbody>
170 <tr>
171 <td><p><span class="term">plugin</span></p></td>
172 <td>
173             <a class="link" href="gst-plugins-base-plugins-plugin-encoding.html#plugin-encoding">encoding</a>
174           </td>
175 </tr>
176 <tr>
177 <td><p><span class="term">author</span></p></td>
178 <td>Edward Hervey &lt;edward.hervey@collabora.co.uk&gt;</td>
179 </tr>
180 <tr>
181 <td><p><span class="term">class</span></p></td>
182 <td>Generic/Bin/Encoder</td>
183 </tr>
184 </tbody>
185 </table></div>
186 </div>
187 <hr>
188 <div class="refsect2">
189 <a name="idp5640640"></a><h3>Element Pads</h3>
190 <div class="variablelist"><table border="0">
191 <col align="left" valign="top">
192 <tbody>
193 <tr>
194 <td><p><span class="term">name</span></p></td>
195 <td>audio_%d</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>request</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 class="variablelist"><table border="0">
212 <col align="left" valign="top">
213 <tbody>
214 <tr>
215 <td><p><span class="term">name</span></p></td>
216 <td>private_%d</td>
217 </tr>
218 <tr>
219 <td><p><span class="term">direction</span></p></td>
220 <td>sink</td>
221 </tr>
222 <tr>
223 <td><p><span class="term">presence</span></p></td>
224 <td>request</td>
225 </tr>
226 <tr>
227 <td><p><span class="term">details</span></p></td>
228 <td>ANY</td>
229 </tr>
230 </tbody>
231 </table></div>
232 <div class="variablelist"><table border="0">
233 <col align="left" valign="top">
234 <tbody>
235 <tr>
236 <td><p><span class="term">name</span></p></td>
237 <td>video_%d</td>
238 </tr>
239 <tr>
240 <td><p><span class="term">direction</span></p></td>
241 <td>sink</td>
242 </tr>
243 <tr>
244 <td><p><span class="term">presence</span></p></td>
245 <td>request</td>
246 </tr>
247 <tr>
248 <td><p><span class="term">details</span></p></td>
249 <td>ANY</td>
250 </tr>
251 </tbody>
252 </table></div>
253 <div class="variablelist"><table border="0">
254 <col align="left" valign="top">
255 <tbody>
256 <tr>
257 <td><p><span class="term">name</span></p></td>
258 <td>src</td>
259 </tr>
260 <tr>
261 <td><p><span class="term">direction</span></p></td>
262 <td>source</td>
263 </tr>
264 <tr>
265 <td><p><span class="term">presence</span></p></td>
266 <td>always</td>
267 </tr>
268 <tr>
269 <td><p><span class="term">details</span></p></td>
270 <td>ANY</td>
271 </tr>
272 </tbody>
273 </table></div>
274 </div>
275 </div>
276 <p>
277 </p>
278 </div>
279 <div class="refsect1">
280 <a name="gst-plugins-base-plugins-encodebin.details"></a><h2>Details</h2>
281 <div class="refsect2">
282 <a name="GstEncodeBin-struct"></a><h3>GstEncodeBin</h3>
283 <pre class="programlisting">typedef struct _GstEncodeBin GstEncodeBin;</pre>
284 <p>
285 </p>
286 </div>
287 </div>
288 <div class="refsect1">
289 <a name="gst-plugins-base-plugins-encodebin.property-details"></a><h2>Property Details</h2>
290 <div class="refsect2">
291 <a name="GstEncodeBin--audio-jitter-tolerance"></a><h3>The <code class="literal">"audio-jitter-tolerance"</code> property</h3>
292 <pre class="programlisting">  "audio-jitter-tolerance"   <span class="type">guint64</span>               : Read / Write</pre>
293 <p>Amount of timestamp jitter/imperfection to allow on audio streams before inserting/dropping samples (ns).</p>
294 <p>Default value: 20000000</p>
295 </div>
296 <hr>
297 <div class="refsect2">
298 <a name="GstEncodeBin--avoid-reencoding"></a><h3>The <code class="literal">"avoid-reencoding"</code> property</h3>
299 <pre class="programlisting">  "avoid-reencoding"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
300 <p>Whether to re-encode portions of compatible video streams that lay on segment boundaries.</p>
301 <p>Default value: FALSE</p>
302 </div>
303 <hr>
304 <div class="refsect2">
305 <a name="GstEncodeBin--profile"></a><h3>The <code class="literal">"profile"</code> property</h3>
306 <pre class="programlisting">  "profile"                  <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-encoding-profile.html#GstEncodingProfile"><span class="type">GstEncodingProfile</span></a>*   : Read / Write</pre>
307 <p>
308 The <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-encoding-profile.html#GstEncodingProfile"><span class="type">GstEncodingProfile</span></a> to use. This property must be set before going
309 to <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#GST-STATE-PAUSED:CAPS"><code class="literal">GST_STATE_PAUSED</code></a> or higher.
310 </p>
311 </div>
312 <hr>
313 <div class="refsect2">
314 <a name="GstEncodeBin--queue-buffers-max"></a><h3>The <code class="literal">"queue-buffers-max"</code> property</h3>
315 <pre class="programlisting">  "queue-buffers-max"        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write</pre>
316 <p>Max. number of buffers in the queue (0=disable).</p>
317 <p>Default value: 200</p>
318 </div>
319 <hr>
320 <div class="refsect2">
321 <a name="GstEncodeBin--queue-bytes-max"></a><h3>The <code class="literal">"queue-bytes-max"</code> property</h3>
322 <pre class="programlisting">  "queue-bytes-max"          <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write</pre>
323 <p>Max. amount of data in the queue (bytes, 0=disable).</p>
324 <p>Default value: 10485760</p>
325 </div>
326 <hr>
327 <div class="refsect2">
328 <a name="GstEncodeBin--queue-time-max"></a><h3>The <code class="literal">"queue-time-max"</code> property</h3>
329 <pre class="programlisting">  "queue-time-max"           <span class="type">guint64</span>               : Read / Write</pre>
330 <p>Max. amount of data in the queue (in ns, 0=disable).</p>
331 <p>Default value: 1000000000</p>
332 </div>
333 <hr>
334 <div class="refsect2">
335 <a name="GstEncodeBin--flags"></a><h3>The <code class="literal">"flags"</code> property</h3>
336 <pre class="programlisting">  "flags"                    <span class="type">GstEncFlags</span>           : Read / Write</pre>
337 <p>
338 Control the behaviour of encodebin.
339 </p>
340 </div>
341 </div>
342 <div class="refsect1">
343 <a name="gst-plugins-base-plugins-encodebin.signal-details"></a><h2>Signal Details</h2>
344 <div class="refsect2">
345 <a name="GstEncodeBin-request-pad"></a><h3>The <code class="literal">"request-pad"</code> signal</h3>
346 <pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="returnvalue">GstPad</span></a>*             user_function                      (<a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin"><span class="type">GstEncodeBin</span></a> *encodebin,
347                                                         <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a>      *caps,
348                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a></pre>
349 <p>
350 Use this method to request an unused sink request <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> that can take the
351 provided <em class="parameter"><code>caps</code></em> as input. You must release the pad with
352 <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#gst-element-release-request-pad"><code class="function">gst_element_release_request_pad()</code></a> when you are done with it.
353 </p>
354 <div class="variablelist"><table border="0">
355 <col align="left" valign="top">
356 <tbody>
357 <tr>
358 <td><p><span class="term"><em class="parameter"><code>encodebin</code></em> :</span></p></td>
359 <td>a <a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin"><span class="type">GstEncodeBin</span></a> instance</td>
360 </tr>
361 <tr>
362 <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
363 <td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a>
364 </td>
365 </tr>
366 <tr>
367 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
368 <td>user data set when the signal handler was connected.</td>
369 </tr>
370 <tr>
371 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
372 <td>A compatible <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no compatible <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> could be
373 created or is available.</td>
374 </tr>
375 </tbody>
376 </table></div>
377 </div>
378 </div>
379 </div>
380 <div class="footer">
381 <hr>
382           Generated by GTK-Doc V1.18</div>
383 </body>
384 </html>