fakesrc: remove custom marshaller

Remove our custom marshaller.
Make the buffer in the handoff signal static_scope so that it is actually
writable.
This commit is contained in:
Wim Taymans 2012-02-07 10:44:07 +01:00
parent a46f0862cd
commit dcde2c2c1a

View file

@ -226,34 +226,6 @@ static guint gst_fake_src_signals[LAST_SIGNAL] = { 0 };
static GParamSpec *pspec_last_message = NULL; static GParamSpec *pspec_last_message = NULL;
static void
marshal_VOID__MINIOBJECT_OBJECT (GClosure * closure, GValue * return_value,
guint n_param_values, const GValue * param_values, gpointer invocation_hint,
gpointer marshal_data)
{
typedef void (*marshalfunc_VOID__MINIOBJECT_OBJECT) (gpointer obj,
gpointer arg1, gpointer arg2, gpointer data2);
register marshalfunc_VOID__MINIOBJECT_OBJECT callback;
register GCClosure *cc = (GCClosure *) closure;
register gpointer data1, data2;
g_return_if_fail (n_param_values == 3);
if (G_CCLOSURE_SWAP_DATA (closure)) {
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
} else {
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback =
(marshalfunc_VOID__MINIOBJECT_OBJECT) (marshal_data ? marshal_data :
cc->callback);
callback (data1, g_value_get_boxed (param_values + 1),
g_value_get_object (param_values + 2), data2);
}
static void static void
gst_fake_src_class_init (GstFakeSrcClass * klass) gst_fake_src_class_init (GstFakeSrcClass * klass)
{ {
@ -363,8 +335,8 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
gst_fake_src_signals[SIGNAL_HANDOFF] = gst_fake_src_signals[SIGNAL_HANDOFF] =
g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstFakeSrcClass, handoff), NULL, NULL, G_STRUCT_OFFSET (GstFakeSrcClass, handoff), NULL, NULL,
marshal_VOID__MINIOBJECT_OBJECT, G_TYPE_NONE, 2, GST_TYPE_BUFFER, gst_marshal_VOID__BOXED_OBJECT, G_TYPE_NONE, 2,
GST_TYPE_PAD); GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE, GST_TYPE_PAD);
gst_element_class_set_details_simple (gstelement_class, gst_element_class_set_details_simple (gstelement_class,
"Fake Source", "Fake Source",