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.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">
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>" <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
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>
84 <div class="refsect1">
85 <a name="gst-plugins-base-plugins-encodebin.description"></a><h2>Description</h2>
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>.
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.
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
106 <li class="listitem">
107 Conversion of raw audio/video streams (scaling, framerate conversion,
108 colorspace conversion, samplerate conversion) to conform to the profile
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
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.
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.
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.
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.
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
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.
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.
162 <div class="refsynopsisdiv">
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">
170 <td><p><span class="term">plugin</span></p></td>
172 <a class="link" href="gst-plugins-base-plugins-plugin-encoding.html#plugin-encoding">encoding</a>
176 <td><p><span class="term">author</span></p></td>
177 <td>Edward Hervey <edward.hervey@collabora.co.uk></td>
180 <td><p><span class="term">class</span></p></td>
181 <td>Generic/Bin/Encoder</td>
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">
193 <td><p><span class="term">name</span></p></td>
197 <td><p><span class="term">direction</span></p></td>
201 <td><p><span class="term">presence</span></p></td>
205 <td><p><span class="term">details</span></p></td>
210 <div class="variablelist"><table border="0">
211 <col align="left" valign="top">
214 <td><p><span class="term">name</span></p></td>
218 <td><p><span class="term">direction</span></p></td>
222 <td><p><span class="term">presence</span></p></td>
226 <td><p><span class="term">details</span></p></td>
231 <div class="variablelist"><table border="0">
232 <col align="left" valign="top">
235 <td><p><span class="term">name</span></p></td>
239 <td><p><span class="term">direction</span></p></td>
243 <td><p><span class="term">presence</span></p></td>
247 <td><p><span class="term">details</span></p></td>
252 <div class="variablelist"><table border="0">
253 <col align="left" valign="top">
256 <td><p><span class="term">name</span></p></td>
260 <td><p><span class="term">direction</span></p></td>
264 <td><p><span class="term">presence</span></p></td>
268 <td><p><span class="term">details</span></p></td>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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.
345 <div class="variablelist"><table border="0">
346 <col align="left" valign="top">
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>
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>
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>
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>
373 Generated by GTK-Doc V1.17</div>