2000-12-28 22:12:02 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wtay@chello.be>
|
2006-02-02 09:51:18 +00:00
|
|
|
* 2002 Thomas Vander Stichele <thomas@apestaart.org>
|
2000-12-28 22:12:02 +00:00
|
|
|
*
|
|
|
|
* gstutils.h: Header for various utility functions
|
2000-01-30 09:03:00 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_UTILS_H__
|
|
|
|
#define __GST_UTILS_H__
|
|
|
|
|
2001-06-25 01:20:11 +00:00
|
|
|
#include <glib.h>
|
2005-03-07 18:27:42 +00:00
|
|
|
#include <gst/gstbin.h>
|
API: gst_parse_launch_full()
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gst.c: (init_post):
* gst/gst_private.h: (_GstParseContext):
* gst/gstparse.c: (gst_parse_error_quark), (gst_parse_context_new),
(gst_parse_context_free), (gst_parse_context_get_missing_elements),
(gst_parse_launchv), (gst_parse_launchv_full), (gst_parse_launch),
(gst_parse_launch_full):
* gst/gstparse.h: (GST_PARSE_FLAG_NONE), (GST_PARSE_FLAG_FATAL_ERRORS),
(GstParseFlags), (GstParseContext):
* gst/gstutils.c: (gst_parse_bin_from_description),
(gst_parse_bin_from_description_full):
* gst/gstutils.h:
* gst/parse/grammar.y:
* gst/parse/types.h:
* win32/common/libgstreamer.def:
Add new gst_parse_*_full API (#528178):
API: gst_parse_launch_full()
API: gst_parse_launchv_full()
API: gst_parse_bin_from_description_full()
API: gst_parse_context_new()
API: gst_parse_context_free()
API: gst_parse_context_get_missing_elements()
2008-05-24 15:33:53 +00:00
|
|
|
#include <gst/gstparse.h>
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2002-07-08 19:07:30 +00:00
|
|
|
G_BEGIN_DECLS
|
2001-02-25 03:42:51 +00:00
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
void gst_util_set_value_from_string (GValue *value, const gchar *value_str);
|
2005-09-12 18:14:03 +00:00
|
|
|
void gst_util_set_object_arg (GObject *object, const gchar *name, const gchar *value);
|
|
|
|
void gst_util_dump_mem (const guchar *mem, guint size);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2008-11-17 04:49:06 +00:00
|
|
|
guint64 gst_util_gdouble_to_guint64 (gdouble value) G_GNUC_PURE;
|
|
|
|
gdouble gst_util_guint64_to_gdouble (guint64 value) G_GNUC_PURE;
|
2005-12-04 09:57:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* gst_guint64_to_gdouble:
|
|
|
|
* @value: the #guint64 value to convert
|
|
|
|
*
|
|
|
|
* Convert @value to a gdouble.
|
|
|
|
*
|
|
|
|
* Returns: @value converted to a #gdouble.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gst_gdouble_to_guint64:
|
|
|
|
* @value: the #gdouble value to convert
|
|
|
|
*
|
|
|
|
* Convert @value to a guint64.
|
|
|
|
*
|
|
|
|
* Returns: @value converted to a #guint64.
|
|
|
|
*/
|
2005-10-10 18:16:37 +00:00
|
|
|
#ifdef WIN32
|
2005-12-05 13:06:37 +00:00
|
|
|
#define gst_gdouble_to_guint64(value) gst_util_gdouble_to_guint64(value)
|
|
|
|
#define gst_guint64_to_gdouble(value) gst_util_guint64_to_gdouble(value)
|
2005-10-10 18:16:37 +00:00
|
|
|
#else
|
2005-12-04 09:57:11 +00:00
|
|
|
#define gst_gdouble_to_guint64(value) ((guint64) (value))
|
|
|
|
#define gst_guint64_to_gdouble(value) ((gdouble) (value))
|
2005-10-10 18:16:37 +00:00
|
|
|
#endif
|
|
|
|
|
2008-11-17 04:49:06 +00:00
|
|
|
guint64 gst_util_uint64_scale (guint64 val, guint64 num, guint64 denom) G_GNUC_PURE;
|
2009-08-13 14:10:31 +00:00
|
|
|
guint64 gst_util_uint64_scale_round (guint64 val, guint64 num, guint64 denom) G_GNUC_PURE;
|
|
|
|
guint64 gst_util_uint64_scale_ceil (guint64 val, guint64 num, guint64 denom) G_GNUC_PURE;
|
2005-08-29 16:10:36 +00:00
|
|
|
|
2008-11-17 04:49:06 +00:00
|
|
|
guint64 gst_util_uint64_scale_int (guint64 val, gint num, gint denom) G_GNUC_PURE;
|
2009-08-13 14:10:31 +00:00
|
|
|
guint64 gst_util_uint64_scale_int_round (guint64 val, gint num, gint denom) G_GNUC_PURE;
|
|
|
|
guint64 gst_util_uint64_scale_int_ceil (guint64 val, gint num, gint denom) G_GNUC_PURE;
|
2005-11-22 15:15:53 +00:00
|
|
|
|
2008-11-04 12:22:53 +00:00
|
|
|
guint32 gst_util_seqnum_next (void);
|
|
|
|
gint32 gst_util_seqnum_compare (guint32 s1, guint32 s2);
|
|
|
|
|
2005-09-12 18:14:03 +00:00
|
|
|
void gst_print_pad_caps (GString *buf, gint indent, GstPad *pad);
|
|
|
|
void gst_print_element_args (GString *buf, gint indent, GstElement *element);
|
2001-09-17 23:44:58 +00:00
|
|
|
|
2004-01-08 04:10:18 +00:00
|
|
|
|
2007-06-21 14:29:05 +00:00
|
|
|
GType gst_type_register_static_full (GType parent_type,
|
|
|
|
const gchar *type_name,
|
|
|
|
guint class_size,
|
|
|
|
GBaseInitFunc base_init,
|
|
|
|
GBaseFinalizeFunc base_finalize,
|
|
|
|
GClassInitFunc class_init,
|
|
|
|
GClassFinalizeFunc class_finalize,
|
|
|
|
gconstpointer class_data,
|
|
|
|
guint instance_size,
|
|
|
|
guint16 n_preallocs,
|
|
|
|
GInstanceInitFunc instance_init,
|
|
|
|
const GTypeValueTable *value_table,
|
|
|
|
GTypeFlags flags);
|
|
|
|
|
|
|
|
|
2005-08-24 11:22:32 +00:00
|
|
|
/* Macros for defining classes. Ideas taken from Bonobo, which took theirs
|
2004-01-08 04:10:18 +00:00
|
|
|
from Nautilus and GOB. */
|
|
|
|
|
2005-09-27 20:40:35 +00:00
|
|
|
/**
|
|
|
|
* GST_BOILERPLATE_FULL:
|
|
|
|
* @type: the name of the type struct
|
|
|
|
* @type_as_function: the prefix for the functions
|
|
|
|
* @parent_type: the parent type struct name
|
|
|
|
* @parent_type_macro: the parent type macro
|
2005-10-15 15:30:24 +00:00
|
|
|
* @additional_initializations: function pointer in the form of
|
2005-09-27 20:40:35 +00:00
|
|
|
* void additional_initializations (GType type) that can be used for
|
|
|
|
* initializing interfaces and the like
|
|
|
|
*
|
|
|
|
* Define the boilerplate type stuff to reduce typos and code size. Defines
|
|
|
|
* the get_type method and the parent_class static variable.
|
|
|
|
*
|
|
|
|
* <informalexample>
|
|
|
|
* <programlisting>
|
|
|
|
* GST_BOILERPLATE_FULL (GstFdSink, gst_fdsink, GstElement, GST_TYPE_ELEMENT, _do_init);
|
|
|
|
* </programlisting>
|
|
|
|
* </informalexample>
|
|
|
|
*/
|
2005-08-24 11:22:32 +00:00
|
|
|
#define GST_BOILERPLATE_FULL(type, type_as_function, parent_type, parent_type_macro, additional_initializations) \
|
|
|
|
\
|
|
|
|
static void type_as_function ## _base_init (gpointer g_class); \
|
|
|
|
static void type_as_function ## _class_init (type ## Class *g_class);\
|
2005-08-28 17:45:58 +00:00
|
|
|
static void type_as_function ## _init (type *object, \
|
|
|
|
type ## Class *g_class);\
|
2005-08-24 11:22:32 +00:00
|
|
|
static parent_type ## Class *parent_class = NULL; \
|
|
|
|
static void \
|
|
|
|
type_as_function ## _class_init_trampoline (gpointer g_class, \
|
|
|
|
gpointer data) \
|
|
|
|
{ \
|
|
|
|
parent_class = (parent_type ## Class *) \
|
|
|
|
g_type_class_peek_parent (g_class); \
|
|
|
|
type_as_function ## _class_init ((type ## Class *)g_class); \
|
|
|
|
} \
|
|
|
|
\
|
2006-01-02 20:26:06 +00:00
|
|
|
GType type_as_function ## _get_type (void); \
|
|
|
|
\
|
2005-08-24 11:22:32 +00:00
|
|
|
GType \
|
|
|
|
type_as_function ## _get_type (void) \
|
|
|
|
{ \
|
2008-05-09 18:25:44 +00:00
|
|
|
/* The typedef for GType may be gulong or gsize, depending on the \
|
|
|
|
* system and whether the compiler is c++ or not. The g_once_init_* \
|
|
|
|
* functions always take a gsize * though ... */ \
|
2009-01-11 09:46:52 +00:00
|
|
|
static volatile gsize gonce_data = 0; \
|
2009-03-26 10:08:27 +00:00
|
|
|
if (g_once_init_enter (&gonce_data)) { \
|
2008-05-08 11:27:56 +00:00
|
|
|
GType _type; \
|
2008-05-08 11:37:03 +00:00
|
|
|
_type = gst_type_register_static_full (parent_type_macro, \
|
|
|
|
g_intern_static_string (#type), \
|
2008-05-08 11:27:56 +00:00
|
|
|
sizeof (type ## Class), \
|
2007-06-21 14:29:05 +00:00
|
|
|
type_as_function ## _base_init, \
|
|
|
|
NULL, /* base_finalize */ \
|
|
|
|
type_as_function ## _class_init_trampoline, \
|
|
|
|
NULL, /* class_finalize */ \
|
|
|
|
NULL, /* class_data */ \
|
|
|
|
sizeof (type), \
|
|
|
|
0, /* n_preallocs */ \
|
|
|
|
(GInstanceInitFunc) type_as_function ## _init, \
|
|
|
|
NULL, \
|
|
|
|
(GTypeFlags) 0); \
|
2008-05-08 11:27:56 +00:00
|
|
|
additional_initializations (_type); \
|
2009-03-26 10:08:27 +00:00
|
|
|
g_once_init_leave (&gonce_data, (gsize) _type); \
|
2005-08-24 11:22:32 +00:00
|
|
|
} \
|
2008-05-09 18:25:44 +00:00
|
|
|
return (GType) gonce_data; \
|
2004-01-08 04:10:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define __GST_DO_NOTHING(type) /* NOP */
|
2005-09-27 20:40:35 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_BOILERPLATE:
|
|
|
|
* @type: the name of the type struct
|
|
|
|
* @type_as_function: the prefix for the functions
|
|
|
|
* @parent_type: the parent type struct name
|
|
|
|
* @parent_type_macro: the parent type macro
|
|
|
|
*
|
|
|
|
* Define the boilerplate type stuff to reduce typos and code size. Defines
|
|
|
|
* the get_type method and the parent_class static variable.
|
|
|
|
*
|
|
|
|
* <informalexample>
|
|
|
|
* <programlisting>
|
|
|
|
* GST_BOILERPLATE (GstFdSink, gst_fdsink, GstElement, GST_TYPE_ELEMENT);
|
|
|
|
* </programlisting>
|
|
|
|
* </informalexample>
|
|
|
|
*/
|
2004-01-08 04:10:18 +00:00
|
|
|
#define GST_BOILERPLATE(type,type_as_function,parent_type,parent_type_macro) \
|
|
|
|
GST_BOILERPLATE_FULL (type, type_as_function, parent_type, parent_type_macro, \
|
|
|
|
__GST_DO_NOTHING)
|
|
|
|
|
2005-08-22 15:12:56 +00:00
|
|
|
/* Like GST_BOILERPLATE, but makes the type 1) implement an interface, and 2)
|
|
|
|
* implement GstImplementsInterface for that type
|
|
|
|
*
|
|
|
|
* After this you will need to implement interface_as_function ## _supported
|
|
|
|
* and interface_as_function ## _interface_init
|
|
|
|
*/
|
2005-09-27 20:40:35 +00:00
|
|
|
/**
|
|
|
|
* GST_BOILERPLATE_WITH_INTERFACE:
|
|
|
|
* @type: the name of the type struct
|
|
|
|
* @type_as_function: the prefix for the functions
|
|
|
|
* @parent_type: the parent type struct name
|
|
|
|
* @parent_type_as_macro: the parent type macro
|
|
|
|
* @interface_type: the name of the interface type struct
|
|
|
|
* @interface_type_as_macro: the interface type macro
|
|
|
|
* @interface_as_function: the interface function name prefix
|
|
|
|
*
|
|
|
|
* Like GST_BOILERPLATE, but makes the type 1) implement an interface, and 2)
|
|
|
|
* implement GstImplementsInterface for that type.
|
|
|
|
*
|
|
|
|
* After this you will need to implement interface_as_function ## _supported
|
|
|
|
* and interface_as_function ## _interface_init
|
|
|
|
*/
|
2005-09-12 18:14:03 +00:00
|
|
|
#define GST_BOILERPLATE_WITH_INTERFACE(type, type_as_function, \
|
|
|
|
parent_type, parent_type_as_macro, interface_type, \
|
|
|
|
interface_type_as_macro, interface_as_function) \
|
|
|
|
\
|
2005-08-22 15:12:56 +00:00
|
|
|
static void interface_as_function ## _interface_init (interface_type ## Class *klass); \
|
|
|
|
static gboolean interface_as_function ## _supported (type *object, GType iface_type); \
|
2005-09-12 18:14:03 +00:00
|
|
|
\
|
|
|
|
static void \
|
2005-08-22 15:12:56 +00:00
|
|
|
type_as_function ## _implements_interface_init (GstImplementsInterfaceClass *klass) \
|
2005-09-12 18:14:03 +00:00
|
|
|
{ \
|
2006-03-06 14:46:31 +00:00
|
|
|
klass->supported = (gboolean (*)(GstImplementsInterface*, GType))interface_as_function ## _supported; \
|
2005-09-12 18:14:03 +00:00
|
|
|
} \
|
|
|
|
\
|
|
|
|
static void \
|
|
|
|
type_as_function ## _init_interfaces (GType type) \
|
|
|
|
{ \
|
|
|
|
static const GInterfaceInfo implements_iface_info = { \
|
|
|
|
(GInterfaceInitFunc) type_as_function ## _implements_interface_init,\
|
|
|
|
NULL, \
|
|
|
|
NULL, \
|
|
|
|
}; \
|
|
|
|
static const GInterfaceInfo iface_info = { \
|
|
|
|
(GInterfaceInitFunc) interface_as_function ## _interface_init, \
|
|
|
|
NULL, \
|
|
|
|
NULL, \
|
|
|
|
}; \
|
|
|
|
\
|
|
|
|
g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE, \
|
|
|
|
&implements_iface_info); \
|
|
|
|
g_type_add_interface_static (type, interface_type_as_macro, \
|
|
|
|
&iface_info); \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
GST_BOILERPLATE_FULL (type, type_as_function, parent_type, \
|
2005-08-22 15:12:56 +00:00
|
|
|
parent_type_as_macro, type_as_function ## _init_interfaces)
|
|
|
|
|
2005-11-04 20:12:01 +00:00
|
|
|
/**
|
|
|
|
* GST_CALL_PARENT:
|
|
|
|
* @parent_class_cast: the name of the class cast macro for the parent type
|
|
|
|
* @name: name of the function to call
|
|
|
|
* @args: arguments enclosed in '( )'
|
|
|
|
*
|
|
|
|
* Just call the parent handler. This assumes that there is a variable
|
2004-01-08 04:10:18 +00:00
|
|
|
* named parent_class that points to the (duh!) parent class. Note that
|
|
|
|
* this macro is not to be used with things that return something, use
|
2005-11-04 20:12:01 +00:00
|
|
|
* the _WITH_DEFAULT version for that
|
|
|
|
*/
|
2005-09-12 18:14:03 +00:00
|
|
|
#define GST_CALL_PARENT(parent_class_cast, name, args) \
|
|
|
|
((parent_class_cast(parent_class)->name != NULL) ? \
|
2004-01-08 04:10:18 +00:00
|
|
|
parent_class_cast(parent_class)->name args : (void) 0)
|
|
|
|
|
2005-11-04 20:12:01 +00:00
|
|
|
/**
|
|
|
|
* GST_CALL_PARENT_WITH_DEFAULT:
|
|
|
|
* @parent_class_cast: the name of the class cast macro for the parent type
|
|
|
|
* @name: name of the function to call
|
|
|
|
* @args: arguments enclosed in '( )'
|
|
|
|
* @def_return: default result
|
|
|
|
*
|
|
|
|
* Same as GST_CALL_PARENT(), but in case there is no implementation, it
|
|
|
|
* evaluates to @def_return.
|
|
|
|
*/
|
|
|
|
#define GST_CALL_PARENT_WITH_DEFAULT(parent_class_cast, name, args, def_return)\
|
2005-09-12 18:14:03 +00:00
|
|
|
((parent_class_cast(parent_class)->name != NULL) ? \
|
2004-01-08 04:10:18 +00:00
|
|
|
parent_class_cast(parent_class)->name args : def_return)
|
|
|
|
|
2008-10-07 12:00:49 +00:00
|
|
|
/* Define PUT and GET functions for unaligned memory */
|
|
|
|
#define _GST_GET(__data, __idx, __size, __shift) \
|
2009-05-15 17:42:48 +00:00
|
|
|
(((guint##__size) (((guint8 *) (__data))[__idx])) << (__shift))
|
2004-04-20 00:17:26 +00:00
|
|
|
|
2008-10-07 12:00:49 +00:00
|
|
|
#define _GST_PUT(__data, __idx, __size, __shift, __num) \
|
2009-05-15 17:42:48 +00:00
|
|
|
(((guint8 *) (__data))[__idx] = (((guint##__size) (__num)) >> (__shift)) & 0xff)
|
2004-04-20 00:17:26 +00:00
|
|
|
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
|
|
|
* GST_READ_UINT64_BE:
|
|
|
|
* @data: memory location
|
|
|
|
*
|
|
|
|
* Read a 64 bit unsigned integer value in big endian format from the memory buffer.
|
|
|
|
*/
|
2008-10-07 12:00:49 +00:00
|
|
|
#define GST_READ_UINT64_BE(data) (_GST_GET (data, 0, 64, 56) | \
|
|
|
|
_GST_GET (data, 1, 64, 48) | \
|
|
|
|
_GST_GET (data, 2, 64, 40) | \
|
|
|
|
_GST_GET (data, 3, 64, 32) | \
|
|
|
|
_GST_GET (data, 4, 64, 24) | \
|
|
|
|
_GST_GET (data, 5, 64, 16) | \
|
|
|
|
_GST_GET (data, 6, 64, 8) | \
|
|
|
|
_GST_GET (data, 7, 64, 0))
|
|
|
|
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
|
|
|
* GST_READ_UINT64_LE:
|
|
|
|
* @data: memory location
|
|
|
|
*
|
|
|
|
* Read a 64 bit unsigned integer value in little endian format from the memory buffer.
|
|
|
|
*/
|
2008-10-07 12:00:49 +00:00
|
|
|
#define GST_READ_UINT64_LE(data) (_GST_GET (data, 7, 64, 56) | \
|
|
|
|
_GST_GET (data, 6, 64, 48) | \
|
|
|
|
_GST_GET (data, 5, 64, 40) | \
|
|
|
|
_GST_GET (data, 4, 64, 32) | \
|
|
|
|
_GST_GET (data, 3, 64, 24) | \
|
|
|
|
_GST_GET (data, 2, 64, 16) | \
|
|
|
|
_GST_GET (data, 1, 64, 8) | \
|
|
|
|
_GST_GET (data, 0, 64, 0))
|
|
|
|
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
|
|
|
* GST_READ_UINT32_BE:
|
|
|
|
* @data: memory location
|
|
|
|
*
|
|
|
|
* Read a 32 bit unsigned integer value in big endian format from the memory buffer.
|
|
|
|
*/
|
2008-10-07 12:00:49 +00:00
|
|
|
#define GST_READ_UINT32_BE(data) (_GST_GET (data, 0, 32, 24) | \
|
|
|
|
_GST_GET (data, 1, 32, 16) | \
|
|
|
|
_GST_GET (data, 2, 32, 8) | \
|
|
|
|
_GST_GET (data, 3, 32, 0))
|
|
|
|
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
|
|
|
* GST_READ_UINT32_LE:
|
|
|
|
* @data: memory location
|
|
|
|
*
|
|
|
|
* Read a 32 bit unsigned integer value in little endian format from the memory buffer.
|
|
|
|
*/
|
2008-10-07 12:00:49 +00:00
|
|
|
#define GST_READ_UINT32_LE(data) (_GST_GET (data, 3, 32, 24) | \
|
|
|
|
_GST_GET (data, 2, 32, 16) | \
|
|
|
|
_GST_GET (data, 1, 32, 8) | \
|
|
|
|
_GST_GET (data, 0, 32, 0))
|
|
|
|
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
2008-10-07 12:00:49 +00:00
|
|
|
* GST_READ_UINT24_BE:
|
2005-10-08 14:48:17 +00:00
|
|
|
* @data: memory location
|
|
|
|
*
|
2008-10-07 12:00:49 +00:00
|
|
|
* Read a 24 bit unsigned integer value in big endian format from the memory buffer.
|
2005-10-08 14:48:17 +00:00
|
|
|
*
|
2008-10-07 12:00:49 +00:00
|
|
|
* Since: 0.10.22
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2008-10-07 12:00:49 +00:00
|
|
|
#define GST_READ_UINT24_BE(data) (_GST_GET (data, 0, 32, 16) | \
|
|
|
|
_GST_GET (data, 1, 32, 8) | \
|
|
|
|
_GST_GET (data, 2, 32, 0))
|
2004-04-20 00:17:26 +00:00
|
|
|
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
2008-10-07 12:00:49 +00:00
|
|
|
* GST_READ_UINT24_LE:
|
2005-10-08 14:48:17 +00:00
|
|
|
* @data: memory location
|
|
|
|
*
|
2008-10-07 12:00:49 +00:00
|
|
|
* Read a 24 bit unsigned integer value in little endian format from the memory buffer.
|
2005-10-08 14:48:17 +00:00
|
|
|
*
|
2008-10-07 12:00:49 +00:00
|
|
|
* Since: 0.10.22
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2008-10-07 12:00:49 +00:00
|
|
|
#define GST_READ_UINT24_LE(data) (_GST_GET (data, 2, 32, 16) | \
|
|
|
|
_GST_GET (data, 1, 32, 8) | \
|
|
|
|
_GST_GET (data, 0, 32, 0))
|
|
|
|
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
2008-10-07 12:00:49 +00:00
|
|
|
* GST_READ_UINT16_BE:
|
2005-10-08 14:48:17 +00:00
|
|
|
* @data: memory location
|
|
|
|
*
|
2008-10-07 12:00:49 +00:00
|
|
|
* Read a 16 bit unsigned integer value in big endian format from the memory buffer.
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2008-10-07 12:00:49 +00:00
|
|
|
#define GST_READ_UINT16_BE(data) (_GST_GET (data, 0, 16, 8) | \
|
|
|
|
_GST_GET (data, 1, 16, 0))
|
|
|
|
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
2008-10-07 12:00:49 +00:00
|
|
|
* GST_READ_UINT16_LE:
|
2005-10-08 14:48:17 +00:00
|
|
|
* @data: memory location
|
|
|
|
*
|
2008-10-07 12:00:49 +00:00
|
|
|
* Read a 16 bit unsigned integer value in little endian format from the memory buffer.
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2008-10-07 12:00:49 +00:00
|
|
|
#define GST_READ_UINT16_LE(data) (_GST_GET (data, 1, 16, 8) | \
|
|
|
|
_GST_GET (data, 0, 16, 0))
|
|
|
|
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
2008-10-07 12:00:49 +00:00
|
|
|
* GST_READ_UINT8:
|
2005-10-08 14:48:17 +00:00
|
|
|
* @data: memory location
|
|
|
|
*
|
2008-10-07 12:00:49 +00:00
|
|
|
* Read an 8 bit unsigned integer value from the memory buffer.
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2008-10-07 12:00:49 +00:00
|
|
|
#define GST_READ_UINT8(data) (_GST_GET (data, 0, 8, 0))
|
|
|
|
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
2008-10-07 12:00:49 +00:00
|
|
|
* GST_WRITE_UINT64_BE:
|
2005-10-08 14:48:17 +00:00
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
2008-10-07 12:00:49 +00:00
|
|
|
* Store a 64 bit unsigned integer value in big endian format into the memory buffer.
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2004-04-20 00:17:26 +00:00
|
|
|
#define GST_WRITE_UINT64_BE(data, num) do { \
|
|
|
|
_GST_PUT (data, 0, 64, 56, num); \
|
|
|
|
_GST_PUT (data, 1, 64, 48, num); \
|
|
|
|
_GST_PUT (data, 2, 64, 40, num); \
|
|
|
|
_GST_PUT (data, 3, 64, 32, num); \
|
|
|
|
_GST_PUT (data, 4, 64, 24, num); \
|
|
|
|
_GST_PUT (data, 5, 64, 16, num); \
|
|
|
|
_GST_PUT (data, 6, 64, 8, num); \
|
|
|
|
_GST_PUT (data, 7, 64, 0, num); \
|
|
|
|
} while (0)
|
|
|
|
|
2008-10-07 12:00:49 +00:00
|
|
|
/**
|
|
|
|
* GST_WRITE_UINT64_LE:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store a 64 bit unsigned integer value in little endian format into the memory buffer.
|
|
|
|
*/
|
2004-04-20 00:17:26 +00:00
|
|
|
#define GST_WRITE_UINT64_LE(data, num) do { \
|
|
|
|
_GST_PUT (data, 0, 64, 0, num); \
|
|
|
|
_GST_PUT (data, 1, 64, 8, num); \
|
|
|
|
_GST_PUT (data, 2, 64, 16, num); \
|
|
|
|
_GST_PUT (data, 3, 64, 24, num); \
|
|
|
|
_GST_PUT (data, 4, 64, 32, num); \
|
|
|
|
_GST_PUT (data, 5, 64, 40, num); \
|
|
|
|
_GST_PUT (data, 6, 64, 48, num); \
|
|
|
|
_GST_PUT (data, 7, 64, 56, num); \
|
|
|
|
} while (0)
|
|
|
|
|
2008-10-07 12:00:49 +00:00
|
|
|
/**
|
|
|
|
* GST_WRITE_UINT32_BE:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store a 32 bit unsigned integer value in big endian format into the memory buffer.
|
|
|
|
*/
|
2004-04-20 00:17:26 +00:00
|
|
|
#define GST_WRITE_UINT32_BE(data, num) do { \
|
|
|
|
_GST_PUT (data, 0, 32, 24, num); \
|
|
|
|
_GST_PUT (data, 1, 32, 16, num); \
|
|
|
|
_GST_PUT (data, 2, 32, 8, num); \
|
|
|
|
_GST_PUT (data, 3, 32, 0, num); \
|
|
|
|
} while (0)
|
|
|
|
|
2008-10-07 12:00:49 +00:00
|
|
|
/**
|
|
|
|
* GST_WRITE_UINT32_LE:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store a 32 bit unsigned integer value in little endian format into the memory buffer.
|
|
|
|
*/
|
2004-04-20 00:17:26 +00:00
|
|
|
#define GST_WRITE_UINT32_LE(data, num) do { \
|
|
|
|
_GST_PUT (data, 0, 32, 0, num); \
|
|
|
|
_GST_PUT (data, 1, 32, 8, num); \
|
|
|
|
_GST_PUT (data, 2, 32, 16, num); \
|
|
|
|
_GST_PUT (data, 3, 32, 24, num); \
|
|
|
|
} while (0)
|
|
|
|
|
2008-10-07 12:00:49 +00:00
|
|
|
/**
|
|
|
|
* GST_WRITE_UINT24_BE:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store a 24 bit unsigned integer value in big endian format into the memory buffer.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*/
|
|
|
|
#define GST_WRITE_UINT24_BE(data, num) do { \
|
|
|
|
_GST_PUT (data, 0, 32, 16, num); \
|
|
|
|
_GST_PUT (data, 1, 32, 8, num); \
|
|
|
|
_GST_PUT (data, 2, 32, 0, num); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_WRITE_UINT24_LE:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store a 24 bit unsigned integer value in little endian format into the memory buffer.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*/
|
|
|
|
#define GST_WRITE_UINT24_LE(data, num) do { \
|
|
|
|
_GST_PUT (data, 0, 32, 0, num); \
|
|
|
|
_GST_PUT (data, 1, 32, 8, num); \
|
|
|
|
_GST_PUT (data, 2, 32, 16, num); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_WRITE_UINT16_BE:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store a 16 bit unsigned integer value in big endian format into the memory buffer.
|
|
|
|
*/
|
2004-04-20 00:17:26 +00:00
|
|
|
#define GST_WRITE_UINT16_BE(data, num) do { \
|
|
|
|
_GST_PUT (data, 0, 16, 8, num); \
|
|
|
|
_GST_PUT (data, 1, 16, 0, num); \
|
|
|
|
} while (0)
|
|
|
|
|
2008-10-07 12:00:49 +00:00
|
|
|
/**
|
|
|
|
* GST_WRITE_UINT16_LE:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store a 16 bit unsigned integer value in little endian format into the memory buffer.
|
|
|
|
*/
|
2004-04-20 00:17:26 +00:00
|
|
|
#define GST_WRITE_UINT16_LE(data, num) do { \
|
|
|
|
_GST_PUT (data, 0, 16, 0, num); \
|
|
|
|
_GST_PUT (data, 1, 16, 8, num); \
|
|
|
|
} while (0)
|
|
|
|
|
2008-10-07 12:00:49 +00:00
|
|
|
/**
|
|
|
|
* GST_WRITE_UINT8:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store an 8 bit unsigned integer value into the memory buffer.
|
|
|
|
*/
|
2004-04-20 00:17:26 +00:00
|
|
|
#define GST_WRITE_UINT8(data, num) do { \
|
|
|
|
_GST_PUT (data, 0, 8, 0, num); \
|
|
|
|
} while (0)
|
|
|
|
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
/* Float endianess conversion macros */
|
|
|
|
|
|
|
|
/* FIXME: Remove this once we depend on a GLib version with this */
|
|
|
|
#ifndef GFLOAT_FROM_LE
|
|
|
|
/**
|
|
|
|
* GFLOAT_SWAP_LE_BE:
|
|
|
|
* @in: input value
|
|
|
|
*
|
|
|
|
* Swap byte order of a 32-bit floating point value (float).
|
|
|
|
*
|
2009-05-22 08:33:02 +00:00
|
|
|
* Returns: @in byte-swapped.
|
|
|
|
*
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
2009-02-22 18:05:20 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC gfloat GFLOAT_SWAP_LE_BE (gfloat in);
|
|
|
|
#endif
|
|
|
|
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
inline static gfloat
|
|
|
|
GFLOAT_SWAP_LE_BE(gfloat in)
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
guint32 i;
|
|
|
|
gfloat f;
|
|
|
|
} u;
|
|
|
|
|
|
|
|
u.f = in;
|
|
|
|
u.i = GUINT32_SWAP_LE_BE (u.i);
|
|
|
|
return u.f;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GDOUBLE_SWAP_LE_BE:
|
|
|
|
* @in: input value
|
|
|
|
*
|
|
|
|
* Swap byte order of a 64-bit floating point value (double).
|
|
|
|
*
|
2009-05-22 08:33:02 +00:00
|
|
|
* Returns: @in byte-swapped.
|
|
|
|
*
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
2009-02-22 18:05:20 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC gdouble GDOUBLE_SWAP_LE_BE (gdouble in);
|
|
|
|
#endif
|
|
|
|
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
inline static gdouble
|
|
|
|
GDOUBLE_SWAP_LE_BE(gdouble in)
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
guint64 i;
|
|
|
|
gdouble d;
|
|
|
|
} u;
|
|
|
|
|
|
|
|
u.d = in;
|
|
|
|
u.i = GUINT64_SWAP_LE_BE (u.i);
|
|
|
|
return u.d;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GDOUBLE_TO_LE:
|
|
|
|
* @val: value
|
|
|
|
*
|
|
|
|
* Convert 64-bit floating point value (double) from native byte order into
|
|
|
|
* little endian byte order.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GDOUBLE_TO_BE:
|
|
|
|
* @val: value
|
|
|
|
*
|
|
|
|
* Convert 64-bit floating point value (double) from native byte order into
|
|
|
|
* big endian byte order.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GDOUBLE_FROM_LE:
|
|
|
|
* @val: value
|
|
|
|
*
|
|
|
|
* Convert 64-bit floating point value (double) from little endian byte order
|
|
|
|
* into native byte order.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GDOUBLE_FROM_BE:
|
|
|
|
* @val: value
|
|
|
|
*
|
|
|
|
* Convert 64-bit floating point value (double) from big endian byte order
|
|
|
|
* into native byte order.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GFLOAT_TO_LE:
|
|
|
|
* @val: value
|
|
|
|
*
|
|
|
|
* Convert 32-bit floating point value (float) from native byte order into
|
|
|
|
* little endian byte order.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GFLOAT_TO_BE:
|
|
|
|
* @val: value
|
|
|
|
*
|
|
|
|
* Convert 32-bit floating point value (float) from native byte order into
|
|
|
|
* big endian byte order.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GFLOAT_FROM_LE:
|
|
|
|
* @val: value
|
|
|
|
*
|
|
|
|
* Convert 32-bit floating point value (float) from little endian byte order
|
|
|
|
* into native byte order.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GFLOAT_FROM_BE:
|
|
|
|
* @val: value
|
|
|
|
*
|
|
|
|
* Convert 32-bit floating point value (float) from big endian byte order
|
|
|
|
* into native byte order.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
|
|
|
#define GFLOAT_TO_LE(val) ((gfloat) (val))
|
|
|
|
#define GFLOAT_TO_BE(val) (GFLOAT_SWAP_LE_BE (val))
|
|
|
|
#define GDOUBLE_TO_LE(val) ((gdouble) (val))
|
|
|
|
#define GDOUBLE_TO_BE(val) (GDOUBLE_SWAP_LE_BE (val))
|
|
|
|
|
|
|
|
#elif G_BYTE_ORDER == G_BIG_ENDIAN
|
|
|
|
#define GFLOAT_TO_LE(val) (GFLOAT_SWAP_LE_BE (val))
|
|
|
|
#define GFLOAT_TO_BE(val) ((gfloat) (val))
|
|
|
|
#define GDOUBLE_TO_LE(val) (GDOUBLE_SWAP_LE_BE (val))
|
|
|
|
#define GDOUBLE_TO_BE(val) ((gdouble) (val))
|
|
|
|
|
|
|
|
#else /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */
|
|
|
|
#error unknown ENDIAN type
|
|
|
|
#endif /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */
|
|
|
|
|
|
|
|
#define GFLOAT_FROM_LE(val) (GFLOAT_TO_LE (val))
|
|
|
|
#define GFLOAT_FROM_BE(val) (GFLOAT_TO_BE (val))
|
|
|
|
#define GDOUBLE_FROM_LE(val) (GDOUBLE_TO_LE (val))
|
|
|
|
#define GDOUBLE_FROM_BE(val) (GDOUBLE_TO_BE (val))
|
|
|
|
|
|
|
|
#endif /* !defined(GFLOAT_FROM_LE) */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_READ_FLOAT_LE:
|
|
|
|
* @data: memory location
|
|
|
|
*
|
|
|
|
* Read a 32 bit float value in little endian format from the memory buffer.
|
|
|
|
*
|
2009-05-22 08:33:02 +00:00
|
|
|
* Returns: The floating point value read from @data
|
|
|
|
*
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
2009-02-22 18:05:20 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC gfloat GST_READ_FLOAT_LE (const guint8 *data);
|
|
|
|
#endif
|
|
|
|
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
inline static gfloat
|
|
|
|
GST_READ_FLOAT_LE(const guint8 *data)
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
guint32 i;
|
|
|
|
gfloat f;
|
|
|
|
} u;
|
|
|
|
|
|
|
|
u.i = GST_READ_UINT32_LE (data);
|
|
|
|
return u.f;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_READ_FLOAT_BE:
|
|
|
|
* @data: memory location
|
|
|
|
*
|
|
|
|
* Read a 32 bit float value in big endian format from the memory buffer.
|
|
|
|
*
|
2009-05-22 08:33:02 +00:00
|
|
|
* Returns: The floating point value read from @data
|
|
|
|
*
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
2009-02-22 18:05:20 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC gfloat GST_READ_FLOAT_BE (const guint8 *data);
|
|
|
|
#endif
|
|
|
|
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
inline static gfloat
|
|
|
|
GST_READ_FLOAT_BE(const guint8 *data)
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
guint32 i;
|
|
|
|
gfloat f;
|
|
|
|
} u;
|
|
|
|
|
|
|
|
u.i = GST_READ_UINT32_BE (data);
|
|
|
|
return u.f;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_READ_DOUBLE_LE:
|
|
|
|
* @data: memory location
|
|
|
|
*
|
|
|
|
* Read a 64 bit double value in little endian format from the memory buffer.
|
|
|
|
*
|
2009-05-22 08:33:02 +00:00
|
|
|
* Returns: The double-precision floating point value read from @data
|
|
|
|
*
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
2009-02-22 18:05:20 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC gdouble GST_READ_DOUBLE_LE (const guint8 *data);
|
|
|
|
#endif
|
|
|
|
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
inline static gdouble
|
|
|
|
GST_READ_DOUBLE_LE(const guint8 *data)
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
guint64 i;
|
|
|
|
gdouble d;
|
|
|
|
} u;
|
|
|
|
|
|
|
|
u.i = GST_READ_UINT64_LE (data);
|
|
|
|
return u.d;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_READ_DOUBLE_BE:
|
|
|
|
* @data: memory location
|
|
|
|
*
|
|
|
|
* Read a 64 bit double value in big endian format from the memory buffer.
|
|
|
|
*
|
2009-05-22 08:33:02 +00:00
|
|
|
* Returns: The double-precision floating point value read from @data
|
|
|
|
*
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
2009-02-22 18:05:20 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC gdouble GST_READ_DOUBLE_BE (const guint8 *data);
|
|
|
|
#endif
|
|
|
|
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
inline static gdouble
|
|
|
|
GST_READ_DOUBLE_BE(const guint8 *data)
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
guint64 i;
|
|
|
|
gdouble d;
|
|
|
|
} u;
|
|
|
|
|
|
|
|
u.i = GST_READ_UINT64_BE (data);
|
|
|
|
return u.d;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_WRITE_FLOAT_LE:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store a 32 bit float value in little endian format into the memory buffer.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
2009-02-22 18:05:20 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC void GST_WRITE_FLOAT_LE (guint8 *data, gfloat num);
|
|
|
|
#endif
|
|
|
|
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
inline static void
|
|
|
|
GST_WRITE_FLOAT_LE(guint8 *data, gfloat num)
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
guint32 i;
|
|
|
|
gfloat f;
|
|
|
|
} u;
|
|
|
|
|
|
|
|
u.f = num;
|
|
|
|
GST_WRITE_UINT32_LE (data, u.i);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_WRITE_FLOAT_BE:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store a 32 bit float value in big endian format into the memory buffer.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
2009-02-22 18:05:20 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC void GST_WRITE_FLOAT_BE (guint8 *data, gfloat num);
|
|
|
|
#endif
|
|
|
|
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
inline static void
|
|
|
|
GST_WRITE_FLOAT_BE(guint8 *data, gfloat num)
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
guint32 i;
|
|
|
|
gfloat f;
|
|
|
|
} u;
|
|
|
|
|
|
|
|
u.f = num;
|
|
|
|
GST_WRITE_UINT32_BE (data, u.i);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_WRITE_DOUBLE_LE:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store a 64 bit double value in little endian format into the memory buffer.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
2009-02-22 18:05:20 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC void GST_WRITE_DOUBLE_LE (guint8 *data, gdouble num);
|
|
|
|
#endif
|
|
|
|
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
inline static void
|
|
|
|
GST_WRITE_DOUBLE_LE(guint8 *data, gdouble num)
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
guint64 i;
|
|
|
|
gdouble d;
|
|
|
|
} u;
|
|
|
|
|
|
|
|
u.d = num;
|
|
|
|
GST_WRITE_UINT64_LE (data, u.i);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_WRITE_DOUBLE_BE:
|
|
|
|
* @data: memory location
|
|
|
|
* @num: value to store
|
|
|
|
*
|
|
|
|
* Store a 64 bit double value in big endian format into the memory buffer.
|
|
|
|
*
|
|
|
|
* Since: 0.10.22
|
|
|
|
*
|
|
|
|
*/
|
2009-02-22 18:05:20 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC void GST_WRITE_DOUBLE_BE (guint8 *data, gdouble num);
|
|
|
|
#endif
|
|
|
|
|
API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
|
|
|
inline static void
|
|
|
|
GST_WRITE_DOUBLE_BE(guint8 *data, gdouble num)
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
guint64 i;
|
|
|
|
gdouble d;
|
|
|
|
} u;
|
|
|
|
|
|
|
|
u.d = num;
|
|
|
|
GST_WRITE_UINT64_BE (data, u.i);
|
|
|
|
}
|
|
|
|
|
2005-08-09 16:25:45 +00:00
|
|
|
/* Miscellaneous utility macros */
|
2005-10-08 14:48:17 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_ROUND_UP_2:
|
2007-01-29 13:40:38 +00:00
|
|
|
* @num: integer value to round up
|
2005-10-08 14:48:17 +00:00
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value up to the next multiple of 2.
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2005-08-09 16:25:45 +00:00
|
|
|
#define GST_ROUND_UP_2(num) (((num)+1)&~1)
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
|
|
|
* GST_ROUND_UP_4:
|
2007-01-29 13:40:38 +00:00
|
|
|
* @num: integer value to round up
|
2005-10-08 14:48:17 +00:00
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value up to the next multiple of 4.
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2005-08-09 16:25:45 +00:00
|
|
|
#define GST_ROUND_UP_4(num) (((num)+3)&~3)
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
|
|
|
* GST_ROUND_UP_8:
|
2007-01-29 13:40:38 +00:00
|
|
|
* @num: integer value to round up
|
2005-10-08 14:48:17 +00:00
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value up to the next multiple of 8.
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2005-08-09 16:25:45 +00:00
|
|
|
#define GST_ROUND_UP_8(num) (((num)+7)&~7)
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
|
|
|
* GST_ROUND_UP_16:
|
2007-01-29 13:40:38 +00:00
|
|
|
* @num: integer value to round up
|
2005-10-08 14:48:17 +00:00
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value up to the next multiple of 16.
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2005-08-09 16:25:45 +00:00
|
|
|
#define GST_ROUND_UP_16(num) (((num)+15)&~15)
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
|
|
|
* GST_ROUND_UP_32:
|
2007-01-29 13:40:38 +00:00
|
|
|
* @num: integer value to round up
|
2005-10-08 14:48:17 +00:00
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value up to the next multiple of 32.
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2005-08-09 16:25:45 +00:00
|
|
|
#define GST_ROUND_UP_32(num) (((num)+31)&~31)
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
|
|
|
* GST_ROUND_UP_64:
|
2007-01-29 13:40:38 +00:00
|
|
|
* @num: integer value to round up
|
2005-10-08 14:48:17 +00:00
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value up to the next multiple of 64.
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2005-08-09 16:25:45 +00:00
|
|
|
#define GST_ROUND_UP_64(num) (((num)+63)&~63)
|
|
|
|
|
2007-01-29 13:40:38 +00:00
|
|
|
/**
|
|
|
|
* GST_ROUND_DOWN_2:
|
|
|
|
* @num: integer value to round down
|
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value down to the next multiple of 2.
|
2007-01-29 13:40:38 +00:00
|
|
|
*
|
|
|
|
* Since: 0.10.12
|
|
|
|
*/
|
|
|
|
#define GST_ROUND_DOWN_2(num) ((num)&(~1))
|
|
|
|
/**
|
|
|
|
* GST_ROUND_DOWN_4:
|
|
|
|
* @num: integer value to round down
|
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value down to the next multiple of 4.
|
2007-01-29 13:40:38 +00:00
|
|
|
*
|
|
|
|
* Since: 0.10.12
|
|
|
|
*/
|
|
|
|
#define GST_ROUND_DOWN_4(num) ((num)&(~3))
|
|
|
|
/**
|
|
|
|
* GST_ROUND_DOWN_8:
|
|
|
|
* @num: integer value to round down
|
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value down to the next multiple of 8.
|
2007-01-29 13:40:38 +00:00
|
|
|
*
|
|
|
|
* Since: 0.10.12
|
|
|
|
*/
|
|
|
|
#define GST_ROUND_DOWN_8(num) ((num)&(~7))
|
|
|
|
/**
|
|
|
|
* GST_ROUND_DOWN_16:
|
|
|
|
* @num: integer value to round down
|
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value down to the next multiple of 16.
|
2007-01-29 13:40:38 +00:00
|
|
|
*
|
|
|
|
* Since: 0.10.12
|
|
|
|
*/
|
|
|
|
#define GST_ROUND_DOWN_16(num) ((num)&(~15))
|
|
|
|
/**
|
|
|
|
* GST_ROUND_DOWN_32:
|
|
|
|
* @num: integer value to round down
|
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value down to the next multiple of 32.
|
2007-01-29 13:40:38 +00:00
|
|
|
*
|
|
|
|
* Since: 0.10.12
|
|
|
|
*/
|
|
|
|
#define GST_ROUND_DOWN_32(num) ((num)&(~31))
|
|
|
|
/**
|
|
|
|
* GST_ROUND_DOWN_64:
|
|
|
|
* @num: integer value to round down
|
|
|
|
*
|
2007-05-13 20:11:27 +00:00
|
|
|
* Rounds an integer value down to the next multiple of 64.
|
2007-01-29 13:40:38 +00:00
|
|
|
*
|
|
|
|
* Since: 0.10.12
|
|
|
|
*/
|
|
|
|
#define GST_ROUND_DOWN_64(num) ((num)&(~63))
|
|
|
|
|
2005-09-12 18:14:03 +00:00
|
|
|
void gst_object_default_error (GstObject * source,
|
2005-03-07 18:27:42 +00:00
|
|
|
GError * error, gchar * debug);
|
|
|
|
|
|
|
|
/* element functions */
|
2005-04-23 23:29:47 +00:00
|
|
|
void gst_element_create_all_pads (GstElement *element);
|
2005-04-24 21:16:45 +00:00
|
|
|
GstPad* gst_element_get_compatible_pad (GstElement *element, GstPad *pad,
|
|
|
|
const GstCaps *caps);
|
2005-03-07 18:27:42 +00:00
|
|
|
|
|
|
|
GstPadTemplate* gst_element_get_compatible_pad_template (GstElement *element, GstPadTemplate *compattempl);
|
|
|
|
|
2005-09-02 15:42:00 +00:00
|
|
|
G_CONST_RETURN gchar* gst_element_state_get_name (GstState state);
|
2006-11-06 15:14:46 +00:00
|
|
|
G_CONST_RETURN gchar * gst_element_state_change_return_get_name (GstStateChangeReturn state_ret);
|
2005-03-07 18:27:42 +00:00
|
|
|
|
|
|
|
gboolean gst_element_link (GstElement *src, GstElement *dest);
|
|
|
|
gboolean gst_element_link_many (GstElement *element_1,
|
2005-11-21 18:41:39 +00:00
|
|
|
GstElement *element_2, ...) G_GNUC_NULL_TERMINATED;
|
2005-08-31 15:27:55 +00:00
|
|
|
gboolean gst_element_link_filtered (GstElement * src,
|
|
|
|
GstElement * dest,
|
|
|
|
GstCaps *filter);
|
2005-03-07 18:27:42 +00:00
|
|
|
void gst_element_unlink (GstElement *src, GstElement *dest);
|
|
|
|
void gst_element_unlink_many (GstElement *element_1,
|
2005-11-21 18:41:39 +00:00
|
|
|
GstElement *element_2, ...) G_GNUC_NULL_TERMINATED;
|
2005-03-07 18:27:42 +00:00
|
|
|
|
|
|
|
gboolean gst_element_link_pads (GstElement *src, const gchar *srcpadname,
|
|
|
|
GstElement *dest, const gchar *destpadname);
|
|
|
|
void gst_element_unlink_pads (GstElement *src, const gchar *srcpadname,
|
|
|
|
GstElement *dest, const gchar *destpadname);
|
2005-06-29 15:17:25 +00:00
|
|
|
|
2005-07-13 16:26:07 +00:00
|
|
|
gboolean gst_element_link_pads_filtered (GstElement * src, const gchar * srcpadname,
|
|
|
|
GstElement * dest, const gchar * destpadname,
|
|
|
|
GstCaps *filter);
|
2006-05-19 10:29:07 +00:00
|
|
|
|
2009-03-13 09:56:54 +00:00
|
|
|
gboolean gst_element_seek_simple (GstElement *element,
|
|
|
|
GstFormat format,
|
|
|
|
GstSeekFlags seek_flags,
|
|
|
|
gint64 seek_pos);
|
2006-05-19 10:29:07 +00:00
|
|
|
|
2005-06-29 15:17:25 +00:00
|
|
|
/* util elementfactory functions */
|
|
|
|
gboolean gst_element_factory_can_src_caps(GstElementFactory *factory, const GstCaps *caps);
|
|
|
|
gboolean gst_element_factory_can_sink_caps(GstElementFactory *factory, const GstCaps *caps);
|
|
|
|
|
2005-05-09 10:53:13 +00:00
|
|
|
/* util query functions */
|
|
|
|
gboolean gst_element_query_position (GstElement *element, GstFormat *format,
|
gst/: API change fix.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_query), (do_playing):
* gst/base/gstbasesrc.c: (gst_base_src_query):
* gst/elements/gstfilesink.c: (gst_file_sink_query):
* gst/elements/gsttypefindelement.c:
(gst_type_find_handle_src_query), (find_element_get_length),
(gst_type_find_element_activate):
API change fix.
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_set_segment),
(gst_query_parse_segment):
* gst/gstquery.h:
Bundling query position/duration is not a good idea since duration
does not change much and we don't want to recalculate it for every
position query, so they are separated again..
Base value in segment query is not needed.
* gst/gstqueue.c: (gst_queue_handle_src_query):
* gst/gstutils.c: (gst_element_query_position),
(gst_element_query_duration), (gst_pad_query_position),
(gst_pad_query_duration):
* gst/gstutils.h:
Updates for query API change.
Added some docs here and there.
2005-10-19 15:50:10 +00:00
|
|
|
gint64 *cur);
|
|
|
|
gboolean gst_element_query_duration (GstElement *element, GstFormat *format,
|
|
|
|
gint64 *duration);
|
2005-05-09 10:53:13 +00:00
|
|
|
gboolean gst_element_query_convert (GstElement *element, GstFormat src_format, gint64 src_val,
|
2005-10-20 19:47:07 +00:00
|
|
|
GstFormat *dest_format, gint64 *dest_val);
|
2005-03-07 18:27:42 +00:00
|
|
|
|
|
|
|
/* element class functions */
|
2005-09-12 18:14:03 +00:00
|
|
|
void gst_element_class_install_std_props (GstElementClass * klass,
|
2005-11-21 18:41:39 +00:00
|
|
|
const gchar * first_name, ...) G_GNUC_NULL_TERMINATED;
|
2005-03-07 18:27:42 +00:00
|
|
|
|
|
|
|
/* pad functions */
|
|
|
|
void gst_pad_use_fixed_caps (GstPad *pad);
|
|
|
|
GstCaps* gst_pad_get_fixed_caps_func (GstPad *pad);
|
|
|
|
GstCaps* gst_pad_proxy_getcaps (GstPad * pad);
|
|
|
|
gboolean gst_pad_proxy_setcaps (GstPad * pad, GstCaps * caps);
|
|
|
|
|
docs/design/: Some more docs in the works.
Original commit message from CVS:
* docs/design/part-dynamic.txt:
* docs/design/part-events.txt:
* docs/design/part-seeking.txt:
Some more docs in the works.
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_getcaps), (gst_base_transform_configure_caps),
(gst_base_transform_setcaps), (gst_base_transform_get_size),
(gst_base_transform_buffer_alloc), (gst_base_transform_event),
(gst_base_transform_handle_buffer),
(gst_base_transform_sink_activate_push),
(gst_base_transform_src_activate_pull),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
Refcounting fixes.
* gst/gstbus.c: (gst_bus_source_dispatch), (gst_bus_poll):
Cleanups.
* gst/gstevent.c: (gst_event_finalize):
Set SRC to NULL.
* gst/gstutils.c: (gst_element_unlink),
(gst_pad_get_parent_element), (gst_pad_proxy_getcaps),
(gst_pad_proxy_setcaps):
* gst/gstutils.h:
Add _get_parent_element() to get a pads parent as an element.
2005-07-18 08:28:48 +00:00
|
|
|
GstElement* gst_pad_get_parent_element (GstPad *pad);
|
|
|
|
|
2005-05-09 10:53:13 +00:00
|
|
|
/* util query functions */
|
|
|
|
gboolean gst_pad_query_position (GstPad *pad, GstFormat *format,
|
gst/: API change fix.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_query), (do_playing):
* gst/base/gstbasesrc.c: (gst_base_src_query):
* gst/elements/gstfilesink.c: (gst_file_sink_query):
* gst/elements/gsttypefindelement.c:
(gst_type_find_handle_src_query), (find_element_get_length),
(gst_type_find_element_activate):
API change fix.
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_set_segment),
(gst_query_parse_segment):
* gst/gstquery.h:
Bundling query position/duration is not a good idea since duration
does not change much and we don't want to recalculate it for every
position query, so they are separated again..
Base value in segment query is not needed.
* gst/gstqueue.c: (gst_queue_handle_src_query):
* gst/gstutils.c: (gst_element_query_position),
(gst_element_query_duration), (gst_pad_query_position),
(gst_pad_query_duration):
* gst/gstutils.h:
Updates for query API change.
Added some docs here and there.
2005-10-19 15:50:10 +00:00
|
|
|
gint64 *cur);
|
|
|
|
gboolean gst_pad_query_duration (GstPad *pad, GstFormat *format,
|
|
|
|
gint64 *duration);
|
2005-05-09 10:53:13 +00:00
|
|
|
gboolean gst_pad_query_convert (GstPad *pad, GstFormat src_format, gint64 src_val,
|
2006-03-23 18:45:02 +00:00
|
|
|
GstFormat *dest_format, gint64 *dest_val);
|
|
|
|
|
|
|
|
gboolean gst_pad_query_peer_position (GstPad *pad, GstFormat *format,
|
|
|
|
gint64 *cur);
|
|
|
|
gboolean gst_pad_query_peer_duration (GstPad *pad, GstFormat *format,
|
|
|
|
gint64 *duration);
|
|
|
|
gboolean gst_pad_query_peer_convert (GstPad *pad, GstFormat src_format, gint64 src_val,
|
2005-08-25 23:17:18 +00:00
|
|
|
GstFormat *dest_format, gint64 *dest_val);
|
2005-05-09 10:53:13 +00:00
|
|
|
|
2005-03-07 18:27:42 +00:00
|
|
|
/* bin functions */
|
2006-02-02 09:51:18 +00:00
|
|
|
void gst_bin_add_many (GstBin *bin, GstElement *element_1, ...) G_GNUC_NULL_TERMINATED;
|
|
|
|
void gst_bin_remove_many (GstBin *bin, GstElement *element_1, ...) G_GNUC_NULL_TERMINATED;
|
2008-05-27 10:50:49 +00:00
|
|
|
GstPad * gst_bin_find_unlinked_pad (GstBin *bin, GstPadDirection direction);
|
|
|
|
#ifndef GST_DISABLE_DEPRECATED
|
2006-02-02 09:51:18 +00:00
|
|
|
GstPad * gst_bin_find_unconnected_pad (GstBin *bin, GstPadDirection direction);
|
2008-05-27 10:50:49 +00:00
|
|
|
#endif
|
2005-03-07 18:27:42 +00:00
|
|
|
|
|
|
|
/* buffer functions */
|
|
|
|
GstBuffer * gst_buffer_merge (GstBuffer * buf1, GstBuffer * buf2);
|
gst/base/gstbasesrc.c: Don't go in pull mode for non-seekable sources.
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_basesrc_activate):
Don't go in pull mode for non-seekable sources.
* gst/elements/gsttypefindelement.c: (gst_type_find_element_init),
(gst_type_find_element_dispose), (gst_type_find_handle_src_query),
(free_entry), (stop_typefinding),
(gst_type_find_element_handle_event), (find_peek),
(gst_type_find_element_chain), (do_pull_typefind),
(gst_type_find_element_change_state):
Allow typefinding (w/o seeking) in push-mode, simplified version
of what was in 0.8.
* gst/gstutils.c: (gst_buffer_join):
* gst/gstutils.h:
gst_buffer_join() from 0.8.
2005-05-25 15:57:57 +00:00
|
|
|
GstBuffer * gst_buffer_join (GstBuffer * buf1, GstBuffer * buf2);
|
2007-07-10 20:10:16 +00:00
|
|
|
#ifndef GST_DISABLE_DEPRECATED
|
2005-03-07 18:27:42 +00:00
|
|
|
void gst_buffer_stamp (GstBuffer * dest, const GstBuffer * src);
|
2007-07-10 20:10:16 +00:00
|
|
|
#endif /* GST_DISABLE_DEPRECATED */
|
2005-03-07 18:27:42 +00:00
|
|
|
|
2005-04-24 22:49:45 +00:00
|
|
|
/* atomic functions */
|
2008-04-17 07:14:46 +00:00
|
|
|
#ifndef GST_DISABLE_DEPRECATED
|
2005-04-24 22:49:45 +00:00
|
|
|
void gst_atomic_int_set (gint * atomic_int, gint value);
|
2008-04-17 07:14:46 +00:00
|
|
|
#endif
|
2005-03-07 18:27:42 +00:00
|
|
|
|
Remove old probes, add new g-signal-based probes and some utility functions.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstprobe.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (_gst_do_pass_data_accumulator),
(gst_pad_class_init), (gst_pad_init), (gst_pad_chain),
(gst_pad_push), (gst_pad_get_range), (gst_pad_pull_range),
(gst_pad_push_event), (gst_pad_send_event):
* gst/gstpad.h:
* gst/gstutils.c: (gst_pad_add_data_probe),
(gst_pad_add_event_probe), (gst_pad_add_buffer_probe),
(gst_pad_remove_data_probe), (gst_pad_remove_event_probe),
(gst_pad_remove_buffer_probe):
* gst/gstutils.h:
Remove old probes, add new g-signal-based probes and some utility
functions.
2005-06-29 15:51:25 +00:00
|
|
|
/* probes */
|
2008-04-10 20:46:51 +00:00
|
|
|
gulong gst_pad_add_data_probe (GstPad * pad,
|
|
|
|
GCallback handler,
|
|
|
|
gpointer data);
|
|
|
|
|
|
|
|
gulong gst_pad_add_data_probe_full (GstPad * pad,
|
|
|
|
GCallback handler,
|
|
|
|
gpointer data,
|
|
|
|
GDestroyNotify notify);
|
|
|
|
|
2005-09-21 12:21:10 +00:00
|
|
|
void gst_pad_remove_data_probe (GstPad * pad, guint handler_id);
|
2008-04-10 20:46:51 +00:00
|
|
|
|
|
|
|
gulong gst_pad_add_event_probe (GstPad * pad,
|
|
|
|
GCallback handler,
|
|
|
|
gpointer data);
|
|
|
|
|
|
|
|
gulong gst_pad_add_event_probe_full (GstPad * pad,
|
|
|
|
GCallback handler,
|
|
|
|
gpointer data,
|
|
|
|
GDestroyNotify notify);
|
|
|
|
|
2005-09-21 12:21:10 +00:00
|
|
|
void gst_pad_remove_event_probe (GstPad * pad, guint handler_id);
|
2008-04-10 20:46:51 +00:00
|
|
|
|
|
|
|
gulong gst_pad_add_buffer_probe (GstPad * pad,
|
|
|
|
GCallback handler,
|
|
|
|
gpointer data);
|
|
|
|
|
|
|
|
gulong gst_pad_add_buffer_probe_full (GstPad * pad,
|
|
|
|
GCallback handler,
|
|
|
|
gpointer data,
|
|
|
|
GDestroyNotify notify);
|
|
|
|
|
2005-09-21 12:21:10 +00:00
|
|
|
void gst_pad_remove_buffer_probe (GstPad * pad, guint handler_id);
|
Remove old probes, add new g-signal-based probes and some utility functions.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstprobe.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (_gst_do_pass_data_accumulator),
(gst_pad_class_init), (gst_pad_init), (gst_pad_chain),
(gst_pad_push), (gst_pad_get_range), (gst_pad_pull_range),
(gst_pad_push_event), (gst_pad_send_event):
* gst/gstpad.h:
* gst/gstutils.c: (gst_pad_add_data_probe),
(gst_pad_add_event_probe), (gst_pad_add_buffer_probe),
(gst_pad_remove_data_probe), (gst_pad_remove_event_probe),
(gst_pad_remove_buffer_probe):
* gst/gstutils.h:
Remove old probes, add new g-signal-based probes and some utility
functions.
2005-06-29 15:51:25 +00:00
|
|
|
|
2005-08-16 16:29:04 +00:00
|
|
|
/* tag emission utility functions */
|
|
|
|
void gst_element_found_tags_for_pad (GstElement * element,
|
|
|
|
GstPad * pad,
|
|
|
|
GstTagList * list);
|
|
|
|
void gst_element_found_tags (GstElement * element,
|
|
|
|
GstTagList * list);
|
|
|
|
|
2006-02-02 09:51:18 +00:00
|
|
|
/* parse utility functions */
|
API: gst_parse_launch_full()
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gst.c: (init_post):
* gst/gst_private.h: (_GstParseContext):
* gst/gstparse.c: (gst_parse_error_quark), (gst_parse_context_new),
(gst_parse_context_free), (gst_parse_context_get_missing_elements),
(gst_parse_launchv), (gst_parse_launchv_full), (gst_parse_launch),
(gst_parse_launch_full):
* gst/gstparse.h: (GST_PARSE_FLAG_NONE), (GST_PARSE_FLAG_FATAL_ERRORS),
(GstParseFlags), (GstParseContext):
* gst/gstutils.c: (gst_parse_bin_from_description),
(gst_parse_bin_from_description_full):
* gst/gstutils.h:
* gst/parse/grammar.y:
* gst/parse/types.h:
* win32/common/libgstreamer.def:
Add new gst_parse_*_full API (#528178):
API: gst_parse_launch_full()
API: gst_parse_launchv_full()
API: gst_parse_bin_from_description_full()
API: gst_parse_context_new()
API: gst_parse_context_free()
API: gst_parse_context_get_missing_elements()
2008-05-24 15:33:53 +00:00
|
|
|
GstElement * gst_parse_bin_from_description (const gchar * bin_description,
|
2008-05-25 16:34:32 +00:00
|
|
|
gboolean ghost_unlinked_pads,
|
API: gst_parse_launch_full()
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gst.c: (init_post):
* gst/gst_private.h: (_GstParseContext):
* gst/gstparse.c: (gst_parse_error_quark), (gst_parse_context_new),
(gst_parse_context_free), (gst_parse_context_get_missing_elements),
(gst_parse_launchv), (gst_parse_launchv_full), (gst_parse_launch),
(gst_parse_launch_full):
* gst/gstparse.h: (GST_PARSE_FLAG_NONE), (GST_PARSE_FLAG_FATAL_ERRORS),
(GstParseFlags), (GstParseContext):
* gst/gstutils.c: (gst_parse_bin_from_description),
(gst_parse_bin_from_description_full):
* gst/gstutils.h:
* gst/parse/grammar.y:
* gst/parse/types.h:
* win32/common/libgstreamer.def:
Add new gst_parse_*_full API (#528178):
API: gst_parse_launch_full()
API: gst_parse_launchv_full()
API: gst_parse_bin_from_description_full()
API: gst_parse_context_new()
API: gst_parse_context_free()
API: gst_parse_context_get_missing_elements()
2008-05-24 15:33:53 +00:00
|
|
|
GError ** err);
|
|
|
|
|
|
|
|
GstElement * gst_parse_bin_from_description_full (const gchar * bin_description,
|
2008-05-25 16:34:32 +00:00
|
|
|
gboolean ghost_unlinked_pads,
|
API: gst_parse_launch_full()
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gst.c: (init_post):
* gst/gst_private.h: (_GstParseContext):
* gst/gstparse.c: (gst_parse_error_quark), (gst_parse_context_new),
(gst_parse_context_free), (gst_parse_context_get_missing_elements),
(gst_parse_launchv), (gst_parse_launchv_full), (gst_parse_launch),
(gst_parse_launch_full):
* gst/gstparse.h: (GST_PARSE_FLAG_NONE), (GST_PARSE_FLAG_FATAL_ERRORS),
(GstParseFlags), (GstParseContext):
* gst/gstutils.c: (gst_parse_bin_from_description),
(gst_parse_bin_from_description_full):
* gst/gstutils.h:
* gst/parse/grammar.y:
* gst/parse/types.h:
* win32/common/libgstreamer.def:
Add new gst_parse_*_full API (#528178):
API: gst_parse_launch_full()
API: gst_parse_launchv_full()
API: gst_parse_bin_from_description_full()
API: gst_parse_context_new()
API: gst_parse_context_free()
API: gst_parse_context_get_missing_elements()
2008-05-24 15:33:53 +00:00
|
|
|
GstParseContext * context,
|
|
|
|
GstParseFlags flags,
|
|
|
|
GError ** err);
|
2006-02-02 09:51:18 +00:00
|
|
|
|
2009-03-13 09:56:54 +00:00
|
|
|
GstClockTime gst_util_get_timestamp (void);
|
2007-12-11 20:23:58 +00:00
|
|
|
|
2009-03-02 15:17:45 +00:00
|
|
|
/**
|
|
|
|
* GstSearchMode:
|
|
|
|
* @GST_SEARCH_MODE_EXACT : Only search for exact matches.
|
|
|
|
* @GST_SEARCH_MODE_BEFORE: Search for an exact match or the element just before.
|
|
|
|
* @GST_SEARCH_MODE_AFTER : Search for an exact match or the element just after.
|
|
|
|
*
|
|
|
|
* The different search modes.
|
|
|
|
*
|
|
|
|
* Since: 0.10.23
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_SEARCH_MODE_EXACT = 0,
|
|
|
|
GST_SEARCH_MODE_BEFORE,
|
|
|
|
GST_SEARCH_MODE_AFTER
|
|
|
|
} GstSearchMode;
|
|
|
|
|
2009-03-13 09:56:54 +00:00
|
|
|
gpointer gst_util_array_binary_search (gpointer array, guint num_elements,
|
|
|
|
gsize element_size, GCompareDataFunc search_func,
|
|
|
|
GstSearchMode mode, gconstpointer search_data,
|
|
|
|
gpointer user_data);
|
2009-03-02 15:17:45 +00:00
|
|
|
|
2002-07-08 19:07:30 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
#endif /* __GST_UTILS_H__ */
|