Git init
[framework/multimedia/gstreamer0.10.git] / docs / gst / html / gstreamer-GstTypeFind.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>GstTypeFind</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GStreamer 0.10 Core Reference Manual">
8 <link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
9 <link rel="prev" href="GstTaskPool.html" title="GstTaskPool">
10 <link rel="next" href="GstTypeFindFactory.html" title="GstTypeFindFactory">
11 <meta name="generator" content="GTK-Doc V1.17 (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="GstTaskPool.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="libgstreamer.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 0.10 Core Reference Manual</th>
21 <td><a accesskey="n" href="GstTypeFindFactory.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="#gstreamer-GstTypeFind.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gstreamer-GstTypeFind.description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="gstreamer-GstTypeFind"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="gstreamer-GstTypeFind.top_of_page"></a>GstTypeFind</span></h2>
34 <p>GstTypeFind — Stream type detection</p>
35 </td>
36 <td valign="top" align="right"></td>
37 </tr></table></div>
38 <div class="refsynopsisdiv">
39 <a name="gstreamer-GstTypeFind.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis">
41 #include &lt;gst/gst.h&gt;
42
43 struct              <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind">GstTypeFind</a>;
44 <span class="returnvalue">void</span>                (<a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()">*GstTypeFindFunction</a>)              (<em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> *find</code></em>,
45                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
46 enum                <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindProbability" title="enum GstTypeFindProbability">GstTypeFindProbability</a>;
47 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *            <a class="link" href="gstreamer-GstTypeFind.html#gst-type-find-peek" title="gst_type_find_peek ()">gst_type_find_peek</a>                  (<em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> *find</code></em>,
48                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> offset</code></em>,
49                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> size</code></em>);
50 <span class="returnvalue">void</span>                <a class="link" href="gstreamer-GstTypeFind.html#gst-type-find-suggest" title="gst_type_find_suggest ()">gst_type_find_suggest</a>               (<em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> *find</code></em>,
51                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> probability</code></em>,
52                                                          <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>);
53 <span class="returnvalue">void</span>                <a class="link" href="gstreamer-GstTypeFind.html#gst-type-find-suggest-simple" title="gst_type_find_suggest_simple ()">gst_type_find_suggest_simple</a>        (<em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> *find</code></em>,
54                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> probability</code></em>,
55                                                          <em class="parameter"><code>const <span class="type">char</span> *media_type</code></em>,
56                                                          <em class="parameter"><code>const <span class="type">char</span> *fieldname</code></em>,
57                                                          <em class="parameter"><code>...</code></em>);
58 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="returnvalue">guint64</span></a>             <a class="link" href="gstreamer-GstTypeFind.html#gst-type-find-get-length" title="gst_type_find_get_length ()">gst_type_find_get_length</a>            (<em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> *find</code></em>);
59 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gstreamer-GstTypeFind.html#gst-type-find-register" title="gst_type_find_register ()">gst_type_find_register</a>              (<em class="parameter"><code><a class="link" href="GstPlugin.html" title="GstPlugin"><span class="type">GstPlugin</span></a> *plugin</code></em>,
60                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
61                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> rank</code></em>,
62                                                          <em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> func</code></em>,
63                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **extensions</code></em>,
64                                                          <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *possible_caps</code></em>,
65                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
66                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> data_notify</code></em>);
67 </pre>
68 </div>
69 <div class="refsect1">
70 <a name="gstreamer-GstTypeFind.description"></a><h2>Description</h2>
71 <p>
72 The following functions allow you to detect the media type of an unknown
73 stream.
74 </p>
75 <p>
76 Last reviewed on 2005-11-09 (0.9.4)
77 </p>
78 </div>
79 <div class="refsect1">
80 <a name="gstreamer-GstTypeFind.details"></a><h2>Details</h2>
81 <div class="refsect2">
82 <a name="GstTypeFind"></a><h3>struct GstTypeFind</h3>
83 <pre class="programlisting">struct GstTypeFind {
84   /* private to the caller of the typefind function */
85   guint8 *  (* peek)       (gpointer         data,
86                             gint64           offset,
87                             guint            size);
88
89   void      (* suggest)    (gpointer         data,
90                             guint            probability,
91                             const GstCaps *  caps);
92
93   gpointer     data;
94
95   /* optional */
96   guint64   (* get_length) (gpointer data);
97 };
98 </pre>
99 <p>
100 Object that stores typefind callbacks. To use with <a class="link" href="GstTypeFindFactory.html" title="GstTypeFindFactory"><span class="type">GstTypeFindFactory</span></a>.
101 </p>
102 <div class="variablelist"><table border="0">
103 <col align="left" valign="top">
104 <tbody>
105 <tr>
106 <td><p><span class="term"><em class="structfield"><code><a name="GstTypeFind.peek"></a>peek</code></em> ()</span></p></td>
107 <td>Method to peek data.</td>
108 </tr>
109 <tr>
110 <td><p><span class="term"><em class="structfield"><code><a name="GstTypeFind.suggest"></a>suggest</code></em> ()</span></p></td>
111 <td>Method to suggest <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> with a given probability.</td>
112 </tr>
113 <tr>
114 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="GstTypeFind.data"></a>data</code></em>;</span></p></td>
115 <td>The data used by the caller of the typefinding function.</td>
116 </tr>
117 <tr>
118 <td><p><span class="term"><em class="structfield"><code><a name="GstTypeFind.get-length"></a>get_length</code></em> ()</span></p></td>
119 <td>Returns the length of current data.</td>
120 </tr>
121 </tbody>
122 </table></div>
123 </div>
124 <hr>
125 <div class="refsect2">
126 <a name="GstTypeFindFunction"></a><h3>GstTypeFindFunction ()</h3>
127 <pre class="programlisting"><span class="returnvalue">void</span>                (*GstTypeFindFunction)              (<em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> *find</code></em>,
128                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
129 <p>
130 A function that will be called by typefinding.
131 </p>
132 <div class="variablelist"><table border="0">
133 <col align="left" valign="top">
134 <tbody>
135 <tr>
136 <td><p><span class="term"><em class="parameter"><code>find</code></em> :</span></p></td>
137 <td>A <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> structure</td>
138 </tr>
139 <tr>
140 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
141 <td>optionnal data to pass to the function</td>
142 </tr>
143 </tbody>
144 </table></div>
145 </div>
146 <hr>
147 <div class="refsect2">
148 <a name="GstTypeFindProbability"></a><h3>enum GstTypeFindProbability</h3>
149 <pre class="programlisting">typedef enum {
150   GST_TYPE_FIND_MINIMUM = 1,
151   GST_TYPE_FIND_POSSIBLE = 50,
152   GST_TYPE_FIND_LIKELY = 80,
153   GST_TYPE_FIND_NEARLY_CERTAIN = 99,
154   GST_TYPE_FIND_MAXIMUM = 100
155 } GstTypeFindProbability;
156 </pre>
157 <p>
158 The probability of the typefind function. Higher values have more certainty
159 in doing a reliable typefind.
160 </p>
161 <div class="variablelist"><table border="0">
162 <col align="left" valign="top">
163 <tbody>
164 <tr>
165 <td><p><a name="GST-TYPE-FIND-MINIMUM:CAPS"></a><span class="term"><code class="literal">GST_TYPE_FIND_MINIMUM</code></span></p></td>
166 <td>unlikely typefind
167 </td>
168 </tr>
169 <tr>
170 <td><p><a name="GST-TYPE-FIND-POSSIBLE:CAPS"></a><span class="term"><code class="literal">GST_TYPE_FIND_POSSIBLE</code></span></p></td>
171 <td>possible type detected
172 </td>
173 </tr>
174 <tr>
175 <td><p><a name="GST-TYPE-FIND-LIKELY:CAPS"></a><span class="term"><code class="literal">GST_TYPE_FIND_LIKELY</code></span></p></td>
176 <td>likely a type was detected
177 </td>
178 </tr>
179 <tr>
180 <td><p><a name="GST-TYPE-FIND-NEARLY-CERTAIN:CAPS"></a><span class="term"><code class="literal">GST_TYPE_FIND_NEARLY_CERTAIN</code></span></p></td>
181 <td>nearly certain that a type was detected
182 </td>
183 </tr>
184 <tr>
185 <td><p><a name="GST-TYPE-FIND-MAXIMUM:CAPS"></a><span class="term"><code class="literal">GST_TYPE_FIND_MAXIMUM</code></span></p></td>
186 <td>very certain a type was detected.
187 </td>
188 </tr>
189 </tbody>
190 </table></div>
191 </div>
192 <hr>
193 <div class="refsect2">
194 <a name="gst-type-find-peek"></a><h3>gst_type_find_peek ()</h3>
195 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *            gst_type_find_peek                  (<em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> *find</code></em>,
196                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> offset</code></em>,
197                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> size</code></em>);</pre>
198 <p>
199 Returns the <em class="parameter"><code>size</code></em> bytes of the stream to identify beginning at offset. If
200 offset is a positive number, the offset is relative to the beginning of the
201 stream, if offset is a negative number the offset is relative to the end of
202 the stream. The returned memory is valid until the typefinding function
203 returns and must not be freed.
204 </p>
205 <div class="variablelist"><table border="0">
206 <col align="left" valign="top">
207 <tbody>
208 <tr>
209 <td><p><span class="term"><em class="parameter"><code>find</code></em> :</span></p></td>
210 <td>The <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> object the function was called with</td>
211 </tr>
212 <tr>
213 <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
214 <td>The offset</td>
215 </tr>
216 <tr>
217 <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
218 <td>The number of bytes to return</td>
219 </tr>
220 <tr>
221 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
222 <td>the requested data, or NULL
223 if that data is not available. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size]</span>
224 </td>
225 </tr>
226 </tbody>
227 </table></div>
228 </div>
229 <hr>
230 <div class="refsect2">
231 <a name="gst-type-find-suggest"></a><h3>gst_type_find_suggest ()</h3>
232 <pre class="programlisting"><span class="returnvalue">void</span>                gst_type_find_suggest               (<em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> *find</code></em>,
233                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> probability</code></em>,
234                                                          <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>);</pre>
235 <p>
236 If a <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> calls this function it suggests the caps with the
237 given probability. A <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> may supply different suggestions
238 in one call.
239 It is up to the caller of the <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> to interpret these values.
240 </p>
241 <div class="variablelist"><table border="0">
242 <col align="left" valign="top">
243 <tbody>
244 <tr>
245 <td><p><span class="term"><em class="parameter"><code>find</code></em> :</span></p></td>
246 <td>The <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> object the function was called with</td>
247 </tr>
248 <tr>
249 <td><p><span class="term"><em class="parameter"><code>probability</code></em> :</span></p></td>
250 <td>The probability in percent that the suggestion is right</td>
251 </tr>
252 <tr>
253 <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
254 <td>The fixed <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> to suggest</td>
255 </tr>
256 </tbody>
257 </table></div>
258 </div>
259 <hr>
260 <div class="refsect2">
261 <a name="gst-type-find-suggest-simple"></a><h3>gst_type_find_suggest_simple ()</h3>
262 <pre class="programlisting"><span class="returnvalue">void</span>                gst_type_find_suggest_simple        (<em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> *find</code></em>,
263                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> probability</code></em>,
264                                                          <em class="parameter"><code>const <span class="type">char</span> *media_type</code></em>,
265                                                          <em class="parameter"><code>const <span class="type">char</span> *fieldname</code></em>,
266                                                          <em class="parameter"><code>...</code></em>);</pre>
267 <p>
268 If a <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> calls this function it suggests the caps with the
269 given probability. A <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> may supply different suggestions
270 in one call. It is up to the caller of the <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> to interpret
271 these values.
272 </p>
273 <p>
274 This function is similar to <a class="link" href="gstreamer-GstTypeFind.html#gst-type-find-suggest" title="gst_type_find_suggest ()"><code class="function">gst_type_find_suggest()</code></a>, only that instead of
275 passing a <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> argument you can create the caps on the fly in the same
276 way as you can with <a class="link" href="gstreamer-GstCaps.html#gst-caps-new-simple" title="gst_caps_new_simple ()"><code class="function">gst_caps_new_simple()</code></a>.
277 </p>
278 <p>
279 Make sure you terminate the list of arguments with a NULL argument and that
280 the values passed have the correct type (in terms of width in bytes when
281 passed to the vararg function - this applies particularly to gdouble and
282 guint64 arguments).
283 </p>
284 <div class="variablelist"><table border="0">
285 <col align="left" valign="top">
286 <tbody>
287 <tr>
288 <td><p><span class="term"><em class="parameter"><code>find</code></em> :</span></p></td>
289 <td>The <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> object the function was called with</td>
290 </tr>
291 <tr>
292 <td><p><span class="term"><em class="parameter"><code>probability</code></em> :</span></p></td>
293 <td>The probability in percent that the suggestion is right</td>
294 </tr>
295 <tr>
296 <td><p><span class="term"><em class="parameter"><code>media_type</code></em> :</span></p></td>
297 <td>the media type of the suggested caps</td>
298 </tr>
299 <tr>
300 <td><p><span class="term"><em class="parameter"><code>fieldname</code></em> :</span></p></td>
301 <td>first field of the suggested caps, or NULL</td>
302 </tr>
303 <tr>
304 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
305 <td>additional arguments to the suggested caps in the same format as the
306 arguments passed to <a class="link" href="gstreamer-GstStructure.html#gst-structure-new" title="gst_structure_new ()"><code class="function">gst_structure_new()</code></a> (ie. triplets of field name,
307 field GType and field value)</td>
308 </tr>
309 </tbody>
310 </table></div>
311 <p class="since">Since 0.10.20</p>
312 </div>
313 <hr>
314 <div class="refsect2">
315 <a name="gst-type-find-get-length"></a><h3>gst_type_find_get_length ()</h3>
316 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="returnvalue">guint64</span></a>             gst_type_find_get_length            (<em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> *find</code></em>);</pre>
317 <p>
318 Get the length of the data stream.
319 </p>
320 <div class="variablelist"><table border="0">
321 <col align="left" valign="top">
322 <tbody>
323 <tr>
324 <td><p><span class="term"><em class="parameter"><code>find</code></em> :</span></p></td>
325 <td>The <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> the function was called with</td>
326 </tr>
327 <tr>
328 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
329 <td>The length of the data stream, or 0 if it is not available.</td>
330 </tr>
331 </tbody>
332 </table></div>
333 </div>
334 <hr>
335 <div class="refsect2">
336 <a name="gst-type-find-register"></a><h3>gst_type_find_register ()</h3>
337 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_type_find_register              (<em class="parameter"><code><a class="link" href="GstPlugin.html" title="GstPlugin"><span class="type">GstPlugin</span></a> *plugin</code></em>,
338                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
339                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> rank</code></em>,
340                                                          <em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> func</code></em>,
341                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **extensions</code></em>,
342                                                          <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *possible_caps</code></em>,
343                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
344                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> data_notify</code></em>);</pre>
345 <p>
346 Registers a new typefind function to be used for typefinding. After
347 registering this function will be available for typefinding.
348 This function is typically called during an element's plugin initialization.
349 </p>
350 <div class="variablelist"><table border="0">
351 <col align="left" valign="top">
352 <tbody>
353 <tr>
354 <td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
355 <td>A <a class="link" href="GstPlugin.html" title="GstPlugin"><span class="type">GstPlugin</span></a>, or NULL for a static typefind function (note that
356 passing NULL only works in GStreamer 0.10.16 and later)</td>
357 </tr>
358 <tr>
359 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
360 <td>The name for registering</td>
361 </tr>
362 <tr>
363 <td><p><span class="term"><em class="parameter"><code>rank</code></em> :</span></p></td>
364 <td>The rank (or importance) of this typefind function</td>
365 </tr>
366 <tr>
367 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
368 <td>The <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> to use</td>
369 </tr>
370 <tr>
371 <td><p><span class="term"><em class="parameter"><code>extensions</code></em> :</span></p></td>
372 <td>Optional extensions that could belong to this type. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span>
373 </td>
374 </tr>
375 <tr>
376 <td><p><span class="term"><em class="parameter"><code>possible_caps</code></em> :</span></p></td>
377 <td>Optionally the caps that could be returned when typefinding
378 succeeds</td>
379 </tr>
380 <tr>
381 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
382 <td>Optional user data. This user data must be available until the plugin
383 is unloaded.</td>
384 </tr>
385 <tr>
386 <td><p><span class="term"><em class="parameter"><code>data_notify</code></em> :</span></p></td>
387 <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> that will be called on <em class="parameter"><code>data</code></em> when the plugin
388 is unloaded.</td>
389 </tr>
390 <tr>
391 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
392 <td>TRUE on success, FALSE otherwise</td>
393 </tr>
394 </tbody>
395 </table></div>
396 </div>
397 </div>
398 </div>
399 <div class="footer">
400 <hr>
401           Generated by GTK-Doc V1.17</div>
402 </body>
403 </html>