gst-gmyth/decodebin2/gstplay-marshal.c
author melunko
Fri Aug 03 21:42:55 2007 +0100 (2007-08-03)
branchtrunk
changeset 794 02ba1859ddc0
permissions -rw-r--r--
[svn r800] Fixed the gmencoder.py get_all_log print that were writing PROGRESS twice
     1 #include "gstplay-marshal.h"
     2 
     3 #include	<glib-object.h>
     4 
     5 
     6 #ifdef G_ENABLE_DEBUG
     7 #define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
     8 #define g_marshal_value_peek_char(v)     g_value_get_char (v)
     9 #define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
    10 #define g_marshal_value_peek_int(v)      g_value_get_int (v)
    11 #define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
    12 #define g_marshal_value_peek_long(v)     g_value_get_long (v)
    13 #define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
    14 #define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
    15 #define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
    16 #define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
    17 #define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
    18 #define g_marshal_value_peek_float(v)    g_value_get_float (v)
    19 #define g_marshal_value_peek_double(v)   g_value_get_double (v)
    20 #define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
    21 #define g_marshal_value_peek_param(v)    g_value_get_param (v)
    22 #define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
    23 #define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
    24 #define g_marshal_value_peek_object(v)   g_value_get_object (v)
    25 #else /* !G_ENABLE_DEBUG */
    26 /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
    27  *          Do not access GValues directly in your code. Instead, use the
    28  *          g_value_get_*() functions
    29  */
    30 #define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
    31 #define g_marshal_value_peek_char(v)     (v)->data[0].v_int
    32 #define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
    33 #define g_marshal_value_peek_int(v)      (v)->data[0].v_int
    34 #define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
    35 #define g_marshal_value_peek_long(v)     (v)->data[0].v_long
    36 #define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
    37 #define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
    38 #define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
    39 #define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
    40 #define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
    41 #define g_marshal_value_peek_float(v)    (v)->data[0].v_float
    42 #define g_marshal_value_peek_double(v)   (v)->data[0].v_double
    43 #define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
    44 #define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
    45 #define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
    46 #define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
    47 #define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
    48 #endif /* !G_ENABLE_DEBUG */
    49 
    50 
    51 /* BOOLEAN:OBJECT (gstplay-marshal.list:1) */
    52 void
    53 gst_play_marshal_BOOLEAN__OBJECT (GClosure     *closure,
    54                                   GValue       *return_value,
    55                                   guint         n_param_values,
    56                                   const GValue *param_values,
    57                                   gpointer      invocation_hint,
    58                                   gpointer      marshal_data)
    59 {
    60   typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT) (gpointer     data1,
    61                                                     gpointer     arg_1,
    62                                                     gpointer     data2);
    63   register GMarshalFunc_BOOLEAN__OBJECT callback;
    64   register GCClosure *cc = (GCClosure*) closure;
    65   register gpointer data1, data2;
    66   gboolean v_return;
    67 
    68   g_return_if_fail (return_value != NULL);
    69   g_return_if_fail (n_param_values == 2);
    70 
    71   if (G_CCLOSURE_SWAP_DATA (closure))
    72     {
    73       data1 = closure->data;
    74       data2 = g_value_peek_pointer (param_values + 0);
    75     }
    76   else
    77     {
    78       data1 = g_value_peek_pointer (param_values + 0);
    79       data2 = closure->data;
    80     }
    81   callback = (GMarshalFunc_BOOLEAN__OBJECT) (marshal_data ? marshal_data : cc->callback);
    82 
    83   v_return = callback (data1,
    84                        g_marshal_value_peek_object (param_values + 1),
    85                        data2);
    86 
    87   g_value_set_boolean (return_value, v_return);
    88 }
    89 
    90 /* VOID:OBJECT,BOOLEAN (gstplay-marshal.list:2) */
    91 void
    92 gst_play_marshal_VOID__OBJECT_BOOLEAN (GClosure     *closure,
    93                                        GValue       *return_value,
    94                                        guint         n_param_values,
    95                                        const GValue *param_values,
    96                                        gpointer      invocation_hint,
    97                                        gpointer      marshal_data)
    98 {
    99   typedef void (*GMarshalFunc_VOID__OBJECT_BOOLEAN) (gpointer     data1,
   100                                                      gpointer     arg_1,
   101                                                      gboolean     arg_2,
   102                                                      gpointer     data2);
   103   register GMarshalFunc_VOID__OBJECT_BOOLEAN callback;
   104   register GCClosure *cc = (GCClosure*) closure;
   105   register gpointer data1, data2;
   106 
   107   g_return_if_fail (n_param_values == 3);
   108 
   109   if (G_CCLOSURE_SWAP_DATA (closure))
   110     {
   111       data1 = closure->data;
   112       data2 = g_value_peek_pointer (param_values + 0);
   113     }
   114   else
   115     {
   116       data1 = g_value_peek_pointer (param_values + 0);
   117       data2 = closure->data;
   118     }
   119   callback = (GMarshalFunc_VOID__OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
   120 
   121   callback (data1,
   122             g_marshal_value_peek_object (param_values + 1),
   123             g_marshal_value_peek_boolean (param_values + 2),
   124             data2);
   125 }
   126 
   127 /* BOOLEAN:OBJECT,POINTER (gstplay-marshal.list:3) */
   128 void
   129 gst_play_marshal_BOOLEAN__OBJECT_POINTER (GClosure     *closure,
   130                                           GValue       *return_value,
   131                                           guint         n_param_values,
   132                                           const GValue *param_values,
   133                                           gpointer      invocation_hint,
   134                                           gpointer      marshal_data)
   135 {
   136   typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT_POINTER) (gpointer     data1,
   137                                                             gpointer     arg_1,
   138                                                             gpointer     arg_2,
   139                                                             gpointer     data2);
   140   register GMarshalFunc_BOOLEAN__OBJECT_POINTER callback;
   141   register GCClosure *cc = (GCClosure*) closure;
   142   register gpointer data1, data2;
   143   gboolean v_return;
   144 
   145   g_return_if_fail (return_value != NULL);
   146   g_return_if_fail (n_param_values == 3);
   147 
   148   if (G_CCLOSURE_SWAP_DATA (closure))
   149     {
   150       data1 = closure->data;
   151       data2 = g_value_peek_pointer (param_values + 0);
   152     }
   153   else
   154     {
   155       data1 = g_value_peek_pointer (param_values + 0);
   156       data2 = closure->data;
   157     }
   158   callback = (GMarshalFunc_BOOLEAN__OBJECT_POINTER) (marshal_data ? marshal_data : cc->callback);
   159 
   160   v_return = callback (data1,
   161                        g_marshal_value_peek_object (param_values + 1),
   162                        g_marshal_value_peek_pointer (param_values + 2),
   163                        data2);
   164 
   165   g_value_set_boolean (return_value, v_return);
   166 }
   167