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