Pass buffer in handoff signal

Original commit message from CVS:
Pass buffer in handoff signal
This commit is contained in:
David I. Lehn 2001-05-10 20:28:51 +00:00
parent 9eaced94af
commit c447ea71a4
5 changed files with 18 additions and 16 deletions

View file

@ -97,7 +97,8 @@ gst_fakesink_class_init (GstFakeSinkClass *klass)
gst_fakesink_signals[SIGNAL_HANDOFF] =
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
GTK_SIGNAL_OFFSET (GstFakeSinkClass, handoff),
gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0);
gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1,
GTK_TYPE_POINTER);
gtk_object_class_add_signals (gtkobject_class, gst_fakesink_signals,
LAST_SIGNAL);
@ -194,9 +195,8 @@ gst_fakesink_chain (GstPad *pad, GstBuffer *buf)
if (!fakesink->silent)
g_print("fakesink: ******* (%s:%s)< (%d bytes) \n",GST_DEBUG_PAD_NAME(pad),GST_BUFFER_SIZE(buf));
gst_buffer_unref (buf);
gtk_signal_emit (GTK_OBJECT (fakesink), gst_fakesink_signals[SIGNAL_HANDOFF],
fakesink);
buf);
gst_buffer_unref (buf);
}

View file

@ -134,7 +134,8 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass)
gst_fakesrc_signals[SIGNAL_HANDOFF] =
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
GTK_SIGNAL_OFFSET (GstFakeSrcClass, handoff),
gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0);
gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1,
GTK_TYPE_POINTER);
gtk_object_class_add_signals (gtkobject_class, gst_fakesrc_signals,
LAST_SIGNAL);
@ -299,7 +300,7 @@ gst_fakesrc_get(GstPad *pad)
buf = gst_buffer_new();
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
src);
buf);
return buf;
}
@ -343,7 +344,7 @@ gst_fakesrc_loop(GstElement *element)
g_print("fakesrc: ******* (%s:%s)> \n",GST_DEBUG_PAD_NAME(pad));
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
src);
buf);
gst_pad_push (pad, buf);
pads = g_slist_next (pads);

View file

@ -97,7 +97,8 @@ gst_fakesink_class_init (GstFakeSinkClass *klass)
gst_fakesink_signals[SIGNAL_HANDOFF] =
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
GTK_SIGNAL_OFFSET (GstFakeSinkClass, handoff),
gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0);
gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1,
GTK_TYPE_POINTER);
gtk_object_class_add_signals (gtkobject_class, gst_fakesink_signals,
LAST_SIGNAL);
@ -194,9 +195,8 @@ gst_fakesink_chain (GstPad *pad, GstBuffer *buf)
if (!fakesink->silent)
g_print("fakesink: ******* (%s:%s)< (%d bytes) \n",GST_DEBUG_PAD_NAME(pad),GST_BUFFER_SIZE(buf));
gst_buffer_unref (buf);
gtk_signal_emit (GTK_OBJECT (fakesink), gst_fakesink_signals[SIGNAL_HANDOFF],
fakesink);
buf);
gst_buffer_unref (buf);
}

View file

@ -134,7 +134,8 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass)
gst_fakesrc_signals[SIGNAL_HANDOFF] =
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
GTK_SIGNAL_OFFSET (GstFakeSrcClass, handoff),
gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0);
gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1,
GTK_TYPE_POINTER);
gtk_object_class_add_signals (gtkobject_class, gst_fakesrc_signals,
LAST_SIGNAL);
@ -299,7 +300,7 @@ gst_fakesrc_get(GstPad *pad)
buf = gst_buffer_new();
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
src);
buf);
return buf;
}
@ -343,7 +344,7 @@ gst_fakesrc_loop(GstElement *element)
g_print("fakesrc: ******* (%s:%s)> \n",GST_DEBUG_PAD_NAME(pad));
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
src);
buf);
gst_pad_push (pad, buf);
pads = g_slist_next (pads);

View file

@ -5,7 +5,7 @@
static guint outcount, incount;
static void
buffer_handoff_sink (GstElement *src, GstElement *bin)
buffer_handoff_sink (GstElement *src, GstBuffer *buf, GstElement *bin)
{
g_print ("\n\n *** buffer arrived in sink ***\n\n");
gst_element_set_state(bin, GST_STATE_NULL);
@ -14,7 +14,7 @@ buffer_handoff_sink (GstElement *src, GstElement *bin)
}
static void
buffer_handoff_src (GstElement *src, GstElement *bin)
buffer_handoff_src (GstElement *src, GstBuffer *buf, GstElement *bin)
{
g_print ("\n\n *** buffer started in src ***\n\n");
incount++;