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>gdkpixbufoverlay: 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-gdkpixbufdec.html" title="gdkpixbufdec"> 10<link rel="next" href="gst-plugins-good-plugins-gdkpixbufsink.html" title="gdkpixbufsink"> 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-gdkpixbufoverlay.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#gst-plugins-good-plugins-gdkpixbufoverlay.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> 20 <a href="#gst-plugins-good-plugins-gdkpixbufoverlay.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-gdkpixbufdec.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-gdkpixbufsink.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-gdkpixbufoverlay"></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-gdkpixbufoverlay.top_of_page"></a>gdkpixbufoverlay</span></h2> 32<p>gdkpixbufoverlay</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-gdkpixbufoverlay.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"> 47<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td> 48<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--location" title="The “location” property">location</a></td> 49<td class="property_flags">Read / Write</td> 50</tr> 51<tr> 52<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> 53<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--offset-x" title="The “offset-x” property">offset-x</a></td> 54<td class="property_flags">Read / Write</td> 55</tr> 56<tr> 57<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> 58<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--offset-y" title="The “offset-y” property">offset-y</a></td> 59<td class="property_flags">Read / Write</td> 60</tr> 61<tr> 62<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> 63<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--overlay-height" title="The “overlay-height” property">overlay-height</a></td> 64<td class="property_flags">Read / Write</td> 65</tr> 66<tr> 67<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> 68<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--overlay-width" title="The “overlay-width” property">overlay-width</a></td> 69<td class="property_flags">Read / Write</td> 70</tr> 71<tr> 72<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td> 73<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--relative-x" title="The “relative-x” property">relative-x</a></td> 74<td class="property_flags">Read / Write</td> 75</tr> 76<tr> 77<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td> 78<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--relative-y" title="The “relative-y” property">relative-y</a></td> 79<td class="property_flags">Read / Write</td> 80</tr> 81<tr> 82<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td> 83<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--alpha" title="The “alpha” property">alpha</a></td> 84<td class="property_flags">Read / Write</td> 85</tr> 86<tr> 87<td class="property_type"> 88<a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf-struct"><span class="type">GdkPixbuf</span></a> *</td> 89<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--pixbuf" title="The “pixbuf” property">pixbuf</a></td> 90<td class="property_flags">Read / Write</td> 91</tr> 92<tr> 93<td class="property_type"><span class="type">GstGdkPixbufPositioningMode</span></td> 94<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--positioning-mode" title="The “positioning-mode” property">positioning-mode</a></td> 95<td class="property_flags">Read / Write</td> 96</tr> 97<tr> 98<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td> 99<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--coef-x" title="The “coef-x” property">coef-x</a></td> 100<td class="property_flags">Read / Write</td> 101</tr> 102<tr> 103<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td> 104<td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay--coef-y" title="The “coef-y” property">coef-y</a></td> 105<td class="property_flags">Read / Write</td> 106</tr> 107</tbody> 108</table></div> 109</div> 110<a name="GstGdkPixbufOverlay"></a><div class="refsect1"> 111<a name="gst-plugins-good-plugins-gdkpixbufoverlay.other"></a><h2>Types and Values</h2> 112<div class="informaltable"><table class="informaltable" width="100%" border="0"> 113<colgroup> 114<col width="150px" class="name"> 115<col class="description"> 116</colgroup> 117<tbody><tr> 118<td class="datatype_keyword">struct</td> 119<td class="function_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufoverlay.html#GstGdkPixbufOverlay-struct" title="struct GstGdkPixbufOverlay">GstGdkPixbufOverlay</a></td> 120</tr></tbody> 121</table></div> 122</div> 123<div class="refsect1"> 124<a name="gst-plugins-good-plugins-gdkpixbufoverlay.object-hierarchy"></a><h2>Object Hierarchy</h2> 125<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> 126 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> 127 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a> 128 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a> 129 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseTransform.html#GstBaseTransform-struct">GstBaseTransform</a> 130 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gst-plugins-base-libs-1.0/GstVideoFilter.html#GstVideoFilter-struct">GstVideoFilter</a> 131 <span class="lineart">╰──</span> GstGdkPixbufOverlay 132</pre> 133</div> 134<div class="refsect1"> 135<a name="gst-plugins-good-plugins-gdkpixbufoverlay.description"></a><h2>Description</h2> 136<p>The gdkpixbufoverlay element overlays an image loaded from file onto 137a video stream.</p> 138<p>Changing the positioning or overlay width and height properties at runtime 139is supported, but it might be prudent to to protect the property setting 140code with GST_BASE_TRANSFORM_LOCK and GST_BASE_TRANSFORM_UNLOCK, as 141<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-set"><code class="function">g_object_set()</code></a> is not atomic for multiple properties passed in one go.</p> 142<p>Changing the image at runtime is currently not supported.</p> 143<p>Negative offsets are also not yet supported.</p> 144<div class="refsect2"> 145<a name="id-1.2.66.7.6"></a><h3>Example launch line</h3> 146<div class="informalexample"> 147 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> 148 <tbody> 149 <tr> 150 <td class="listing_lines" align="right"><pre>1</pre></td> 151 <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> gdkpixbufoverlay location<span class="gtkdoc opt">=</span>image<span class="gtkdoc opt">.</span>png <span class="gtkdoc opt">!</span> autovideosink</pre></td> 152 </tr> 153 </tbody> 154 </table> 155</div> 156 157Overlays the image in image.png onto the test video picture produced by 158videotestsrc. 159</div> 160<div class="refsynopsisdiv"> 161<h2>Synopsis</h2> 162<div class="refsect2"> 163<a name="id-1.2.66.7.7.1"></a><h3>Element Information</h3> 164<div class="variablelist"><table border="0" class="variablelist"> 165<colgroup> 166<col align="left" valign="top"> 167<col> 168</colgroup> 169<tbody> 170<tr> 171<td><p><span class="term">plugin</span></p></td> 172<td> 173 <a class="link" href="gst-plugins-good-plugins-plugin-gdkpixbuf.html#plugin-gdkpixbuf">gdkpixbuf</a> 174 </td> 175</tr> 176<tr> 177<td><p><span class="term">author</span></p></td> 178<td>Tim-Philipp Müller <tim centricular net></td> 179</tr> 180<tr> 181<td><p><span class="term">class</span></p></td> 182<td>Filter/Effect/Video</td> 183</tr> 184</tbody> 185</table></div> 186</div> 187<hr> 188<div class="refsect2"> 189<a name="id-1.2.66.7.7.2"></a><h3>Element Pads</h3> 190<div class="variablelist"><table border="0" class="variablelist"> 191<colgroup> 192<col align="left" valign="top"> 193<col> 194</colgroup> 195<tbody> 196<tr> 197<td><p><span class="term">name</span></p></td> 198<td>sink</td> 199</tr> 200<tr> 201<td><p><span class="term">direction</span></p></td> 202<td>sink</td> 203</tr> 204<tr> 205<td><p><span class="term">presence</span></p></td> 206<td>always</td> 207</tr> 208<tr> 209<td><p><span class="term">details</span></p></td> 210<td>video/x-raw, format=(string){ RGBx, RGB, BGR, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, I420, YV12, AYUV, YUY2, UYVY, v308, v210, v216, Y41B, Y42B, Y444, YVYU, NV12, NV21, UYVP, RGB16, BGR16, RGB15, BGR15, UYVP, A420, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, GRAY8, GRAY16_BE, GRAY16_LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td> 211</tr> 212</tbody> 213</table></div> 214<div class="variablelist"><table border="0" class="variablelist"> 215<colgroup> 216<col align="left" valign="top"> 217<col> 218</colgroup> 219<tbody> 220<tr> 221<td><p><span class="term">name</span></p></td> 222<td>src</td> 223</tr> 224<tr> 225<td><p><span class="term">direction</span></p></td> 226<td>source</td> 227</tr> 228<tr> 229<td><p><span class="term">presence</span></p></td> 230<td>always</td> 231</tr> 232<tr> 233<td><p><span class="term">details</span></p></td> 234<td>video/x-raw, format=(string){ RGBx, RGB, BGR, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, I420, YV12, AYUV, YUY2, UYVY, v308, v210, v216, Y41B, Y42B, Y444, YVYU, NV12, NV21, UYVP, RGB16, BGR16, RGB15, BGR15, UYVP, A420, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, GRAY8, GRAY16_BE, GRAY16_LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td> 235</tr> 236</tbody> 237</table></div> 238</div> 239</div> 240</div> 241<div class="refsect1"> 242<a name="gst-plugins-good-plugins-gdkpixbufoverlay.functions_details"></a><h2>Functions</h2> 243<p></p> 244</div> 245<div class="refsect1"> 246<a name="gst-plugins-good-plugins-gdkpixbufoverlay.other_details"></a><h2>Types and Values</h2> 247<div class="refsect2"> 248<a name="GstGdkPixbufOverlay-struct"></a><h3>struct GstGdkPixbufOverlay</h3> 249<pre class="programlisting">struct GstGdkPixbufOverlay;</pre> 250<p>The opaque element instance structure.</p> 251</div> 252</div> 253<div class="refsect1"> 254<a name="gst-plugins-good-plugins-gdkpixbufoverlay.property-details"></a><h2>Property Details</h2> 255<div class="refsect2"> 256<a name="GstGdkPixbufOverlay--location"></a><h3>The <code class="literal">“location”</code> property</h3> 257<pre class="programlisting"> “location” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre> 258<p>Location of image file to overlay.</p> 259<p>Flags: Read / Write</p> 260<p>Default value: NULL</p> 261</div> 262<hr> 263<div class="refsect2"> 264<a name="GstGdkPixbufOverlay--offset-x"></a><h3>The <code class="literal">“offset-x”</code> property</h3> 265<pre class="programlisting"> “offset-x” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> 266<p>For positive value, horizontal offset of overlay image in pixels from left of video image. For negative value, horizontal offset of overlay image in pixels from right of video image.</p> 267<p>Flags: Read / Write</p> 268<p>Default value: 0</p> 269</div> 270<hr> 271<div class="refsect2"> 272<a name="GstGdkPixbufOverlay--offset-y"></a><h3>The <code class="literal">“offset-y”</code> property</h3> 273<pre class="programlisting"> “offset-y” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> 274<p>For positive value, vertical offset of overlay image in pixels from top of video image. For negative value, vertical offset of overlay image in pixels from bottom of video image.</p> 275<p>Flags: Read / Write</p> 276<p>Default value: 0</p> 277</div> 278<hr> 279<div class="refsect2"> 280<a name="GstGdkPixbufOverlay--overlay-height"></a><h3>The <code class="literal">“overlay-height”</code> property</h3> 281<pre class="programlisting"> “overlay-height” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> 282<p>Height of overlay image in pixels (0 = same as overlay image).</p> 283<p>Flags: Read / Write</p> 284<p>Allowed values: >= 0</p> 285<p>Default value: 0</p> 286</div> 287<hr> 288<div class="refsect2"> 289<a name="GstGdkPixbufOverlay--overlay-width"></a><h3>The <code class="literal">“overlay-width”</code> property</h3> 290<pre class="programlisting"> “overlay-width” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> 291<p>Width of overlay image in pixels (0 = same as overlay image).</p> 292<p>Flags: Read / Write</p> 293<p>Allowed values: >= 0</p> 294<p>Default value: 0</p> 295</div> 296<hr> 297<div class="refsect2"> 298<a name="GstGdkPixbufOverlay--relative-x"></a><h3>The <code class="literal">“relative-x”</code> property</h3> 299<pre class="programlisting"> “relative-x” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre> 300<p>Horizontal offset of overlay image in fractions of video image width, from top-left corner of video image (in relative positioning).</p> 301<p>Flags: Read / Write</p> 302<p>Allowed values: [-1,1]</p> 303<p>Default value: 0</p> 304</div> 305<hr> 306<div class="refsect2"> 307<a name="GstGdkPixbufOverlay--relative-y"></a><h3>The <code class="literal">“relative-y”</code> property</h3> 308<pre class="programlisting"> “relative-y” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre> 309<p>Vertical offset of overlay image in fractions of video image height, from top-left corner of video image (in relative positioning).</p> 310<p>Flags: Read / Write</p> 311<p>Allowed values: [-1,1]</p> 312<p>Default value: 0</p> 313</div> 314<hr> 315<div class="refsect2"> 316<a name="GstGdkPixbufOverlay--alpha"></a><h3>The <code class="literal">“alpha”</code> property</h3> 317<pre class="programlisting"> “alpha” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre> 318<p>Global alpha of overlay image.</p> 319<p>Flags: Read / Write</p> 320<p>Allowed values: [0,1]</p> 321<p>Default value: 1</p> 322</div> 323<hr> 324<div class="refsect2"> 325<a name="GstGdkPixbufOverlay--pixbuf"></a><h3>The <code class="literal">“pixbuf”</code> property</h3> 326<pre class="programlisting"> “pixbuf” <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf-struct"><span class="type">GdkPixbuf</span></a> *</pre> 327<p>GdkPixbuf object to render.</p> 328<p>Flags: Read / Write</p> 329<p class="since">Since: 1.6</p> 330</div> 331<hr> 332<div class="refsect2"> 333<a name="GstGdkPixbufOverlay--positioning-mode"></a><h3>The <code class="literal">“positioning-mode”</code> property</h3> 334<pre class="programlisting"> “positioning-mode” <span class="type">GstGdkPixbufPositioningMode</span></pre> 335<p>Positioning mode of offset-x and offset-y properties. Determines how 336negative x/y offsets will be interpreted. By default negative values 337are for positioning relative to the right/bottom edge of the video 338image, but you can use this property to select absolute positioning 339relative to a (0, 0) origin in the top-left corner. That way negative 340offsets will be to the left/above the video image, which allows you to 341smoothly slide logos into and out of the frame if desired.</p> 342<p>Flags: Read / Write</p> 343<p>Default value: pixels-relative-to-edges</p> 344<p class="since">Since: 1.6</p> 345</div> 346<hr> 347<div class="refsect2"> 348<a name="GstGdkPixbufOverlay--coef-x"></a><h3>The <code class="literal">“coef-x”</code> property</h3> 349<pre class="programlisting"> “coef-x” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre> 350<p>In absolute positioning mode, the x coordinate of overlay image's 351top-left corner is now given by 352offset-x + (relative-x * overlay_width) + (coef-x * video_width). 353This allows to align the image absolutely and relatively 354to any edge or center position.</p> 355<p>Flags: Read / Write</p> 356<p>Allowed values: [-1,1]</p> 357<p>Default value: 0</p> 358<p class="since">Since: 1.12</p> 359</div> 360<hr> 361<div class="refsect2"> 362<a name="GstGdkPixbufOverlay--coef-y"></a><h3>The <code class="literal">“coef-y”</code> property</h3> 363<pre class="programlisting"> “coef-y” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre> 364<p>In absolute positioning mode, the y coordinate of overlay image's 365top-left corner is now given by 366offset-y + (relative-y * overlay_height) + (coef-y * video_height). 367This allows to align the image absolutely and relatively 368to any edge or center position.</p> 369<p>Flags: Read / Write</p> 370<p>Allowed values: [-1,1]</p> 371<p>Default value: 0</p> 372<p class="since">Since: 1.12</p> 373</div> 374</div> 375</div> 376<div class="footer"> 377<hr>Generated by GTK-Doc V1.28</div> 378</body> 379</html>