gstreamer_core/gst/gstutils.h
changeset 16 8e837d1bf446
parent 0 0e761a78d257
child 10 6f340f756486
equal deleted inserted replaced
15:4b0c6ed43234 16:8e837d1bf446
    25 #ifndef __GST_UTILS_H__
    25 #ifndef __GST_UTILS_H__
    26 #define __GST_UTILS_H__
    26 #define __GST_UTILS_H__
    27 
    27 
    28 #include <glib.h>
    28 #include <glib.h>
    29 #include <gst/gstbin.h>
    29 #include <gst/gstbin.h>
       
    30 #include <gst/gstparse.h>
    30 
    31 
    31 G_BEGIN_DECLS
    32 G_BEGIN_DECLS
    32 
    33 
    33 void		gst_util_set_value_from_string	(GValue *value, const gchar *value_str);
    34 void		gst_util_set_value_from_string	(GValue *value, const gchar *value_str);
    34 #ifdef __SYMBIAN32__
    35 #ifdef __SYMBIAN32__
    44 #ifdef __SYMBIAN32__
    45 #ifdef __SYMBIAN32__
    45 IMPORT_C
    46 IMPORT_C
    46 #endif
    47 #endif
    47 
    48 
    48 
    49 
    49 guint64         gst_util_gdouble_to_guint64     (gdouble value);
    50 guint64         gst_util_gdouble_to_guint64     (gdouble value)  G_GNUC_PURE;
    50 #ifdef __SYMBIAN32__
    51 #ifdef __SYMBIAN32__
    51 IMPORT_C
    52 IMPORT_C
    52 #endif
    53 #endif
    53 
    54 
    54 gdouble         gst_util_guint64_to_gdouble     (guint64 value);
    55 gdouble         gst_util_guint64_to_gdouble     (guint64 value)  G_GNUC_PURE;
    55 
    56 
    56 /**
    57 /**
    57  * gst_guint64_to_gdouble:
    58  * gst_guint64_to_gdouble:
    58  * @value: the #guint64 value to convert
    59  * @value: the #guint64 value to convert
    59  *
    60  *
    76 #else
    77 #else
    77 #define         gst_gdouble_to_guint64(value)   ((guint64) (value))
    78 #define         gst_gdouble_to_guint64(value)   ((guint64) (value))
    78 #define         gst_guint64_to_gdouble(value)   ((gdouble) (value))
    79 #define         gst_guint64_to_gdouble(value)   ((gdouble) (value))
    79 #endif
    80 #endif
    80 
    81 
    81 guint64		gst_util_uint64_scale		(guint64 val, guint64 num, guint64 denom);
    82 guint64		gst_util_uint64_scale		(guint64 val, guint64 num, guint64 denom) G_GNUC_PURE;
    82 #ifdef __SYMBIAN32__
    83 #ifdef __SYMBIAN32__
    83 IMPORT_C
    84 IMPORT_C
    84 #endif
    85 #endif
    85 
    86 
    86 
    87 
    87 guint64         gst_util_uint64_scale_int       (guint64 val, gint num, gint denom);
    88 guint64         gst_util_uint64_scale_int       (guint64 val, gint num, gint denom) G_GNUC_PURE;
       
    89 #ifdef __SYMBIAN32__
       
    90 IMPORT_C
       
    91 #endif
       
    92 
       
    93 
       
    94 guint32         gst_util_seqnum_next            (void);
       
    95 #ifdef __SYMBIAN32__
       
    96 IMPORT_C
       
    97 #endif
       
    98 
       
    99 gint32          gst_util_seqnum_compare         (guint32 s1, guint32 s2);
    88 #ifdef __SYMBIAN32__
   100 #ifdef __SYMBIAN32__
    89 IMPORT_C
   101 IMPORT_C
    90 #endif
   102 #endif
    91 
   103 
    92 
   104 
   158 GType type_as_function ## _get_type (void);				\
   170 GType type_as_function ## _get_type (void);				\
   159 									\
   171 									\
   160 __declspec(dllexport) GType									\
   172 __declspec(dllexport) GType									\
   161 type_as_function ## _get_type (void)					\
   173 type_as_function ## _get_type (void)					\
   162 {									\
   174 {									\
   163   static GType object_type = 0;						\
   175   /* The typedef for GType may be gulong or gsize, depending on the	\
   164   if (G_UNLIKELY (object_type == 0)) {					\
   176    * system and whether the compiler is c++ or not. The g_once_init_*	\
   165     object_type = gst_type_register_static_full (parent_type_macro, #type,	\
   177    * functions always take a gsize * though ... */			\
   166 	sizeof (type ## Class),					\
   178   static volatile gsize gonce_data = 0;					\
       
   179   if (g_once_init_enter (&gonce_data)) {				\
       
   180     GType _type;							\
       
   181     _type = gst_type_register_static_full (parent_type_macro,           \
       
   182         g_intern_static_string (#type),					\
       
   183 	sizeof (type ## Class),						\
   167         type_as_function ## _base_init,					\
   184         type_as_function ## _base_init,					\
   168         NULL,		  /* base_finalize */				\
   185         NULL,		  /* base_finalize */				\
   169         type_as_function ## _class_init_trampoline,			\
   186         type_as_function ## _class_init_trampoline,			\
   170         NULL,		  /* class_finalize */				\
   187         NULL,		  /* class_finalize */				\
   171         NULL,               /* class_data */				\
   188         NULL,               /* class_data */				\
   172         sizeof (type),							\
   189         sizeof (type),							\
   173         0,                  /* n_preallocs */				\
   190         0,                  /* n_preallocs */				\
   174         (GInstanceInitFunc) type_as_function ## _init,                  \
   191         (GInstanceInitFunc) type_as_function ## _init,                  \
   175         NULL,                                                           \
   192         NULL,                                                           \
   176         (GTypeFlags) 0);				                \
   193         (GTypeFlags) 0);				                \
   177     additional_initializations (object_type);				\
   194     additional_initializations (_type);				        \
       
   195     g_once_init_leave (&gonce_data, (gsize) _type);			\
   178   }									\
   196   }									\
   179   return object_type;							\
   197   return (GType) gonce_data;						\
   180 }
   198 }
   181 
   199 
   182 #define __GST_DO_NOTHING(type)	/* NOP */
   200 #define __GST_DO_NOTHING(type)	/* NOP */
   183 
   201 
   184 /**
   202 /**
   286  */
   304  */
   287 #define GST_CALL_PARENT_WITH_DEFAULT(parent_class_cast, name, args, def_return)\
   305 #define GST_CALL_PARENT_WITH_DEFAULT(parent_class_cast, name, args, def_return)\
   288 	((parent_class_cast(parent_class)->name != NULL) ?		\
   306 	((parent_class_cast(parent_class)->name != NULL) ?		\
   289 	 parent_class_cast(parent_class)->name args : def_return)
   307 	 parent_class_cast(parent_class)->name args : def_return)
   290 
   308 
   291 /* Define possibly unaligned memory access method whether the type of
   309 /* Define PUT and GET functions for unaligned memory */
   292  * architecture. */
   310 #define _GST_GET(__data, __idx, __size, __shift) \
   293 #if GST_HAVE_UNALIGNED_ACCESS
   311     (((guint##__size) (((guint8 *) (__data))[__idx])) << (__shift))
   294 
   312 
   295 #define _GST_GET(__data, __size, __end) \
   313 #define _GST_PUT(__data, __idx, __size, __shift, __num) \
   296     (GUINT##__size##_FROM_##__end (* ((guint##__size *) (__data))))
   314     (((guint8 *) (__data))[__idx] = (((guint##__size) (__num)) >> (__shift)) & 0xff)
   297 
   315 
   298 /**
   316 /**
   299  * GST_READ_UINT64_BE:
   317  * GST_READ_UINT64_BE:
   300  * @data: memory location
   318  * @data: memory location
   301  *
   319  *
   302  * Read a 64 bit unsigned integer value in big endian format from the memory buffer.
   320  * Read a 64 bit unsigned integer value in big endian format from the memory buffer.
   303  */
   321  */
   304 #define GST_READ_UINT64_BE(data)	_GST_GET (data, 64, BE)
       
   305 /**
       
   306  * GST_READ_UINT64_LE:
       
   307  * @data: memory location
       
   308  *
       
   309  * Read a 64 bit unsigned integer value in little endian format from the memory buffer.
       
   310  */
       
   311 #define GST_READ_UINT64_LE(data)	_GST_GET (data, 64, LE)
       
   312 /**
       
   313  * GST_READ_UINT32_BE:
       
   314  * @data: memory location
       
   315  *
       
   316  * Read a 32 bit unsigned integer value in big endian format from the memory buffer.
       
   317  */
       
   318 #define GST_READ_UINT32_BE(data)	_GST_GET (data, 32, BE)
       
   319 /**
       
   320  * GST_READ_UINT32_LE:
       
   321  * @data: memory location
       
   322  *
       
   323  * Read a 32 bit unsigned integer value in little endian format from the memory buffer.
       
   324  */
       
   325 #define GST_READ_UINT32_LE(data)        _GST_GET (data, 32, LE)
       
   326 /**
       
   327  * GST_READ_UINT16_BE:
       
   328  * @data: memory location
       
   329  *
       
   330  * Read a 16 bit unsigned integer value in big endian format from the memory buffer.
       
   331  */
       
   332 #define GST_READ_UINT16_BE(data)        _GST_GET (data, 16, BE)
       
   333 /**
       
   334  * GST_READ_UINT16_LE:
       
   335  * @data: memory location
       
   336  *
       
   337  * Read a 16 bit unsigned integer value in little endian format from the memory buffer.
       
   338  */
       
   339 #define GST_READ_UINT16_LE(data)        _GST_GET (data, 16, LE)
       
   340 /**
       
   341  * GST_READ_UINT8:
       
   342  * @data: memory location
       
   343  *
       
   344  * Read an 8 bit unsigned integer value from the memory buffer.
       
   345  */
       
   346 #define GST_READ_UINT8(data)		(* ((guint8 *) (data)))
       
   347 
       
   348 #define _GST_PUT(__data, __size, __end, __num) \
       
   349     ((* (guint##__size *) (__data)) = GUINT##__size##_TO_##__end (__num))
       
   350 
       
   351 /**
       
   352  * GST_WRITE_UINT64_BE:
       
   353  * @data: memory location
       
   354  * @num: value to store
       
   355  *
       
   356  * Store a 64 bit unsigned integer value in big endian format into the memory buffer.
       
   357  */
       
   358 #define GST_WRITE_UINT64_BE(data, num)	_GST_PUT(data, 64, BE, num)
       
   359 /**
       
   360  * GST_WRITE_UINT64_LE:
       
   361  * @data: memory location
       
   362  * @num: value to store
       
   363  *
       
   364  * Store a 64 bit unsigned integer value in little endian format into the memory buffer.
       
   365  */
       
   366 #define GST_WRITE_UINT64_LE(data, num)  _GST_PUT(data, 64, LE, num)
       
   367 /**
       
   368  * GST_WRITE_UINT32_BE:
       
   369  * @data: memory location
       
   370  * @num: value to store
       
   371  *
       
   372  * Store a 32 bit unsigned integer value in big endian format into the memory buffer.
       
   373  */
       
   374 #define GST_WRITE_UINT32_BE(data, num)  _GST_PUT(data, 32, BE, num)
       
   375 /**
       
   376  * GST_WRITE_UINT32_LE:
       
   377  * @data: memory location
       
   378  * @num: value to store
       
   379  *
       
   380  * Store a 32 bit unsigned integer value in little endian format into the memory buffer.
       
   381  */
       
   382 #define GST_WRITE_UINT32_LE(data, num)  _GST_PUT(data, 32, LE, num)
       
   383 /**
       
   384  * GST_WRITE_UINT16_BE:
       
   385  * @data: memory location
       
   386  * @num: value to store
       
   387  *
       
   388  * Store a 16 bit unsigned integer value in big endian format into the memory buffer.
       
   389  */
       
   390 #define GST_WRITE_UINT16_BE(data, num)  _GST_PUT(data, 16, BE, num)
       
   391 /**
       
   392  * GST_WRITE_UINT16_LE:
       
   393  * @data: memory location
       
   394  * @num: value to store
       
   395  *
       
   396  * Store a 16 bit unsigned integer value in little endian format into the memory buffer.
       
   397  */
       
   398 #define GST_WRITE_UINT16_LE(data, num)  _GST_PUT(data, 16, LE, num)
       
   399 /**
       
   400  * GST_WRITE_UINT8:
       
   401  * @data: memory location
       
   402  * @num: value to store
       
   403  *
       
   404  * Store an 8 bit unsigned integer value into the memory buffer.
       
   405  */
       
   406 #define GST_WRITE_UINT8(data, num)	((* (guint8 *) (data)) = (num))
       
   407 
       
   408 #else /* GST_HAVE_UNALIGNED_ACCESS */
       
   409 
       
   410 #define _GST_GET(__data, __idx, __size, __shift) \
       
   411     (((guint##__size) (((guint8 *) (__data))[__idx])) << __shift)
       
   412 
       
   413 #define GST_READ_UINT64_BE(data)	(_GST_GET (data, 0, 64, 56) | \
   322 #define GST_READ_UINT64_BE(data)	(_GST_GET (data, 0, 64, 56) | \
   414 					 _GST_GET (data, 1, 64, 48) | \
   323 					 _GST_GET (data, 1, 64, 48) | \
   415 					 _GST_GET (data, 2, 64, 40) | \
   324 					 _GST_GET (data, 2, 64, 40) | \
   416 					 _GST_GET (data, 3, 64, 32) | \
   325 					 _GST_GET (data, 3, 64, 32) | \
   417 					 _GST_GET (data, 4, 64, 24) | \
   326 					 _GST_GET (data, 4, 64, 24) | \
   418 					 _GST_GET (data, 5, 64, 16) | \
   327 					 _GST_GET (data, 5, 64, 16) | \
   419 					 _GST_GET (data, 6, 64,  8) | \
   328 					 _GST_GET (data, 6, 64,  8) | \
   420 					 _GST_GET (data, 7, 64,  0))
   329 					 _GST_GET (data, 7, 64,  0))
   421 
   330 
       
   331 /**
       
   332  * GST_READ_UINT64_LE:
       
   333  * @data: memory location
       
   334  *
       
   335  * Read a 64 bit unsigned integer value in little endian format from the memory buffer.
       
   336  */
   422 #define GST_READ_UINT64_LE(data)	(_GST_GET (data, 7, 64, 56) | \
   337 #define GST_READ_UINT64_LE(data)	(_GST_GET (data, 7, 64, 56) | \
   423 					 _GST_GET (data, 6, 64, 48) | \
   338 					 _GST_GET (data, 6, 64, 48) | \
   424 					 _GST_GET (data, 5, 64, 40) | \
   339 					 _GST_GET (data, 5, 64, 40) | \
   425 					 _GST_GET (data, 4, 64, 32) | \
   340 					 _GST_GET (data, 4, 64, 32) | \
   426 					 _GST_GET (data, 3, 64, 24) | \
   341 					 _GST_GET (data, 3, 64, 24) | \
   427 					 _GST_GET (data, 2, 64, 16) | \
   342 					 _GST_GET (data, 2, 64, 16) | \
   428 					 _GST_GET (data, 1, 64,  8) | \
   343 					 _GST_GET (data, 1, 64,  8) | \
   429 					 _GST_GET (data, 0, 64,  0))
   344 					 _GST_GET (data, 0, 64,  0))
   430 
   345 
       
   346 /**
       
   347  * GST_READ_UINT32_BE:
       
   348  * @data: memory location
       
   349  *
       
   350  * Read a 32 bit unsigned integer value in big endian format from the memory buffer.
       
   351  */
   431 #define GST_READ_UINT32_BE(data)	(_GST_GET (data, 0, 32, 24) | \
   352 #define GST_READ_UINT32_BE(data)	(_GST_GET (data, 0, 32, 24) | \
   432 					 _GST_GET (data, 1, 32, 16) | \
   353 					 _GST_GET (data, 1, 32, 16) | \
   433 					 _GST_GET (data, 2, 32,  8) | \
   354 					 _GST_GET (data, 2, 32,  8) | \
   434 					 _GST_GET (data, 3, 32,  0))
   355 					 _GST_GET (data, 3, 32,  0))
   435 
   356 
       
   357 /**
       
   358  * GST_READ_UINT32_LE:
       
   359  * @data: memory location
       
   360  *
       
   361  * Read a 32 bit unsigned integer value in little endian format from the memory buffer.
       
   362  */
   436 #define GST_READ_UINT32_LE(data)	(_GST_GET (data, 3, 32, 24) | \
   363 #define GST_READ_UINT32_LE(data)	(_GST_GET (data, 3, 32, 24) | \
   437 					 _GST_GET (data, 2, 32, 16) | \
   364 					 _GST_GET (data, 2, 32, 16) | \
   438 					 _GST_GET (data, 1, 32,  8) | \
   365 					 _GST_GET (data, 1, 32,  8) | \
   439 					 _GST_GET (data, 0, 32,  0))
   366 					 _GST_GET (data, 0, 32,  0))
   440 
   367 
       
   368 /**
       
   369  * GST_READ_UINT24_BE:
       
   370  * @data: memory location
       
   371  *
       
   372  * Read a 24 bit unsigned integer value in big endian format from the memory buffer.
       
   373  *
       
   374  * Since: 0.10.22
       
   375  */
       
   376 #define GST_READ_UINT24_BE(data)	(_GST_GET (data, 0, 32, 16) | \
       
   377 					 _GST_GET (data, 1, 32,  8) | \
       
   378 					 _GST_GET (data, 2, 32,  0))
       
   379 
       
   380 /**
       
   381  * GST_READ_UINT24_LE:
       
   382  * @data: memory location
       
   383  *
       
   384  * Read a 24 bit unsigned integer value in little endian format from the memory buffer.
       
   385  *
       
   386  * Since: 0.10.22
       
   387  */
       
   388 #define GST_READ_UINT24_LE(data)	(_GST_GET (data, 2, 32, 16) | \
       
   389 					 _GST_GET (data, 1, 32,  8) | \
       
   390 					 _GST_GET (data, 0, 32,  0))
       
   391 
       
   392 /**
       
   393  * GST_READ_UINT16_BE:
       
   394  * @data: memory location
       
   395  *
       
   396  * Read a 16 bit unsigned integer value in big endian format from the memory buffer.
       
   397  */
   441 #define GST_READ_UINT16_BE(data)	(_GST_GET (data, 0, 16,  8) | \
   398 #define GST_READ_UINT16_BE(data)	(_GST_GET (data, 0, 16,  8) | \
   442 					 _GST_GET (data, 1, 16,  0))
   399 					 _GST_GET (data, 1, 16,  0))
   443 
   400 
       
   401 /**
       
   402  * GST_READ_UINT16_LE:
       
   403  * @data: memory location
       
   404  *
       
   405  * Read a 16 bit unsigned integer value in little endian format from the memory buffer.
       
   406  */
   444 #define GST_READ_UINT16_LE(data)	(_GST_GET (data, 1, 16,  8) | \
   407 #define GST_READ_UINT16_LE(data)	(_GST_GET (data, 1, 16,  8) | \
   445 					 _GST_GET (data, 0, 16,  0))
   408 					 _GST_GET (data, 0, 16,  0))
   446 
   409 
       
   410 /**
       
   411  * GST_READ_UINT8:
       
   412  * @data: memory location
       
   413  *
       
   414  * Read an 8 bit unsigned integer value from the memory buffer.
       
   415  */
   447 #define GST_READ_UINT8(data)		(_GST_GET (data, 0,  8,  0))
   416 #define GST_READ_UINT8(data)		(_GST_GET (data, 0,  8,  0))
   448 
   417 
   449 #define _GST_PUT(__data, __idx, __size, __shift, __num) \
   418 /**
   450     (((guint8 *) (__data))[__idx] = (((guint##__size) __num) >> __shift) & 0xff)
   419  * GST_WRITE_UINT64_BE:
   451 
   420  * @data: memory location
       
   421  * @num: value to store
       
   422  *
       
   423  * Store a 64 bit unsigned integer value in big endian format into the memory buffer.
       
   424  */
   452 #define GST_WRITE_UINT64_BE(data, num)	do { \
   425 #define GST_WRITE_UINT64_BE(data, num)	do { \
   453 					  _GST_PUT (data, 0, 64, 56, num); \
   426 					  _GST_PUT (data, 0, 64, 56, num); \
   454 					  _GST_PUT (data, 1, 64, 48, num); \
   427 					  _GST_PUT (data, 1, 64, 48, num); \
   455 					  _GST_PUT (data, 2, 64, 40, num); \
   428 					  _GST_PUT (data, 2, 64, 40, num); \
   456 					  _GST_PUT (data, 3, 64, 32, num); \
   429 					  _GST_PUT (data, 3, 64, 32, num); \
   458 					  _GST_PUT (data, 5, 64, 16, num); \
   431 					  _GST_PUT (data, 5, 64, 16, num); \
   459 					  _GST_PUT (data, 6, 64,  8, num); \
   432 					  _GST_PUT (data, 6, 64,  8, num); \
   460 					  _GST_PUT (data, 7, 64,  0, num); \
   433 					  _GST_PUT (data, 7, 64,  0, num); \
   461 					} while (0)
   434 					} while (0)
   462 
   435 
       
   436 /**
       
   437  * GST_WRITE_UINT64_LE:
       
   438  * @data: memory location
       
   439  * @num: value to store
       
   440  *
       
   441  * Store a 64 bit unsigned integer value in little endian format into the memory buffer.
       
   442  */
   463 #define GST_WRITE_UINT64_LE(data, num)	do { \
   443 #define GST_WRITE_UINT64_LE(data, num)	do { \
   464 					  _GST_PUT (data, 0, 64,  0, num); \
   444 					  _GST_PUT (data, 0, 64,  0, num); \
   465 					  _GST_PUT (data, 1, 64,  8, num); \
   445 					  _GST_PUT (data, 1, 64,  8, num); \
   466 					  _GST_PUT (data, 2, 64, 16, num); \
   446 					  _GST_PUT (data, 2, 64, 16, num); \
   467 					  _GST_PUT (data, 3, 64, 24, num); \
   447 					  _GST_PUT (data, 3, 64, 24, num); \
   469 					  _GST_PUT (data, 5, 64, 40, num); \
   449 					  _GST_PUT (data, 5, 64, 40, num); \
   470 					  _GST_PUT (data, 6, 64, 48, num); \
   450 					  _GST_PUT (data, 6, 64, 48, num); \
   471 					  _GST_PUT (data, 7, 64, 56, num); \
   451 					  _GST_PUT (data, 7, 64, 56, num); \
   472 					} while (0)
   452 					} while (0)
   473 
   453 
       
   454 /**
       
   455  * GST_WRITE_UINT32_BE:
       
   456  * @data: memory location
       
   457  * @num: value to store
       
   458  *
       
   459  * Store a 32 bit unsigned integer value in big endian format into the memory buffer.
       
   460  */
   474 #define GST_WRITE_UINT32_BE(data, num)	do { \
   461 #define GST_WRITE_UINT32_BE(data, num)	do { \
   475 					  _GST_PUT (data, 0, 32, 24, num); \
   462 					  _GST_PUT (data, 0, 32, 24, num); \
   476 					  _GST_PUT (data, 1, 32, 16, num); \
   463 					  _GST_PUT (data, 1, 32, 16, num); \
   477 					  _GST_PUT (data, 2, 32,  8, num); \
   464 					  _GST_PUT (data, 2, 32,  8, num); \
   478 					  _GST_PUT (data, 3, 32,  0, num); \
   465 					  _GST_PUT (data, 3, 32,  0, num); \
   479 					} while (0)
   466 					} while (0)
   480 
   467 
       
   468 /**
       
   469  * GST_WRITE_UINT32_LE:
       
   470  * @data: memory location
       
   471  * @num: value to store
       
   472  *
       
   473  * Store a 32 bit unsigned integer value in little endian format into the memory buffer.
       
   474  */
   481 #define GST_WRITE_UINT32_LE(data, num)	do { \
   475 #define GST_WRITE_UINT32_LE(data, num)	do { \
   482 					  _GST_PUT (data, 0, 32,  0, num); \
   476 					  _GST_PUT (data, 0, 32,  0, num); \
   483 					  _GST_PUT (data, 1, 32,  8, num); \
   477 					  _GST_PUT (data, 1, 32,  8, num); \
   484 					  _GST_PUT (data, 2, 32, 16, num); \
   478 					  _GST_PUT (data, 2, 32, 16, num); \
   485 					  _GST_PUT (data, 3, 32, 24, num); \
   479 					  _GST_PUT (data, 3, 32, 24, num); \
   486 					} while (0)
   480 					} while (0)
   487 
   481 
       
   482 /**
       
   483  * GST_WRITE_UINT24_BE:
       
   484  * @data: memory location
       
   485  * @num: value to store
       
   486  *
       
   487  * Store a 24 bit unsigned integer value in big endian format into the memory buffer.
       
   488  *
       
   489  * Since: 0.10.22
       
   490  */
       
   491 #define GST_WRITE_UINT24_BE(data, num)	do { \
       
   492 					  _GST_PUT (data, 0, 32,  16, num); \
       
   493 					  _GST_PUT (data, 1, 32,  8, num); \
       
   494 					  _GST_PUT (data, 2, 32,  0, num); \
       
   495 					} while (0)
       
   496 
       
   497 /**
       
   498  * GST_WRITE_UINT24_LE:
       
   499  * @data: memory location
       
   500  * @num: value to store
       
   501  *
       
   502  * Store a 24 bit unsigned integer value in little endian format into the memory buffer.
       
   503  *
       
   504  * Since: 0.10.22
       
   505  */
       
   506 #define GST_WRITE_UINT24_LE(data, num)	do { \
       
   507 					  _GST_PUT (data, 0, 32,  0, num); \
       
   508 					  _GST_PUT (data, 1, 32,  8, num); \
       
   509 					  _GST_PUT (data, 2, 32,  16, num); \
       
   510 					} while (0)
       
   511 
       
   512 /**
       
   513  * GST_WRITE_UINT16_BE:
       
   514  * @data: memory location
       
   515  * @num: value to store
       
   516  *
       
   517  * Store a 16 bit unsigned integer value in big endian format into the memory buffer.
       
   518  */
   488 #define GST_WRITE_UINT16_BE(data, num)	do { \
   519 #define GST_WRITE_UINT16_BE(data, num)	do { \
   489 					  _GST_PUT (data, 0, 16,  8, num); \
   520 					  _GST_PUT (data, 0, 16,  8, num); \
   490 					  _GST_PUT (data, 1, 16,  0, num); \
   521 					  _GST_PUT (data, 1, 16,  0, num); \
   491 					} while (0)
   522 					} while (0)
   492 
   523 
       
   524 /**
       
   525  * GST_WRITE_UINT16_LE:
       
   526  * @data: memory location
       
   527  * @num: value to store
       
   528  *
       
   529  * Store a 16 bit unsigned integer value in little endian format into the memory buffer.
       
   530  */
   493 #define GST_WRITE_UINT16_LE(data, num)	do { \
   531 #define GST_WRITE_UINT16_LE(data, num)	do { \
   494 					  _GST_PUT (data, 0, 16,  0, num); \
   532 					  _GST_PUT (data, 0, 16,  0, num); \
   495 					  _GST_PUT (data, 1, 16,  8, num); \
   533 					  _GST_PUT (data, 1, 16,  8, num); \
   496 					} while (0)
   534 					} while (0)
   497 
   535 
       
   536 /**
       
   537  * GST_WRITE_UINT8:
       
   538  * @data: memory location
       
   539  * @num: value to store
       
   540  *
       
   541  * Store an 8 bit unsigned integer value into the memory buffer.
       
   542  */
   498 #define GST_WRITE_UINT8(data, num)	do { \
   543 #define GST_WRITE_UINT8(data, num)	do { \
   499 					  _GST_PUT (data, 0,  8,  0, num); \
   544 					  _GST_PUT (data, 0,  8,  0, num); \
   500 					} while (0)
   545 					} while (0)
   501 
   546 
   502 #endif /* GST_HAVE_UNALIGNED_ACCESS */
   547 /* Float endianess conversion macros */
   503 
   548 
       
   549 /* FIXME: Remove this once we depend on a GLib version with this */
       
   550 #ifndef GFLOAT_FROM_LE
       
   551 /**
       
   552  * GFLOAT_SWAP_LE_BE:
       
   553  * @in: input value
       
   554  *
       
   555  * Swap byte order of a 32-bit floating point value (float).
       
   556  *
       
   557  * Returns: @in byte-swapped.
       
   558  *
       
   559  * Since: 0.10.22
       
   560  *
       
   561  */
       
   562 #ifdef _FOOL_GTK_DOC_
       
   563 G_INLINE_FUNC gfloat GFLOAT_SWAP_LE_BE (gfloat in);
       
   564 #endif
       
   565 
       
   566 inline static gfloat
       
   567 GFLOAT_SWAP_LE_BE(gfloat in)
       
   568 {
       
   569   union
       
   570   {
       
   571     guint32 i;
       
   572     gfloat f;
       
   573   } u;
       
   574 
       
   575   u.f = in;
       
   576   u.i = GUINT32_SWAP_LE_BE (u.i);
       
   577   return u.f;
       
   578 }
       
   579 
       
   580 /**
       
   581  * GDOUBLE_SWAP_LE_BE:
       
   582  * @in: input value
       
   583  *
       
   584  * Swap byte order of a 64-bit floating point value (double).
       
   585  *
       
   586  * Returns: @in byte-swapped.
       
   587  *
       
   588  * Since: 0.10.22
       
   589  *
       
   590  */
       
   591 #ifdef _FOOL_GTK_DOC_
       
   592 G_INLINE_FUNC gdouble GDOUBLE_SWAP_LE_BE (gdouble in);
       
   593 #endif
       
   594 
       
   595 inline static gdouble
       
   596 GDOUBLE_SWAP_LE_BE(gdouble in)
       
   597 {
       
   598   union
       
   599   {
       
   600     guint64 i;
       
   601     gdouble d;
       
   602   } u;
       
   603 
       
   604   u.d = in;
       
   605   u.i = GUINT64_SWAP_LE_BE (u.i);
       
   606   return u.d;
       
   607 }
       
   608 
       
   609 /**
       
   610  * GDOUBLE_TO_LE:
       
   611  * @val: value
       
   612  *
       
   613  * Convert 64-bit floating point value (double) from native byte order into
       
   614  * little endian byte order.
       
   615  *
       
   616  * Since: 0.10.22
       
   617  *
       
   618  */
       
   619 /**
       
   620  * GDOUBLE_TO_BE:
       
   621  * @val: value
       
   622  *
       
   623  * Convert 64-bit floating point value (double) from native byte order into
       
   624  * big endian byte order.
       
   625  *
       
   626  * Since: 0.10.22
       
   627  *
       
   628  */
       
   629 /**
       
   630  * GDOUBLE_FROM_LE:
       
   631  * @val: value
       
   632  *
       
   633  * Convert 64-bit floating point value (double) from little endian byte order
       
   634  * into native byte order.
       
   635  *
       
   636  * Since: 0.10.22
       
   637  *
       
   638  */
       
   639 /**
       
   640  * GDOUBLE_FROM_BE:
       
   641  * @val: value
       
   642  *
       
   643  * Convert 64-bit floating point value (double) from big endian byte order
       
   644  * into native byte order.
       
   645  *
       
   646  * Since: 0.10.22
       
   647  *
       
   648  */
       
   649 
       
   650 /**
       
   651  * GFLOAT_TO_LE:
       
   652  * @val: value
       
   653  *
       
   654  * Convert 32-bit floating point value (float) from native byte order into
       
   655  * little endian byte order.
       
   656  *
       
   657  * Since: 0.10.22
       
   658  *
       
   659  */
       
   660 /**
       
   661  * GFLOAT_TO_BE:
       
   662  * @val: value
       
   663  *
       
   664  * Convert 32-bit floating point value (float) from native byte order into
       
   665  * big endian byte order.
       
   666  *
       
   667  * Since: 0.10.22
       
   668  *
       
   669  */
       
   670 /**
       
   671  * GFLOAT_FROM_LE:
       
   672  * @val: value
       
   673  *
       
   674  * Convert 32-bit floating point value (float) from little endian byte order
       
   675  * into native byte order.
       
   676  *
       
   677  * Since: 0.10.22
       
   678  *
       
   679  */
       
   680 /**
       
   681  * GFLOAT_FROM_BE:
       
   682  * @val: value
       
   683  *
       
   684  * Convert 32-bit floating point value (float) from big endian byte order
       
   685  * into native byte order.
       
   686  *
       
   687  * Since: 0.10.22
       
   688  *
       
   689  */
       
   690 
       
   691 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
       
   692 #define GFLOAT_TO_LE(val)    ((gfloat) (val))
       
   693 #define GFLOAT_TO_BE(val)    (GFLOAT_SWAP_LE_BE (val))
       
   694 #define GDOUBLE_TO_LE(val)   ((gdouble) (val))
       
   695 #define GDOUBLE_TO_BE(val)   (GDOUBLE_SWAP_LE_BE (val))
       
   696 
       
   697 #elif G_BYTE_ORDER == G_BIG_ENDIAN
       
   698 #define GFLOAT_TO_LE(val)    (GFLOAT_SWAP_LE_BE (val))
       
   699 #define GFLOAT_TO_BE(val)    ((gfloat) (val))
       
   700 #define GDOUBLE_TO_LE(val)   (GDOUBLE_SWAP_LE_BE (val))
       
   701 #define GDOUBLE_TO_BE(val)   ((gdouble) (val))
       
   702 
       
   703 #else /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */
       
   704 #error unknown ENDIAN type
       
   705 #endif /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */
       
   706 
       
   707 #define GFLOAT_FROM_LE(val)  (GFLOAT_TO_LE (val))
       
   708 #define GFLOAT_FROM_BE(val)  (GFLOAT_TO_BE (val))
       
   709 #define GDOUBLE_FROM_LE(val) (GDOUBLE_TO_LE (val))
       
   710 #define GDOUBLE_FROM_BE(val) (GDOUBLE_TO_BE (val))
       
   711 
       
   712 #endif /* !defined(GFLOAT_FROM_LE) */
       
   713 
       
   714 /**
       
   715  * GST_READ_FLOAT_LE:
       
   716  * @data: memory location
       
   717  *
       
   718  * Read a 32 bit float value in little endian format from the memory buffer.
       
   719  *
       
   720  * Returns: The floating point value read from @data
       
   721  *
       
   722  * Since: 0.10.22
       
   723  *
       
   724  */
       
   725 #ifdef _FOOL_GTK_DOC_
       
   726 G_INLINE_FUNC gfloat GST_READ_FLOAT_LE (const guint8 *data);
       
   727 #endif
       
   728 
       
   729 inline static gfloat
       
   730 GST_READ_FLOAT_LE(const guint8 *data)
       
   731 {
       
   732   union
       
   733   {
       
   734     guint32 i;
       
   735     gfloat f;
       
   736   } u;
       
   737 
       
   738   u.i = GST_READ_UINT32_LE (data);
       
   739   return u.f;
       
   740 }
       
   741 
       
   742 /**
       
   743  * GST_READ_FLOAT_BE:
       
   744  * @data: memory location
       
   745  *
       
   746  * Read a 32 bit float value in big endian format from the memory buffer.
       
   747  *
       
   748  * Returns: The floating point value read from @data
       
   749  *
       
   750  * Since: 0.10.22
       
   751  *
       
   752  */
       
   753 #ifdef _FOOL_GTK_DOC_
       
   754 G_INLINE_FUNC gfloat GST_READ_FLOAT_BE (const guint8 *data);
       
   755 #endif
       
   756 
       
   757 inline static gfloat
       
   758 GST_READ_FLOAT_BE(const guint8 *data)
       
   759 {
       
   760   union
       
   761   {
       
   762     guint32 i;
       
   763     gfloat f;
       
   764   } u;
       
   765 
       
   766   u.i = GST_READ_UINT32_BE (data);
       
   767   return u.f;
       
   768 }
       
   769 
       
   770 /**
       
   771  * GST_READ_DOUBLE_LE:
       
   772  * @data: memory location
       
   773  *
       
   774  * Read a 64 bit double value in little endian format from the memory buffer.
       
   775  *
       
   776  * Returns: The double-precision floating point value read from @data
       
   777  *
       
   778  * Since: 0.10.22
       
   779  *
       
   780  */
       
   781 #ifdef _FOOL_GTK_DOC_
       
   782 G_INLINE_FUNC gdouble GST_READ_DOUBLE_LE (const guint8 *data);
       
   783 #endif
       
   784 
       
   785 inline static gdouble
       
   786 GST_READ_DOUBLE_LE(const guint8 *data)
       
   787 {
       
   788   union
       
   789   {
       
   790     guint64 i;
       
   791     gdouble d;
       
   792   } u;
       
   793 
       
   794   u.i = GST_READ_UINT64_LE (data);
       
   795   return u.d;
       
   796 }
       
   797 
       
   798 /**
       
   799  * GST_READ_DOUBLE_BE:
       
   800  * @data: memory location
       
   801  *
       
   802  * Read a 64 bit double value in big endian format from the memory buffer.
       
   803  *
       
   804  * Returns: The double-precision floating point value read from @data
       
   805  *
       
   806  * Since: 0.10.22
       
   807  *
       
   808  */
       
   809 #ifdef _FOOL_GTK_DOC_
       
   810 G_INLINE_FUNC gdouble GST_READ_DOUBLE_BE (const guint8 *data);
       
   811 #endif
       
   812 
       
   813 inline static gdouble
       
   814 GST_READ_DOUBLE_BE(const guint8 *data)
       
   815 {
       
   816   union
       
   817   {
       
   818     guint64 i;
       
   819     gdouble d;
       
   820   } u;
       
   821 
       
   822   u.i = GST_READ_UINT64_BE (data);
       
   823   return u.d;
       
   824 }
       
   825 
       
   826 /**
       
   827  * GST_WRITE_FLOAT_LE:
       
   828  * @data: memory location
       
   829  * @num: value to store
       
   830  *
       
   831  * Store a 32 bit float value in little endian format into the memory buffer.
       
   832  *
       
   833  * Since: 0.10.22
       
   834  *
       
   835  */
       
   836 #ifdef _FOOL_GTK_DOC_
       
   837 G_INLINE_FUNC void GST_WRITE_FLOAT_LE (guint8 *data, gfloat num);
       
   838 #endif
       
   839 
       
   840 inline static void
       
   841 GST_WRITE_FLOAT_LE(guint8 *data, gfloat num)
       
   842 {
       
   843   union
       
   844   {
       
   845     guint32 i;
       
   846     gfloat f;
       
   847   } u;
       
   848 
       
   849   u.f = num;
       
   850   GST_WRITE_UINT32_LE (data, u.i);
       
   851 }
       
   852 
       
   853 /**
       
   854  * GST_WRITE_FLOAT_BE:
       
   855  * @data: memory location
       
   856  * @num: value to store
       
   857  *
       
   858  * Store a 32 bit float value in big endian format into the memory buffer.
       
   859  *
       
   860  * Since: 0.10.22
       
   861  *
       
   862  */
       
   863 #ifdef _FOOL_GTK_DOC_
       
   864 G_INLINE_FUNC void GST_WRITE_FLOAT_BE (guint8 *data, gfloat num);
       
   865 #endif
       
   866 
       
   867 inline static void
       
   868 GST_WRITE_FLOAT_BE(guint8 *data, gfloat num)
       
   869 {
       
   870   union
       
   871   {
       
   872     guint32 i;
       
   873     gfloat f;
       
   874   } u;
       
   875 
       
   876   u.f = num;
       
   877   GST_WRITE_UINT32_BE (data, u.i);
       
   878 }
       
   879 
       
   880 /**
       
   881  * GST_WRITE_DOUBLE_LE:
       
   882  * @data: memory location
       
   883  * @num: value to store
       
   884  *
       
   885  * Store a 64 bit double value in little endian format into the memory buffer.
       
   886  *
       
   887  * Since: 0.10.22
       
   888  *
       
   889  */
       
   890 #ifdef _FOOL_GTK_DOC_
       
   891 G_INLINE_FUNC void GST_WRITE_DOUBLE_LE (guint8 *data, gdouble num);
       
   892 #endif
       
   893 
       
   894 inline static void
       
   895 GST_WRITE_DOUBLE_LE(guint8 *data, gdouble num)
       
   896 {
       
   897   union
       
   898   {
       
   899     guint64 i;
       
   900     gdouble d;
       
   901   } u;
       
   902 
       
   903   u.d = num;
       
   904   GST_WRITE_UINT64_LE (data, u.i);
       
   905 }
       
   906 
       
   907 /**
       
   908  * GST_WRITE_DOUBLE_BE:
       
   909  * @data: memory location
       
   910  * @num: value to store
       
   911  *
       
   912  * Store a 64 bit double value in big endian format into the memory buffer.
       
   913  *
       
   914  * Since: 0.10.22
       
   915  *
       
   916  */
       
   917 #ifdef _FOOL_GTK_DOC_
       
   918 G_INLINE_FUNC void GST_WRITE_DOUBLE_BE (guint8 *data, gdouble num);
       
   919 #endif
       
   920 
       
   921 inline static void
       
   922 GST_WRITE_DOUBLE_BE(guint8 *data, gdouble num)
       
   923 {
       
   924   union
       
   925   {
       
   926     guint64 i;
       
   927     gdouble d;
       
   928   } u;
       
   929 
       
   930   u.d = num;
       
   931   GST_WRITE_UINT64_BE (data, u.i);
       
   932 }
   504 
   933 
   505 /* Miscellaneous utility macros */
   934 /* Miscellaneous utility macros */
   506 
   935 
   507 /**
   936 /**
   508  * GST_ROUND_UP_2:
   937  * GST_ROUND_UP_2:
   688 #ifdef __SYMBIAN32__
  1117 #ifdef __SYMBIAN32__
   689 IMPORT_C
  1118 IMPORT_C
   690 #endif
  1119 #endif
   691 
  1120 
   692 
  1121 
   693 gboolean        gst_element_seek_simple (GstElement   *element,
  1122 gboolean                gst_element_seek_simple         (GstElement   *element,
   694                                          GstFormat     format,
  1123                                                          GstFormat     format,
   695                                          GstSeekFlags  seek_flags,
  1124                                                          GstSeekFlags  seek_flags,
   696                                          gint64        seek_pos);
  1125                                                          gint64        seek_pos);
   697 
  1126 
   698 /* util elementfactory functions */
  1127 /* util elementfactory functions */
   699 #ifdef __SYMBIAN32__
  1128 #ifdef __SYMBIAN32__
   700 IMPORT_C
  1129 IMPORT_C
   701 #endif
  1130 #endif
   738 /* pad functions */
  1167 /* pad functions */
   739 #ifdef __SYMBIAN32__
  1168 #ifdef __SYMBIAN32__
   740 IMPORT_C
  1169 IMPORT_C
   741 #endif
  1170 #endif
   742 
  1171 
   743 gboolean                gst_pad_can_link                (GstPad *srcpad, GstPad *sinkpad);
       
   744 #ifdef __SYMBIAN32__
       
   745 IMPORT_C
       
   746 #endif
       
   747 
       
   748 
       
   749 void			gst_pad_use_fixed_caps		(GstPad *pad);
  1172 void			gst_pad_use_fixed_caps		(GstPad *pad);
   750 #ifdef __SYMBIAN32__
  1173 #ifdef __SYMBIAN32__
   751 IMPORT_C
  1174 IMPORT_C
   752 #endif
  1175 #endif
   753 
  1176 
   821 void                    gst_bin_remove_many             (GstBin *bin, GstElement *element_1, ...) G_GNUC_NULL_TERMINATED;
  1244 void                    gst_bin_remove_many             (GstBin *bin, GstElement *element_1, ...) G_GNUC_NULL_TERMINATED;
   822 #ifdef __SYMBIAN32__
  1245 #ifdef __SYMBIAN32__
   823 IMPORT_C
  1246 IMPORT_C
   824 #endif
  1247 #endif
   825 
  1248 
       
  1249 GstPad *                gst_bin_find_unlinked_pad       (GstBin *bin, GstPadDirection direction);
       
  1250 #ifndef GST_DISABLE_DEPRECATED
   826 GstPad *                gst_bin_find_unconnected_pad    (GstBin *bin, GstPadDirection direction);
  1251 GstPad *                gst_bin_find_unconnected_pad    (GstBin *bin, GstPadDirection direction);
       
  1252 #endif
   827 
  1253 
   828 /* buffer functions */
  1254 /* buffer functions */
   829 #ifdef __SYMBIAN32__
  1255 #ifdef __SYMBIAN32__
   830 IMPORT_C
  1256 IMPORT_C
   831 #endif
  1257 #endif
   839 #ifndef GST_DISABLE_DEPRECATED
  1265 #ifndef GST_DISABLE_DEPRECATED
   840 void			gst_buffer_stamp		(GstBuffer * dest, const GstBuffer * src);
  1266 void			gst_buffer_stamp		(GstBuffer * dest, const GstBuffer * src);
   841 #endif /* GST_DISABLE_DEPRECATED */
  1267 #endif /* GST_DISABLE_DEPRECATED */
   842 
  1268 
   843 /* atomic functions */
  1269 /* atomic functions */
   844 #ifdef __SYMBIAN32__
  1270 #ifndef GST_DISABLE_DEPRECATED
   845 IMPORT_C
       
   846 #endif
       
   847 
       
   848 void                    gst_atomic_int_set              (gint * atomic_int, gint value);
  1271 void                    gst_atomic_int_set              (gint * atomic_int, gint value);
       
  1272 #endif
   849 
  1273 
   850 /* probes */
  1274 /* probes */
   851 #ifdef __SYMBIAN32__
  1275 #ifdef __SYMBIAN32__
   852 IMPORT_C
  1276 IMPORT_C
   853 #endif
  1277 #endif
   854 
  1278 
   855 gulong			gst_pad_add_data_probe		(GstPad * pad,
  1279 gulong			gst_pad_add_data_probe		(GstPad   * pad,
   856 							 GCallback handler,
  1280 							 GCallback  handler,
   857 							 gpointer data);
  1281 							 gpointer   data);
   858 #ifdef __SYMBIAN32__
  1282 #ifdef __SYMBIAN32__
   859 IMPORT_C
  1283 IMPORT_C
   860 #endif
  1284 #endif
       
  1285 
       
  1286 
       
  1287 gulong			gst_pad_add_data_probe_full	(GstPad       * pad,
       
  1288 							 GCallback      handler,
       
  1289 							 gpointer       data,
       
  1290 							 GDestroyNotify notify);
       
  1291 #ifdef __SYMBIAN32__
       
  1292 IMPORT_C
       
  1293 #endif
       
  1294 
   861 
  1295 
   862 void			gst_pad_remove_data_probe	(GstPad * pad, guint handler_id);
  1296 void			gst_pad_remove_data_probe	(GstPad * pad, guint handler_id);
   863 #ifdef __SYMBIAN32__
  1297 #ifdef __SYMBIAN32__
   864 IMPORT_C
  1298 IMPORT_C
   865 #endif
  1299 #endif
   866 
  1300 
   867 gulong			gst_pad_add_event_probe		(GstPad * pad,
  1301 
   868 							 GCallback handler,
  1302 gulong			gst_pad_add_event_probe		(GstPad   * pad,
   869 							 gpointer data);
  1303 							 GCallback  handler,
   870 #ifdef __SYMBIAN32__
  1304 							 gpointer   data);
   871 IMPORT_C
  1305 #ifdef __SYMBIAN32__
   872 #endif
  1306 IMPORT_C
       
  1307 #endif
       
  1308 
       
  1309 
       
  1310 gulong			gst_pad_add_event_probe_full	(GstPad       * pad,
       
  1311 							 GCallback      handler,
       
  1312 							 gpointer       data,
       
  1313 							 GDestroyNotify notify);
       
  1314 #ifdef __SYMBIAN32__
       
  1315 IMPORT_C
       
  1316 #endif
       
  1317 
   873 
  1318 
   874 void			gst_pad_remove_event_probe	(GstPad * pad, guint handler_id);
  1319 void			gst_pad_remove_event_probe	(GstPad * pad, guint handler_id);
   875 #ifdef __SYMBIAN32__
  1320 #ifdef __SYMBIAN32__
   876 IMPORT_C
  1321 IMPORT_C
   877 #endif
  1322 #endif
   878 
  1323 
   879 gulong			gst_pad_add_buffer_probe	(GstPad * pad,
  1324 
   880 							 GCallback handler,
  1325 gulong			gst_pad_add_buffer_probe	(GstPad   * pad,
   881 							 gpointer data);
  1326 							 GCallback  handler,
   882 #ifdef __SYMBIAN32__
  1327 							 gpointer   data);
   883 IMPORT_C
  1328 #ifdef __SYMBIAN32__
   884 #endif
  1329 IMPORT_C
       
  1330 #endif
       
  1331 
       
  1332 
       
  1333 gulong			gst_pad_add_buffer_probe_full	(GstPad       * pad,
       
  1334 							 GCallback      handler,
       
  1335 							 gpointer       data,
       
  1336 							 GDestroyNotify notify);
       
  1337 #ifdef __SYMBIAN32__
       
  1338 IMPORT_C
       
  1339 #endif
       
  1340 
   885 
  1341 
   886 void			gst_pad_remove_buffer_probe	(GstPad * pad, guint handler_id);
  1342 void			gst_pad_remove_buffer_probe	(GstPad * pad, guint handler_id);
   887 
  1343 
   888 /* tag emission utility functions */
  1344 /* tag emission utility functions */
   889 #ifdef __SYMBIAN32__
  1345 #ifdef __SYMBIAN32__
   903 /* parse utility functions */
  1359 /* parse utility functions */
   904 #ifdef __SYMBIAN32__
  1360 #ifdef __SYMBIAN32__
   905 IMPORT_C
  1361 IMPORT_C
   906 #endif
  1362 #endif
   907 
  1363 
   908 GstElement *            gst_parse_bin_from_description  (const gchar * bin_description,
  1364 GstElement *            gst_parse_bin_from_description      (const gchar     * bin_description,
   909                                                          gboolean ghost_unconnected_pads,
  1365                                                              gboolean          ghost_unlinked_pads,
   910                                                          GError ** err);
  1366                                                              GError         ** err);
   911 #ifdef __SYMBIAN32__
  1367 #ifdef __SYMBIAN32__
   912 IMPORT_C
  1368 IMPORT_C
   913 #endif
  1369 #endif
   914 
  1370 
   915 
  1371 
   916 GstClockTime gst_util_get_timestamp (void);
  1372 GstElement *            gst_parse_bin_from_description_full (const gchar     * bin_description,
       
  1373                                                              gboolean          ghost_unlinked_pads,
       
  1374                                                              GstParseContext * context,
       
  1375                                                              GstParseFlags     flags,
       
  1376                                                              GError         ** err);
       
  1377 #ifdef __SYMBIAN32__
       
  1378 IMPORT_C
       
  1379 #endif
       
  1380 
       
  1381 
       
  1382 GstClockTime            gst_util_get_timestamp          (void);
       
  1383 
       
  1384 /**
       
  1385  * GstSearchMode:
       
  1386  * @GST_SEARCH_MODE_EXACT : Only search for exact matches.
       
  1387  * @GST_SEARCH_MODE_BEFORE: Search for an exact match or the element just before.
       
  1388  * @GST_SEARCH_MODE_AFTER : Search for an exact match or the element just after.
       
  1389  *
       
  1390  * The different search modes.
       
  1391  *
       
  1392  * Since: 0.10.23
       
  1393  */
       
  1394 typedef enum {
       
  1395   GST_SEARCH_MODE_EXACT = 0,
       
  1396   GST_SEARCH_MODE_BEFORE,
       
  1397   GST_SEARCH_MODE_AFTER
       
  1398 } GstSearchMode;
       
  1399 #ifdef __SYMBIAN32__
       
  1400 IMPORT_C
       
  1401 #endif
       
  1402 
       
  1403 
       
  1404 gpointer                gst_util_array_binary_search      (gpointer array, guint num_elements,
       
  1405                                                            gsize element_size, GCompareDataFunc search_func,
       
  1406 							   GstSearchMode mode, gconstpointer search_data,
       
  1407 							   gpointer user_data);
   917 
  1408 
   918 G_END_DECLS
  1409 G_END_DECLS
   919 
  1410 
   920 #endif /* __GST_UTILS_H__ */
  1411 #endif /* __GST_UTILS_H__ */