gst-gmyth/decodebin2/gstplay-marshal.c
branchtrunk
changeset 810 fcf0bc36025a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gst-gmyth/decodebin2/gstplay-marshal.c	Fri Aug 17 19:28:10 2007 +0100
     1.3 @@ -0,0 +1,167 @@
     1.4 +#include "gstplay-marshal.h"
     1.5 +
     1.6 +#include	<glib-object.h>
     1.7 +
     1.8 +
     1.9 +#ifdef G_ENABLE_DEBUG
    1.10 +#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
    1.11 +#define g_marshal_value_peek_char(v)     g_value_get_char (v)
    1.12 +#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
    1.13 +#define g_marshal_value_peek_int(v)      g_value_get_int (v)
    1.14 +#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
    1.15 +#define g_marshal_value_peek_long(v)     g_value_get_long (v)
    1.16 +#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
    1.17 +#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
    1.18 +#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
    1.19 +#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
    1.20 +#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
    1.21 +#define g_marshal_value_peek_float(v)    g_value_get_float (v)
    1.22 +#define g_marshal_value_peek_double(v)   g_value_get_double (v)
    1.23 +#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
    1.24 +#define g_marshal_value_peek_param(v)    g_value_get_param (v)
    1.25 +#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
    1.26 +#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
    1.27 +#define g_marshal_value_peek_object(v)   g_value_get_object (v)
    1.28 +#else /* !G_ENABLE_DEBUG */
    1.29 +/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
    1.30 + *          Do not access GValues directly in your code. Instead, use the
    1.31 + *          g_value_get_*() functions
    1.32 + */
    1.33 +#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
    1.34 +#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
    1.35 +#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
    1.36 +#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
    1.37 +#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
    1.38 +#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
    1.39 +#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
    1.40 +#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
    1.41 +#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
    1.42 +#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
    1.43 +#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
    1.44 +#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
    1.45 +#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
    1.46 +#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
    1.47 +#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
    1.48 +#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
    1.49 +#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
    1.50 +#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
    1.51 +#endif /* !G_ENABLE_DEBUG */
    1.52 +
    1.53 +
    1.54 +/* BOOLEAN:OBJECT (gstplay-marshal.list:1) */
    1.55 +void
    1.56 +gst_play_marshal_BOOLEAN__OBJECT (GClosure     *closure,
    1.57 +                                  GValue       *return_value,
    1.58 +                                  guint         n_param_values,
    1.59 +                                  const GValue *param_values,
    1.60 +                                  gpointer      invocation_hint,
    1.61 +                                  gpointer      marshal_data)
    1.62 +{
    1.63 +  typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT) (gpointer     data1,
    1.64 +                                                    gpointer     arg_1,
    1.65 +                                                    gpointer     data2);
    1.66 +  register GMarshalFunc_BOOLEAN__OBJECT callback;
    1.67 +  register GCClosure *cc = (GCClosure*) closure;
    1.68 +  register gpointer data1, data2;
    1.69 +  gboolean v_return;
    1.70 +
    1.71 +  g_return_if_fail (return_value != NULL);
    1.72 +  g_return_if_fail (n_param_values == 2);
    1.73 +
    1.74 +  if (G_CCLOSURE_SWAP_DATA (closure))
    1.75 +    {
    1.76 +      data1 = closure->data;
    1.77 +      data2 = g_value_peek_pointer (param_values + 0);
    1.78 +    }
    1.79 +  else
    1.80 +    {
    1.81 +      data1 = g_value_peek_pointer (param_values + 0);
    1.82 +      data2 = closure->data;
    1.83 +    }
    1.84 +  callback = (GMarshalFunc_BOOLEAN__OBJECT) (marshal_data ? marshal_data : cc->callback);
    1.85 +
    1.86 +  v_return = callback (data1,
    1.87 +                       g_marshal_value_peek_object (param_values + 1),
    1.88 +                       data2);
    1.89 +
    1.90 +  g_value_set_boolean (return_value, v_return);
    1.91 +}
    1.92 +
    1.93 +/* VOID:OBJECT,BOOLEAN (gstplay-marshal.list:2) */
    1.94 +void
    1.95 +gst_play_marshal_VOID__OBJECT_BOOLEAN (GClosure     *closure,
    1.96 +                                       GValue       *return_value,
    1.97 +                                       guint         n_param_values,
    1.98 +                                       const GValue *param_values,
    1.99 +                                       gpointer      invocation_hint,
   1.100 +                                       gpointer      marshal_data)
   1.101 +{
   1.102 +  typedef void (*GMarshalFunc_VOID__OBJECT_BOOLEAN) (gpointer     data1,
   1.103 +                                                     gpointer     arg_1,
   1.104 +                                                     gboolean     arg_2,
   1.105 +                                                     gpointer     data2);
   1.106 +  register GMarshalFunc_VOID__OBJECT_BOOLEAN callback;
   1.107 +  register GCClosure *cc = (GCClosure*) closure;
   1.108 +  register gpointer data1, data2;
   1.109 +
   1.110 +  g_return_if_fail (n_param_values == 3);
   1.111 +
   1.112 +  if (G_CCLOSURE_SWAP_DATA (closure))
   1.113 +    {
   1.114 +      data1 = closure->data;
   1.115 +      data2 = g_value_peek_pointer (param_values + 0);
   1.116 +    }
   1.117 +  else
   1.118 +    {
   1.119 +      data1 = g_value_peek_pointer (param_values + 0);
   1.120 +      data2 = closure->data;
   1.121 +    }
   1.122 +  callback = (GMarshalFunc_VOID__OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
   1.123 +
   1.124 +  callback (data1,
   1.125 +            g_marshal_value_peek_object (param_values + 1),
   1.126 +            g_marshal_value_peek_boolean (param_values + 2),
   1.127 +            data2);
   1.128 +}
   1.129 +
   1.130 +/* BOOLEAN:OBJECT,POINTER (gstplay-marshal.list:3) */
   1.131 +void
   1.132 +gst_play_marshal_BOOLEAN__OBJECT_POINTER (GClosure     *closure,
   1.133 +                                          GValue       *return_value,
   1.134 +                                          guint         n_param_values,
   1.135 +                                          const GValue *param_values,
   1.136 +                                          gpointer      invocation_hint,
   1.137 +                                          gpointer      marshal_data)
   1.138 +{
   1.139 +  typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT_POINTER) (gpointer     data1,
   1.140 +                                                            gpointer     arg_1,
   1.141 +                                                            gpointer     arg_2,
   1.142 +                                                            gpointer     data2);
   1.143 +  register GMarshalFunc_BOOLEAN__OBJECT_POINTER callback;
   1.144 +  register GCClosure *cc = (GCClosure*) closure;
   1.145 +  register gpointer data1, data2;
   1.146 +  gboolean v_return;
   1.147 +
   1.148 +  g_return_if_fail (return_value != NULL);
   1.149 +  g_return_if_fail (n_param_values == 3);
   1.150 +
   1.151 +  if (G_CCLOSURE_SWAP_DATA (closure))
   1.152 +    {
   1.153 +      data1 = closure->data;
   1.154 +      data2 = g_value_peek_pointer (param_values + 0);
   1.155 +    }
   1.156 +  else
   1.157 +    {
   1.158 +      data1 = g_value_peek_pointer (param_values + 0);
   1.159 +      data2 = closure->data;
   1.160 +    }
   1.161 +  callback = (GMarshalFunc_BOOLEAN__OBJECT_POINTER) (marshal_data ? marshal_data : cc->callback);
   1.162 +
   1.163 +  v_return = callback (data1,
   1.164 +                       g_marshal_value_peek_object (param_values + 1),
   1.165 +                       g_marshal_value_peek_pointer (param_values + 2),
   1.166 +                       data2);
   1.167 +
   1.168 +  g_value_set_boolean (return_value, v_return);
   1.169 +}
   1.170 +