Imported Upstream version 0.10.23
[profile/ivi/gst-plugins-bad.git] / docs / plugins / html / gst-plugins-bad-plugins-videodetect.html
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>videodetect</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GStreamer Bad Plugins 0.10 Plugins Reference Manual">
8 <link rel="up" href="ch01.html" title="gst-plugins-bad Elements">
9 <link rel="prev" href="gst-plugins-bad-plugins-videoanalyse.html" title="videoanalyse">
10 <link rel="next" href="gst-plugins-bad-plugins-videomark.html" title="videomark">
11 <meta name="generator" content="GTK-Doc V1.18 (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="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="gst-plugins-bad-plugins-videoanalyse.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GStreamer Bad Plugins 0.10 Plugins Reference Manual</th>
21 <td><a accesskey="n" href="gst-plugins-bad-plugins-videomark.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-bad-plugins-videodetect.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-bad-plugins-videodetect.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gst-plugins-bad-plugins-videodetect.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#gst-plugins-bad-plugins-videodetect.properties" class="shortcut">Properties</a>
31 </td></tr>
32 </table>
33 <div class="refentry">
34 <a name="gst-plugins-bad-plugins-videodetect"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
36 <td valign="top">
37 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-videodetect.top_of_page"></a>videodetect</span></h2>
38 <p>videodetect — Detect patterns in a video signal</p>
39 </td>
40 <td valign="top" align="right"></td>
41 </tr></table></div>
42 <div class="refsynopsisdiv">
43 <a name="gst-plugins-bad-plugins-videodetect.synopsis"></a><h2>Synopsis</h2>
44 <a name="GstVideoDetect"></a><pre class="synopsis">struct              <a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect-struct" title="struct GstVideoDetect">GstVideoDetect</a>;
45 </pre>
46 </div>
47 <div class="refsect1">
48 <a name="gst-plugins-bad-plugins-videodetect.object-hierarchy"></a><h2>Object Hierarchy</h2>
49 <pre class="synopsis">
50   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
51    +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
52          +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
53                +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseTransform.html">GstBaseTransform</a>
54                      +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideofilter.html#GstVideoFilter">GstVideoFilter</a>
55                            +----GstVideoDetect
56 </pre>
57 </div>
58 <div class="refsect1">
59 <a name="gst-plugins-bad-plugins-videodetect.properties"></a><h2>Properties</h2>
60 <pre class="synopsis">
61   "<a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--message" title='The "message" property'>message</a>"                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct
62   "<a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--pattern-count" title='The "pattern-count" property'>pattern-count</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct
63   "<a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--pattern-data-count" title='The "pattern-data-count" property'>pattern-data-count</a>"       <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct
64   "<a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--pattern-height" title='The "pattern-height" property'>pattern-height</a>"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct
65   "<a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--pattern-sensitivity" title='The "pattern-sensitivity" property'>pattern-sensitivity</a>"      <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>               : Read / Write / Construct
66   "<a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--pattern-width" title='The "pattern-width" property'>pattern-width</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct
67   "<a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--bottom-offset" title='The "bottom-offset" property'>bottom-offset</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct
68   "<a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--left-offset" title='The "left-offset" property'>left-offset</a>"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct
69   "<a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--pattern-center" title='The "pattern-center" property'>pattern-center</a>"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>               : Read / Write / Construct
70 </pre>
71 </div>
72 <div class="refsect1">
73 <a name="gst-plugins-bad-plugins-videodetect.description"></a><h2>Description</h2>
74 <p>
75 This plugin detects <a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--pattern-count" title='The "pattern-count" property'><span class="type">"pattern-count"</span></a> squares in the bottom left
76 corner of the video frames. The squares have a width and height of
77 respectively <a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--pattern-width" title='The "pattern-width" property'><span class="type">"pattern-width"</span></a> and <a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--pattern-height" title='The "pattern-height" property'><span class="type">"pattern-height"</span></a>.
78 Even squares must be black and odd squares must be white.
79 </p>
80 <p>
81 When the pattern has been found, <a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--pattern-data-count" title='The "pattern-data-count" property'><span class="type">"pattern-data-count"</span></a> squares
82 after the pattern squares are read as a bitarray. White squares represent a 1
83 bit and black squares a 0 bit. The bitarray will will included in the element
84 message that is posted (see below).
85 </p>
86 <p>
87 After the pattern has been found and the data pattern has been read, an
88 element message called <code class="classname">"GstVideoDetect"</code> will
89 be posted on the bus. If the pattern is no longer found in the frame, the
90 same element message is posted with the have-pattern field set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a>.
91 The message is only posted if the <a class="link" href="gst-plugins-bad-plugins-videodetect.html#GstVideoDetect--message" title='The "message" property'><span class="type">"message"</span></a> property is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a>.
92 </p>
93 <p>
94 The message's structure contains these fields:
95 </p>
96 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
97 <li class="listitem"><p>
98   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>
99   <code class="classname">"have-pattern"</code>:
100   if the pattern was found. This field will be set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> for as long as
101   the pattern was found in the frame and set to FALSE for the first frame
102   that does not contain the pattern anymore.
103   </p></li>
104 <li class="listitem"><p>
105   <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a>
106   <code class="classname">"timestamp"</code>:
107   the timestamp of the buffer that triggered the message.
108   </p></li>
109 <li class="listitem"><p>
110   <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a>
111   <code class="classname">"stream-time"</code>:
112   the stream time of the buffer.
113   </p></li>
114 <li class="listitem"><p>
115   <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a>
116   <code class="classname">"running-time"</code>:
117   the running_time of the buffer.
118   </p></li>
119 <li class="listitem"><p>
120   <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a>
121   <code class="classname">"duration"</code>:
122   the duration of the buffer.
123   </p></li>
124 <li class="listitem"><p>
125   <span class="type">guint64</span>
126   <code class="classname">"data-uint64"</code>:
127   the data-pattern found after the pattern or 0 when have-signal is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a>.
128   </p></li>
129 <li class="listitem"><p>
130   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>
131   <code class="classname">"data"</code>:
132   the data-pattern found after the pattern or 0 when have-signal is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a>.
133   </p></li>
134 </ul></div>
135 <p>
136 </p>
137 <p>
138 </p>
139 <div class="refsect2">
140 <a name="idp23525664"></a><h3>Example launch line</h3>
141 <div class="informalexample">
142   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
143     <tbody>
144       <tr>
145         <td class="listing_lines" align="right"><pre>1</pre></td>
146         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch videotestsrc <span class="gtkdoc opt">!</span> videodetect <span class="gtkdoc opt">!</span> ffmpegcolorspace <span class="gtkdoc opt">!</span> ximagesink</pre></td>
147       </tr>
148     </tbody>
149   </table>
150 </div>
151
152 </div>
153 <p>
154 </p>
155 <p>
156 Last reviewed on 2007-05-30 (0.10.5)
157 </p>
158 <div class="refsynopsisdiv">
159 <h2>Synopsis</h2>
160 <div class="refsect2">
161 <a name="idp23528768"></a><h3>Element Information</h3>
162 <div class="variablelist"><table border="0">
163 <col align="left" valign="top">
164 <tbody>
165 <tr>
166 <td><p><span class="term">plugin</span></p></td>
167 <td>
168             <a class="link" href="gst-plugins-bad-plugins-plugin-videosignal.html#plugin-videosignal">videosignal</a>
169           </td>
170 </tr>
171 <tr>
172 <td><p><span class="term">author</span></p></td>
173 <td>Wim Taymans &lt;wim@fluendo.com&gt;</td>
174 </tr>
175 <tr>
176 <td><p><span class="term">class</span></p></td>
177 <td>Filter/Effect/Video</td>
178 </tr>
179 </tbody>
180 </table></div>
181 </div>
182 <hr>
183 <div class="refsect2">
184 <a name="idp23536224"></a><h3>Element Pads</h3>
185 <div class="variablelist"><table border="0">
186 <col align="left" valign="top">
187 <tbody>
188 <tr>
189 <td><p><span class="term">name</span></p></td>
190 <td>sink</td>
191 </tr>
192 <tr>
193 <td><p><span class="term">direction</span></p></td>
194 <td>sink</td>
195 </tr>
196 <tr>
197 <td><p><span class="term">presence</span></p></td>
198 <td>always</td>
199 </tr>
200 <tr>
201 <td><p><span class="term">details</span></p></td>
202 <td>video/x-raw-yuv, format=(fourcc){ I420, YV12, Y41B, Y42B, Y444, YUY2, UYVY, AYUV, YVYU }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
203 </tr>
204 </tbody>
205 </table></div>
206 <div class="variablelist"><table border="0">
207 <col align="left" valign="top">
208 <tbody>
209 <tr>
210 <td><p><span class="term">name</span></p></td>
211 <td>src</td>
212 </tr>
213 <tr>
214 <td><p><span class="term">direction</span></p></td>
215 <td>source</td>
216 </tr>
217 <tr>
218 <td><p><span class="term">presence</span></p></td>
219 <td>always</td>
220 </tr>
221 <tr>
222 <td><p><span class="term">details</span></p></td>
223 <td>video/x-raw-yuv, format=(fourcc){ I420, YV12, Y41B, Y42B, Y444, YUY2, UYVY, AYUV, YVYU }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
224 </tr>
225 </tbody>
226 </table></div>
227 </div>
228 </div>
229 <p>
230 </p>
231 </div>
232 <div class="refsect1">
233 <a name="gst-plugins-bad-plugins-videodetect.details"></a><h2>Details</h2>
234 <div class="refsect2">
235 <a name="GstVideoDetect-struct"></a><h3>struct GstVideoDetect</h3>
236 <pre class="programlisting">struct GstVideoDetect;</pre>
237 <p>
238 Opaque datastructure.
239 </p>
240 </div>
241 </div>
242 <div class="refsect1">
243 <a name="gst-plugins-bad-plugins-videodetect.property-details"></a><h2>Property Details</h2>
244 <div class="refsect2">
245 <a name="GstVideoDetect--message"></a><h3>The <code class="literal">"message"</code> property</h3>
246 <pre class="programlisting">  "message"                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct</pre>
247 <p>Post statics messages.</p>
248 <p>Default value: TRUE</p>
249 </div>
250 <hr>
251 <div class="refsect2">
252 <a name="GstVideoDetect--pattern-count"></a><h3>The <code class="literal">"pattern-count"</code> property</h3>
253 <pre class="programlisting">  "pattern-count"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct</pre>
254 <p>The number of pattern markers.</p>
255 <p>Allowed values: &gt;= 0</p>
256 <p>Default value: 4</p>
257 </div>
258 <hr>
259 <div class="refsect2">
260 <a name="GstVideoDetect--pattern-data-count"></a><h3>The <code class="literal">"pattern-data-count"</code> property</h3>
261 <pre class="programlisting">  "pattern-data-count"       <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct</pre>
262 <p>The number of extra data pattern markers.</p>
263 <p>Allowed values: &gt;= 0</p>
264 <p>Default value: 5</p>
265 </div>
266 <hr>
267 <div class="refsect2">
268 <a name="GstVideoDetect--pattern-height"></a><h3>The <code class="literal">"pattern-height"</code> property</h3>
269 <pre class="programlisting">  "pattern-height"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct</pre>
270 <p>The height of the pattern markers.</p>
271 <p>Allowed values: &gt;= 1</p>
272 <p>Default value: 16</p>
273 </div>
274 <hr>
275 <div class="refsect2">
276 <a name="GstVideoDetect--pattern-sensitivity"></a><h3>The <code class="literal">"pattern-sensitivity"</code> property</h3>
277 <pre class="programlisting">  "pattern-sensitivity"      <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>               : Read / Write / Construct</pre>
278 <p>The sensitivity around the center for detecting the markers (0.0 = lowest, 1.0 highest).</p>
279 <p>Allowed values: [0,1]</p>
280 <p>Default value: 0.3</p>
281 </div>
282 <hr>
283 <div class="refsect2">
284 <a name="GstVideoDetect--pattern-width"></a><h3>The <code class="literal">"pattern-width"</code> property</h3>
285 <pre class="programlisting">  "pattern-width"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct</pre>
286 <p>The width of the pattern markers.</p>
287 <p>Allowed values: &gt;= 1</p>
288 <p>Default value: 4</p>
289 </div>
290 <hr>
291 <div class="refsect2">
292 <a name="GstVideoDetect--bottom-offset"></a><h3>The <code class="literal">"bottom-offset"</code> property</h3>
293 <pre class="programlisting">  "bottom-offset"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct</pre>
294 <p>The offset from the bottom border where the pattern starts.</p>
295 <p>Allowed values: &gt;= 0</p>
296 <p>Default value: 0</p>
297 </div>
298 <hr>
299 <div class="refsect2">
300 <a name="GstVideoDetect--left-offset"></a><h3>The <code class="literal">"left-offset"</code> property</h3>
301 <pre class="programlisting">  "left-offset"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct</pre>
302 <p>The offset from the left border where the pattern starts.</p>
303 <p>Allowed values: &gt;= 0</p>
304 <p>Default value: 0</p>
305 </div>
306 <hr>
307 <div class="refsect2">
308 <a name="GstVideoDetect--pattern-center"></a><h3>The <code class="literal">"pattern-center"</code> property</h3>
309 <pre class="programlisting">  "pattern-center"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>               : Read / Write / Construct</pre>
310 <p>The center of the black/white separation (0.0 = lowest, 1.0 highest).</p>
311 <p>Allowed values: [0,1]</p>
312 <p>Default value: 0.5</p>
313 </div>
314 </div>
315 <div class="refsect1">
316 <a name="gst-plugins-bad-plugins-videodetect.see-also"></a><h2>See Also</h2>
317 <a class="link" href="gst-plugins-bad-plugins-videomark.html#GstVideoMark"><span class="type">GstVideoMark</span></a>
318 </div>
319 </div>
320 <div class="footer">
321 <hr>
322           Generated by GTK-Doc V1.18</div>
323 </body>
324 </html>