aboutsummaryrefslogtreecommitdiff
path: root/docs/gst/html/gstreamer-GstTypeFind.html
blob: 01e856faf269994097dc6086d60a5d3d2f3d6323 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GstTypeFind</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GStreamer 0.11 Core Reference Manual">
<link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
<link rel="prev" href="GstTaskPool.html" title="GstTaskPool">
<link rel="next" href="GstTypeFindFactory.html" title="GstTypeFindFactory">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GstTaskPool.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GStreamer 0.11 Core Reference Manual</th>
<td><a accesskey="n" href="GstTypeFindFactory.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gstreamer-GstTypeFind.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gstreamer-GstTypeFind.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gstreamer-GstTypeFind"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gstreamer-GstTypeFind.top_of_page"></a>GstTypeFind</span></h2>
<p>GstTypeFind — Stream type detection</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gstreamer-GstTypeFind.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gst/gst.h&gt;

struct              <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind">GstTypeFind</a>;
<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>,
                                                         <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>);
enum                <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindProbability" title="enum GstTypeFindProbability">GstTypeFindProbability</a>;
const <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>,
                                                         <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>,
                                                         <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>);
<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>,
                                                         <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>,
                                                         <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>);
<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>,
                                                         <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>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *media_type</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *fieldname</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<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>);
<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>,
                                                         <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>,
                                                         <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>,
                                                         <em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> func</code></em>,
                                                         <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>,
                                                         <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>,
                                                         <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>,
                                                         <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>
</div>
<div class="refsect1">
<a name="gstreamer-GstTypeFind.description"></a><h2>Description</h2>
<p>
The following functions allow you to detect the media type of an unknown
stream.
</p>
<p>
Last reviewed on 2005-11-09 (0.9.4)
</p>
</div>
<div class="refsect1">
<a name="gstreamer-GstTypeFind.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GstTypeFind"></a><h3>struct GstTypeFind</h3>
<pre class="programlisting">struct GstTypeFind {
  /* private to the caller of the typefind function */
  const guint8 *  (* peek)       (gpointer         data,
                                  gint64           offset,
                                  guint            size);

  void            (* suggest)    (gpointer         data,
                                  guint            probability,
                                  const GstCaps *  caps);

  gpointer         data;

  /* optional */
  guint64         (* get_length) (gpointer data);
};
</pre>
<p>
Object that stores typefind callbacks. To use with <a class="link" href="GstTypeFindFactory.html" title="GstTypeFindFactory"><span class="type">GstTypeFindFactory</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstTypeFind.peek"></a>peek</code></em> ()</span></p></td>
<td>Method to peek data.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstTypeFind.suggest"></a>suggest</code></em> ()</span></p></td>
<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>
</tr>
<tr>
<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>
<td>The data used by the caller of the typefinding function.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstTypeFind.get-length"></a>get_length</code></em> ()</span></p></td>
<td>Returns the length of current data.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstTypeFindFunction"></a><h3>GstTypeFindFunction ()</h3>
<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>,
                                                         <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>
<p>
A function that will be called by typefinding.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>find</code></em> :</span></p></td>
<td>A <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFind" title="struct GstTypeFind"><span class="type">GstTypeFind</span></a> structure</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>optionnal data to pass to the function</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstTypeFindProbability"></a><h3>enum GstTypeFindProbability</h3>
<pre class="programlisting">typedef enum {
  GST_TYPE_FIND_NONE = 0,
  GST_TYPE_FIND_MINIMUM = 1,
  GST_TYPE_FIND_POSSIBLE = 50,
  GST_TYPE_FIND_LIKELY = 80,
  GST_TYPE_FIND_NEARLY_CERTAIN = 99,
  GST_TYPE_FIND_MAXIMUM = 100
} GstTypeFindProbability;
</pre>
<p>
The probability of the typefind function. Higher values have more certainty
in doing a reliable typefind.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GST-TYPE-FIND-NONE:CAPS"></a><span class="term"><code class="literal">GST_TYPE_FIND_NONE</code></span></p></td>
<td>type undetected. Since 0.10.36.
</td>
</tr>
<tr>
<td><p><a name="GST-TYPE-FIND-MINIMUM:CAPS"></a><span class="term"><code class="literal">GST_TYPE_FIND_MINIMUM</code></span></p></td>
<td>unlikely typefind.
</td>
</tr>
<tr>
<td><p><a name="GST-TYPE-FIND-POSSIBLE:CAPS"></a><span class="term"><code class="literal">GST_TYPE_FIND_POSSIBLE</code></span></p></td>
<td>possible type detected.
</td>
</tr>
<tr>
<td><p><a name="GST-TYPE-FIND-LIKELY:CAPS"></a><span class="term"><code class="literal">GST_TYPE_FIND_LIKELY</code></span></p></td>
<td>likely a type was detected.
</td>
</tr>
<tr>
<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>
<td>nearly certain that a type was detected.
</td>
</tr>
<tr>
<td><p><a name="GST-TYPE-FIND-MAXIMUM:CAPS"></a><span class="term"><code class="literal">GST_TYPE_FIND_MAXIMUM</code></span></p></td>
<td>very certain a type was detected.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-type-find-peek"></a><h3>gst_type_find_peek ()</h3>
<pre class="programlisting">const <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>,
                                                         <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>,
                                                         <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>
