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>aspectratiocrop: 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-apev2mux.html" title="apev2mux"> 10<link rel="next" href="gst-plugins-good-plugins-asteriskh263.html" title="asteriskh263"> 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">|</span> 18 <a href="#gst-plugins-good-plugins-aspectratiocrop.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#gst-plugins-good-plugins-aspectratiocrop.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> 20 <a href="#gst-plugins-good-plugins-aspectratiocrop.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span> 21 <a href="#gst-plugins-good-plugins-aspectratiocrop.properties" class="shortcut">Properties</a></span> 22</td> 23<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 24<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 25<td><a accesskey="p" href="gst-plugins-good-plugins-apev2mux.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 26<td><a accesskey="n" href="gst-plugins-good-plugins-asteriskh263.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 27</tr></table> 28<div class="refentry"> 29<a name="gst-plugins-good-plugins-aspectratiocrop"></a><div class="titlepage"></div> 30<div class="refnamediv"><table width="100%"><tr> 31<td valign="top"> 32<h2><span class="refentrytitle"><a name="gst-plugins-good-plugins-aspectratiocrop.top_of_page"></a>aspectratiocrop</span></h2> 33<p>aspectratiocrop</p> 34</td> 35<td class="gallery_image" valign="top" align="right"></td> 36</tr></table></div> 37<div class="refsect1"> 38<a name="gst-plugins-good-plugins-aspectratiocrop.properties"></a><h2>Properties</h2> 39<div class="informaltable"><table class="informaltable" border="0"> 40<colgroup> 41<col width="150px" class="properties_type"> 42<col width="300px" class="properties_name"> 43<col width="200px" class="properties_flags"> 44</colgroup> 45<tbody><tr> 46<td class="property_type"><span class="type">GstFraction</span></td> 47<td class="property_name"><a class="link" href="gst-plugins-good-plugins-aspectratiocrop.html#GstAspectRatioCrop--aspect-ratio" title="The “aspect-ratio” property">aspect-ratio</a></td> 48<td class="property_flags">Read / Write</td> 49</tr></tbody> 50</table></div> 51</div> 52<a name="GstAspectRatioCrop"></a><div class="refsect1"> 53<a name="gst-plugins-good-plugins-aspectratiocrop.other"></a><h2>Types and Values</h2> 54<div class="informaltable"><table class="informaltable" width="100%" border="0"> 55<colgroup> 56<col width="150px" class="name"> 57<col class="description"> 58</colgroup> 59<tbody><tr> 60<td class="datatype_keyword">struct</td> 61<td class="function_name"><a class="link" href="gst-plugins-good-plugins-aspectratiocrop.html#GstAspectRatioCrop-struct" title="struct GstAspectRatioCrop">GstAspectRatioCrop</a></td> 62</tr></tbody> 63</table></div> 64</div> 65<div class="refsect1"> 66<a name="gst-plugins-good-plugins-aspectratiocrop.object-hierarchy"></a><h2>Object Hierarchy</h2> 67<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> 68 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> 69 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a> 70 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a> 71 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBin.html#GstBin-struct">GstBin</a> 72 <span class="lineart">╰──</span> GstAspectRatioCrop 73</pre> 74</div> 75<div class="refsect1"> 76<a name="gst-plugins-good-plugins-aspectratiocrop.implemented-interfaces"></a><h2>Implemented Interfaces</h2> 77<p> 78GstAspectRatioCrop implements 79 <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstChildProxy.html#GstChildProxy-struct">GstChildProxy</a>.</p> 80</div> 81<div class="refsect1"> 82<a name="gst-plugins-good-plugins-aspectratiocrop.description"></a><h2>Description</h2> 83<p>This element crops video frames to a specified <a class="link" href="gst-plugins-good-plugins-aspectratiocrop.html#GstAspectRatioCrop--aspect-ratio" title="The “aspect-ratio” property"><span class="type">“aspect-ratio”</span></a>.</p> 84<p>If the aspect-ratio is already correct, the element will operate 85in pass-through mode.</p> 86<div class="refsect2"> 87<a name="id-1.2.14.8.4"></a><h3>Example launch line</h3> 88<div class="informalexample"> 89 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> 90 <tbody> 91 <tr> 92 <td class="listing_lines" align="right"><pre>1</pre></td> 93 <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> <span class="gtkdoc opt">-</span>v videotestsrc <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>height<span class="gtkdoc opt">=</span><span class="number">640</span><span class="gtkdoc opt">,</span>width<span class="gtkdoc opt">=</span><span class="number">480</span> <span class="gtkdoc opt">!</span> aspectratiocrop aspect<span class="gtkdoc opt">-</span>ratio<span class="gtkdoc opt">=</span><span class="number">16</span><span class="gtkdoc opt">/</span><span class="number">9</span> <span class="gtkdoc opt">!</span> ximagesink</pre></td> 94 </tr> 95 </tbody> 96 </table> 97</div> 98 This pipeline generates a videostream in 4/3 and crops it to 16/9. 99</div> 100<div class="refsynopsisdiv"> 101<h2>Synopsis</h2> 102<div class="refsect2"> 103<a name="id-1.2.14.8.5.1"></a><h3>Element Information</h3> 104<div class="variablelist"><table border="0" class="variablelist"> 105<colgroup> 106<col align="left" valign="top"> 107<col> 108</colgroup> 109<tbody> 110<tr> 111<td><p><span class="term">plugin</span></p></td> 112<td> 113 <a class="link" href="gst-plugins-good-plugins-plugin-videocrop.html#plugin-videocrop">videocrop</a> 114 </td> 115</tr> 116<tr> 117<td><p><span class="term">author</span></p></td> 118<td>Thijs Vermeir <thijsvermeir@gmail.com></td> 119</tr> 120<tr> 121<td><p><span class="term">class</span></p></td> 122<td>Filter/Effect/Video</td> 123</tr> 124</tbody> 125</table></div> 126</div> 127<hr> 128<div class="refsect2"> 129<a name="id-1.2.14.8.5.2"></a><h3>Element Pads</h3> 130<div class="variablelist"><table border="0" class="variablelist"> 131<colgroup> 132<col align="left" valign="top"> 133<col> 134</colgroup> 135<tbody> 136<tr> 137<td><p><span class="term">name</span></p></td> 138<td>sink</td> 139</tr> 140<tr> 141<td><p><span class="term">direction</span></p></td> 142<td>sink</td> 143</tr> 144<tr> 145<td><p><span class="term">presence</span></p></td> 146<td>always</td> 147</tr> 148<tr> 149<td><p><span class="term">details</span></p></td> 150<td>video/x-raw, format=(string){ RGBx, xRGB, BGRx, xBGR, RGBA, ARGB, BGRA, ABGR, RGB, BGR, AYUV, YUY2, YVYU, UYVY, I420, YV12, RGB16, RGB15, GRAY8, NV12, NV21, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td> 151</tr> 152</tbody> 153</table></div> 154<div class="variablelist"><table border="0" class="variablelist"> 155<colgroup> 156<col align="left" valign="top"> 157<col> 158</colgroup> 159<tbody> 160<tr> 161<td><p><span class="term">name</span></p></td> 162<td>src</td> 163</tr> 164<tr> 165<td><p><span class="term">direction</span></p></td> 166<td>source</td> 167</tr> 168<tr> 169<td><p><span class="term">presence</span></p></td> 170<td>always</td> 171</tr> 172<tr> 173<td><p><span class="term">details</span></p></td> 174<td>video/x-raw, format=(string){ RGBx, xRGB, BGRx, xBGR, RGBA, ARGB, BGRA, ABGR, RGB, BGR, AYUV, YUY2, YVYU, UYVY, I420, YV12, RGB16, RGB15, GRAY8, NV12, NV21, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td> 175</tr> 176</tbody> 177</table></div> 178</div> 179</div> 180</div> 181<div class="refsect1"> 182<a name="gst-plugins-good-plugins-aspectratiocrop.functions_details"></a><h2>Functions</h2> 183<p></p> 184</div> 185<div class="refsect1"> 186<a name="gst-plugins-good-plugins-aspectratiocrop.other_details"></a><h2>Types and Values</h2> 187<div class="refsect2"> 188<a name="GstAspectRatioCrop-struct"></a><h3>struct GstAspectRatioCrop</h3> 189<pre class="programlisting">struct GstAspectRatioCrop;</pre> 190</div> 191</div> 192<div class="refsect1"> 193<a name="gst-plugins-good-plugins-aspectratiocrop.property-details"></a><h2>Property Details</h2> 194<div class="refsect2"> 195<a name="GstAspectRatioCrop--aspect-ratio"></a><h3>The <code class="literal">“aspect-ratio”</code> property</h3> 196<pre class="programlisting"> “aspect-ratio” <span class="type">GstFraction</span></pre> 197<p>Target aspect-ratio of video.</p> 198<p>Flags: Read / Write</p> 199</div> 200</div> 201<div class="refsect1"> 202<a name="gst-plugins-good-plugins-aspectratiocrop.see-also"></a><h2>See Also</h2> 203<p><a class="link" href="gst-plugins-good-plugins-videocrop.html#GstVideoCrop"><span class="type">GstVideoCrop</span></a></p> 204</div> 205</div> 206<div class="footer"> 207<hr>Generated by GTK-Doc V1.28</div> 208</body> 209</html>