• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>videobox: GStreamer Good Plugins 1.0 Plugins Reference Manual</title>
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="index.html" title="GStreamer Good Plugins 1.0 Plugins Reference Manual">
8<link rel="up" href="ch01.html" title="gst-plugins-good Elements">
9<link rel="prev" href="gst-plugins-good-plugins-videobalance.html" title="videobalance">
10<link rel="next" href="gst-plugins-good-plugins-videocrop.html" title="videocrop">
11<meta name="generator" content="GTK-Doc V1.28 (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="5"><tr valign="middle">
16<td width="100%" align="left" class="shortcuts">
17<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span18                  <a href="#gst-plugins-good-plugins-videobox.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span19                  <a href="#gst-plugins-good-plugins-videobox.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span20                  <a href="#gst-plugins-good-plugins-videobox.properties" class="shortcut">Properties</a></span>
21</td>
22<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
23<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
24<td><a accesskey="p" href="gst-plugins-good-plugins-videobalance.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
25<td><a accesskey="n" href="gst-plugins-good-plugins-videocrop.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
26</tr></table>
27<div class="refentry">
28<a name="gst-plugins-good-plugins-videobox"></a><div class="titlepage"></div>
29<div class="refnamediv"><table width="100%"><tr>
30<td valign="top">
31<h2><span class="refentrytitle"><a name="gst-plugins-good-plugins-videobox.top_of_page"></a>videobox</span></h2>
32<p>videobox</p>
33</td>
34<td class="gallery_image" valign="top" align="right"></td>
35</tr></table></div>
36<div class="refsect1">
37<a name="gst-plugins-good-plugins-videobox.properties"></a><h2>Properties</h2>
38<div class="informaltable"><table class="informaltable" border="0">
39<colgroup>
40<col width="150px" class="properties_type">
41<col width="300px" class="properties_name">
42<col width="200px" class="properties_flags">
43</colgroup>
44<tbody>
45<tr>
46<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td>
47<td class="property_name"><a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBox--alpha" title="The “alpha” property">alpha</a></td>
48<td class="property_flags">Read / Write</td>
49</tr>
50<tr>
51<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td>
52<td class="property_name"><a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBox--border-alpha" title="The “border-alpha” property">border-alpha</a></td>
53<td class="property_flags">Read / Write</td>
54</tr>
55<tr>
56<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
57<td class="property_name"><a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBox--bottom" title="The “bottom” property">bottom</a></td>
58<td class="property_flags">Read / Write</td>
59</tr>
60<tr>
61<td class="property_type"><a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBoxFill" title="enum GstVideoBoxFill"><span class="type">GstVideoBoxFill</span></a></td>
62<td class="property_name"><a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBox--fill" title="The “fill” property">fill</a></td>
63<td class="property_flags">Read / Write</td>
64</tr>
65<tr>
66<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
67<td class="property_name"><a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBox--left" title="The “left” property">left</a></td>
68<td class="property_flags">Read / Write</td>
69</tr>
70<tr>
71<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
72<td class="property_name"><a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBox--right" title="The “right” property">right</a></td>
73<td class="property_flags">Read / Write</td>
74</tr>
75<tr>
76<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
77<td class="property_name"><a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBox--top" title="The “top” property">top</a></td>
78<td class="property_flags">Read / Write</td>
79</tr>
80<tr>
81<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
82<td class="property_name"><a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBox--autocrop" title="The “autocrop” property">autocrop</a></td>
83<td class="property_flags">Read / Write</td>
84</tr>
85</tbody>
86</table></div>
87</div>
88<a name="GstVideoBox"></a><div class="refsect1">
89<a name="gst-plugins-good-plugins-videobox.other"></a><h2>Types and Values</h2>
90<div class="informaltable"><table class="informaltable" width="100%" border="0">
91<colgroup>
92<col width="150px" class="name">
93<col class="description">
94</colgroup>
95<tbody>
96<tr>
97<td class="datatype_keyword">struct</td>
98<td class="function_name"><a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBox-struct" title="struct GstVideoBox">GstVideoBox</a></td>
99</tr>
100<tr>
101<td class="datatype_keyword">enum</td>
102<td class="function_name"><a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBoxFill" title="enum GstVideoBoxFill">GstVideoBoxFill</a></td>
103</tr>
104</tbody>
105</table></div>
106</div>
107<div class="refsect1">
108<a name="gst-plugins-good-plugins-videobox.object-hierarchy"></a><h2>Object Hierarchy</h2>
109<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
110    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
111        <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a>
112            <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a>
113                <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseTransform.html#GstBaseTransform-struct">GstBaseTransform</a>
114                    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gst-plugins-base-libs-1.0/GstVideoFilter.html#GstVideoFilter-struct">GstVideoFilter</a>
115                        <span class="lineart">╰──</span> GstVideoBox
116</pre>
117</div>
118<div class="refsect1">
119<a name="gst-plugins-good-plugins-videobox.description"></a><h2>Description</h2>
120<p>This plugin crops or enlarges the image. It takes 4 values as input, a
121top, bottom, left and right offset. Positive values will crop that much
122pixels from the respective border of the image, negative values will add
123that much pixels. When pixels are added, you can specify their color.
124Some predefined colors are usable with an enum property.</p>
125<p>The plugin is alpha channel aware and will try to negotiate with a format
126that supports alpha channels first. When alpha channel is active two
127other properties, alpha and border_alpha can be used to set the alpha
128values of the inner picture and the border respectively. an alpha value of
1290.0 means total transparency, 1.0 is opaque.</p>
130<p>The videobox plugin has many uses such as doing a mosaic of pictures,
131letterboxing video, cutting out pieces of video, picture in picture, etc..</p>
132<p>Setting autocrop to true changes the behavior of the plugin so that
133caps determine crop properties rather than the other way around: given
134input and output dimensions, the crop values are selected so that the
135smaller frame is effectively centered in the larger frame.  This
136involves either cropping or padding.</p>
137<p>If you use autocrop there is little point in setting the other
138properties manually because they will be overriden if the caps change,
139but nothing stops you from doing so.</p>
140<p>Sample pipeline:</p>
141<div class="informalexample">
142  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
143    <tbody>
144      <tr>
145        <td class="listing_lines" align="right"><pre>1
1462</pre></td>
147        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> videotestsrc <span class="gtkdoc opt">!</span> videobox autocrop<span class="gtkdoc opt">=</span><span class="keyword">true</span> <span class="gtkdoc opt">!</span> \
148  <span class="string">&quot;video/x-raw, width=600, height=400&quot;</span> <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> ximagesink</pre></td>
149      </tr>
150    </tbody>
151  </table>
152</div>
153
154<p></p>
155<div class="refsynopsisdiv">
156<h2>Synopsis</h2>
157<div class="refsect2">
158<a name="id-1.2.266.7.10.1"></a><h3>Element Information</h3>
159<div class="variablelist"><table border="0" class="variablelist">
160<colgroup>
161<col align="left" valign="top">
162<col>
163</colgroup>
164<tbody>
165<tr>
166<td><p><span class="term">plugin</span></p></td>
167<td>
168            <a class="link" href="gst-plugins-good-plugins-plugin-videobox.html#plugin-videobox">videobox</a>
169          </td>
170</tr>
171<tr>
172<td><p><span class="term">author</span></p></td>
173<td>Wim Taymans &lt;wim@fluendo.com&gt;</td>
174</tr>
175<tr>
176<td><p><span class="term">class</span></p></td>
177<td>Filter/Effect/Video</td>
178</tr>
179</tbody>
180</table></div>
181</div>
182<hr>
183<div class="refsect2">
184<a name="id-1.2.266.7.10.2"></a><h3>Element Pads</h3>
185<div class="variablelist"><table border="0" class="variablelist">
186<colgroup>
187<col align="left" valign="top">
188<col>
189</colgroup>
190<tbody>
191<tr>
192<td><p><span class="term">name</span></p></td>
193<td>sink</td>
194</tr>
195<tr>
196<td><p><span class="term">direction</span></p></td>
197<td>sink</td>
198</tr>
199<tr>
200<td><p><span class="term">presence</span></p></td>
201<td>always</td>
202</tr>
203<tr>
204<td><p><span class="term">details</span></p></td>
205<td>video/x-raw, format=(string){ AYUV, ARGB, BGRA, ABGR, RGBA, xRGB, BGRx, xBGR, RGBx, RGB, BGR, Y444, Y42B, YUY2, YVYU, UYVY, I420, YV12, Y41B, GRAY8, GRAY16_BE, GRAY16_LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
206</tr>
207</tbody>
208</table></div>
209<div class="variablelist"><table border="0" class="variablelist">
210<colgroup>
211<col align="left" valign="top">
212<col>
213</colgroup>
214<tbody>
215<tr>
216<td><p><span class="term">name</span></p></td>
217<td>src</td>
218</tr>
219<tr>
220<td><p><span class="term">direction</span></p></td>
221<td>source</td>
222</tr>
223<tr>
224<td><p><span class="term">presence</span></p></td>
225<td>always</td>
226</tr>
227<tr>
228<td><p><span class="term">details</span></p></td>
229<td>video/x-raw, format=(string){ AYUV, ARGB, BGRA, ABGR, RGBA, xRGB, BGRx, xBGR, RGBx, RGB, BGR, Y444, Y42B, YUY2, YVYU, UYVY, I420, YV12, Y41B, GRAY8, GRAY16_BE, GRAY16_LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
230</tr>
231</tbody>
232</table></div>
233</div>
234</div>
235</div>
236<div class="refsect1">
237<a name="gst-plugins-good-plugins-videobox.functions_details"></a><h2>Functions</h2>
238<p></p>
239</div>
240<div class="refsect1">
241<a name="gst-plugins-good-plugins-videobox.other_details"></a><h2>Types and Values</h2>
242<div class="refsect2">
243<a name="GstVideoBox-struct"></a><h3>struct GstVideoBox</h3>
244<pre class="programlisting">struct GstVideoBox;</pre>
245</div>
246<hr>
247<div class="refsect2">
248<a name="GstVideoBoxFill"></a><h3>enum GstVideoBoxFill</h3>
249<div class="refsect3">
250<a name="GstVideoBoxFill.members"></a><h4>Members</h4>
251<div class="informaltable"><table class="informaltable" width="100%" border="0">
252<colgroup>
253<col width="300px" class="enum_members_name">
254<col class="enum_members_description">
255<col width="200px" class="enum_members_annotations">
256</colgroup>
257<tbody>
258<tr>
259<td class="enum_member_name"><p><a name="VIDEO-BOX-FILL-BLACK:CAPS"></a>VIDEO_BOX_FILL_BLACK</p></td>
260<td> </td>
261<td> </td>
262</tr>
263<tr>
264<td class="enum_member_name"><p><a name="VIDEO-BOX-FILL-GREEN:CAPS"></a>VIDEO_BOX_FILL_GREEN</p></td>
265<td> </td>
266<td> </td>
267</tr>
268<tr>
269<td class="enum_member_name"><p><a name="VIDEO-BOX-FILL-BLUE:CAPS"></a>VIDEO_BOX_FILL_BLUE</p></td>
270<td> </td>
271<td> </td>
272</tr>
273<tr>
274<td class="enum_member_name"><p><a name="VIDEO-BOX-FILL-RED:CAPS"></a>VIDEO_BOX_FILL_RED</p></td>
275<td> </td>
276<td> </td>
277</tr>
278<tr>
279<td class="enum_member_name"><p><a name="VIDEO-BOX-FILL-YELLOW:CAPS"></a>VIDEO_BOX_FILL_YELLOW</p></td>
280<td> </td>
281<td> </td>
282</tr>
283<tr>
284<td class="enum_member_name"><p><a name="VIDEO-BOX-FILL-WHITE:CAPS"></a>VIDEO_BOX_FILL_WHITE</p></td>
285<td> </td>
286<td> </td>
287</tr>
288<tr>
289<td class="enum_member_name"><p><a name="VIDEO-BOX-FILL-LAST:CAPS"></a>VIDEO_BOX_FILL_LAST</p></td>
290<td> </td>
291<td> </td>
292</tr>
293</tbody>
294</table></div>
295</div>
296</div>
297</div>
298<div class="refsect1">
299<a name="gst-plugins-good-plugins-videobox.property-details"></a><h2>Property Details</h2>
300<div class="refsect2">
301<a name="GstVideoBox--alpha"></a><h3>The <code class="literal">“alpha”</code> property</h3>
302<pre class="programlisting">  “alpha”                    <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre>
303<p>Alpha value picture.</p>
304<p>Flags: Read / Write</p>
305<p>Allowed values: [0,1]</p>
306<p>Default value: 1</p>
307</div>
308<hr>
309<div class="refsect2">
310<a name="GstVideoBox--border-alpha"></a><h3>The <code class="literal">“border-alpha”</code> property</h3>
311<pre class="programlisting">  “border-alpha”             <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre>
312<p>Alpha value of the border.</p>
313<p>Flags: Read / Write</p>
314<p>Allowed values: [0,1]</p>
315<p>Default value: 1</p>
316</div>
317<hr>
318<div class="refsect2">
319<a name="GstVideoBox--bottom"></a><h3>The <code class="literal">“bottom”</code> property</h3>
320<pre class="programlisting">  “bottom”                   <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
321<p>Pixels to box at bottom (&lt;0 = add a border).</p>
322<p>Flags: Read / Write</p>
323<p>Default value: 0</p>
324</div>
325<hr>
326<div class="refsect2">
327<a name="GstVideoBox--fill"></a><h3>The <code class="literal">“fill”</code> property</h3>
328<pre class="programlisting">  “fill”                     <a class="link" href="gst-plugins-good-plugins-videobox.html#GstVideoBoxFill" title="enum GstVideoBoxFill"><span class="type">GstVideoBoxFill</span></a></pre>
329<p>How to fill the borders.</p>
330<p>Flags: Read / Write</p>
331<p>Default value: Black</p>
332</div>
333<hr>
334<div class="refsect2">
335<a name="GstVideoBox--left"></a><h3>The <code class="literal">“left”</code> property</h3>
336<pre class="programlisting">  “left”                     <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
337<p>Pixels to box at left (&lt;0  = add a border).</p>
338<p>Flags: Read / Write</p>
339<p>Default value: 0</p>
340</div>
341<hr>
342<div class="refsect2">
343<a name="GstVideoBox--right"></a><h3>The <code class="literal">“right”</code> property</h3>
344<pre class="programlisting">  “right”                    <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
345<p>Pixels to box at right (&lt;0 = add a border).</p>
346<p>Flags: Read / Write</p>
347<p>Default value: 0</p>
348</div>
349<hr>
350<div class="refsect2">
351<a name="GstVideoBox--top"></a><h3>The <code class="literal">“top”</code> property</h3>
352<pre class="programlisting">  “top”                      <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
353<p>Pixels to box at top (&lt;0 = add a border).</p>
354<p>Flags: Read / Write</p>
355<p>Default value: 0</p>
356</div>
357<hr>
358<div class="refsect2">
359<a name="GstVideoBox--autocrop"></a><h3>The <code class="literal">“autocrop”</code> property</h3>
360<pre class="programlisting">  “autocrop”                 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
361<p>If set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> videobox will automatically crop/pad the input
362video to be centered in the output.</p>
363<p>Flags: Read / Write</p>
364<p>Default value: FALSE</p>
365</div>
366</div>
367<div class="refsect1">
368<a name="gst-plugins-good-plugins-videobox.see-also"></a><h2>See Also</h2>
369<p><a class="link" href="gst-plugins-good-plugins-videocrop.html#GstVideoCrop"><span class="type">GstVideoCrop</span></a></p>
370</div>
371</div>
372<div class="footer">
373<hr>Generated by GTK-Doc V1.28</div>
374</body>
375</html>