<p>
Returns the <em class="parameter"><code>size</code></em> bytes of the stream to identify beginning at offset. If
offset is a positive number, the offset is relative to the beginning of the
stream, if offset is a negative number the offset is relative to the end of
the stream. The returned memory is valid until the typefinding function
returns and must not be freed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>find</code></em> :</span></p></td>
<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>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
<td>The offset</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>The number of bytes to return</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the requested data, or NULL
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>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-type-find-suggest"></a><h3>gst_type_find_suggest ()</h3>
<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>,
                                                         <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>,
                                                         <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>
<p>
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
given probability. A <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> may supply different suggestions
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 these values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>find</code></em> :</span></p></td>
<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>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>probability</code></em> :</span></p></td>
<td>The probability in percent that the suggestion is right</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
<td>The fixed <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> to suggest</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-type-find-suggest-simple"></a><h3>gst_type_find_suggest_simple ()</h3>
<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>,
                                                         <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>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *media_type</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *fieldname</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
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
given probability. A <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> may supply different suggestions
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
these values.
</p>
<p>
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
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
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>.
</p>
<p>
Make sure you terminate the list of arguments with a NULL argument and that
the values passed have the correct type (in terms of width in bytes when
passed to the vararg function - this applies particularly to gdouble and
guint64 arguments).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>find</code></em> :</span></p></td>
<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>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>probability</code></em> :</span></p></td>
<td>The probability in percent that the suggestion is right</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>media_type</code></em> :</span></p></td>
<td>the media type of the suggested caps</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fieldname</code></em> :</span></p></td>
<td>first field of the suggested caps, or NULL</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>additional arguments to the suggested caps in the same format as the
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,
field GType and field value)</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.10.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gst-type-find-get-length"></a><h3>gst_type_find_get_length ()</h3>
<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>
<p>
Get the length of the data stream.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>find</code></em> :</span></p></td>
<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>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The length of the data stream, or 0 if it is not available.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-type-find-register"></a><h3>gst_type_find_register ()</h3>
<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>,
                                                         <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>,
                                                         <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>,
                                                         <em class="parameter"><code><a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> func</code></em>,
                                                         <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>,
                                                         <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>,
                                                         <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>,
                                                         <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>
<p>
Registers a new typefind function to be used for typefinding. After
registering this function will be available for typefinding.
This function is typically called during an element's plugin initialization.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
<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
passing NULL only works in GStreamer 0.10.16 and later)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>The name for registering</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rank</code></em> :</span></p></td>
<td>The rank (or importance) of this typefind function</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>The <a class="link" href="gstreamer-GstTypeFind.html#GstTypeFindFunction" title="GstTypeFindFunction ()"><span class="type">GstTypeFindFunction</span></a> to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>extensions</code></em> :</span></p></td>
<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>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>possible_caps</code></em> :</span></p></td>
<td>Optionally the caps that could be returned when typefinding
succeeds</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>Optional user data. This user data must be available until the plugin
is unloaded.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data_notify</code></em> :</span></p></td>
<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
is unloaded.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE on success, FALSE otherwise</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>