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>GstVideoOverlayRectangle: GStreamer Base Plugins 1.0 Library Reference Manual</title> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual"> 8<link rel="up" href="gstreamer-video.html" title="Video Library"> 9<link rel="prev" href="GstVideoAggregatorPad.html" title="GstVideoAggregatorPad"> 10<link rel="next" href="GstVideoFilter.html" title="GstVideoFilter"> 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-base-libs-GstVideoOverlayRectangle.description" class="shortcut">Description</a></span> 19</td> 20<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 21<td><a accesskey="u" href="gstreamer-video.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 22<td><a accesskey="p" href="GstVideoAggregatorPad.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 23<td><a accesskey="n" href="GstVideoFilter.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 24</tr></table> 25<div class="refentry"> 26<a name="gst-plugins-base-libs-GstVideoOverlayRectangle"></a><div class="titlepage"></div> 27<div class="refnamediv"><table width="100%"><tr> 28<td valign="top"> 29<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-GstVideoOverlayRectangle.top_of_page"></a>GstVideoOverlayRectangle</span></h2> 30<p>GstVideoOverlayRectangle — Video Buffer Overlay Compositions (Subtitles, Logos)</p> 31</td> 32<td class="gallery_image" valign="top" align="right"></td> 33</tr></table></div> 34<div class="refsect1"> 35<a name="gst-plugins-base-libs-GstVideoOverlayRectangle.functions"></a><h2>Functions</h2> 36<div class="informaltable"><table class="informaltable" width="100%" border="0"> 37<colgroup> 38<col width="150px" class="functions_return"> 39<col class="functions_name"> 40</colgroup> 41<tbody> 42<tr> 43<td class="function_type"> 44<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="returnvalue">GstVideoOverlayComposition</span></a> * 45</td> 46<td class="function_name"> 47<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-new" title="gst_video_overlay_composition_new ()">gst_video_overlay_composition_new</a> <span class="c_punctuation">()</span> 48</td> 49</tr> 50<tr> 51<td class="function_type"> 52<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="returnvalue">GstVideoOverlayComposition</span></a> * 53</td> 54<td class="function_name"> 55<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-ref" title="gst_video_overlay_composition_ref ()">gst_video_overlay_composition_ref</a> <span class="c_punctuation">()</span> 56</td> 57</tr> 58<tr> 59<td class="function_type"> 60<span class="returnvalue">void</span> 61</td> 62<td class="function_name"> 63<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-unref" title="gst_video_overlay_composition_unref ()">gst_video_overlay_composition_unref</a> <span class="c_punctuation">()</span> 64</td> 65</tr> 66<tr> 67<td class="function_type"> 68<span class="returnvalue">void</span> 69</td> 70<td class="function_name"> 71<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-add-rectangle" title="gst_video_overlay_composition_add_rectangle ()">gst_video_overlay_composition_add_rectangle</a> <span class="c_punctuation">()</span> 72</td> 73</tr> 74<tr> 75<td class="function_type"> 76<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> 77</td> 78<td class="function_name"> 79<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-n-rectangles" title="gst_video_overlay_composition_n_rectangles ()">gst_video_overlay_composition_n_rectangles</a> <span class="c_punctuation">()</span> 80</td> 81</tr> 82<tr> 83<td class="function_type"> 84<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="returnvalue">GstVideoOverlayRectangle</span></a> * 85</td> 86<td class="function_name"> 87<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-get-rectangle" title="gst_video_overlay_composition_get_rectangle ()">gst_video_overlay_composition_get_rectangle</a> <span class="c_punctuation">()</span> 88</td> 89</tr> 90<tr> 91<td class="function_type"> 92<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> 93</td> 94<td class="function_name"> 95<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-get-seqnum" title="gst_video_overlay_composition_get_seqnum ()">gst_video_overlay_composition_get_seqnum</a> <span class="c_punctuation">()</span> 96</td> 97</tr> 98<tr> 99<td class="function_type"> 100<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="returnvalue">GstVideoOverlayComposition</span></a> * 101</td> 102<td class="function_name"> 103<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-copy" title="gst_video_overlay_composition_copy ()">gst_video_overlay_composition_copy</a> <span class="c_punctuation">()</span> 104</td> 105</tr> 106<tr> 107<td class="function_type"> 108<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="returnvalue">GstVideoOverlayComposition</span></a> * 109</td> 110<td class="function_name"> 111<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-make-writable" title="gst_video_overlay_composition_make_writable ()">gst_video_overlay_composition_make_writable</a> <span class="c_punctuation">()</span> 112</td> 113</tr> 114<tr> 115<td class="function_type"> 116<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 117</td> 118<td class="function_name"> 119<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-blend" title="gst_video_overlay_composition_blend ()">gst_video_overlay_composition_blend</a> <span class="c_punctuation">()</span> 120</td> 121</tr> 122<tr> 123<td class="function_type">const <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstMeta.html#GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> * 124</td> 125<td class="function_name"> 126<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-meta-get-info" title="gst_video_overlay_composition_meta_get_info ()">gst_video_overlay_composition_meta_get_info</a> <span class="c_punctuation">()</span> 127</td> 128</tr> 129<tr> 130<td class="function_type"> 131<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayCompositionMeta" title="struct GstVideoOverlayCompositionMeta"><span class="returnvalue">GstVideoOverlayCompositionMeta</span></a> * 132</td> 133<td class="function_name"> 134<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-buffer-add-video-overlay-composition-meta" title="gst_buffer_add_video_overlay_composition_meta ()">gst_buffer_add_video_overlay_composition_meta</a> <span class="c_punctuation">()</span> 135</td> 136</tr> 137<tr> 138<td class="define_keyword">#define</td> 139<td class="function_name"> 140<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-buffer-get-video-overlay-composition-meta" title="gst_buffer_get_video_overlay_composition_meta()">gst_buffer_get_video_overlay_composition_meta</a><span class="c_punctuation">()</span> 141</td> 142</tr> 143<tr> 144<td class="define_keyword">#define</td> 145<td class="function_name"> 146<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-buffer-remove-video-overlay-composition-meta" title="gst_buffer_remove_video_overlay_composition_meta()">gst_buffer_remove_video_overlay_composition_meta</a><span class="c_punctuation">()</span> 147</td> 148</tr> 149<tr> 150<td class="function_type"> 151<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="returnvalue">GstVideoOverlayRectangle</span></a> * 152</td> 153<td class="function_name"> 154<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-new-raw" title="gst_video_overlay_rectangle_new_raw ()">gst_video_overlay_rectangle_new_raw</a> <span class="c_punctuation">()</span> 155</td> 156</tr> 157<tr> 158<td class="function_type"> 159<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="returnvalue">GstVideoOverlayRectangle</span></a> * 160</td> 161<td class="function_name"> 162<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-ref" title="gst_video_overlay_rectangle_ref ()">gst_video_overlay_rectangle_ref</a> <span class="c_punctuation">()</span> 163</td> 164</tr> 165<tr> 166<td class="function_type"> 167<span class="returnvalue">void</span> 168</td> 169<td class="function_name"> 170<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-unref" title="gst_video_overlay_rectangle_unref ()">gst_video_overlay_rectangle_unref</a> <span class="c_punctuation">()</span> 171</td> 172</tr> 173<tr> 174<td class="function_type"> 175<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 176</td> 177<td class="function_name"> 178<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-pixels-raw" title="gst_video_overlay_rectangle_get_pixels_raw ()">gst_video_overlay_rectangle_get_pixels_raw</a> <span class="c_punctuation">()</span> 179</td> 180</tr> 181<tr> 182<td class="function_type"> 183<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 184</td> 185<td class="function_name"> 186<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-pixels-argb" title="gst_video_overlay_rectangle_get_pixels_argb ()">gst_video_overlay_rectangle_get_pixels_argb</a> <span class="c_punctuation">()</span> 187</td> 188</tr> 189<tr> 190<td class="function_type"> 191<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 192</td> 193<td class="function_name"> 194<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-pixels-ayuv" title="gst_video_overlay_rectangle_get_pixels_ayuv ()">gst_video_overlay_rectangle_get_pixels_ayuv</a> <span class="c_punctuation">()</span> 195</td> 196</tr> 197<tr> 198<td class="function_type"> 199<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 200</td> 201<td class="function_name"> 202<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-pixels-unscaled-raw" title="gst_video_overlay_rectangle_get_pixels_unscaled_raw ()">gst_video_overlay_rectangle_get_pixels_unscaled_raw</a> <span class="c_punctuation">()</span> 203</td> 204</tr> 205<tr> 206<td class="function_type"> 207<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 208</td> 209<td class="function_name"> 210<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-pixels-unscaled-argb" title="gst_video_overlay_rectangle_get_pixels_unscaled_argb ()">gst_video_overlay_rectangle_get_pixels_unscaled_argb</a> <span class="c_punctuation">()</span> 211</td> 212</tr> 213<tr> 214<td class="function_type"> 215<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 216</td> 217<td class="function_name"> 218<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-pixels-unscaled-ayuv" title="gst_video_overlay_rectangle_get_pixels_unscaled_ayuv ()">gst_video_overlay_rectangle_get_pixels_unscaled_ayuv</a> <span class="c_punctuation">()</span> 219</td> 220</tr> 221<tr> 222<td class="function_type"> 223<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 224</td> 225<td class="function_name"> 226<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-render-rectangle" title="gst_video_overlay_rectangle_get_render_rectangle ()">gst_video_overlay_rectangle_get_render_rectangle</a> <span class="c_punctuation">()</span> 227</td> 228</tr> 229<tr> 230<td class="function_type"> 231<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> 232</td> 233<td class="function_name"> 234<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-seqnum" title="gst_video_overlay_rectangle_get_seqnum ()">gst_video_overlay_rectangle_get_seqnum</a> <span class="c_punctuation">()</span> 235</td> 236</tr> 237<tr> 238<td class="function_type"> 239<span class="returnvalue">void</span> 240</td> 241<td class="function_name"> 242<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-set-render-rectangle" title="gst_video_overlay_rectangle_set_render_rectangle ()">gst_video_overlay_rectangle_set_render_rectangle</a> <span class="c_punctuation">()</span> 243</td> 244</tr> 245<tr> 246<td class="function_type"> 247<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="returnvalue">GstVideoOverlayRectangle</span></a> * 248</td> 249<td class="function_name"> 250<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-copy" title="gst_video_overlay_rectangle_copy ()">gst_video_overlay_rectangle_copy</a> <span class="c_punctuation">()</span> 251</td> 252</tr> 253<tr> 254<td class="function_type"> 255<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayFormatFlags" title="enum GstVideoOverlayFormatFlags"><span class="returnvalue">GstVideoOverlayFormatFlags</span></a> 256</td> 257<td class="function_name"> 258<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-flags" title="gst_video_overlay_rectangle_get_flags ()">gst_video_overlay_rectangle_get_flags</a> <span class="c_punctuation">()</span> 259</td> 260</tr> 261<tr> 262<td class="function_type"> 263<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat"><span class="returnvalue">gfloat</span></a> 264</td> 265<td class="function_name"> 266<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-global-alpha" title="gst_video_overlay_rectangle_get_global_alpha ()">gst_video_overlay_rectangle_get_global_alpha</a> <span class="c_punctuation">()</span> 267</td> 268</tr> 269<tr> 270<td class="function_type"> 271<span class="returnvalue">void</span> 272</td> 273<td class="function_name"> 274<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-set-global-alpha" title="gst_video_overlay_rectangle_set_global_alpha ()">gst_video_overlay_rectangle_set_global_alpha</a> <span class="c_punctuation">()</span> 275</td> 276</tr> 277</tbody> 278</table></div> 279</div> 280<div class="refsect1"> 281<a name="gst-plugins-base-libs-GstVideoOverlayRectangle.other"></a><h2>Types and Values</h2> 282<div class="informaltable"><table class="informaltable" width="100%" border="0"> 283<colgroup> 284<col width="150px" class="name"> 285<col class="description"> 286</colgroup> 287<tbody> 288<tr> 289<td class="datatype_keyword"> </td> 290<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition">GstVideoOverlayComposition</a></td> 291</tr> 292<tr> 293<td class="define_keyword">#define</td> 294<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GST-VIDEO-OVERLAY-COMPOSITION-FORMAT-RGB:CAPS" title="GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_RGB">GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_RGB</a></td> 295</tr> 296<tr> 297<td class="define_keyword">#define</td> 298<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GST-VIDEO-OVERLAY-COMPOSITION-FORMAT-YUV:CAPS" title="GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_YUV">GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_YUV</a></td> 299</tr> 300<tr> 301<td class="define_keyword">#define</td> 302<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GST-VIDEO-OVERLAY-COMPOSITION-BLEND-FORMATS:CAPS" title="GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS">GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS</a></td> 303</tr> 304<tr> 305<td class="define_keyword">#define</td> 306<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GST-CAPS-FEATURE-META-GST-VIDEO-OVERLAY-COMPOSITION:CAPS" title="GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION">GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION</a></td> 307</tr> 308<tr> 309<td class="datatype_keyword">struct</td> 310<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayCompositionMeta" title="struct GstVideoOverlayCompositionMeta">GstVideoOverlayCompositionMeta</a></td> 311</tr> 312<tr> 313<td class="datatype_keyword">enum</td> 314<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayFormatFlags" title="enum GstVideoOverlayFormatFlags">GstVideoOverlayFormatFlags</a></td> 315</tr> 316<tr> 317<td class="datatype_keyword"> </td> 318<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle">GstVideoOverlayRectangle</a></td> 319</tr> 320</tbody> 321</table></div> 322</div> 323<div class="refsect1"> 324<a name="gst-plugins-base-libs-GstVideoOverlayRectangle.includes"></a><h2>Includes</h2> 325<pre class="synopsis">#include <gst/video/video.h> 326</pre> 327</div> 328<div class="refsect1"> 329<a name="gst-plugins-base-libs-GstVideoOverlayRectangle.description"></a><h2>Description</h2> 330<p>Functions to create and handle overlay compositions on video buffers.</p> 331<p>An overlay composition describes one or more overlay rectangles to be 332blended on top of a video buffer.</p> 333<p>This API serves two main purposes:</p> 334<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 335<li class="listitem"><p>it can be used to attach overlay information (subtitles or logos) 336to non-raw video buffers such as GL/VAAPI/VDPAU surfaces. The actual 337blending of the overlay can then be done by e.g. the video sink that 338processes these non-raw buffers.</p></li> 339<li class="listitem"><p>it can also be used to blend overlay rectangles on top of raw video 340buffers, thus consolidating blending functionality for raw video in 341one place.</p></li> 342</ul></div> 343<p>Together, this allows existing overlay elements to easily handle raw 344and non-raw video as input in without major changes (once the overlays 345have been put into a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> object anyway) - for raw 346video the overlay can just use the blending function to blend the data 347on top of the video, and for surface buffers it can just attach them to 348the buffer and let the sink render the overlays.</p> 349</div> 350<div class="refsect1"> 351<a name="gst-plugins-base-libs-GstVideoOverlayRectangle.functions_details"></a><h2>Functions</h2> 352<div class="refsect2"> 353<a name="gst-video-overlay-composition-new"></a><h3>gst_video_overlay_composition_new ()</h3> 354<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="returnvalue">GstVideoOverlayComposition</span></a> * 355gst_video_overlay_composition_new (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>);</pre> 356<p>Creates a new video overlay composition object to hold one or more 357overlay rectangles.</p> 358<div class="refsect3"> 359<a name="gst-video-overlay-composition-new.parameters"></a><h4>Parameters</h4> 360<div class="informaltable"><table class="informaltable" width="100%" border="0"> 361<colgroup> 362<col width="150px" class="parameters_name"> 363<col class="parameters_description"> 364<col width="200px" class="parameters_annotations"> 365</colgroup> 366<tbody><tr> 367<td class="parameter_name"><p>rectangle</p></td> 368<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> to add to the 369composition. </p></td> 370<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> 371</tr></tbody> 372</table></div> 373</div> 374<div class="refsect3"> 375<a name="gst-video-overlay-composition-new.returns"></a><h4>Returns</h4> 376<p>a new <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a>. Unref with 377<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-unref" title="gst_video_overlay_composition_unref ()"><code class="function">gst_video_overlay_composition_unref()</code></a> when no longer needed. </p> 378<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 379</div> 380</div> 381<hr> 382<div class="refsect2"> 383<a name="gst-video-overlay-composition-ref"></a><h3>gst_video_overlay_composition_ref ()</h3> 384<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="returnvalue">GstVideoOverlayComposition</span></a> * 385gst_video_overlay_composition_ref (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> *comp</code></em>);</pre> 386<p>Increases the refcount of the given composition by one.</p> 387<p>Note that the refcount affects the writeability 388of <em class="parameter"><code>comp</code></em> 389, use <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-make-writable" title="gst_video_overlay_composition_make_writable ()"><code class="function">gst_video_overlay_composition_make_writable()</code></a> to ensure 390a composition and its rectangles can be modified.</p> 391<div class="refsect3"> 392<a name="gst-video-overlay-composition-ref.parameters"></a><h4>Parameters</h4> 393<div class="informaltable"><table class="informaltable" width="100%" border="0"> 394<colgroup> 395<col width="150px" class="parameters_name"> 396<col class="parameters_description"> 397<col width="200px" class="parameters_annotations"> 398</colgroup> 399<tbody><tr> 400<td class="parameter_name"><p>comp</p></td> 401<td class="parameter_description"><p>a a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a>.</p></td> 402<td class="parameter_annotations"> </td> 403</tr></tbody> 404</table></div> 405</div> 406<div class="refsect3"> 407<a name="gst-video-overlay-composition-ref.returns"></a><h4>Returns</h4> 408<p><em class="parameter"><code>comp</code></em> 409. </p> 410<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 411</div> 412</div> 413<hr> 414<div class="refsect2"> 415<a name="gst-video-overlay-composition-unref"></a><h3>gst_video_overlay_composition_unref ()</h3> 416<pre class="programlisting"><span class="returnvalue">void</span> 417gst_video_overlay_composition_unref (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> *comp</code></em>);</pre> 418<p>Decreases the refcount of the composition. If the refcount reaches 0, the 419composition will be freed.</p> 420<div class="refsect3"> 421<a name="gst-video-overlay-composition-unref.parameters"></a><h4>Parameters</h4> 422<div class="informaltable"><table class="informaltable" width="100%" border="0"> 423<colgroup> 424<col width="150px" class="parameters_name"> 425<col class="parameters_description"> 426<col width="200px" class="parameters_annotations"> 427</colgroup> 428<tbody><tr> 429<td class="parameter_name"><p>comp</p></td> 430<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a>. </p></td> 431<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> 432</tr></tbody> 433</table></div> 434</div> 435</div> 436<hr> 437<div class="refsect2"> 438<a name="gst-video-overlay-composition-add-rectangle"></a><h3>gst_video_overlay_composition_add_rectangle ()</h3> 439<pre class="programlisting"><span class="returnvalue">void</span> 440gst_video_overlay_composition_add_rectangle 441 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> *comp</code></em>, 442 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>);</pre> 443<p>Adds an overlay rectangle to an existing overlay composition object. This 444must be done right after creating the overlay composition.</p> 445<div class="refsect3"> 446<a name="gst-video-overlay-composition-add-rectangle.parameters"></a><h4>Parameters</h4> 447<div class="informaltable"><table class="informaltable" width="100%" border="0"> 448<colgroup> 449<col width="150px" class="parameters_name"> 450<col class="parameters_description"> 451<col width="200px" class="parameters_annotations"> 452</colgroup> 453<tbody> 454<tr> 455<td class="parameter_name"><p>comp</p></td> 456<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a></p></td> 457<td class="parameter_annotations"> </td> 458</tr> 459<tr> 460<td class="parameter_name"><p>rectangle</p></td> 461<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> to add to the 462composition. </p></td> 463<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> 464</tr> 465</tbody> 466</table></div> 467</div> 468</div> 469<hr> 470<div class="refsect2"> 471<a name="gst-video-overlay-composition-n-rectangles"></a><h3>gst_video_overlay_composition_n_rectangles ()</h3> 472<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> 473gst_video_overlay_composition_n_rectangles 474 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> *comp</code></em>);</pre> 475<p>Returns the number of <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a>s contained in <em class="parameter"><code>comp</code></em> 476.</p> 477<div class="refsect3"> 478<a name="gst-video-overlay-composition-n-rectangles.parameters"></a><h4>Parameters</h4> 479<div class="informaltable"><table class="informaltable" width="100%" border="0"> 480<colgroup> 481<col width="150px" class="parameters_name"> 482<col class="parameters_description"> 483<col width="200px" class="parameters_annotations"> 484</colgroup> 485<tbody><tr> 486<td class="parameter_name"><p>comp</p></td> 487<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a></p></td> 488<td class="parameter_annotations"> </td> 489</tr></tbody> 490</table></div> 491</div> 492<div class="refsect3"> 493<a name="gst-video-overlay-composition-n-rectangles.returns"></a><h4>Returns</h4> 494<p> the number of rectangles</p> 495</div> 496</div> 497<hr> 498<div class="refsect2"> 499<a name="gst-video-overlay-composition-get-rectangle"></a><h3>gst_video_overlay_composition_get_rectangle ()</h3> 500<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="returnvalue">GstVideoOverlayRectangle</span></a> * 501gst_video_overlay_composition_get_rectangle 502 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> *comp</code></em>, 503 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);</pre> 504<p>Returns the <em class="parameter"><code>n</code></em> 505-th <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> contained in <em class="parameter"><code>comp</code></em> 506.</p> 507<div class="refsect3"> 508<a name="gst-video-overlay-composition-get-rectangle.parameters"></a><h4>Parameters</h4> 509<div class="informaltable"><table class="informaltable" width="100%" border="0"> 510<colgroup> 511<col width="150px" class="parameters_name"> 512<col class="parameters_description"> 513<col width="200px" class="parameters_annotations"> 514</colgroup> 515<tbody> 516<tr> 517<td class="parameter_name"><p>comp</p></td> 518<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a></p></td> 519<td class="parameter_annotations"> </td> 520</tr> 521<tr> 522<td class="parameter_name"><p>n</p></td> 523<td class="parameter_description"><p>number of the rectangle to get</p></td> 524<td class="parameter_annotations"> </td> 525</tr> 526</tbody> 527</table></div> 528</div> 529<div class="refsect3"> 530<a name="gst-video-overlay-composition-get-rectangle.returns"></a><h4>Returns</h4> 531<p>the <em class="parameter"><code>n</code></em> 532-th rectangle, or NULL if <em class="parameter"><code>n</code></em> 533is out of 534bounds. Will not return a new reference, the caller will need to 535obtain her own reference using <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-ref" title="gst_video_overlay_rectangle_ref ()"><code class="function">gst_video_overlay_rectangle_ref()</code></a> 536if needed. </p> 537<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> 538</div> 539</div> 540<hr> 541<div class="refsect2"> 542<a name="gst-video-overlay-composition-get-seqnum"></a><h3>gst_video_overlay_composition_get_seqnum ()</h3> 543<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> 544gst_video_overlay_composition_get_seqnum 545 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> *comp</code></em>);</pre> 546<p>Returns the sequence number of this composition. Sequence numbers are 547monotonically increasing and unique for overlay compositions and rectangles 548(meaning there will never be a rectangle with the same sequence number as 549a composition).</p> 550<div class="refsect3"> 551<a name="gst-video-overlay-composition-get-seqnum.parameters"></a><h4>Parameters</h4> 552<div class="informaltable"><table class="informaltable" width="100%" border="0"> 553<colgroup> 554<col width="150px" class="parameters_name"> 555<col class="parameters_description"> 556<col width="200px" class="parameters_annotations"> 557</colgroup> 558<tbody><tr> 559<td class="parameter_name"><p>comp</p></td> 560<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a></p></td> 561<td class="parameter_annotations"> </td> 562</tr></tbody> 563</table></div> 564</div> 565<div class="refsect3"> 566<a name="gst-video-overlay-composition-get-seqnum.returns"></a><h4>Returns</h4> 567<p> the sequence number of <em class="parameter"><code>comp</code></em> 568</p> 569</div> 570</div> 571<hr> 572<div class="refsect2"> 573<a name="gst-video-overlay-composition-copy"></a><h3>gst_video_overlay_composition_copy ()</h3> 574<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="returnvalue">GstVideoOverlayComposition</span></a> * 575gst_video_overlay_composition_copy (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> *comp</code></em>);</pre> 576<p>Makes a copy of <em class="parameter"><code>comp</code></em> 577 and all contained rectangles, so that it is possible 578to modify the composition and contained rectangles (e.g. add additional 579rectangles or change the render co-ordinates or render dimension). The 580actual overlay pixel data buffers contained in the rectangles are not 581copied.</p> 582<div class="refsect3"> 583<a name="gst-video-overlay-composition-copy.parameters"></a><h4>Parameters</h4> 584<div class="informaltable"><table class="informaltable" width="100%" border="0"> 585<colgroup> 586<col width="150px" class="parameters_name"> 587<col class="parameters_description"> 588<col width="200px" class="parameters_annotations"> 589</colgroup> 590<tbody><tr> 591<td class="parameter_name"><p>comp</p></td> 592<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> to copy. </p></td> 593<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> 594</tr></tbody> 595</table></div> 596</div> 597<div class="refsect3"> 598<a name="gst-video-overlay-composition-copy.returns"></a><h4>Returns</h4> 599<p>a new <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> equivalent 600to <em class="parameter"><code>comp</code></em> 601. </p> 602<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 603</div> 604</div> 605<hr> 606<div class="refsect2"> 607<a name="gst-video-overlay-composition-make-writable"></a><h3>gst_video_overlay_composition_make_writable ()</h3> 608<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="returnvalue">GstVideoOverlayComposition</span></a> * 609gst_video_overlay_composition_make_writable 610 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> *comp</code></em>);</pre> 611<p>Takes ownership of <em class="parameter"><code>comp</code></em> 612 and returns a version of <em class="parameter"><code>comp</code></em> 613 that is writable 614(i.e. can be modified). Will either return <em class="parameter"><code>comp</code></em> 615 right away, or create a 616new writable copy of <em class="parameter"><code>comp</code></em> 617 and unref <em class="parameter"><code>comp</code></em> 618 itself. All the contained 619rectangles will also be copied, but the actual overlay pixel data buffers 620contained in the rectangles are not copied.</p> 621<div class="refsect3"> 622<a name="gst-video-overlay-composition-make-writable.parameters"></a><h4>Parameters</h4> 623<div class="informaltable"><table class="informaltable" width="100%" border="0"> 624<colgroup> 625<col width="150px" class="parameters_name"> 626<col class="parameters_description"> 627<col width="200px" class="parameters_annotations"> 628</colgroup> 629<tbody><tr> 630<td class="parameter_name"><p>comp</p></td> 631<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> to copy. </p></td> 632<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> 633</tr></tbody> 634</table></div> 635</div> 636<div class="refsect3"> 637<a name="gst-video-overlay-composition-make-writable.returns"></a><h4>Returns</h4> 638<p>a writable <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> 639equivalent to <em class="parameter"><code>comp</code></em> 640. </p> 641<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 642</div> 643</div> 644<hr> 645<div class="refsect2"> 646<a name="gst-video-overlay-composition-blend"></a><h3>gst_video_overlay_composition_blend ()</h3> 647<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 648gst_video_overlay_composition_blend (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> *comp</code></em>, 649 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFrame" title="struct GstVideoFrame"><span class="type">GstVideoFrame</span></a> *video_buf</code></em>);</pre> 650<p>Blends the overlay rectangles in <em class="parameter"><code>comp</code></em> 651 on top of the raw video data 652contained in <em class="parameter"><code>video_buf</code></em> 653. The data in <em class="parameter"><code>video_buf</code></em> 654 must be writable and 655mapped appropriately.</p> 656<p>Since <em class="parameter"><code>video_buf</code></em> 657 data is read and will be modified, it ought be 658mapped with flag GST_MAP_READWRITE.</p> 659<div class="refsect3"> 660<a name="gst-video-overlay-composition-blend.parameters"></a><h4>Parameters</h4> 661<div class="informaltable"><table class="informaltable" width="100%" border="0"> 662<colgroup> 663<col width="150px" class="parameters_name"> 664<col class="parameters_description"> 665<col width="200px" class="parameters_annotations"> 666</colgroup> 667<tbody> 668<tr> 669<td class="parameter_name"><p>comp</p></td> 670<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a></p></td> 671<td class="parameter_annotations"> </td> 672</tr> 673<tr> 674<td class="parameter_name"><p>video_buf</p></td> 675<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFrame" title="struct GstVideoFrame"><span class="type">GstVideoFrame</span></a> containing raw video data in a 676supported format. It should be mapped using GST_MAP_READWRITE</p></td> 677<td class="parameter_annotations"> </td> 678</tr> 679</tbody> 680</table></div> 681</div> 682</div> 683<hr> 684<div class="refsect2"> 685<a name="gst-video-overlay-composition-meta-get-info"></a><h3>gst_video_overlay_composition_meta_get_info ()</h3> 686<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstMeta.html#GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> * 687gst_video_overlay_composition_meta_get_info 688 (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> 689</div> 690<hr> 691<div class="refsect2"> 692<a name="gst-buffer-add-video-overlay-composition-meta"></a><h3>gst_buffer_add_video_overlay_composition_meta ()</h3> 693<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayCompositionMeta" title="struct GstVideoOverlayCompositionMeta"><span class="returnvalue">GstVideoOverlayCompositionMeta</span></a> * 694gst_buffer_add_video_overlay_composition_meta 695 (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> *buf</code></em>, 696 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> *comp</code></em>);</pre> 697<p>Sets an overlay composition on a buffer. The buffer will obtain its own 698reference to the composition, meaning this function does not take ownership 699of <em class="parameter"><code>comp</code></em> 700.</p> 701<div class="refsect3"> 702<a name="gst-buffer-add-video-overlay-composition-meta.parameters"></a><h4>Parameters</h4> 703<div class="informaltable"><table class="informaltable" width="100%" border="0"> 704<colgroup> 705<col width="150px" class="parameters_name"> 706<col class="parameters_description"> 707<col width="200px" class="parameters_annotations"> 708</colgroup> 709<tbody> 710<tr> 711<td class="parameter_name"><p>buf</p></td> 712<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a></p></td> 713<td class="parameter_annotations"> </td> 714</tr> 715<tr> 716<td class="parameter_name"><p>comp</p></td> 717<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a>. </p></td> 718<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 719</tr> 720</tbody> 721</table></div> 722</div> 723<div class="refsect3"> 724<a name="gst-buffer-add-video-overlay-composition-meta.returns"></a><h4>Returns</h4> 725<p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayCompositionMeta" title="struct GstVideoOverlayCompositionMeta"><span class="type">GstVideoOverlayCompositionMeta</span></a>. </p> 726<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> 727</div> 728</div> 729<hr> 730<div class="refsect2"> 731<a name="gst-buffer-get-video-overlay-composition-meta"></a><h3>gst_buffer_get_video_overlay_composition_meta()</h3> 732<pre class="programlisting">#define gst_buffer_get_video_overlay_composition_meta(b)</pre> 733</div> 734<hr> 735<div class="refsect2"> 736<a name="gst-buffer-remove-video-overlay-composition-meta"></a><h3>gst_buffer_remove_video_overlay_composition_meta()</h3> 737<pre class="programlisting">#define gst_buffer_remove_video_overlay_composition_meta(b,m)</pre> 738</div> 739<hr> 740<div class="refsect2"> 741<a name="gst-video-overlay-rectangle-new-raw"></a><h3>gst_video_overlay_rectangle_new_raw ()</h3> 742<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="returnvalue">GstVideoOverlayRectangle</span></a> * 743gst_video_overlay_rectangle_new_raw (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> *pixels</code></em>, 744 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> render_x</code></em>, 745 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> render_y</code></em>, 746 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> render_width</code></em>, 747 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> render_height</code></em>, 748 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayFormatFlags" title="enum GstVideoOverlayFormatFlags"><span class="type">GstVideoOverlayFormatFlags</span></a> flags</code></em>);</pre> 749<p>Creates a new video overlay rectangle with ARGB or AYUV pixel data. 750The layout in case of ARGB of the components in memory is B-G-R-A 751on little-endian platforms 752(corresponding to <a class="link" href="gst-plugins-base-libs-GstVideo.html#GST-VIDEO-FORMAT-BGRA:CAPS"><span class="type">GST_VIDEO_FORMAT_BGRA</span></a>) and A-R-G-B on big-endian 753platforms (corresponding to <a class="link" href="gst-plugins-base-libs-GstVideo.html#GST-VIDEO-FORMAT-ARGB:CAPS"><span class="type">GST_VIDEO_FORMAT_ARGB</span></a>). In other words, 754pixels are treated as 32-bit words and the lowest 8 bits then contain 755the blue component value and the highest 8 bits contain the alpha 756component value. Unless specified in the flags, the RGB values are 757non-premultiplied. This is the format that is used by most hardware, 758and also many rendering libraries such as Cairo, for example. 759The pixel data buffer must have <a class="link" href="gst-plugins-base-libs-GstMeta-for-video.html#GstVideoMeta" title="struct GstVideoMeta"><span class="type">GstVideoMeta</span></a> set.</p> 760<div class="refsect3"> 761<a name="gst-video-overlay-rectangle-new-raw.parameters"></a><h4>Parameters</h4> 762<div class="informaltable"><table class="informaltable" width="100%" border="0"> 763<colgroup> 764<col width="150px" class="parameters_name"> 765<col class="parameters_description"> 766<col width="200px" class="parameters_annotations"> 767</colgroup> 768<tbody> 769<tr> 770<td class="parameter_name"><p>pixels</p></td> 771<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> pointing to the pixel memory. </p></td> 772<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> 773</tr> 774<tr> 775<td class="parameter_name"><p>render_x</p></td> 776<td class="parameter_description"><p>the X co-ordinate on the video where the top-left corner of this 777overlay rectangle should be rendered to</p></td> 778<td class="parameter_annotations"> </td> 779</tr> 780<tr> 781<td class="parameter_name"><p>render_y</p></td> 782<td class="parameter_description"><p>the Y co-ordinate on the video where the top-left corner of this 783overlay rectangle should be rendered to</p></td> 784<td class="parameter_annotations"> </td> 785</tr> 786<tr> 787<td class="parameter_name"><p>render_width</p></td> 788<td class="parameter_description"><p>the render width of this rectangle on the video</p></td> 789<td class="parameter_annotations"> </td> 790</tr> 791<tr> 792<td class="parameter_name"><p>render_height</p></td> 793<td class="parameter_description"><p>the render height of this rectangle on the video</p></td> 794<td class="parameter_annotations"> </td> 795</tr> 796<tr> 797<td class="parameter_name"><p>flags</p></td> 798<td class="parameter_description"><p>flags</p></td> 799<td class="parameter_annotations"> </td> 800</tr> 801</tbody> 802</table></div> 803</div> 804<div class="refsect3"> 805<a name="gst-video-overlay-rectangle-new-raw.returns"></a><h4>Returns</h4> 806<p>a new <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a>. Unref with 807<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-unref" title="gst_video_overlay_rectangle_unref ()"><code class="function">gst_video_overlay_rectangle_unref()</code></a> when no longer needed. </p> 808<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 809</div> 810</div> 811<hr> 812<div class="refsect2"> 813<a name="gst-video-overlay-rectangle-ref"></a><h3>gst_video_overlay_rectangle_ref ()</h3> 814<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="returnvalue">GstVideoOverlayRectangle</span></a> * 815gst_video_overlay_rectangle_ref (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *comp</code></em>);</pre> 816<p>Increases the refcount of the given rectangle by one.</p> 817<p>Note that the refcount affects the writeability 818of <em class="parameter"><code>comp</code></em> 819, use <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-copy" title="gst_video_overlay_rectangle_copy ()"><code class="function">gst_video_overlay_rectangle_copy()</code></a> to ensure a rectangle can 820be modified (there is no <code class="function">gst_video_overlay_rectangle_make_writable()</code> because 821it is unlikely that someone will hold the single reference to the rectangle 822and not know that that's the case).</p> 823<div class="refsect3"> 824<a name="gst-video-overlay-rectangle-ref.parameters"></a><h4>Parameters</h4> 825<div class="informaltable"><table class="informaltable" width="100%" border="0"> 826<colgroup> 827<col width="150px" class="parameters_name"> 828<col class="parameters_description"> 829<col width="200px" class="parameters_annotations"> 830</colgroup> 831<tbody><tr> 832<td class="parameter_name"><p>comp</p></td> 833<td class="parameter_description"><p>a a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a>.</p></td> 834<td class="parameter_annotations"> </td> 835</tr></tbody> 836</table></div> 837</div> 838<div class="refsect3"> 839<a name="gst-video-overlay-rectangle-ref.returns"></a><h4>Returns</h4> 840<p><em class="parameter"><code>comp</code></em> 841. </p> 842<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 843</div> 844</div> 845<hr> 846<div class="refsect2"> 847<a name="gst-video-overlay-rectangle-unref"></a><h3>gst_video_overlay_rectangle_unref ()</h3> 848<pre class="programlisting"><span class="returnvalue">void</span> 849gst_video_overlay_rectangle_unref (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *comp</code></em>);</pre> 850<p>Decreases the refcount of the rectangle. If the refcount reaches 0, the 851rectangle will be freed.</p> 852<div class="refsect3"> 853<a name="gst-video-overlay-rectangle-unref.parameters"></a><h4>Parameters</h4> 854<div class="informaltable"><table class="informaltable" width="100%" border="0"> 855<colgroup> 856<col width="150px" class="parameters_name"> 857<col class="parameters_description"> 858<col width="200px" class="parameters_annotations"> 859</colgroup> 860<tbody><tr> 861<td class="parameter_name"><p>comp</p></td> 862<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a>. </p></td> 863<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> 864</tr></tbody> 865</table></div> 866</div> 867</div> 868<hr> 869<div class="refsect2"> 870<a name="gst-video-overlay-rectangle-get-pixels-raw"></a><h3>gst_video_overlay_rectangle_get_pixels_raw ()</h3> 871<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 872gst_video_overlay_rectangle_get_pixels_raw 873 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>, 874 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayFormatFlags" title="enum GstVideoOverlayFormatFlags"><span class="type">GstVideoOverlayFormatFlags</span></a> flags</code></em>);</pre> 875<div class="refsect3"> 876<a name="gst-video-overlay-rectangle-get-pixels-raw.parameters"></a><h4>Parameters</h4> 877<div class="informaltable"><table class="informaltable" width="100%" border="0"> 878<colgroup> 879<col width="150px" class="parameters_name"> 880<col class="parameters_description"> 881<col width="200px" class="parameters_annotations"> 882</colgroup> 883<tbody> 884<tr> 885<td class="parameter_name"><p>rectangle</p></td> 886<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 887<td class="parameter_annotations"> </td> 888</tr> 889<tr> 890<td class="parameter_name"><p>flags</p></td> 891<td class="parameter_description"><p>flags 892If a global_alpha value != 1 is set for the rectangle, the caller 893should set the <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GST-VIDEO-OVERLAY-FORMAT-FLAG-GLOBAL-ALPHA:CAPS"><span class="type">GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA</span></a> flag 894if he wants to apply global-alpha himself. If the flag is not set 895global_alpha is applied internally before returning the pixel-data.</p></td> 896<td class="parameter_annotations"> </td> 897</tr> 898</tbody> 899</table></div> 900</div> 901<div class="refsect3"> 902<a name="gst-video-overlay-rectangle-get-pixels-raw.returns"></a><h4>Returns</h4> 903<p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> holding the pixel data with 904format as originally provided and specified in video meta with 905width and height of the render dimensions as per 906<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-render-rectangle" title="gst_video_overlay_rectangle_get_render_rectangle ()"><code class="function">gst_video_overlay_rectangle_get_render_rectangle()</code></a>. This function does 907not return a reference, the caller should obtain a reference of her own 908with <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#gst-buffer-ref"><code class="function">gst_buffer_ref()</code></a> if needed. </p> 909<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> 910</div> 911</div> 912<hr> 913<div class="refsect2"> 914<a name="gst-video-overlay-rectangle-get-pixels-argb"></a><h3>gst_video_overlay_rectangle_get_pixels_argb ()</h3> 915<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 916gst_video_overlay_rectangle_get_pixels_argb 917 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>, 918 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayFormatFlags" title="enum GstVideoOverlayFormatFlags"><span class="type">GstVideoOverlayFormatFlags</span></a> flags</code></em>);</pre> 919<div class="refsect3"> 920<a name="gst-video-overlay-rectangle-get-pixels-argb.parameters"></a><h4>Parameters</h4> 921<div class="informaltable"><table class="informaltable" width="100%" border="0"> 922<colgroup> 923<col width="150px" class="parameters_name"> 924<col class="parameters_description"> 925<col width="200px" class="parameters_annotations"> 926</colgroup> 927<tbody> 928<tr> 929<td class="parameter_name"><p>rectangle</p></td> 930<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 931<td class="parameter_annotations"> </td> 932</tr> 933<tr> 934<td class="parameter_name"><p>flags</p></td> 935<td class="parameter_description"><p>flags 936If a global_alpha value != 1 is set for the rectangle, the caller 937should set the <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GST-VIDEO-OVERLAY-FORMAT-FLAG-GLOBAL-ALPHA:CAPS"><span class="type">GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA</span></a> flag 938if he wants to apply global-alpha himself. If the flag is not set 939global_alpha is applied internally before returning the pixel-data.</p></td> 940<td class="parameter_annotations"> </td> 941</tr> 942</tbody> 943</table></div> 944</div> 945<div class="refsect3"> 946<a name="gst-video-overlay-rectangle-get-pixels-argb.returns"></a><h4>Returns</h4> 947<p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> holding the ARGB pixel data with 948width and height of the render dimensions as per 949<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-render-rectangle" title="gst_video_overlay_rectangle_get_render_rectangle ()"><code class="function">gst_video_overlay_rectangle_get_render_rectangle()</code></a>. This function does 950not return a reference, the caller should obtain a reference of her own 951with <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#gst-buffer-ref"><code class="function">gst_buffer_ref()</code></a> if needed. </p> 952<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> 953</div> 954</div> 955<hr> 956<div class="refsect2"> 957<a name="gst-video-overlay-rectangle-get-pixels-ayuv"></a><h3>gst_video_overlay_rectangle_get_pixels_ayuv ()</h3> 958<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 959gst_video_overlay_rectangle_get_pixels_ayuv 960 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>, 961 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayFormatFlags" title="enum GstVideoOverlayFormatFlags"><span class="type">GstVideoOverlayFormatFlags</span></a> flags</code></em>);</pre> 962<div class="refsect3"> 963<a name="gst-video-overlay-rectangle-get-pixels-ayuv.parameters"></a><h4>Parameters</h4> 964<div class="informaltable"><table class="informaltable" width="100%" border="0"> 965<colgroup> 966<col width="150px" class="parameters_name"> 967<col class="parameters_description"> 968<col width="200px" class="parameters_annotations"> 969</colgroup> 970<tbody> 971<tr> 972<td class="parameter_name"><p>rectangle</p></td> 973<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 974<td class="parameter_annotations"> </td> 975</tr> 976<tr> 977<td class="parameter_name"><p>flags</p></td> 978<td class="parameter_description"><p>flags 979If a global_alpha value != 1 is set for the rectangle, the caller 980should set the <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GST-VIDEO-OVERLAY-FORMAT-FLAG-GLOBAL-ALPHA:CAPS"><span class="type">GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA</span></a> flag 981if he wants to apply global-alpha himself. If the flag is not set 982global_alpha is applied internally before returning the pixel-data.</p></td> 983<td class="parameter_annotations"> </td> 984</tr> 985</tbody> 986</table></div> 987</div> 988<div class="refsect3"> 989<a name="gst-video-overlay-rectangle-get-pixels-ayuv.returns"></a><h4>Returns</h4> 990<p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> holding the AYUV pixel data with 991width and height of the render dimensions as per 992<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-render-rectangle" title="gst_video_overlay_rectangle_get_render_rectangle ()"><code class="function">gst_video_overlay_rectangle_get_render_rectangle()</code></a>. This function does 993not return a reference, the caller should obtain a reference of her own 994with <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#gst-buffer-ref"><code class="function">gst_buffer_ref()</code></a> if needed. </p> 995<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> 996</div> 997</div> 998<hr> 999<div class="refsect2"> 1000<a name="gst-video-overlay-rectangle-get-pixels-unscaled-raw"></a><h3>gst_video_overlay_rectangle_get_pixels_unscaled_raw ()</h3> 1001<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 1002gst_video_overlay_rectangle_get_pixels_unscaled_raw 1003 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>, 1004 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayFormatFlags" title="enum GstVideoOverlayFormatFlags"><span class="type">GstVideoOverlayFormatFlags</span></a> flags</code></em>);</pre> 1005<p>Retrieves the pixel data as it is. This is useful if the caller can 1006do the scaling itself when handling the overlaying. The rectangle will 1007need to be scaled to the render dimensions, which can be retrieved using 1008<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-render-rectangle" title="gst_video_overlay_rectangle_get_render_rectangle ()"><code class="function">gst_video_overlay_rectangle_get_render_rectangle()</code></a>.</p> 1009<div class="refsect3"> 1010<a name="gst-video-overlay-rectangle-get-pixels-unscaled-raw.parameters"></a><h4>Parameters</h4> 1011<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1012<colgroup> 1013<col width="150px" class="parameters_name"> 1014<col class="parameters_description"> 1015<col width="200px" class="parameters_annotations"> 1016</colgroup> 1017<tbody> 1018<tr> 1019<td class="parameter_name"><p>rectangle</p></td> 1020<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 1021<td class="parameter_annotations"> </td> 1022</tr> 1023<tr> 1024<td class="parameter_name"><p>flags</p></td> 1025<td class="parameter_description"><p>flags. 1026If a global_alpha value != 1 is set for the rectangle, the caller 1027should set the <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GST-VIDEO-OVERLAY-FORMAT-FLAG-GLOBAL-ALPHA:CAPS"><span class="type">GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA</span></a> flag 1028if he wants to apply global-alpha himself. If the flag is not set 1029global_alpha is applied internally before returning the pixel-data.</p></td> 1030<td class="parameter_annotations"> </td> 1031</tr> 1032</tbody> 1033</table></div> 1034</div> 1035<div class="refsect3"> 1036<a name="gst-video-overlay-rectangle-get-pixels-unscaled-raw.returns"></a><h4>Returns</h4> 1037<p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> holding the pixel data with 1038<a class="link" href="gst-plugins-base-libs-GstMeta-for-video.html#GstVideoMeta" title="struct GstVideoMeta"><span class="type">GstVideoMeta</span></a> set. This function does not return a reference, the caller 1039should obtain a reference of her own with <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#gst-buffer-ref"><code class="function">gst_buffer_ref()</code></a> if needed. </p> 1040<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> 1041</div> 1042</div> 1043<hr> 1044<div class="refsect2"> 1045<a name="gst-video-overlay-rectangle-get-pixels-unscaled-argb"></a><h3>gst_video_overlay_rectangle_get_pixels_unscaled_argb ()</h3> 1046<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 1047gst_video_overlay_rectangle_get_pixels_unscaled_argb 1048 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>, 1049 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayFormatFlags" title="enum GstVideoOverlayFormatFlags"><span class="type">GstVideoOverlayFormatFlags</span></a> flags</code></em>);</pre> 1050<p>Retrieves the pixel data as it is. This is useful if the caller can 1051do the scaling itself when handling the overlaying. The rectangle will 1052need to be scaled to the render dimensions, which can be retrieved using 1053<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-render-rectangle" title="gst_video_overlay_rectangle_get_render_rectangle ()"><code class="function">gst_video_overlay_rectangle_get_render_rectangle()</code></a>.</p> 1054<div class="refsect3"> 1055<a name="gst-video-overlay-rectangle-get-pixels-unscaled-argb.parameters"></a><h4>Parameters</h4> 1056<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1057<colgroup> 1058<col width="150px" class="parameters_name"> 1059<col class="parameters_description"> 1060<col width="200px" class="parameters_annotations"> 1061</colgroup> 1062<tbody> 1063<tr> 1064<td class="parameter_name"><p>rectangle</p></td> 1065<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 1066<td class="parameter_annotations"> </td> 1067</tr> 1068<tr> 1069<td class="parameter_name"><p>flags</p></td> 1070<td class="parameter_description"><p>flags. 1071If a global_alpha value != 1 is set for the rectangle, the caller 1072should set the <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GST-VIDEO-OVERLAY-FORMAT-FLAG-GLOBAL-ALPHA:CAPS"><span class="type">GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA</span></a> flag 1073if he wants to apply global-alpha himself. If the flag is not set 1074global_alpha is applied internally before returning the pixel-data.</p></td> 1075<td class="parameter_annotations"> </td> 1076</tr> 1077</tbody> 1078</table></div> 1079</div> 1080<div class="refsect3"> 1081<a name="gst-video-overlay-rectangle-get-pixels-unscaled-argb.returns"></a><h4>Returns</h4> 1082<p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> holding the ARGB pixel data with 1083<a class="link" href="gst-plugins-base-libs-GstMeta-for-video.html#GstVideoMeta" title="struct GstVideoMeta"><span class="type">GstVideoMeta</span></a> set. This function does not return a reference, the caller 1084should obtain a reference of her own with <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#gst-buffer-ref"><code class="function">gst_buffer_ref()</code></a> if needed. </p> 1085<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> 1086</div> 1087</div> 1088<hr> 1089<div class="refsect2"> 1090<a name="gst-video-overlay-rectangle-get-pixels-unscaled-ayuv"></a><h3>gst_video_overlay_rectangle_get_pixels_unscaled_ayuv ()</h3> 1091<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 1092gst_video_overlay_rectangle_get_pixels_unscaled_ayuv 1093 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>, 1094 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayFormatFlags" title="enum GstVideoOverlayFormatFlags"><span class="type">GstVideoOverlayFormatFlags</span></a> flags</code></em>);</pre> 1095<p>Retrieves the pixel data as it is. This is useful if the caller can 1096do the scaling itself when handling the overlaying. The rectangle will 1097need to be scaled to the render dimensions, which can be retrieved using 1098<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-get-render-rectangle" title="gst_video_overlay_rectangle_get_render_rectangle ()"><code class="function">gst_video_overlay_rectangle_get_render_rectangle()</code></a>.</p> 1099<div class="refsect3"> 1100<a name="gst-video-overlay-rectangle-get-pixels-unscaled-ayuv.parameters"></a><h4>Parameters</h4> 1101<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1102<colgroup> 1103<col width="150px" class="parameters_name"> 1104<col class="parameters_description"> 1105<col width="200px" class="parameters_annotations"> 1106</colgroup> 1107<tbody> 1108<tr> 1109<td class="parameter_name"><p>rectangle</p></td> 1110<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 1111<td class="parameter_annotations"> </td> 1112</tr> 1113<tr> 1114<td class="parameter_name"><p>flags</p></td> 1115<td class="parameter_description"><p>flags. 1116If a global_alpha value != 1 is set for the rectangle, the caller 1117should set the <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GST-VIDEO-OVERLAY-FORMAT-FLAG-GLOBAL-ALPHA:CAPS"><span class="type">GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA</span></a> flag 1118if he wants to apply global-alpha himself. If the flag is not set 1119global_alpha is applied internally before returning the pixel-data.</p></td> 1120<td class="parameter_annotations"> </td> 1121</tr> 1122</tbody> 1123</table></div> 1124</div> 1125<div class="refsect3"> 1126<a name="gst-video-overlay-rectangle-get-pixels-unscaled-ayuv.returns"></a><h4>Returns</h4> 1127<p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> holding the AYUV pixel data with 1128<a class="link" href="gst-plugins-base-libs-GstMeta-for-video.html#GstVideoMeta" title="struct GstVideoMeta"><span class="type">GstVideoMeta</span></a> set. This function does not return a reference, the caller 1129should obtain a reference of her own with <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#gst-buffer-ref"><code class="function">gst_buffer_ref()</code></a> if needed. </p> 1130<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> 1131</div> 1132</div> 1133<hr> 1134<div class="refsect2"> 1135<a name="gst-video-overlay-rectangle-get-render-rectangle"></a><h3>gst_video_overlay_rectangle_get_render_rectangle ()</h3> 1136<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 1137gst_video_overlay_rectangle_get_render_rectangle 1138 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>, 1139 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *render_x</code></em>, 1140 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *render_y</code></em>, 1141 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *render_width</code></em>, 1142 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *render_height</code></em>);</pre> 1143<p>Retrieves the render position and render dimension of the overlay 1144rectangle on the video.</p> 1145<div class="refsect3"> 1146<a name="gst-video-overlay-rectangle-get-render-rectangle.parameters"></a><h4>Parameters</h4> 1147<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1148<colgroup> 1149<col width="150px" class="parameters_name"> 1150<col class="parameters_description"> 1151<col width="200px" class="parameters_annotations"> 1152</colgroup> 1153<tbody> 1154<tr> 1155<td class="parameter_name"><p>rectangle</p></td> 1156<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 1157<td class="parameter_annotations"> </td> 1158</tr> 1159<tr> 1160<td class="parameter_name"><p>render_x</p></td> 1161<td class="parameter_description"><p>address where to store the X render offset. </p></td> 1162<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1163</tr> 1164<tr> 1165<td class="parameter_name"><p>render_y</p></td> 1166<td class="parameter_description"><p>address where to store the Y render offset. </p></td> 1167<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1168</tr> 1169<tr> 1170<td class="parameter_name"><p>render_width</p></td> 1171<td class="parameter_description"><p>address where to store the render width. </p></td> 1172<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1173</tr> 1174<tr> 1175<td class="parameter_name"><p>render_height</p></td> 1176<td class="parameter_description"><p>address where to store the render height. </p></td> 1177<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1178</tr> 1179</tbody> 1180</table></div> 1181</div> 1182<div class="refsect3"> 1183<a name="gst-video-overlay-rectangle-get-render-rectangle.returns"></a><h4>Returns</h4> 1184<p> TRUE if valid render dimensions were retrieved.</p> 1185</div> 1186</div> 1187<hr> 1188<div class="refsect2"> 1189<a name="gst-video-overlay-rectangle-get-seqnum"></a><h3>gst_video_overlay_rectangle_get_seqnum ()</h3> 1190<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> 1191gst_video_overlay_rectangle_get_seqnum 1192 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>);</pre> 1193<p>Returns the sequence number of this rectangle. Sequence numbers are 1194monotonically increasing and unique for overlay compositions and rectangles 1195(meaning there will never be a rectangle with the same sequence number as 1196a composition).</p> 1197<p>Using the sequence number of a rectangle as an indicator for changed 1198pixel-data of a rectangle is dangereous. Some API calls, like e.g. 1199<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-rectangle-set-global-alpha" title="gst_video_overlay_rectangle_set_global_alpha ()"><code class="function">gst_video_overlay_rectangle_set_global_alpha()</code></a>, automatically update 1200the per rectangle sequence number, which is misleading for renderers/ 1201consumers, that handle global-alpha themselves. For them the 1202pixel-data returned by gst_video_overlay_rectangle_get_pixels_*() 1203wont be different for different global-alpha values. In this case a 1204renderer could also use the GstBuffer pointers as a hint for changed 1205pixel-data.</p> 1206<div class="refsect3"> 1207<a name="gst-video-overlay-rectangle-get-seqnum.parameters"></a><h4>Parameters</h4> 1208<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1209<colgroup> 1210<col width="150px" class="parameters_name"> 1211<col class="parameters_description"> 1212<col width="200px" class="parameters_annotations"> 1213</colgroup> 1214<tbody><tr> 1215<td class="parameter_name"><p>rectangle</p></td> 1216<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 1217<td class="parameter_annotations"> </td> 1218</tr></tbody> 1219</table></div> 1220</div> 1221<div class="refsect3"> 1222<a name="gst-video-overlay-rectangle-get-seqnum.returns"></a><h4>Returns</h4> 1223<p> the sequence number of <em class="parameter"><code>rectangle</code></em> 1224</p> 1225</div> 1226</div> 1227<hr> 1228<div class="refsect2"> 1229<a name="gst-video-overlay-rectangle-set-render-rectangle"></a><h3>gst_video_overlay_rectangle_set_render_rectangle ()</h3> 1230<pre class="programlisting"><span class="returnvalue">void</span> 1231gst_video_overlay_rectangle_set_render_rectangle 1232 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>, 1233 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> render_x</code></em>, 1234 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> render_y</code></em>, 1235 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> render_width</code></em>, 1236 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> render_height</code></em>);</pre> 1237<p>Sets the render position and dimensions of the rectangle on the video. 1238This function is mainly for elements that modify the size of the video 1239in some way (e.g. through scaling or cropping) and need to adjust the 1240details of any overlays to match the operation that changed the size.</p> 1241<p><em class="parameter"><code>rectangle</code></em> 1242 must be writable, meaning its refcount must be 1. You can 1243make the rectangles inside a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> writable using 1244<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-make-writable" title="gst_video_overlay_composition_make_writable ()"><code class="function">gst_video_overlay_composition_make_writable()</code></a> or 1245<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-copy" title="gst_video_overlay_composition_copy ()"><code class="function">gst_video_overlay_composition_copy()</code></a>.</p> 1246<div class="refsect3"> 1247<a name="gst-video-overlay-rectangle-set-render-rectangle.parameters"></a><h4>Parameters</h4> 1248<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1249<colgroup> 1250<col width="150px" class="parameters_name"> 1251<col class="parameters_description"> 1252<col width="200px" class="parameters_annotations"> 1253</colgroup> 1254<tbody> 1255<tr> 1256<td class="parameter_name"><p>rectangle</p></td> 1257<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 1258<td class="parameter_annotations"> </td> 1259</tr> 1260<tr> 1261<td class="parameter_name"><p>render_x</p></td> 1262<td class="parameter_description"><p>render X position of rectangle on video</p></td> 1263<td class="parameter_annotations"> </td> 1264</tr> 1265<tr> 1266<td class="parameter_name"><p>render_y</p></td> 1267<td class="parameter_description"><p>render Y position of rectangle on video</p></td> 1268<td class="parameter_annotations"> </td> 1269</tr> 1270<tr> 1271<td class="parameter_name"><p>render_width</p></td> 1272<td class="parameter_description"><p>render width of rectangle</p></td> 1273<td class="parameter_annotations"> </td> 1274</tr> 1275<tr> 1276<td class="parameter_name"><p>render_height</p></td> 1277<td class="parameter_description"><p>render height of rectangle</p></td> 1278<td class="parameter_annotations"> </td> 1279</tr> 1280</tbody> 1281</table></div> 1282</div> 1283</div> 1284<hr> 1285<div class="refsect2"> 1286<a name="gst-video-overlay-rectangle-copy"></a><h3>gst_video_overlay_rectangle_copy ()</h3> 1287<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="returnvalue">GstVideoOverlayRectangle</span></a> * 1288gst_video_overlay_rectangle_copy (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>);</pre> 1289<p>Makes a copy of <em class="parameter"><code>rectangle</code></em> 1290, so that it is possible to modify it 1291(e.g. to change the render co-ordinates or render dimension). The 1292actual overlay pixel data buffers contained in the rectangle are not 1293copied.</p> 1294<div class="refsect3"> 1295<a name="gst-video-overlay-rectangle-copy.parameters"></a><h4>Parameters</h4> 1296<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1297<colgroup> 1298<col width="150px" class="parameters_name"> 1299<col class="parameters_description"> 1300<col width="200px" class="parameters_annotations"> 1301</colgroup> 1302<tbody><tr> 1303<td class="parameter_name"><p>rectangle</p></td> 1304<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> to copy. </p></td> 1305<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> 1306</tr></tbody> 1307</table></div> 1308</div> 1309<div class="refsect3"> 1310<a name="gst-video-overlay-rectangle-copy.returns"></a><h4>Returns</h4> 1311<p>a new <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> equivalent 1312to <em class="parameter"><code>rectangle</code></em> 1313. </p> 1314<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 1315</div> 1316</div> 1317<hr> 1318<div class="refsect2"> 1319<a name="gst-video-overlay-rectangle-get-flags"></a><h3>gst_video_overlay_rectangle_get_flags ()</h3> 1320<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayFormatFlags" title="enum GstVideoOverlayFormatFlags"><span class="returnvalue">GstVideoOverlayFormatFlags</span></a> 1321gst_video_overlay_rectangle_get_flags (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>);</pre> 1322<p>Retrieves the flags associated with a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a>. 1323This is useful if the caller can handle both premultiplied alpha and 1324non premultiplied alpha, for example. By knowing whether the rectangle 1325uses premultiplied or not, it can request the pixel data in the format 1326it is stored in, to avoid unnecessary conversion.</p> 1327<div class="refsect3"> 1328<a name="gst-video-overlay-rectangle-get-flags.parameters"></a><h4>Parameters</h4> 1329<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1330<colgroup> 1331<col width="150px" class="parameters_name"> 1332<col class="parameters_description"> 1333<col width="200px" class="parameters_annotations"> 1334</colgroup> 1335<tbody><tr> 1336<td class="parameter_name"><p>rectangle</p></td> 1337<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 1338<td class="parameter_annotations"> </td> 1339</tr></tbody> 1340</table></div> 1341</div> 1342<div class="refsect3"> 1343<a name="gst-video-overlay-rectangle-get-flags.returns"></a><h4>Returns</h4> 1344<p> the <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayFormatFlags" title="enum GstVideoOverlayFormatFlags"><span class="type">GstVideoOverlayFormatFlags</span></a> associated with the rectangle.</p> 1345</div> 1346</div> 1347<hr> 1348<div class="refsect2"> 1349<a name="gst-video-overlay-rectangle-get-global-alpha"></a><h3>gst_video_overlay_rectangle_get_global_alpha ()</h3> 1350<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat"><span class="returnvalue">gfloat</span></a> 1351gst_video_overlay_rectangle_get_global_alpha 1352 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>);</pre> 1353<p>Retrieves the global-alpha value associated with a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a>.</p> 1354<div class="refsect3"> 1355<a name="gst-video-overlay-rectangle-get-global-alpha.parameters"></a><h4>Parameters</h4> 1356<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1357<colgroup> 1358<col width="150px" class="parameters_name"> 1359<col class="parameters_description"> 1360<col width="200px" class="parameters_annotations"> 1361</colgroup> 1362<tbody><tr> 1363<td class="parameter_name"><p>rectangle</p></td> 1364<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 1365<td class="parameter_annotations"> </td> 1366</tr></tbody> 1367</table></div> 1368</div> 1369<div class="refsect3"> 1370<a name="gst-video-overlay-rectangle-get-global-alpha.returns"></a><h4>Returns</h4> 1371<p> the global-alpha value associated with the rectangle.</p> 1372</div> 1373</div> 1374<hr> 1375<div class="refsect2"> 1376<a name="gst-video-overlay-rectangle-set-global-alpha"></a><h3>gst_video_overlay_rectangle_set_global_alpha ()</h3> 1377<pre class="programlisting"><span class="returnvalue">void</span> 1378gst_video_overlay_rectangle_set_global_alpha 1379 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a> *rectangle</code></em>, 1380 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> global_alpha</code></em>);</pre> 1381<p>Sets the global alpha value associated with a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a>. Per- 1382pixel alpha values are multiplied with this value. Valid 1383values: 0 <= global_alpha <= 1; 1 to deactivate.</p> 1384<p><em class="parameter"><code>rectangle</code></em> 1385 must be writable, meaning its refcount must be 1. You can 1386make the rectangles inside a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> writable using 1387<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-make-writable" title="gst_video_overlay_composition_make_writable ()"><code class="function">gst_video_overlay_composition_make_writable()</code></a> or 1388<a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-copy" title="gst_video_overlay_composition_copy ()"><code class="function">gst_video_overlay_composition_copy()</code></a>.</p> 1389<div class="refsect3"> 1390<a name="gst-video-overlay-rectangle-set-global-alpha.parameters"></a><h4>Parameters</h4> 1391<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1392<colgroup> 1393<col width="150px" class="parameters_name"> 1394<col class="parameters_description"> 1395<col width="200px" class="parameters_annotations"> 1396</colgroup> 1397<tbody> 1398<tr> 1399<td class="parameter_name"><p>rectangle</p></td> 1400<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayRectangle" title="GstVideoOverlayRectangle"><span class="type">GstVideoOverlayRectangle</span></a></p></td> 1401<td class="parameter_annotations"> </td> 1402</tr> 1403<tr> 1404<td class="parameter_name"><p>global_alpha</p></td> 1405<td class="parameter_description"><p>Global alpha value (0 to 1.0)</p></td> 1406<td class="parameter_annotations"> </td> 1407</tr> 1408</tbody> 1409</table></div> 1410</div> 1411</div> 1412</div> 1413<div class="refsect1"> 1414<a name="gst-plugins-base-libs-GstVideoOverlayRectangle.other_details"></a><h2>Types and Values</h2> 1415<div class="refsect2"> 1416<a name="GstVideoOverlayComposition"></a><h3>GstVideoOverlayComposition</h3> 1417<pre class="programlisting">typedef struct _GstVideoOverlayComposition GstVideoOverlayComposition;</pre> 1418<p>An opaque video overlay composition object. A composition contains 1419multiple overlay rectangles.</p> 1420</div> 1421<hr> 1422<div class="refsect2"> 1423<a name="GST-VIDEO-OVERLAY-COMPOSITION-FORMAT-RGB:CAPS"></a><h3>GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_RGB</h3> 1424<pre class="programlisting">#define GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_RGB GST_VIDEO_FORMAT_BGRA 1425</pre> 1426<p>Supported RGB overlay video format.</p> 1427</div> 1428<hr> 1429<div class="refsect2"> 1430<a name="GST-VIDEO-OVERLAY-COMPOSITION-FORMAT-YUV:CAPS"></a><h3>GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_YUV</h3> 1431<pre class="programlisting">#define GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_YUV GST_VIDEO_FORMAT_AYUV 1432</pre> 1433<p>Supported YUV overlay video format.</p> 1434</div> 1435<hr> 1436<div class="refsect2"> 1437<a name="GST-VIDEO-OVERLAY-COMPOSITION-BLEND-FORMATS:CAPS"></a><h3>GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS</h3> 1438<pre class="programlisting">#define GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS</pre> 1439<p>Video formats supported by <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#gst-video-overlay-composition-blend" title="gst_video_overlay_composition_blend ()"><code class="function">gst_video_overlay_composition_blend()</code></a>, for 1440use in overlay elements' pad template caps.</p> 1441<p class="since">Since: <a class="link" href="ix14.html#api-index-1.2">1.2</a></p> 1442</div> 1443<hr> 1444<div class="refsect2"> 1445<a name="GST-CAPS-FEATURE-META-GST-VIDEO-OVERLAY-COMPOSITION:CAPS"></a><h3>GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION</h3> 1446<pre class="programlisting">#define GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION "meta:GstVideoOverlayComposition" 1447</pre> 1448</div> 1449<hr> 1450<div class="refsect2"> 1451<a name="GstVideoOverlayCompositionMeta"></a><h3>struct GstVideoOverlayCompositionMeta</h3> 1452<pre class="programlisting">struct GstVideoOverlayCompositionMeta { 1453 GstMeta meta; 1454 1455 GstVideoOverlayComposition *overlay; 1456}; 1457</pre> 1458<p>Extra buffer metadata describing image overlay data.</p> 1459<div class="refsect3"> 1460<a name="GstVideoOverlayCompositionMeta.members"></a><h4>Members</h4> 1461<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1462<colgroup> 1463<col width="300px" class="struct_members_name"> 1464<col class="struct_members_description"> 1465<col width="200px" class="struct_members_annotations"> 1466</colgroup> 1467<tbody> 1468<tr> 1469<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstMeta.html#GstMeta"><span class="type">GstMeta</span></a> <em class="structfield"><code><a name="GstVideoOverlayCompositionMeta.meta"></a>meta</code></em>;</p></td> 1470<td class="struct_member_description"><p>parent <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstMeta.html#GstMeta"><span class="type">GstMeta</span></a></p></td> 1471<td class="struct_member_annotations"> </td> 1472</tr> 1473<tr> 1474<td class="struct_member_name"><p><a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a> *<em class="structfield"><code><a name="GstVideoOverlayCompositionMeta.overlay"></a>overlay</code></em>;</p></td> 1475<td class="struct_member_description"><p>the attached <a class="link" href="gst-plugins-base-libs-GstVideoOverlayRectangle.html#GstVideoOverlayComposition" title="GstVideoOverlayComposition"><span class="type">GstVideoOverlayComposition</span></a></p></td> 1476<td class="struct_member_annotations"> </td> 1477</tr> 1478</tbody> 1479</table></div> 1480</div> 1481</div> 1482<hr> 1483<div class="refsect2"> 1484<a name="GstVideoOverlayFormatFlags"></a><h3>enum GstVideoOverlayFormatFlags</h3> 1485<p>Overlay format flags.</p> 1486<div class="refsect3"> 1487<a name="GstVideoOverlayFormatFlags.members"></a><h4>Members</h4> 1488<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1489<colgroup> 1490<col width="300px" class="enum_members_name"> 1491<col class="enum_members_description"> 1492<col width="200px" class="enum_members_annotations"> 1493</colgroup> 1494<tbody> 1495<tr> 1496<td class="enum_member_name"><p><a name="GST-VIDEO-OVERLAY-FORMAT-FLAG-NONE:CAPS"></a>GST_VIDEO_OVERLAY_FORMAT_FLAG_NONE</p></td> 1497<td class="enum_member_description"> 1498<p>no flags</p> 1499</td> 1500<td class="enum_member_annotations"> </td> 1501</tr> 1502<tr> 1503<td class="enum_member_name"><p><a name="GST-VIDEO-OVERLAY-FORMAT-FLAG-PREMULTIPLIED-ALPHA:CAPS"></a>GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA</p></td> 1504<td class="enum_member_description"> 1505<p>RGB are premultiplied by A/255.</p> 1506</td> 1507<td class="enum_member_annotations"> </td> 1508</tr> 1509<tr> 1510<td class="enum_member_name"><p><a name="GST-VIDEO-OVERLAY-FORMAT-FLAG-GLOBAL-ALPHA:CAPS"></a>GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA</p></td> 1511<td class="enum_member_description"> 1512<p>a global-alpha value != 1 is set.</p> 1513</td> 1514<td class="enum_member_annotations"> </td> 1515</tr> 1516</tbody> 1517</table></div> 1518</div> 1519</div> 1520<hr> 1521<div class="refsect2"> 1522<a name="GstVideoOverlayRectangle"></a><h3>GstVideoOverlayRectangle</h3> 1523<pre class="programlisting">typedef struct _GstVideoOverlayRectangle GstVideoOverlayRectangle;</pre> 1524<p>An opaque video overlay rectangle object. A rectangle contains a single 1525overlay rectangle which can be added to a composition.</p> 1526</div> 1527</div> 1528</div> 1529<div class="footer"> 1530<hr>Generated by GTK-Doc V1.28</div> 1531</body> 1532</html>