docs/gst/gstreamer-sections.txt: Doc updates.
[platform/upstream/gstreamer.git] / gst / gstutils.h
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wtay@chello.be>
4  *
5  * gstutils.h: Header for various utility functions
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23
24 #ifndef __GST_UTILS_H__
25 #define __GST_UTILS_H__
26
27 #include <glib.h>
28 #include <gst/gstbin.h>
29
30 G_BEGIN_DECLS
31
32 void            gst_util_set_value_from_string  (GValue *value, const gchar *value_str);
33 void            gst_util_set_object_arg         (GObject *object, const gchar *name, const gchar *value);
34 void            gst_util_dump_mem               (const guchar *mem, guint size);
35
36 guint64         gst_util_uint64_scale           (guint64 val, guint64 num, guint64 denom);
37
38 void            gst_print_pad_caps              (GString *buf, gint indent, GstPad *pad);
39 void            gst_print_element_args          (GString *buf, gint indent, GstElement *element);
40
41
42 /* Macros for defining classes.  Ideas taken from Bonobo, which took theirs
43    from Nautilus and GOB. */
44
45 /**
46  * GST_BOILERPLATE_FULL:
47  * @type: the name of the type struct
48  * @type_as_function: the prefix for the functions
49  * @parent_type: the parent type struct name
50  * @parent_type_macro: the parent type macro
51  * @additional_initializations: function pointer in the form of 
52  * void additional_initializations (GType type) that can be used for
53  * initializing interfaces and the like
54  *
55  * Define the boilerplate type stuff to reduce typos and code size.  Defines
56  * the get_type method and the parent_class static variable.
57  *
58  * <informalexample>
59  * <programlisting>
60  *   GST_BOILERPLATE_FULL (GstFdSink, gst_fdsink, GstElement, GST_TYPE_ELEMENT, _do_init);
61  * </programlisting>
62  * </informalexample>
63  */
64 #define GST_BOILERPLATE_FULL(type, type_as_function, parent_type, parent_type_macro, additional_initializations)        \
65                                                                         \
66 static void type_as_function ## _base_init     (gpointer      g_class); \
67 static void type_as_function ## _class_init    (type ## Class *g_class);\
68 static void type_as_function ## _init          (type          *object,  \
69                                                 type ## Class *g_class);\
70 static parent_type ## Class *parent_class = NULL;                       \
71 static void                                                             \
72 type_as_function ## _class_init_trampoline (gpointer g_class,           \
73                                             gpointer data)              \
74 {                                                                       \
75   parent_class = (parent_type ## Class *)                               \
76       g_type_class_peek_parent (g_class);                               \
77   type_as_function ## _class_init ((type ## Class *)g_class);           \
78 }                                                                       \
79                                                                         \
80 GType                                                                   \
81 type_as_function ## _get_type (void)                                    \
82 {                                                                       \
83   static GType object_type = 0;                                         \
84   if (object_type == 0) {                                               \
85     static const GTypeInfo object_info = {                              \
86       sizeof (type ## Class),                                           \
87       type_as_function ## _base_init,                                   \
88       NULL,               /* base_finalize */                           \
89       type_as_function ## _class_init_trampoline,                       \
90       NULL,               /* class_finalize */                          \
91       NULL,               /* class_data */                              \
92       sizeof (type),                                                    \
93       0,                  /* n_preallocs */                             \
94       (GInstanceInitFunc) type_as_function ## _init                     \
95     };                                                                  \
96     object_type = g_type_register_static (parent_type_macro, #type,     \
97         &object_info, (GTypeFlags) 0);                                  \
98     additional_initializations (object_type);                           \
99   }                                                                     \
100   return object_type;                                                   \
101 }
102
103 #define __GST_DO_NOTHING(type)  /* NOP */
104
105 /**
106  * GST_BOILERPLATE:
107  * @type: the name of the type struct
108  * @type_as_function: the prefix for the functions
109  * @parent_type: the parent type struct name
110  * @parent_type_macro: the parent type macro
111  *
112  * Define the boilerplate type stuff to reduce typos and code size.  Defines
113  * the get_type method and the parent_class static variable.
114  *
115  * <informalexample>
116  * <programlisting>
117  *   GST_BOILERPLATE (GstFdSink, gst_fdsink, GstElement, GST_TYPE_ELEMENT);
118  * </programlisting>
119  * </informalexample>
120  */
121 #define GST_BOILERPLATE(type,type_as_function,parent_type,parent_type_macro)    \
122   GST_BOILERPLATE_FULL (type, type_as_function, parent_type, parent_type_macro, \
123       __GST_DO_NOTHING)
124
125 /* Like GST_BOILERPLATE, but makes the type 1) implement an interface, and 2)
126  * implement GstImplementsInterface for that type
127  *
128  * After this you will need to implement interface_as_function ## _supported
129  * and interface_as_function ## _interface_init
130  */
131 /**
132  * GST_BOILERPLATE_WITH_INTERFACE:
133  * @type: the name of the type struct
134  * @type_as_function: the prefix for the functions
135  * @parent_type: the parent type struct name
136  * @parent_type_as_macro: the parent type macro
137  * @interface_type: the name of the interface type struct
138  * @interface_type_as_macro: the interface type macro
139  * @interface_as_function: the interface function name prefix
140  *
141  * Like GST_BOILERPLATE, but makes the type 1) implement an interface, and 2)
142  * implement GstImplementsInterface for that type.
143  *
144  * After this you will need to implement interface_as_function ## _supported
145  * and interface_as_function ## _interface_init
146  */
147 #define GST_BOILERPLATE_WITH_INTERFACE(type, type_as_function,          \
148     parent_type, parent_type_as_macro, interface_type,                  \
149     interface_type_as_macro, interface_as_function)                     \
150                                                                         \
151 static void interface_as_function ## _interface_init (interface_type ## Class *klass);  \
152 static gboolean interface_as_function ## _supported (type *object, GType iface_type);   \
153                                                                         \
154 static void                                                             \
155 type_as_function ## _implements_interface_init (GstImplementsInterfaceClass *klass)     \
156 {                                                                       \
157   klass->supported = (gpointer)interface_as_function ## _supported;     \
158 }                                                                       \
159                                                                         \
160 static void                                                             \
161 type_as_function ## _init_interfaces (GType type)                       \
162 {                                                                       \
163   static const GInterfaceInfo implements_iface_info = {                 \
164     (GInterfaceInitFunc) type_as_function ## _implements_interface_init,\
165     NULL,                                                               \
166     NULL,                                                               \
167   };                                                                    \
168   static const GInterfaceInfo iface_info = {                            \
169     (GInterfaceInitFunc) interface_as_function ## _interface_init,      \
170     NULL,                                                               \
171     NULL,                                                               \
172   };                                                                    \
173                                                                         \
174   g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE,     \
175       &implements_iface_info);                                          \
176   g_type_add_interface_static (type, interface_type_as_macro,           \
177       &iface_info);                                                     \
178 }                                                                       \
179                                                                         \
180 GST_BOILERPLATE_FULL (type, type_as_function, parent_type,              \
181     parent_type_as_macro, type_as_function ## _init_interfaces)
182
183 /* Just call the parent handler.  This assumes that there is a variable
184  * named parent_class that points to the (duh!) parent class.  Note that
185  * this macro is not to be used with things that return something, use
186  * the _WITH_DEFAULT version for that */
187 #define GST_CALL_PARENT(parent_class_cast, name, args)                  \
188         ((parent_class_cast(parent_class)->name != NULL) ?              \
189          parent_class_cast(parent_class)->name args : (void) 0)
190
191 /* Same as above, but in case there is no implementation, it evaluates
192  * to def_return */
193 #define GST_CALL_PARENT_WITH_DEFAULT(parent_class_cast, name, args,     \
194     def_return)                                                         \
195         ((parent_class_cast(parent_class)->name != NULL) ?              \
196          parent_class_cast(parent_class)->name args : def_return)
197
198 /* Define possibly unaligned memory access method whether the type of
199  * architecture. */
200 #if GST_HAVE_UNALIGNED_ACCESS
201
202 #define _GST_GET(__data, __size, __end) \
203     (GUINT##__size##_FROM_##__end (* ((guint##__size *) (__data))))
204
205 /**
206  * GST_READ_UINT64_BE:
207  * @data: memory location
208  *
209  * Read a 64 bit unsigned integer value in big endian format from the memory buffer.
210  */
211 #define GST_READ_UINT64_BE(data)        _GST_GET (data, 64, BE)
212 /**
213  * GST_READ_UINT64_LE:
214  * @data: memory location
215  *
216  * Read a 64 bit unsigned integer value in little endian format from the memory buffer.
217  */
218 #define GST_READ_UINT64_LE(data)        _GST_GET (data, 64, LE)
219 /**
220  * GST_READ_UINT32_BE:
221  * @data: memory location
222  *
223  * Read a 32 bit unsigned integer value in big endian format from the memory buffer.
224  */
225 #define GST_READ_UINT32_BE(data)        _GST_GET (data, 32, BE)
226 /**
227  * GST_READ_UINT32_LE:
228  * @data: memory location
229  *
230  * Read a 32 bit unsigned integer value in little endian format from the memory buffer.
231  */
232 #define GST_READ_UINT32_LE(data)        _GST_GET (data, 32, LE)
233 /**
234  * GST_READ_UINT16_BE:
235  * @data: memory location
236  *
237  * Read a 16 bit unsigned integer value in big endian format from the memory buffer.
238  */
239 #define GST_READ_UINT16_BE(data)        _GST_GET (data, 16, BE)
240 /**
241  * GST_READ_UINT16_LE:
242  * @data: memory location
243  *
244  * Read a 16 bit unsigned integer value in little endian format from the memory buffer.
245  */
246 #define GST_READ_UINT16_LE(data)        _GST_GET (data, 16, LE)
247 /**
248  * GST_READ_UINT8:
249  * @data: memory location
250  *
251  * Read an 8 bit unsigned integer value from the memory buffer.
252  */
253 #define GST_READ_UINT8(data)            (* ((guint8 *) (data)))
254
255 #define _GST_PUT(__data, __size, __end, __num) \
256     ((* (guint##__size *) (__data)) = GUINT##__size##_TO_##__end (__num))
257
258 /**
259  * GST_WRITE_UINT64_BE:
260  * @data: memory location
261  * @num: value to store
262  *
263  * Store a 64 bit unsigned integer value in big endian format into the memory buffer.
264  */
265 #define GST_WRITE_UINT64_BE(data, num)  _GST_PUT(data, 64, BE, num)
266 /**
267  * GST_WRITE_UINT64_LE:
268  * @data: memory location
269  * @num: value to store
270  *
271  * Store a 64 bit unsigned integer value in little endian format into the memory buffer.
272  */
273 #define GST_WRITE_UINT64_LE(data, num)  _GST_PUT(data, 64, LE, num)
274 /**
275  * GST_WRITE_UINT32_BE:
276  * @data: memory location
277  * @num: value to store
278  *
279  * Store a 32 bit unsigned integer value in big endian format into the memory buffer.
280  */
281 #define GST_WRITE_UINT32_BE(data, num)  _GST_PUT(data, 32, BE, num)
282 /**
283  * GST_WRITE_UINT32_LE:
284  * @data: memory location
285  * @num: value to store
286  *
287  * Store a 32 bit unsigned integer value in little endian format into the memory buffer.
288  */
289 #define GST_WRITE_UINT32_LE(data, num)  _GST_PUT(data, 32, LE, num)
290 /**
291  * GST_WRITE_UINT16_BE:
292  * @data: memory location
293  * @num: value to store
294  *
295  * Store a 16 bit unsigned integer value in big endian format into the memory buffer.
296  */
297 #define GST_WRITE_UINT16_BE(data, num)  _GST_PUT(data, 16, BE, num)
298 /**
299  * GST_WRITE_UINT16_LE:
300  * @data: memory location
301  * @num: value to store
302  *
303  * Store a 16 bit unsigned integer value in little endian format into the memory buffer.
304  */
305 #define GST_WRITE_UINT16_LE(data, num)  _GST_PUT(data, 16, LE, num)
306 /**
307  * GST_WRITE_UINT8:
308  * @data: memory location
309  * @num: value to store
310  *
311  * Store an 8 bit unsigned integer value into the memory buffer.
312  */
313 #define GST_WRITE_UINT8(data, num)      ((* (guint8 *) (data)) = (num))
314
315 #else /* GST_HAVE_UNALIGNED_ACCESS */
316
317 #define _GST_GET(__data, __idx, __size, __shift) \
318     (((guint##__size) (((guint8 *) (__data))[__idx])) << __shift)
319
320 #define GST_READ_UINT64_BE(data)        (_GST_GET (data, 0, 64, 56) | \
321                                          _GST_GET (data, 1, 64, 48) | \
322                                          _GST_GET (data, 2, 64, 40) | \
323                                          _GST_GET (data, 3, 64, 32) | \
324                                          _GST_GET (data, 4, 64, 24) | \
325                                          _GST_GET (data, 5, 64, 16) | \
326                                          _GST_GET (data, 6, 64,  8) | \
327                                          _GST_GET (data, 7, 64,  0))
328
329 #define GST_READ_UINT64_LE(data)        (_GST_GET (data, 7, 64, 56) | \
330                                          _GST_GET (data, 6, 64, 48) | \
331                                          _GST_GET (data, 5, 64, 40) | \
332                                          _GST_GET (data, 4, 64, 32) | \
333                                          _GST_GET (data, 3, 64, 24) | \
334                                          _GST_GET (data, 2, 64, 16) | \
335                                          _GST_GET (data, 1, 64,  8) | \
336                                          _GST_GET (data, 0, 64,  0))
337
338 #define GST_READ_UINT32_BE(data)        (_GST_GET (data, 0, 32, 24) | \
339                                          _GST_GET (data, 1, 32, 16) | \
340                                          _GST_GET (data, 2, 32,  8) | \
341                                          _GST_GET (data, 3, 32,  0))
342
343 #define GST_READ_UINT32_LE(data)        (_GST_GET (data, 3, 32, 24) | \
344                                          _GST_GET (data, 2, 32, 16) | \
345                                          _GST_GET (data, 1, 32,  8) | \
346                                          _GST_GET (data, 0, 32,  0))
347
348 #define GST_READ_UINT16_BE(data)        (_GST_GET (data, 0, 16,  8) | \
349                                          _GST_GET (data, 1, 16,  0))
350
351 #define GST_READ_UINT16_LE(data)        (_GST_GET (data, 1, 16,  8) | \
352                                          _GST_GET (data, 0, 16,  0))
353
354 #define GST_READ_UINT8(data)            (_GST_GET (data, 0,  8,  0))
355
356 #define _GST_PUT(__data, __idx, __size, __shift, __num) \
357     (((guint8 *) (__data))[__idx] = (((guint##__size) __num) >> __shift) & 0xff)
358
359 #define GST_WRITE_UINT64_BE(data, num)  do { \
360                                           _GST_PUT (data, 0, 64, 56, num); \
361                                           _GST_PUT (data, 1, 64, 48, num); \
362                                           _GST_PUT (data, 2, 64, 40, num); \
363                                           _GST_PUT (data, 3, 64, 32, num); \
364                                           _GST_PUT (data, 4, 64, 24, num); \
365                                           _GST_PUT (data, 5, 64, 16, num); \
366                                           _GST_PUT (data, 6, 64,  8, num); \
367                                           _GST_PUT (data, 7, 64,  0, num); \
368                                         } while (0)
369
370 #define GST_WRITE_UINT64_LE(data, num)  do { \
371                                           _GST_PUT (data, 0, 64,  0, num); \
372                                           _GST_PUT (data, 1, 64,  8, num); \
373                                           _GST_PUT (data, 2, 64, 16, num); \
374                                           _GST_PUT (data, 3, 64, 24, num); \
375                                           _GST_PUT (data, 4, 64, 32, num); \
376                                           _GST_PUT (data, 5, 64, 40, num); \
377                                           _GST_PUT (data, 6, 64, 48, num); \
378                                           _GST_PUT (data, 7, 64, 56, num); \
379                                         } while (0)
380
381 #define GST_WRITE_UINT32_BE(data, num)  do { \
382                                           _GST_PUT (data, 0, 32, 24, num); \
383                                           _GST_PUT (data, 1, 32, 16, num); \
384                                           _GST_PUT (data, 2, 32,  8, num); \
385                                           _GST_PUT (data, 3, 32,  0, num); \
386                                         } while (0)
387
388 #define GST_WRITE_UINT32_LE(data, num)  do { \
389                                           _GST_PUT (data, 0, 32,  0, num); \
390                                           _GST_PUT (data, 1, 32,  8, num); \
391                                           _GST_PUT (data, 2, 32, 16, num); \
392                                           _GST_PUT (data, 3, 32, 24, num); \
393                                         } while (0)
394
395 #define GST_WRITE_UINT16_BE(data, num)  do { \
396                                           _GST_PUT (data, 0, 16,  8, num); \
397                                           _GST_PUT (data, 1, 16,  0, num); \
398                                         } while (0)
399
400 #define GST_WRITE_UINT16_LE(data, num)  do { \
401                                           _GST_PUT (data, 0, 16,  0, num); \
402                                           _GST_PUT (data, 1, 16,  8, num); \
403                                         } while (0)
404
405 #define GST_WRITE_UINT8(data, num)      do { \
406                                           _GST_PUT (data, 0,  8,  0, num); \
407                                         } while (0)
408
409 #endif /* GST_HAVE_UNALIGNED_ACCESS */
410
411
412 /* Miscellaneous utility macros */
413
414 /**
415  * GST_ROUND_UP_2:
416  * @num: value round up
417  *
418  * Make number divideable by two without a rest.
419  */
420 #define GST_ROUND_UP_2(num)  (((num)+1)&~1)
421 /**
422  * GST_ROUND_UP_4:
423  * @num: value round up
424  *
425  * Make number divideable by four without a rest.
426  */
427 #define GST_ROUND_UP_4(num)  (((num)+3)&~3)
428 /**
429  * GST_ROUND_UP_8:
430  * @num: value round up
431  *
432  * Make number divideable by eight without a rest.
433  */
434 #define GST_ROUND_UP_8(num)  (((num)+7)&~7)
435 /**
436  * GST_ROUND_UP_16:
437  * @num: value round up
438  *
439  * Make number divideable by 16 without a rest.
440  */
441 #define GST_ROUND_UP_16(num) (((num)+15)&~15)
442 /**
443  * GST_ROUND_UP_32:
444  * @num: value round up
445  *
446  * Make number divideable by 32 without a rest.
447  */
448 #define GST_ROUND_UP_32(num) (((num)+31)&~31)
449 /**
450  * GST_ROUND_UP_64:
451  * @num: value round up
452  *
453  * Make number divideable by 64 without a rest.
454  */
455 #define GST_ROUND_UP_64(num) (((num)+63)&~63)
456
457 void                    gst_object_default_error        (GstObject * source,
458                                                          GError * error, gchar * debug);
459
460 /* rec mutex */
461 #ifndef g_static_rec_cond_wait
462 #define GST_COMPILE_STATIC_REC_COND_WAIT
463 void                    g_static_rec_cond_wait          (GCond                *cond,
464                                                          GStaticRecMutex      *mutex);
465 gboolean                g_static_rec_cond_timed_wait    (GCond                *cond,
466                                                          GStaticRecMutex      *mutex,
467                                                          GTimeVal             *end_time);
468 #endif
469
470 /* element functions */
471 GstFlowReturn           gst_element_abort_preroll       (GstElement *element);
472 GstFlowReturn           gst_element_finish_preroll      (GstElement *element, GstPad *pad);
473
474 void                    gst_element_create_all_pads     (GstElement *element);
475 GstPad*                 gst_element_get_compatible_pad  (GstElement *element, GstPad *pad,
476                                                          const GstCaps *caps);
477
478 GstPadTemplate*         gst_element_get_compatible_pad_template (GstElement *element, GstPadTemplate *compattempl);
479
480 G_CONST_RETURN gchar*   gst_element_state_get_name      (GstState state);
481
482 gboolean                gst_element_link                (GstElement *src, GstElement *dest);
483 gboolean                gst_element_link_many           (GstElement *element_1,
484                                                          GstElement *element_2, ...);
485 gboolean                gst_element_link_filtered       (GstElement * src,
486                                                          GstElement * dest,
487                                                          GstCaps *filter);
488 void                    gst_element_unlink              (GstElement *src, GstElement *dest);
489 void                    gst_element_unlink_many         (GstElement *element_1,
490                                                          GstElement *element_2, ...);
491
492 gboolean                gst_element_link_pads           (GstElement *src, const gchar *srcpadname,
493                                                          GstElement *dest, const gchar *destpadname);
494 void                    gst_element_unlink_pads         (GstElement *src, const gchar *srcpadname,
495                                                          GstElement *dest, const gchar *destpadname);
496
497 gboolean                gst_element_link_pads_filtered  (GstElement * src, const gchar * srcpadname,
498                                                          GstElement * dest, const gchar * destpadname,
499                                                          GstCaps *filter);
500 GstStateChangeReturn    gst_element_set_state_async     (GstElement * element, GstState state);
501
502 /* util elementfactory functions */
503 gboolean                gst_element_factory_can_src_caps(GstElementFactory *factory, const GstCaps *caps);
504 gboolean                gst_element_factory_can_sink_caps(GstElementFactory *factory, const GstCaps *caps);
505
506 /* util query functions */
507 gboolean                gst_element_query_position      (GstElement *element, GstFormat *format,
508                                                          gint64 *cur, gint64 *end);
509 gboolean                gst_element_query_convert       (GstElement *element, GstFormat src_format, gint64 src_val,
510                                                          GstFormat *dest_fmt, gint64 *dest_val);
511
512 /* element class functions */
513 void                    gst_element_class_install_std_props (GstElementClass * klass,
514                                                          const gchar * first_name, ...);
515
516 /* pad functions */
517 gboolean                gst_pad_can_link                (GstPad *srcpad, GstPad *sinkpad);
518
519 void                    gst_pad_use_fixed_caps          (GstPad *pad);
520 GstCaps*                gst_pad_get_fixed_caps_func     (GstPad *pad);
521 GstCaps*                gst_pad_proxy_getcaps           (GstPad * pad);
522 gboolean                gst_pad_proxy_setcaps           (GstPad * pad, GstCaps * caps);
523
524 GstElement*             gst_pad_get_parent_element      (GstPad *pad);
525
526 /* flow */
527 G_CONST_RETURN gchar*   gst_flow_get_name               (GstFlowReturn ret);
528
529
530 /* util query functions */
531 gboolean                gst_pad_query_position          (GstPad *pad, GstFormat *format,
532                                                          gint64 *cur, gint64 *end);
533 gboolean                gst_pad_query_convert           (GstPad *pad, GstFormat src_format, gint64 src_val,
534                                                          GstFormat *dest_format, gint64 *dest_val);
535
536 /* bin functions */
537 void                    gst_bin_add_many                (GstBin *bin, GstElement *element_1, ...);
538 void                    gst_bin_remove_many             (GstBin *bin, GstElement *element_1, ...);
539 void                    gst_bin_watch_for_state_change  (GstBin *bin);
540
541 /* buffer functions */
542 GstBuffer *             gst_buffer_merge                (GstBuffer * buf1, GstBuffer * buf2);
543 GstBuffer *             gst_buffer_join                 (GstBuffer * buf1, GstBuffer * buf2);
544 void                    gst_buffer_stamp                (GstBuffer * dest, const GstBuffer * src);
545
546 /* atomic functions */
547 void                    gst_atomic_int_set              (gint * atomic_int, gint value);
548
549 /* probes */
550 gulong                  gst_pad_add_data_probe          (GstPad * pad,
551                                                          GCallback handler,
552                                                          gpointer data);
553 void                    gst_pad_remove_data_probe       (GstPad * pad, guint handler_id);
554 gulong                  gst_pad_add_event_probe         (GstPad * pad,
555                                                          GCallback handler,
556                                                          gpointer data);
557 void                    gst_pad_remove_event_probe      (GstPad * pad, guint handler_id);
558 gulong                  gst_pad_add_buffer_probe        (GstPad * pad,
559                                                          GCallback handler,
560                                                          gpointer data);
561 void                    gst_pad_remove_buffer_probe     (GstPad * pad, guint handler_id);
562
563 /* tag emission utility functions */
564 void                    gst_element_found_tags_for_pad  (GstElement * element,
565                                                          GstPad * pad,
566                                                          GstTagList * list);
567 void                    gst_element_found_tags          (GstElement * element,
568                                                          GstTagList * list);
569
570 G_END_DECLS
571
572 #endif /* __GST_UTILS_H__ */