blob: 8e6fe3990e048fe7b8979e9543ea82b36c6521a5 [file] [log] [blame]
Nicolas Dechesne406546a2011-09-30 22:27:39 +02001<!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">
Sebastian Dröged05631b2015-06-07 10:15:58 +02005<title>textoverlay: GStreamer Base Plugins 1.0 Plugins Reference Manual</title>
Sebastian Dröge8e30b872016-02-19 11:02:14 +02006<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
Olivier Naudan9cccb5b2012-04-13 11:18:22 -04007<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Plugins Reference Manual">
Nicolas Dechesne406546a2011-09-30 22:27:39 +02008<link rel="up" href="ch01.html" title="gst-plugins-base Elements">
Sebastian Dröge343fe0a2015-08-19 13:00:11 +03009<link rel="prev" href="gst-plugins-base-plugins-tcpserversrc.html" title="tcpserversrc">
Nicolas Dechesne406546a2011-09-30 22:27:39 +020010<link rel="next" href="gst-plugins-base-plugins-textrender.html" title="textrender">
Sebastian Drögec6053392016-03-24 12:15:30 +020011<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
Nicolas Dechesne406546a2011-09-30 22:27:39 +020012<link rel="stylesheet" href="style.css" type="text/css">
13</head>
14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Sebastian Dröge7122f1b2015-03-16 19:31:54 +010015<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
Sebastian Dröge1b9a9832014-04-19 15:47:21 +020016<td width="100%" align="left" class="shortcuts">
Sebastian Dröge7122f1b2015-03-16 19:31:54 +010017<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18 <a href="#gst-plugins-base-plugins-textoverlay.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
Sebastian Dröge9d57c762014-05-03 18:28:40 +020019 <a href="#gst-plugins-base-plugins-textoverlay.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
Sebastian Dröge1b9a9832014-04-19 15:47:21 +020020</td>
21<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
Sebastian Dröge343fe0a2015-08-19 13:00:11 +030023<td><a accesskey="p" href="gst-plugins-base-plugins-tcpserversrc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
Sebastian Dröge1b9a9832014-04-19 15:47:21 +020024<td><a accesskey="n" href="gst-plugins-base-plugins-textrender.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25</tr></table>
Nicolas Dechesne406546a2011-09-30 22:27:39 +020026<div class="refentry">
27<a name="gst-plugins-base-plugins-textoverlay"></a><div class="titlepage"></div>
28<div class="refnamediv"><table width="100%"><tr>
29<td valign="top">
30<h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-textoverlay.top_of_page"></a>textoverlay</span></h2>
Sebastian Dröge50ef2922015-06-24 23:10:55 +020031<p>textoverlay</p>
Nicolas Dechesne406546a2011-09-30 22:27:39 +020032</td>
Sebastian Dröge1b9a9832014-04-19 15:47:21 +020033<td class="gallery_image" valign="top" align="right"></td>
Nicolas Dechesne406546a2011-09-30 22:27:39 +020034</tr></table></div>
Sebastian Dröge1b9a9832014-04-19 15:47:21 +020035<a name="GstTextOverlay"></a><div class="refsect1">
36<a name="gst-plugins-base-plugins-textoverlay.other"></a><h2>Types and Values</h2>
Sebastian Dröge8e30b872016-02-19 11:02:14 +020037<div class="informaltable"><table class="informaltable" width="100%" border="0">
Sebastian Dröge1b9a9832014-04-19 15:47:21 +020038<colgroup>
39<col width="150px" class="name">
40<col class="description">
41</colgroup>
42<tbody><tr>
43<td class="datatype_keyword">struct</td>
44<td class="function_name"><a class="link" href="gst-plugins-base-plugins-textoverlay.html#GstTextOverlay-struct" title="struct GstTextOverlay">GstTextOverlay</a></td>
45</tr></tbody>
46</table></div>
Nicolas Dechesne406546a2011-09-30 22:27:39 +020047</div>
48<div class="refsect1">
49<a name="gst-plugins-base-plugins-textoverlay.object-hierarchy"></a><h2>Object Hierarchy</h2>
Sebastian Drögec6053392016-03-24 12:15:30 +020050<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
51 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
52 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0GstObject.html#GstObject-struct">GstObject</a>
53 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0GstElement.html#GstElement-struct">GstElement</a>
Sebastian Dröge1b9a9832014-04-19 15:47:21 +020054 <span class="lineart">╰──</span> GstBaseTextOverlay
55 <span class="lineart">╰──</span> GstTextOverlay
Nicolas Dechesne406546a2011-09-30 22:27:39 +020056</pre>
57</div>
58<div class="refsect1">
59<a name="gst-plugins-base-plugins-textoverlay.description"></a><h2>Description</h2>
Sebastian Dröge381b4542016-07-06 12:21:09 +030060<p>This plugin renders text on top of a video stream. This can be either
61static text or text from buffers received on the text sink pad, e.g.
62as produced by the subparse element. If the text sink pad is not linked,
63the text set via the "text" property will be rendered. If the text sink
64pad is linked, text will be rendered as it is received on that pad,
65honouring and matching the buffer timestamps of both input streams.</p>
66<p>The text can contain newline characters and text wrapping is enabled by
67default.</p>
68<div class="refsect2">
Sebastian Drögeb0cc1d02016-09-01 11:52:53 +030069<a name="id-1.2.45.6.4"></a><h3>Example launch lines</h3>
Sebastian Dröge381b4542016-07-06 12:21:09 +030070<div class="informalexample">
71 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
72 <tbody>
73 <tr>
74 <td class="listing_lines" align="right"><pre>1</pre></td>
75 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> videotestsrc <span class="gtkdoc opt">!</span> textoverlay text<span class="gtkdoc opt">=</span><span class="string">&quot;Room A&quot;</span> valignment<span class="gtkdoc opt">=</span>top halignment<span class="gtkdoc opt">=</span>left font<span class="gtkdoc opt">-</span>desc<span class="gtkdoc opt">=</span><span class="string">&quot;Sans, 72&quot;</span> <span class="gtkdoc opt">!</span> autovideosink</pre></td>
76 </tr>
77 </tbody>
78 </table>
79</div>
80 Here is a simple pipeline that displays a static text in the top left
81corner of the video picture
82<div class="informalexample">
83 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
84 <tbody>
85 <tr>
86 <td class="listing_lines" align="right"><pre>1</pre></td>
87 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>subtitles<span class="gtkdoc opt">.</span>srt <span class="gtkdoc opt">!</span> subparse <span class="gtkdoc opt">!</span> txt<span class="gtkdoc opt">.</span> videotestsrc <span class="gtkdoc opt">!</span> timeoverlay <span class="gtkdoc opt">!</span> textoverlay name<span class="gtkdoc opt">=</span>txt shaded<span class="gtkdoc opt">-</span>background<span class="gtkdoc opt">=</span>yes <span class="gtkdoc opt">!</span> autovideosink</pre></td>
88 </tr>
89 </tbody>
90 </table>
91</div>
92 Here is another pipeline that displays subtitles from an .srt subtitle
93file, centered at the bottom of the picture and with a rectangular shading
94around the text in the background:
95<p>
96If you do not have such a subtitle file, create one looking like this
97in a text editor:
98</p>
99<div class="informalexample">
100 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
101 <tbody>
102 <tr>
103 <td class="listing_lines" align="right"><pre>1
1042
1053
1064
1075
1086
1097
1108
1119
11210
11311
11412
11513</pre></td>
116 <td class="listing_code"><pre class="programlisting"><span class="number">1</span>
117<span class="number">00</span><span class="gtkdoc opt">:</span><span class="number">00</span><span class="gtkdoc opt">:</span><span class="number">03</span><span class="gtkdoc opt">,</span><span class="number">000</span> <span class="gtkdoc opt">--&gt;</span> <span class="number">00</span><span class="gtkdoc opt">:</span><span class="number">00</span><span class="gtkdoc opt">:</span><span class="number">05</span><span class="gtkdoc opt">,</span><span class="number">000</span>
118Hello? <span class="gtkdoc opt">(</span><span class="number">3</span><span class="gtkdoc opt">-</span><span class="number">5</span>s<span class="gtkdoc opt">)</span>
119
120<span class="number">2</span>
121<span class="number">00</span><span class="gtkdoc opt">:</span><span class="number">00</span><span class="gtkdoc opt">:</span><span class="number">08</span><span class="gtkdoc opt">,</span><span class="number">000</span> <span class="gtkdoc opt">--&gt;</span> <span class="number">00</span><span class="gtkdoc opt">:</span><span class="number">00</span><span class="gtkdoc opt">:</span><span class="number">13</span><span class="gtkdoc opt">,</span><span class="number">000</span>
122Yes<span class="gtkdoc opt">,</span> <span class="keyword">this</span> is a subtitle<span class="gtkdoc opt">.</span> Don<span class="string">'t</span>
123<span class="string">you like it? (8-13s)</span>
124<span class="string"></span>
125<span class="string">3</span>
126<span class="string">00:00:18,826 --&gt; 00:01:02,886</span>
127<span class="string">Uh? What are you talking about?</span>
128<span class="string">I don'</span>t <span class="function">understand</span> <span class="gtkdoc opt">(</span><span class="number">18</span><span class="gtkdoc opt">-</span><span class="number">62</span>s<span class="gtkdoc opt">)</span></pre></td>
129 </tr>
130 </tbody>
131 </table>
132</div>
133
134<p>
135</p>
136</div>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200137<div class="refsynopsisdiv">
138<h2>Synopsis</h2>
139<div class="refsect2">
Sebastian Drögeb0cc1d02016-09-01 11:52:53 +0300140<a name="id-1.2.45.6.5.1"></a><h3>Element Information</h3>
Sebastian Dröge3330fc22013-07-14 11:04:55 +0200141<div class="variablelist"><table border="0" class="variablelist">
142<colgroup>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200143<col align="left" valign="top">
Sebastian Dröge3330fc22013-07-14 11:04:55 +0200144<col>
145</colgroup>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200146<tbody>
147<tr>
148<td><p><span class="term">plugin</span></p></td>
149<td>
150 <a class="link" href="gst-plugins-base-plugins-plugin-pango.html#plugin-pango">pango</a>
151 </td>
152</tr>
153<tr>
154<td><p><span class="term">author</span></p></td>
155<td>David Schleef &lt;ds@schleef.org&gt;, Zeeshan Ali &lt;zeeshan.ali@nokia.com&gt;</td>
156</tr>
157<tr>
158<td><p><span class="term">class</span></p></td>
159<td>Filter/Editor/Video</td>
160</tr>
161</tbody>
162</table></div>
163</div>
164<hr>
165<div class="refsect2">
Sebastian Drögeb0cc1d02016-09-01 11:52:53 +0300166<a name="id-1.2.45.6.5.2"></a><h3>Element Pads</h3>
Sebastian Dröge3330fc22013-07-14 11:04:55 +0200167<div class="variablelist"><table border="0" class="variablelist">
168<colgroup>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200169<col align="left" valign="top">
Sebastian Dröge3330fc22013-07-14 11:04:55 +0200170<col>
171</colgroup>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200172<tbody>
173<tr>
174<td><p><span class="term">name</span></p></td>
175<td>text_sink</td>
176</tr>
177<tr>
178<td><p><span class="term">direction</span></p></td>
179<td>sink</td>
180</tr>
181<tr>
182<td><p><span class="term">presence</span></p></td>
183<td>always</td>
184</tr>
185<tr>
186<td><p><span class="term">details</span></p></td>
Sebastian Dröge5d7860b2012-09-14 09:34:56 +0200187<td>text/x-raw, format=(string){ pango-markup, utf8 }</td>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200188</tr>
189</tbody>
190</table></div>
Sebastian Dröge3330fc22013-07-14 11:04:55 +0200191<div class="variablelist"><table border="0" class="variablelist">
192<colgroup>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200193<col align="left" valign="top">
Sebastian Dröge3330fc22013-07-14 11:04:55 +0200194<col>
195</colgroup>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200196<tbody>
197<tr>
198<td><p><span class="term">name</span></p></td>
199<td>video_sink</td>
200</tr>
201<tr>
202<td><p><span class="term">direction</span></p></td>
203<td>sink</td>
204</tr>
205<tr>
206<td><p><span class="term">presence</span></p></td>
207<td>always</td>
208</tr>
209<tr>
210<td><p><span class="term">details</span></p></td>
Sebastian Dröge92920512012-11-21 14:48:06 +0100211<td>video/x-raw, format=(string){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200212</tr>
Sebastian Dröge9d57c762014-05-03 18:28:40 +0200213<tr>
214<td><p><span class="term"></span></p></td>
Sebastian Dröge381b4542016-07-06 12:21:09 +0300215<td> video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
Sebastian Dröge9d57c762014-05-03 18:28:40 +0200216</tr>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200217</tbody>
218</table></div>
Sebastian Dröge3330fc22013-07-14 11:04:55 +0200219<div class="variablelist"><table border="0" class="variablelist">
220<colgroup>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200221<col align="left" valign="top">
Sebastian Dröge3330fc22013-07-14 11:04:55 +0200222<col>
223</colgroup>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200224<tbody>
225<tr>
226<td><p><span class="term">name</span></p></td>
227<td>src</td>
228</tr>
229<tr>
230<td><p><span class="term">direction</span></p></td>
231<td>source</td>
232</tr>
233<tr>
234<td><p><span class="term">presence</span></p></td>
235<td>always</td>
236</tr>
237<tr>
238<td><p><span class="term">details</span></p></td>
Sebastian Dröge92920512012-11-21 14:48:06 +0100239<td>video/x-raw, format=(string){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200240</tr>
Sebastian Dröge9d57c762014-05-03 18:28:40 +0200241<tr>
242<td><p><span class="term"></span></p></td>
Sebastian Dröge381b4542016-07-06 12:21:09 +0300243<td> video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
Sebastian Dröge9d57c762014-05-03 18:28:40 +0200244</tr>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200245</tbody>
246</table></div>
247</div>
248</div>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200249</div>
250<div class="refsect1">
Sebastian Dröge1b9a9832014-04-19 15:47:21 +0200251<a name="gst-plugins-base-plugins-textoverlay.functions_details"></a><h2>Functions</h2>
Sebastian Dröged05631b2015-06-07 10:15:58 +0200252<p></p>
Sebastian Dröge1b9a9832014-04-19 15:47:21 +0200253</div>
254<div class="refsect1">
255<a name="gst-plugins-base-plugins-textoverlay.other_details"></a><h2>Types and Values</h2>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200256<div class="refsect2">
257<a name="GstTextOverlay-struct"></a><h3>struct GstTextOverlay</h3>
258<pre class="programlisting">struct GstTextOverlay;</pre>
Sebastian Dröge381b4542016-07-06 12:21:09 +0300259<p>Opaque textoverlay data structure.</p>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200260</div>
261</div>
Sebastian Dröge381b4542016-07-06 12:21:09 +0300262<div class="refsect1">
263<a name="gst-plugins-base-plugins-textoverlay.see-also"></a><h2>See Also</h2>
264<p><a class="link" href="gst-plugins-base-plugins-textrender.html#GstTextRender"><span class="type">GstTextRender</span></a>, <a class="link" href="gst-plugins-base-plugins-textoverlay.html#GstTextOverlay"><span class="type">GstTextOverlay</span></a>, <a class="link" href="gst-plugins-base-plugins-timeoverlay.html#GstTimeOverlay"><span class="type">GstTimeOverlay</span></a>, <a class="link" href="gst-plugins-base-plugins-subparse.html#GstSubParse"><span class="type">GstSubParse</span></a></p>
265</div>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200266</div>
267<div class="footer">
Sebastian Drögec6053392016-03-24 12:15:30 +0200268<hr>Generated by GTK-Doc V1.25</div>
Nicolas Dechesne406546a2011-09-30 22:27:39 +0200269</body>
270</html>