From: Wim Taymans Date: Wed, 11 Jul 2001 19:22:20 +0000 (+0000) Subject: Some cleanups in output of various test plugins. X-Git-Tag: BRANCH-EVENTS1-ROOT~128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=abf2bfc2732843cb39a0e35ae54f07826d213613;p=platform%2Fupstream%2Fgstreamer.git Some cleanups in output of various test plugins. Original commit message from CVS: Some cleanups in output of various test plugins. Added debug output to tee. Added buffer duplication to identity. --- diff --git a/gst/elements/gstfakesink.c b/gst/elements/gstfakesink.c index fb9a158..3ebc8f4 100644 --- a/gst/elements/gstfakesink.c +++ b/gst/elements/gstfakesink.c @@ -220,7 +220,7 @@ gst_fakesink_chain (GstPad *pad, GstBuffer *buf) fakesink = GST_FAKESINK (gst_pad_get_parent (pad)); if (!fakesink->silent) - g_print("fakesink: chain ******* (%s:%s)< (%d bytes, %llu) \n", + g_print("fakesink: chain ******* (%s:%s)< (%d bytes, %llu) \n", GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); g_signal_emit (G_OBJECT (fakesink), gst_fakesink_signals[SIGNAL_HANDOFF], 0, diff --git a/gst/elements/gstfakesrc.c b/gst/elements/gstfakesrc.c index 2eadef9..869a06c 100644 --- a/gst/elements/gstfakesrc.c +++ b/gst/elements/gstfakesrc.c @@ -133,7 +133,7 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass) 1, G_MAXINT, 1, G_PARAM_READABLE)); g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LOOP_BASED, g_param_spec_boolean("loop_based","loop_based","loop_based", - TRUE,G_PARAM_READWRITE)); // CHECKME + FALSE, G_PARAM_READWRITE)); // CHECKME g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_OUTPUT, g_param_spec_enum("output","output","output", GST_TYPE_FAKESRC_OUTPUT,FAKESRC_FIRST_LAST_LOOP,G_PARAM_READWRITE)); // CHECKME! @@ -175,7 +175,7 @@ gst_fakesrc_init (GstFakeSrc *fakesrc) gst_element_add_pad (GST_ELEMENT (fakesrc), pad); fakesrc->srcpads = g_slist_append (NULL, pad); - fakesrc->loop_based = TRUE; + fakesrc->loop_based = FALSE; if (fakesrc->loop_based) gst_element_set_loop_function (GST_ELEMENT (fakesrc), GST_DEBUG_FUNCPTR (gst_fakesrc_loop)); @@ -347,7 +347,7 @@ gst_fakesrc_get(GstPad *pad) GST_BUFFER_TIMESTAMP (buf) = src->buffer_count++; if (!src->silent) - g_print("fakesrc: get ******* (%s:%s)> (%d bytes, %llu) \n", + g_print("fakesrc: get ******* (%s:%s)> (%d bytes, %llu) \n", GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); g_signal_emit (G_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF], 0, @@ -400,7 +400,7 @@ gst_fakesrc_loop(GstElement *element) GST_BUFFER_TIMESTAMP (buf) = src->buffer_count++; if (!src->silent) - g_print("fakesrc: loop ******* (%s:%s) > (%d bytes, %llu) \n", + g_print("fakesrc: loop ******* (%s:%s) > (%d bytes, %llu) \n", GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); g_signal_emit (G_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF], 0, diff --git a/gst/elements/gstidentity.c b/gst/elements/gstidentity.c index 9b7fb71..0ba7634 100644 --- a/gst/elements/gstidentity.c +++ b/gst/elements/gstidentity.c @@ -45,6 +45,7 @@ enum { ARG_0, ARG_LOOP_BASED, ARG_SLEEP_TIME, + ARG_DUPLICATE, ARG_SILENT, }; @@ -90,15 +91,18 @@ gst_identity_class_init (GstIdentityClass *klass) parent_class = g_type_class_ref (GST_TYPE_ELEMENT); - g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LOOP_BASED, - g_param_spec_boolean("loop_based","loop_based","loop_based", - TRUE,G_PARAM_READWRITE)); // CHECKME - g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SLEEP_TIME, - g_param_spec_uint("sleep_time","sleep_time","sleep_time", - 0,G_MAXUINT,0,G_PARAM_READWRITE)); // CHECKME - g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SILENT, - g_param_spec_boolean("silent","silent","silent", - TRUE,G_PARAM_READWRITE)); // CHECKME + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOOP_BASED, + g_param_spec_boolean ("loop_based", "loop_based", "loop_based", + TRUE, G_PARAM_READWRITE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SLEEP_TIME, + g_param_spec_uint ("sleep_time", "sleep_time", "sleep_time", + 0, G_MAXUINT, 0, G_PARAM_READWRITE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DUPLICATE, + g_param_spec_uint ("duplicate", "duplicate", "duplicate", + 0, G_MAXUINT, 1, G_PARAM_READWRITE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SILENT, + g_param_spec_boolean ("silent", "silent", "silent", + TRUE,G_PARAM_READWRITE)); gst_identity_signals[SIGNAL_HANDOFF] = g_signal_newc ("handoff", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, @@ -155,6 +159,7 @@ gst_identity_init (GstIdentity *identity) identity->loop_based = FALSE; identity->sleep_time = 0; + identity->duplicate = 1; identity->silent = FALSE; } @@ -162,6 +167,7 @@ static void gst_identity_chain (GstPad *pad, GstBuffer *buf) { GstIdentity *identity; + guint i; g_return_if_fail (pad != NULL); g_return_if_fail (GST_IS_PAD (pad)); @@ -169,17 +175,22 @@ gst_identity_chain (GstPad *pad, GstBuffer *buf) identity = GST_IDENTITY (gst_pad_get_parent (pad)); - if (!identity->silent) - g_print("identity: chain ******* (%s:%s)i (%d bytes, %llu) \n", + for (i=identity->duplicate; i; i--) { + if (!identity->silent) + g_print("identity: chain ******* (%s:%s)i (%d bytes, %llu) \n", GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); - g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0, + g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0, buf); - gst_pad_push (identity->srcpad, buf); + if (i>1) + gst_buffer_ref (buf); + + gst_pad_push (identity->srcpad, buf); - if (identity->sleep_time) - usleep (identity->sleep_time); + if (identity->sleep_time) + usleep (identity->sleep_time); + } } static void @@ -187,6 +198,7 @@ gst_identity_loop (GstElement *element) { GstIdentity *identity; GstBuffer *buf; + guint i; g_return_if_fail (element != NULL); g_return_if_fail (GST_IS_IDENTITY (element)); @@ -195,17 +207,23 @@ gst_identity_loop (GstElement *element) do { buf = gst_pad_pull (identity->sinkpad); - if (!identity->silent) - g_print("identity: loop ******* (%s:%s)i (%d bytes, %llu) \n", + + for (i=identity->duplicate; i; i--) { + if (!identity->silent) + g_print("identity: loop ******* (%s:%s)i (%d bytes, %llu) \n", GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); - g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0, + g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0, buf); - gst_pad_push (identity->srcpad, buf); + if (i>1) + gst_buffer_ref (buf); - if (identity->sleep_time) - usleep (identity->sleep_time); + gst_pad_push (identity->srcpad, buf); + + if (identity->sleep_time) + usleep (identity->sleep_time); + } } while (!GST_ELEMENT_IS_COTHREAD_STOPPING(element)); } @@ -238,6 +256,9 @@ gst_identity_set_property (GObject *object, guint prop_id, const GValue *value, case ARG_SILENT: identity->silent = g_value_get_boolean (value); break; + case ARG_DUPLICATE: + identity->duplicate = g_value_get_uint (value); + break; default: break; } @@ -258,6 +279,9 @@ static void gst_identity_get_property(GObject *object, guint prop_id, GValue *va case ARG_SLEEP_TIME: g_value_set_uint (value, identity->sleep_time); break; + case ARG_DUPLICATE: + g_value_set_uint (value, identity->duplicate); + break; case ARG_SILENT: g_value_set_boolean (value, identity->silent); break; diff --git a/gst/elements/gstidentity.h b/gst/elements/gstidentity.h index 032196c..86e56dd 100644 --- a/gst/elements/gstidentity.h +++ b/gst/elements/gstidentity.h @@ -58,7 +58,7 @@ struct _GstIdentity { GstPad *srcpad; gboolean loop_based; - + guint duplicate; guint sleep_time; gboolean silent; }; diff --git a/gst/elements/gsttee.c b/gst/elements/gsttee.c index 1c12cf2..7dbb02a 100644 --- a/gst/elements/gsttee.c +++ b/gst/elements/gsttee.c @@ -41,6 +41,7 @@ enum { enum { ARG_0, + ARG_SILENT, ARG_NUM_PADS, /* FILL ME */ }; @@ -101,6 +102,11 @@ gst_tee_class_init (GstTeeClass *klass) g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_PADS, g_param_spec_int ("num_pads", "num_pads", "num_pads", 0, G_MAXINT, 0, G_PARAM_READABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SILENT, + g_param_spec_boolean ("silent", "silent", "silent", + FALSE, G_PARAM_READWRITE)); + + gobject_class->set_property = GST_DEBUG_FUNCPTR(gst_tee_set_property); gobject_class->get_property = GST_DEBUG_FUNCPTR(gst_tee_get_property); @@ -117,6 +123,7 @@ gst_tee_init (GstTee *tee) tee->numsrcpads = 0; tee->srcpads = NULL; + tee->silent = FALSE; } static GstPad* @@ -157,9 +164,9 @@ gst_tee_set_property (GObject *object, guint prop_id, const GValue *value, GPara tee = GST_TEE (object); switch (prop_id) { -// case ARG_NUM_PADS: -// g_value_set_int (value, tee->numsrcpads); -// break; + case ARG_SILENT: + tee->silent = g_value_get_boolean (value); + break; default: break; } @@ -179,6 +186,9 @@ gst_tee_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec case ARG_NUM_PADS: g_value_set_int (value, tee->numsrcpads); break; + case ARG_SILENT: + g_value_set_boolean (value, tee->silent); + break; default: break; } @@ -210,8 +220,14 @@ gst_tee_chain (GstPad *pad, GstBuffer *buf) srcpads = tee->srcpads; while (srcpads) { - gst_pad_push (GST_PAD (srcpads->data), buf); + GstPad *outpad = GST_PAD (srcpads->data); srcpads = g_slist_next (srcpads); + + if (!tee->silent) + g_print("tee: chain ******* (%s:%s)t (%d bytes, %llu) \n", + GST_DEBUG_PAD_NAME (outpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); + + gst_pad_push (outpad, buf); } } diff --git a/gst/elements/gsttee.h b/gst/elements/gsttee.h index 7607629..d714ef5 100644 --- a/gst/elements/gsttee.h +++ b/gst/elements/gsttee.h @@ -52,6 +52,7 @@ struct _GstTee { GstPad *sinkpad; + gboolean silent; gint numsrcpads; GSList *srcpads; }; diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c index fb9a158..3ebc8f4 100644 --- a/plugins/elements/gstfakesink.c +++ b/plugins/elements/gstfakesink.c @@ -220,7 +220,7 @@ gst_fakesink_chain (GstPad *pad, GstBuffer *buf) fakesink = GST_FAKESINK (gst_pad_get_parent (pad)); if (!fakesink->silent) - g_print("fakesink: chain ******* (%s:%s)< (%d bytes, %llu) \n", + g_print("fakesink: chain ******* (%s:%s)< (%d bytes, %llu) \n", GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); g_signal_emit (G_OBJECT (fakesink), gst_fakesink_signals[SIGNAL_HANDOFF], 0, diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index 2eadef9..869a06c 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -133,7 +133,7 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass) 1, G_MAXINT, 1, G_PARAM_READABLE)); g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LOOP_BASED, g_param_spec_boolean("loop_based","loop_based","loop_based", - TRUE,G_PARAM_READWRITE)); // CHECKME + FALSE, G_PARAM_READWRITE)); // CHECKME g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_OUTPUT, g_param_spec_enum("output","output","output", GST_TYPE_FAKESRC_OUTPUT,FAKESRC_FIRST_LAST_LOOP,G_PARAM_READWRITE)); // CHECKME! @@ -175,7 +175,7 @@ gst_fakesrc_init (GstFakeSrc *fakesrc) gst_element_add_pad (GST_ELEMENT (fakesrc), pad); fakesrc->srcpads = g_slist_append (NULL, pad); - fakesrc->loop_based = TRUE; + fakesrc->loop_based = FALSE; if (fakesrc->loop_based) gst_element_set_loop_function (GST_ELEMENT (fakesrc), GST_DEBUG_FUNCPTR (gst_fakesrc_loop)); @@ -347,7 +347,7 @@ gst_fakesrc_get(GstPad *pad) GST_BUFFER_TIMESTAMP (buf) = src->buffer_count++; if (!src->silent) - g_print("fakesrc: get ******* (%s:%s)> (%d bytes, %llu) \n", + g_print("fakesrc: get ******* (%s:%s)> (%d bytes, %llu) \n", GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); g_signal_emit (G_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF], 0, @@ -400,7 +400,7 @@ gst_fakesrc_loop(GstElement *element) GST_BUFFER_TIMESTAMP (buf) = src->buffer_count++; if (!src->silent) - g_print("fakesrc: loop ******* (%s:%s) > (%d bytes, %llu) \n", + g_print("fakesrc: loop ******* (%s:%s) > (%d bytes, %llu) \n", GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); g_signal_emit (G_OBJECT (src), gst_fakesrc_signals[SIGNAL_HANDOFF], 0, diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index 9b7fb71..0ba7634 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -45,6 +45,7 @@ enum { ARG_0, ARG_LOOP_BASED, ARG_SLEEP_TIME, + ARG_DUPLICATE, ARG_SILENT, }; @@ -90,15 +91,18 @@ gst_identity_class_init (GstIdentityClass *klass) parent_class = g_type_class_ref (GST_TYPE_ELEMENT); - g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LOOP_BASED, - g_param_spec_boolean("loop_based","loop_based","loop_based", - TRUE,G_PARAM_READWRITE)); // CHECKME - g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SLEEP_TIME, - g_param_spec_uint("sleep_time","sleep_time","sleep_time", - 0,G_MAXUINT,0,G_PARAM_READWRITE)); // CHECKME - g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SILENT, - g_param_spec_boolean("silent","silent","silent", - TRUE,G_PARAM_READWRITE)); // CHECKME + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOOP_BASED, + g_param_spec_boolean ("loop_based", "loop_based", "loop_based", + TRUE, G_PARAM_READWRITE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SLEEP_TIME, + g_param_spec_uint ("sleep_time", "sleep_time", "sleep_time", + 0, G_MAXUINT, 0, G_PARAM_READWRITE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DUPLICATE, + g_param_spec_uint ("duplicate", "duplicate", "duplicate", + 0, G_MAXUINT, 1, G_PARAM_READWRITE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SILENT, + g_param_spec_boolean ("silent", "silent", "silent", + TRUE,G_PARAM_READWRITE)); gst_identity_signals[SIGNAL_HANDOFF] = g_signal_newc ("handoff", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, @@ -155,6 +159,7 @@ gst_identity_init (GstIdentity *identity) identity->loop_based = FALSE; identity->sleep_time = 0; + identity->duplicate = 1; identity->silent = FALSE; } @@ -162,6 +167,7 @@ static void gst_identity_chain (GstPad *pad, GstBuffer *buf) { GstIdentity *identity; + guint i; g_return_if_fail (pad != NULL); g_return_if_fail (GST_IS_PAD (pad)); @@ -169,17 +175,22 @@ gst_identity_chain (GstPad *pad, GstBuffer *buf) identity = GST_IDENTITY (gst_pad_get_parent (pad)); - if (!identity->silent) - g_print("identity: chain ******* (%s:%s)i (%d bytes, %llu) \n", + for (i=identity->duplicate; i; i--) { + if (!identity->silent) + g_print("identity: chain ******* (%s:%s)i (%d bytes, %llu) \n", GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); - g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0, + g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0, buf); - gst_pad_push (identity->srcpad, buf); + if (i>1) + gst_buffer_ref (buf); + + gst_pad_push (identity->srcpad, buf); - if (identity->sleep_time) - usleep (identity->sleep_time); + if (identity->sleep_time) + usleep (identity->sleep_time); + } } static void @@ -187,6 +198,7 @@ gst_identity_loop (GstElement *element) { GstIdentity *identity; GstBuffer *buf; + guint i; g_return_if_fail (element != NULL); g_return_if_fail (GST_IS_IDENTITY (element)); @@ -195,17 +207,23 @@ gst_identity_loop (GstElement *element) do { buf = gst_pad_pull (identity->sinkpad); - if (!identity->silent) - g_print("identity: loop ******* (%s:%s)i (%d bytes, %llu) \n", + + for (i=identity->duplicate; i; i--) { + if (!identity->silent) + g_print("identity: loop ******* (%s:%s)i (%d bytes, %llu) \n", GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); - g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0, + g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0, buf); - gst_pad_push (identity->srcpad, buf); + if (i>1) + gst_buffer_ref (buf); - if (identity->sleep_time) - usleep (identity->sleep_time); + gst_pad_push (identity->srcpad, buf); + + if (identity->sleep_time) + usleep (identity->sleep_time); + } } while (!GST_ELEMENT_IS_COTHREAD_STOPPING(element)); } @@ -238,6 +256,9 @@ gst_identity_set_property (GObject *object, guint prop_id, const GValue *value, case ARG_SILENT: identity->silent = g_value_get_boolean (value); break; + case ARG_DUPLICATE: + identity->duplicate = g_value_get_uint (value); + break; default: break; } @@ -258,6 +279,9 @@ static void gst_identity_get_property(GObject *object, guint prop_id, GValue *va case ARG_SLEEP_TIME: g_value_set_uint (value, identity->sleep_time); break; + case ARG_DUPLICATE: + g_value_set_uint (value, identity->duplicate); + break; case ARG_SILENT: g_value_set_boolean (value, identity->silent); break; diff --git a/plugins/elements/gstidentity.h b/plugins/elements/gstidentity.h index 032196c..86e56dd 100644 --- a/plugins/elements/gstidentity.h +++ b/plugins/elements/gstidentity.h @@ -58,7 +58,7 @@ struct _GstIdentity { GstPad *srcpad; gboolean loop_based; - + guint duplicate; guint sleep_time; gboolean silent; }; diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index 1c12cf2..7dbb02a 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -41,6 +41,7 @@ enum { enum { ARG_0, + ARG_SILENT, ARG_NUM_PADS, /* FILL ME */ }; @@ -101,6 +102,11 @@ gst_tee_class_init (GstTeeClass *klass) g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_PADS, g_param_spec_int ("num_pads", "num_pads", "num_pads", 0, G_MAXINT, 0, G_PARAM_READABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SILENT, + g_param_spec_boolean ("silent", "silent", "silent", + FALSE, G_PARAM_READWRITE)); + + gobject_class->set_property = GST_DEBUG_FUNCPTR(gst_tee_set_property); gobject_class->get_property = GST_DEBUG_FUNCPTR(gst_tee_get_property); @@ -117,6 +123,7 @@ gst_tee_init (GstTee *tee) tee->numsrcpads = 0; tee->srcpads = NULL; + tee->silent = FALSE; } static GstPad* @@ -157,9 +164,9 @@ gst_tee_set_property (GObject *object, guint prop_id, const GValue *value, GPara tee = GST_TEE (object); switch (prop_id) { -// case ARG_NUM_PADS: -// g_value_set_int (value, tee->numsrcpads); -// break; + case ARG_SILENT: + tee->silent = g_value_get_boolean (value); + break; default: break; } @@ -179,6 +186,9 @@ gst_tee_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec case ARG_NUM_PADS: g_value_set_int (value, tee->numsrcpads); break; + case ARG_SILENT: + g_value_set_boolean (value, tee->silent); + break; default: break; } @@ -210,8 +220,14 @@ gst_tee_chain (GstPad *pad, GstBuffer *buf) srcpads = tee->srcpads; while (srcpads) { - gst_pad_push (GST_PAD (srcpads->data), buf); + GstPad *outpad = GST_PAD (srcpads->data); srcpads = g_slist_next (srcpads); + + if (!tee->silent) + g_print("tee: chain ******* (%s:%s)t (%d bytes, %llu) \n", + GST_DEBUG_PAD_NAME (outpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf)); + + gst_pad_push (outpad, buf); } } diff --git a/plugins/elements/gsttee.h b/plugins/elements/gsttee.h index 7607629..d714ef5 100644 --- a/plugins/elements/gsttee.h +++ b/plugins/elements/gsttee.h @@ -52,6 +52,7 @@ struct _GstTee { GstPad *sinkpad; + gboolean silent; gint numsrcpads; GSList *srcpads; };