mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
Pass buffer in handoff signal
Original commit message from CVS: Pass buffer in handoff signal
This commit is contained in:
parent
9eaced94af
commit
c447ea71a4
5 changed files with 18 additions and 16 deletions
|
@ -97,7 +97,8 @@ gst_fakesink_class_init (GstFakeSinkClass *klass)
|
||||||
gst_fakesink_signals[SIGNAL_HANDOFF] =
|
gst_fakesink_signals[SIGNAL_HANDOFF] =
|
||||||
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GstFakeSinkClass, handoff),
|
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,
|
gtk_object_class_add_signals (gtkobject_class, gst_fakesink_signals,
|
||||||
LAST_SIGNAL);
|
LAST_SIGNAL);
|
||||||
|
@ -194,9 +195,8 @@ gst_fakesink_chain (GstPad *pad, GstBuffer *buf)
|
||||||
if (!fakesink->silent)
|
if (!fakesink->silent)
|
||||||
g_print("fakesink: ******* (%s:%s)< (%d bytes) \n",GST_DEBUG_PAD_NAME(pad),GST_BUFFER_SIZE(buf));
|
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],
|
gtk_signal_emit (GTK_OBJECT (fakesink), gst_fakesink_signals[SIGNAL_HANDOFF],
|
||||||
fakesink);
|
buf);
|
||||||
|
|
||||||
|
gst_buffer_unref (buf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,8 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass)
|
||||||
gst_fakesrc_signals[SIGNAL_HANDOFF] =
|
gst_fakesrc_signals[SIGNAL_HANDOFF] =
|
||||||
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GstFakeSrcClass, handoff),
|
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,
|
gtk_object_class_add_signals (gtkobject_class, gst_fakesrc_signals,
|
||||||
LAST_SIGNAL);
|
LAST_SIGNAL);
|
||||||
|
@ -299,7 +300,7 @@ gst_fakesrc_get(GstPad *pad)
|
||||||
buf = gst_buffer_new();
|
buf = gst_buffer_new();
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
|
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
|
||||||
src);
|
buf);
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
@ -343,7 +344,7 @@ gst_fakesrc_loop(GstElement *element)
|
||||||
g_print("fakesrc: ******* (%s:%s)> \n",GST_DEBUG_PAD_NAME(pad));
|
g_print("fakesrc: ******* (%s:%s)> \n",GST_DEBUG_PAD_NAME(pad));
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
|
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
|
||||||
src);
|
buf);
|
||||||
gst_pad_push (pad, buf);
|
gst_pad_push (pad, buf);
|
||||||
|
|
||||||
pads = g_slist_next (pads);
|
pads = g_slist_next (pads);
|
||||||
|
|
|
@ -97,7 +97,8 @@ gst_fakesink_class_init (GstFakeSinkClass *klass)
|
||||||
gst_fakesink_signals[SIGNAL_HANDOFF] =
|
gst_fakesink_signals[SIGNAL_HANDOFF] =
|
||||||
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GstFakeSinkClass, handoff),
|
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,
|
gtk_object_class_add_signals (gtkobject_class, gst_fakesink_signals,
|
||||||
LAST_SIGNAL);
|
LAST_SIGNAL);
|
||||||
|
@ -194,9 +195,8 @@ gst_fakesink_chain (GstPad *pad, GstBuffer *buf)
|
||||||
if (!fakesink->silent)
|
if (!fakesink->silent)
|
||||||
g_print("fakesink: ******* (%s:%s)< (%d bytes) \n",GST_DEBUG_PAD_NAME(pad),GST_BUFFER_SIZE(buf));
|
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],
|
gtk_signal_emit (GTK_OBJECT (fakesink), gst_fakesink_signals[SIGNAL_HANDOFF],
|
||||||
fakesink);
|
buf);
|
||||||
|
|
||||||
|
gst_buffer_unref (buf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,8 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass)
|
||||||
gst_fakesrc_signals[SIGNAL_HANDOFF] =
|
gst_fakesrc_signals[SIGNAL_HANDOFF] =
|
||||||
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GstFakeSrcClass, handoff),
|
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,
|
gtk_object_class_add_signals (gtkobject_class, gst_fakesrc_signals,
|
||||||
LAST_SIGNAL);
|
LAST_SIGNAL);
|
||||||
|
@ -299,7 +300,7 @@ gst_fakesrc_get(GstPad *pad)
|
||||||
buf = gst_buffer_new();
|
buf = gst_buffer_new();
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
|
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
|
||||||
src);
|
buf);
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
@ -343,7 +344,7 @@ gst_fakesrc_loop(GstElement *element)
|
||||||
g_print("fakesrc: ******* (%s:%s)> \n",GST_DEBUG_PAD_NAME(pad));
|
g_print("fakesrc: ******* (%s:%s)> \n",GST_DEBUG_PAD_NAME(pad));
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
|
gtk_signal_emit (GTK_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF],
|
||||||
src);
|
buf);
|
||||||
gst_pad_push (pad, buf);
|
gst_pad_push (pad, buf);
|
||||||
|
|
||||||
pads = g_slist_next (pads);
|
pads = g_slist_next (pads);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
static guint outcount, incount;
|
static guint outcount, incount;
|
||||||
|
|
||||||
static void
|
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");
|
g_print ("\n\n *** buffer arrived in sink ***\n\n");
|
||||||
gst_element_set_state(bin, GST_STATE_NULL);
|
gst_element_set_state(bin, GST_STATE_NULL);
|
||||||
|
@ -14,7 +14,7 @@ buffer_handoff_sink (GstElement *src, GstElement *bin)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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");
|
g_print ("\n\n *** buffer started in src ***\n\n");
|
||||||
incount++;
|
incount++;
|
||||||
|
|
Loading…
Reference in a new issue