3457ee3c6dcb22ca99ce1333ddadeb9bb70485e6
[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.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-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.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-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>"   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a>               : 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>"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a>               : Read / Write
76 </pre>
77 </div>
78 <div class="refsect1">
79 <a name="gst-plugins-base-plugins-encodebin.signals"></a><h2>Signals</h2>
80 <pre class="synopsis">
81   "<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>
82 </pre>
83 </div>
84 <div class="refsect1">
85 <a name="gst-plugins-base-plugins-encodebin.description"></a><h2>Description</h2>
86 <p>
87 EncodeBin provides a bin for encoding/muxing various streams according to
88 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>.
89 </p>
90 <p>
91 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),
92 EncodeBin will internally select and configure the required elements
93 (encoders, muxers, but also audio and video converters) so that you can
94 provide it raw or pre-encoded streams of data in input and have your
95 encoded/muxed/converted stream in output.
96 </p>
97 <p>
98 </p>
99 <div class="refsect2">
100 <a name="idp6809216"></a><h3>Features</h3>
101 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
102 <li class="listitem">
103 Automatic encoder and muxer selection based on elements available on the
104 system.
105 </li>
106 <li class="listitem">
107 Conversion of raw audio/video streams (scaling, framerate conversion,
108 colorspace conversion, samplerate conversion) to conform to the profile
109 output format.
110 </li>
111 <li class="listitem">
112 Variable number of streams. If the presence property for a stream encoding
113 profile is 0, you can request any number of sink pads for it via the
114 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
115 signal.
116 </li>
117 <li class="listitem">
118 Avoid reencoding (passthrough). If the input stream is already encoded and is
119 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
120 be re-encoded but just passed through downstream to the muxer or the output.
121 </li>
122 <li class="listitem">
123 Mix pre-encoded and raw streams as input. In addition to the passthrough
124 feature above, you can feed both raw audio/video *AND* already-encoded data
125 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
126 segments and re-encoding the segments of media that need encoding.
127 </li>
128 <li class="listitem">
129 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
130 encoding and muxing performed. But you can also provide a single stream
131 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
132 handle the encoded output yourself.
133 </li>
134 <li class="listitem">
135 Audio imperfection corrections. Incoming audio streams can have non perfect
136 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>
137 will automatically fix those imperfections for you. See
138 <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.
139 </li>
140 <li class="listitem">
141 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
142 the variableframerate property deactivated (default), then the incoming
143 raw video stream will be retimestampped in order to produce a constant
144 framerate.
145 </li>
146 <li class="listitem">
147 Cross-boundary re-encoding. When feeding compatible pre-encoded streams that
148 fall on segment boundaries, and for supported formats (right now only H263),
149 the GOP will be decoded/reencoded when needed to produce an encoded output
150 that fits exactly within the request GstSegment.
151 </li>
152 <li class="listitem">
153 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
154 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
155 <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
156 user a way to install the missing element.
157 </li>
158 </ul></div>
159 </div>
160 <p>
161 </p>
162 <div class="refsynopsisdiv">
163 <h2>Synopsis</h2>
164 <div class="refsect2">
165 <a name="idp11211984"></a><h3>Element Information</h3>
166 <div class="variablelist"><table border="0">
167 <col align="left" valign="top">
168 <tbody>
169 <tr>
170 <td><p><span class="term">plugin</span></p></td>
171 <td>
172             <a class="link" href="gst-plugins-base-plugins-plugin-encoding.html#plugin-encoding">encoding</a>
173           </td>
174 </tr>
175 <tr>
176 <td><p><span class="term">author</span></p></td>
177 <td>Edward Hervey &lt;edward.hervey@collabora.co.uk&gt;</td>
178 </tr>
179 <tr>
180 <td><p><span class="term">class</span></p></td>
181 <td>Generic/Bin/Encoder</td>
182 </tr>
183 </tbody>
184 </table></div>
185 </div>
186 <hr>
187 <div class="refsect2">
188 <a name="idp11219392"></a><h3>Element Pads</h3>
189 <div class="variablelist"><table border="0">
190 <col align="left" valign="top">
191 <tbody>
192 <tr>
193 <td><p><span class="term">name</span></p></td>
194 <td>audio_%d</td>
195 </tr>
196 <tr>
197 <td><p><span class="term">direction</span></p></td>
198 <td>sink</td>
199 </tr>
200 <tr>
201 <td><p><span class="term">presence</span></p></td>
202 <td>request</td>
203 </tr>
204 <tr>
205 <td><p><span class="term">details</span></p></td>
206 <td>ANY</td>
207 </tr>
208 </tbody>
209 </table></div>
210 <div class="variablelist"><table border="0">
211 <col align="left" valign="top">
212 <tbody>
213 <tr>
214 <td><p><span class="term">name</span></p></td>
215 <td>private_%d</td>
216 </tr>
217 <tr>
218 <td><p><span class="term">direction</span></p></td>
219 <td>sink</td>
220 </tr>
221 <tr>
222 <td><p><span class="term">presence</span></p></td>
223 <td>request</td>
224 </tr>
225 <tr>
226 <td><p><span class="term">details</span></p></td>
227 <td>ANY</td>
228 </tr>
229 </tbody>
230 </table></div>
231 <div class="variablelist"><table border="0">
232 <col align="left" valign="top">
233 <tbody>
234 <tr>
235 <td><p><span class="term">name</span></p></td>
236 <td>video_%d</td>
237 </tr>
238 <tr>
239 <td><p><span class="term">direction</span></p></td>
240 <td>sink</td>
241 </tr>
242 <tr>
243 <td><p><span class="term">presence</span></p></td>
244 <td>request</td>
245 </tr>
246 <tr>
247 <td><p><span class="term">details</span></p></td>
248 <td>ANY</td>
249 </tr>
250 </tbody>
251 </table></div>
252 <div class="variablelist"><table border="0">
253 <col align="left" valign="top">
254 <tbody>
255 <tr>
256 <td><p><span class="term">name</span></p></td>
257 <td>src</td>
258 </tr>
259 <tr>
260 <td><p><span class="term">direction</span></p></td>
261 <td>source</td>
262 </tr>
263 <tr>
264 <td><p><span class="term">presence</span></p></td>
265 <td>always</td>
266 </tr>
267 <tr>
268 <td><p><span class="term">details</span></p></td>
269 <td>ANY</td>
270 </tr>
271 </tbody>
272 </table></div>
273 </div>
274 </div>
275 <p>
276 </p>
277 </div>
278 <div class="refsect1">
279 <a name="gst-plugins-base-plugins-encodebin.details"></a><h2>Details</h2>
280 <div class="refsect2">
281 <a name="GstEncodeBin-struct"></a><h3>GstEncodeBin</h3>
282 <pre class="programlisting">typedef struct _GstEncodeBin GstEncodeBin;</pre>
283 <p>
284 </p>
285 </div>
286 </div>
287 <div class="refsect1">
288 <a name="gst-plugins-base-plugins-encodebin.property-details"></a><h2>Property Details</h2>
289 <div class="refsect2">
290 <a name="GstEncodeBin--audio-jitter-tolerance"></a><h3>The <code class="literal">"audio-jitter-tolerance"</code> property</h3>
291 <pre class="programlisting">  "audio-jitter-tolerance"   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a>               : Read / Write</pre>
292 <p>Amount of timestamp jitter/imperfection to allow on audio streams before inserting/dropping samples (ns).</p>
293 <p>Default value: 20000000</p>
294 </div>
295 <hr>
296 <div class="refsect2">
297 <a name="GstEncodeBin--avoid-reencoding"></a><h3>The <code class="literal">"avoid-reencoding"</code> property</h3>
298 <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>
299 <p>Whether to re-encode portions of compatible video streams that lay on segment boundaries.</p>
300 <p>Default value: FALSE</p>
301 </div>
302 <hr>
303 <div class="refsect2">
304 <a name="GstEncodeBin--profile"></a><h3>The <code class="literal">"profile"</code> property</h3>
305 <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>
306 <p>
307 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
308 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.
309 </p>
310 </div>
311 <hr>
312 <div class="refsect2">
313 <a name="GstEncodeBin--queue-buffers-max"></a><h3>The <code class="literal">"queue-buffers-max"</code> property</h3>
314 <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>
315 <p>Max. number of buffers in the queue (0=disable).</p>
316 <p>Default value: 200</p>
317 </div>
318 <hr>
319 <div class="refsect2">
320 <a name="GstEncodeBin--queue-bytes-max"></a><h3>The <code class="literal">"queue-bytes-max"</code> property</h3>
321 <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>
322 <p>Max. amount of data in the queue (bytes, 0=disable).</p>
323 <p>Default value: 10485760</p>
324 </div>
325 <hr>
326 <div class="refsect2">
327 <a name="GstEncodeBin--queue-time-max"></a><h3>The <code class="literal">"queue-time-max"</code> property</h3>
328 <pre class="programlisting">  "queue-time-max"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a>               : Read / Write</pre>
329 <p>Max. amount of data in the queue (in ns, 0=disable).</p>
330 <p>Default value: 1000000000</p>
331 </div>
332 </div>
333 <div class="refsect1">
334 <a name="gst-plugins-base-plugins-encodebin.signal-details"></a><h2>Signal Details</h2>
335 <div class="refsect2">
336 <a name="GstEncodeBin-request-pad"></a><h3>The <code class="literal">"request-pad"</code> signal</h3>
337 <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,
338                                                         <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a>      *caps,
339                                                         <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>
340 <p>
341 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
342 provided <em class="parameter"><code>caps</code></em> as input. You must release the pad with
343 <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.
344 </p>
345 <div class="variablelist"><table border="0">
346 <col align="left" valign="top">
347 <tbody>
348 <tr>
349 <td><p><span class="term"><em class="parameter"><code>encodebin</code></em> :</span></p></td>
350 <td>a <a class="link" href="gst-plugins-base-plugins-encodebin.html#GstEncodeBin"><span class="type">GstEncodeBin</span></a> instance</td>
351 </tr>
352 <tr>
353 <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
354 <td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a>
355 </td>
356 </tr>
357 <tr>
358 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
359 <td>user data set when the signal handler was connected.</td>
360 </tr>
361 <tr>
362 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
363 <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
364 created or is available.</td>
365 </tr>
366 </tbody>
367 </table></div>
368 </div>
369 </div>
370 </div>
371 <div class="footer">
372 <hr>
373           Generated by GTK-Doc V1.17</div>
374 </body>
375 </html>