blob: f9590850a2f41f1a85da4de101235232999ed920 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>videoscale</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Plugins Reference Manual">
<link rel="up" href="ch01.html" title="gst-plugins-base Elements">
<link rel="prev" href="gst-plugins-base-plugins-videorate.html" title="videorate">
<link rel="next" href="gst-plugins-base-plugins-videotestsrc.html" title="videotestsrc">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gst-plugins-base-plugins-videorate.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GStreamer Base Plugins 1.0 Plugins Reference Manual</th>
<td><a accesskey="n" href="gst-plugins-base-plugins-videotestsrc.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gst-plugins-base-plugins-videoscale.synopsis" class="shortcut">Top</a>
 | 
<a href="#gst-plugins-base-plugins-videoscale.description" class="shortcut">Description</a>
 | 
<a href="#gst-plugins-base-plugins-videoscale.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
<a href="#gst-plugins-base-plugins-videoscale.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="gst-plugins-base-plugins-videoscale"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-videoscale.top_of_page"></a>videoscale</span></h2>
<p>videoscale — Resizes video</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gst-plugins-base-plugins-videoscale.synopsis"></a><h2>Synopsis</h2>
<a name="GstVideoScale"></a><pre class="synopsis">struct <a class="link" href="gst-plugins-base-plugins-videoscale.html#GstVideoScale-struct" title="struct GstVideoScale">GstVideoScale</a>;
enum <a class="link" href="gst-plugins-base-plugins-videoscale.html#GstVideoScaleMethod" title="enum GstVideoScaleMethod">GstVideoScaleMethod</a>;
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-videoscale.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
+----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
+----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
+----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseTransform.html">GstBaseTransform</a>
+----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideofilter.html#GstVideoFilter">GstVideoFilter</a>
+----GstVideoScale
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-videoscale.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="gst-plugins-base-plugins-videoscale.html#GstVideoScale--method" title='The "method" property'>method</a>" <a class="link" href="gst-plugins-base-plugins-videoscale.html#GstVideoScaleMethod" title="enum GstVideoScaleMethod"><span class="type">GstVideoScaleMethod</span></a> : Read / Write
"<a class="link" href="gst-plugins-base-plugins-videoscale.html#GstVideoScale--add-borders" title='The "add-borders" property'>add-borders</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
"<a class="link" href="gst-plugins-base-plugins-videoscale.html#GstVideoScale--dither" title='The "dither" property'>dither</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct
"<a class="link" href="gst-plugins-base-plugins-videoscale.html#GstVideoScale--envelope" title='The "envelope" property'>envelope</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> : Read / Write / Construct
"<a class="link" href="gst-plugins-base-plugins-videoscale.html#GstVideoScale--sharpen" title='The "sharpen" property'>sharpen</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> : Read / Write / Construct
"<a class="link" href="gst-plugins-base-plugins-videoscale.html#GstVideoScale--sharpness" title='The "sharpness" property'>sharpness</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> : Read / Write / Construct
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-videoscale.description"></a><h2>Description</h2>
<p>
This element resizes video frames. By default the element will try to
negotiate to the same size on the source and sinkpad so that no scaling
is needed. It is therefore safe to insert this element in a pipeline to
get more robust behaviour without any cost if no scaling is needed.
</p>
<p>
This element supports a wide range of color spaces including various YUV and
RGB formats and is therefore generally able to operate anywhere in a
pipeline.
</p>
<p>
</p>
<div class="refsect2">
<a name="idp66937456"></a><h3>Example pipelines</h3>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>videotestsrc<span class="gtkdoc opt">.</span>ogg <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> theoradec <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> videoscale <span class="gtkdoc opt">!</span> ximagesink</pre></td>
</tr>
</tbody>
</table>
</div>
Decode an Ogg/Theora and display the video using ximagesink. Since
ximagesink cannot perform scaling, the video scaling will be performed by
videoscale when you resize the video window.
To create the test Ogg/Theora file refer to the documentation of theoraenc.
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>videotestsrc<span class="gtkdoc opt">.</span>ogg <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> theoradec <span class="gtkdoc opt">!</span> videoscale <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span> width<span class="gtkdoc opt">=</span><span class="number">50</span> <span class="gtkdoc opt">!</span> xvimagesink</pre></td>
</tr>
</tbody>
</table>
</div>
Decode an Ogg/Theora and display the video using xvimagesink with a width
of 50.
</div>
<p>
</p>
<p>
Last reviewed on 2006-03-02 (0.10.4)
</p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="refsect2">
<a name="idp66732944"></a><h3>Element Information</h3>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">plugin</span></p></td>
<td>
<a class="link" href="gst-plugins-base-plugins-plugin-videoscale.html#plugin-videoscale">videoscale</a>
</td>
</tr>
<tr>
<td><p><span class="term">author</span></p></td>
<td>Wim Taymans &lt;wim.taymans@chello.be&gt;</td>
</tr>
<tr>
<td><p><span class="term">class</span></p></td>
<td>Filter/Converter/Video/Scaler</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="idp67506976"></a><h3>Element Pads</h3>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">name</span></p></td>
<td>sink</td>
</tr>
<tr>
<td><p><span class="term">direction</span></p></td>
<td>sink</td>
</tr>
<tr>
<td><p><span class="term">presence</span></p></td>
<td>always</td>
</tr>
<tr>
<td><p><span class="term">details</span></p></td>
<td>video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, RGB15, ARGB64, AYUV64, NV12 }, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td> video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, RGB15, ARGB64, AYUV64, NV12 }, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
</tbody>
</table></div>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">name</span></p></td>
<td>src</td>
</tr>
<tr>
<td><p><span class="term">direction</span></p></td>
<td>source</td>
</tr>
<tr>
<td><p><span class="term">presence</span></p></td>
<td>always</td>
</tr>
<tr>
<td><p><span class="term">details</span></p></td>
<td>video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, RGB15, ARGB64, AYUV64, NV12 }, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td> video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, RGB15, ARGB64, AYUV64, NV12 }, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<p>
</p>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-videoscale.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GstVideoScale-struct"></a><h3>struct GstVideoScale</h3>
<pre class="programlisting">struct GstVideoScale;</pre>
<p>
Opaque data structure
</p>
</div>
<hr>
<div class="refsect2">
<a name="GstVideoScaleMethod"></a><h3>enum GstVideoScaleMethod</h3>
<pre class="programlisting">typedef enum {
GST_VIDEO_SCALE_NEAREST,
GST_VIDEO_SCALE_BILINEAR,
GST_VIDEO_SCALE_4TAP,
GST_VIDEO_SCALE_LANCZOS
} GstVideoScaleMethod;
</pre>
<p>
The videoscale method to use.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="GST-VIDEO-SCALE-NEAREST:CAPS"></a><span class="term"><code class="literal">GST_VIDEO_SCALE_NEAREST</code></span></p></td>
<td>use nearest neighbour scaling (fast and ugly)
</td>
</tr>
<tr>
<td><p><a name="GST-VIDEO-SCALE-BILINEAR:CAPS"></a><span class="term"><code class="literal">GST_VIDEO_SCALE_BILINEAR</code></span></p></td>
<td>use bilinear scaling (slower but prettier).
</td>
</tr>
<tr>
<td><p><a name="GST-VIDEO-SCALE-4TAP:CAPS"></a><span class="term"><code class="literal">GST_VIDEO_SCALE_4TAP</code></span></p></td>
<td>use a 4-tap filter for scaling (slow).
</td>
</tr>
<tr>
<td><p><a name="GST-VIDEO-SCALE-LANCZOS:CAPS"></a><span class="term"><code class="literal">GST_VIDEO_SCALE_LANCZOS</code></span></p></td>
<td>use a multitap Lanczos filter for scaling (slow).
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-videoscale.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GstVideoScale--method"></a><h3>The <code class="literal">"method"</code> property</h3>
<pre class="programlisting"> "method" <a class="link" href="gst-plugins-base-plugins-videoscale.html#GstVideoScaleMethod" title="enum GstVideoScaleMethod"><span class="type">GstVideoScaleMethod</span></a> : Read / Write</pre>
<p>method.</p>
<p>Default value: Bilinear</p>
</div>
<hr>
<div class="refsect2">
<a name="GstVideoScale--add-borders"></a><h3>The <code class="literal">"add-borders"</code> property</h3>
<pre class="programlisting"> "add-borders" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre>
<p>Add black borders if necessary to keep the display aspect ratio.</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="GstVideoScale--dither"></a><h3>The <code class="literal">"dither"</code> property</h3>
<pre class="programlisting"> "dither" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct</pre>
<p>Add dither (only used for Lanczos method).</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GstVideoScale--envelope"></a><h3>The <code class="literal">"envelope"</code> property</h3>
<pre class="programlisting"> "envelope" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> : Read / Write / Construct</pre>
<p>Size of filter envelope.</p>
<p>Allowed values: [1,5]</p>
<p>Default value: 2</p>
</div>
<hr>
<div class="refsect2">
<a name="GstVideoScale--sharpen"></a><h3>The <code class="literal">"sharpen"</code> property</h3>
<pre class="programlisting"> "sharpen" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> : Read / Write / Construct</pre>
<p>Sharpening.</p>
<p>Allowed values: [0,1]</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="GstVideoScale--sharpness"></a><h3>The <code class="literal">"sharpness"</code> property</h3>
<pre class="programlisting"> "sharpness" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> : Read / Write / Construct</pre>
<p>Sharpness of filter.</p>
<p>Allowed values: [0.5,1.5]</p>
<p>Default value: 1</p>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-videoscale.see-also"></a><h2>See Also</h2>
videorate, videoconvert
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>