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>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">
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-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>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-base-plugins-encodebin.synopsis" class="shortcut">Top</a>
26 <a href="#gst-plugins-base-plugins-encodebin.description" class="shortcut">Description</a>
28 <a href="#gst-plugins-base-plugins-encodebin.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#gst-plugins-base-plugins-encodebin.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
32 <a href="#gst-plugins-base-plugins-encodebin.properties" class="shortcut">Properties</a>
34 <a href="#gst-plugins-base-plugins-encodebin.signals" class="shortcut">Signals</a>
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>
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>
44 <td valign="top" align="right"></td>
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>;
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>
61 <div class="refsect1">
62 <a name="gst-plugins-base-plugins-encodebin.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
64 GstEncodeBin implements
65 <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstChildProxy.html">GstChildProxy</a>.</p>
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
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>
85 <div class="refsect1">
86 <a name="gst-plugins-base-plugins-encodebin.description"></a><h2>Description</h2>
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>.
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.
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
107 <li class="listitem">
108 Conversion of raw audio/video streams (scaling, framerate conversion,
109 colorspace conversion, samplerate conversion) to conform to the profile
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
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.
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.
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.
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.
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
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.
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.
163 <div class="refsynopsisdiv">
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">
171 <td><p><span class="term">plugin</span></p></td>
173 <a class="link" href="gst-plugins-base-plugins-plugin-encoding.html#plugin-encoding">encoding</a>
177 <td><p><span class="term">author</span></p></td>
178 <td>Edward Hervey <edward.hervey@collabora.co.uk></td>
181 <td><p><span class="term">class</span></p></td>
182 <td>Generic/Bin/Encoder</td>
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">
194 <td><p><span class="term">name</span></p></td>
198 <td><p><span class="term">direction</span></p></td>
202 <td><p><span class="term">presence</span></p></td>
206 <td><p><span class="term">details</span></p></td>
211 <div class="variablelist"><table border="0">
212 <col align="left" valign="top">
215 <td><p><span class="term">name</span></p></td>
219 <td><p><span class="term">direction</span></p></td>
223 <td><p><span class="term">presence</span></p></td>
227 <td><p><span class="term">details</span></p></td>
232 <div class="variablelist"><table border="0">
233 <col align="left" valign="top">
236 <td><p><span class="term">name</span></p></td>
240 <td><p><span class="term">direction</span></p></td>
244 <td><p><span class="term">presence</span></p></td>
248 <td><p><span class="term">details</span></p></td>
253 <div class="variablelist"><table border="0">
254 <col align="left" valign="top">
257 <td><p><span class="term">name</span></p></td>
261 <td><p><span class="term">direction</span></p></td>
265 <td><p><span class="term">presence</span></p></td>
269 <td><p><span class="term">details</span></p></td>
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>
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>
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>
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>
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.
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>
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>
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>
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>
338 Control the behaviour of encodebin.
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>
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.
354 <div class="variablelist"><table border="0">
355 <col align="left" valign="top">
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>
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>
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>
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>
382 Generated by GTK-Doc V1.18</div>