gst/base/gstbasesink.c: No need to prerol after receiving EOS.

Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_change_state):
No need to prerol after receiving EOS.

* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfakesrc.c: (gst_fake_src_event_handler):
* gst/elements/gstidentity.c: (gst_identity_event):
Print events more verbosely.
This commit is contained in:
Wim Taymans 2005-10-12 09:02:42 +00:00
parent cc28efc239
commit 0fd18045b1
9 changed files with 61 additions and 10 deletions

View file

@ -1,3 +1,14 @@
2005-10-12 Wim Taymans <wim@fluendo.com>
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_change_state):
No need to prerol after receiving EOS.
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfakesrc.c: (gst_fake_src_event_handler):
* gst/elements/gstidentity.c: (gst_identity_event):
Print events more verbosely.
2005-10-12 Wim Taymans <wim@fluendo.com>
* check/Makefile.am:

View file

@ -1489,6 +1489,7 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
gboolean do_eos = !basesink->eos_queued;
gst_base_sink_preroll_queue_empty (basesink, basesink->sinkpad);
basesink->need_preroll = FALSE;
/* need to post EOS message here if it was not in the preroll queue we
* just emptied. */

View file

@ -294,9 +294,9 @@ static gboolean
gst_fake_sink_event (GstBaseSink * bsink, GstEvent * event)
{
GstFakeSink *sink = GST_FAKE_SINK (bsink);
const GstStructure *s;
if (!sink->silent) {
const GstStructure *s;
gchar *sstr;
GST_LOCK (sink);

View file

@ -351,12 +351,21 @@ gst_fake_src_event_handler (GstBaseSrc * basesrc, GstEvent * event)
src = GST_FAKE_SRC (basesrc);
if (!src->silent) {
const GstStructure *s;
gchar *sstr;
GST_LOCK (src);
g_free (src->last_message);
if ((s = gst_event_get_structure (event)))
sstr = gst_structure_to_string (s);
else
sstr = g_strdup ("");
src->last_message =
g_strdup_printf ("event ******* E (type: %d) %p",
GST_EVENT_TYPE (event), event);
g_strdup_printf ("event ******* E (type: %d, %s) %p",
GST_EVENT_TYPE (event), sstr, event);
g_free (sstr);
GST_UNLOCK (src);
g_object_notify (G_OBJECT (src), "last_message");

View file

@ -240,12 +240,22 @@ gst_identity_event (GstBaseTransform * trans, GstEvent * event)
identity = GST_IDENTITY (trans);
if (!identity->silent) {
const GstStructure *s;
gchar *sstr;
GST_LOCK (identity);
g_free (identity->last_message);
if ((s = gst_event_get_structure (event)))
sstr = gst_structure_to_string (s);
else
sstr = g_strdup ("");
identity->last_message =
g_strdup_printf ("chain ******* (%s:%s)E (type: %d) %p",
GST_DEBUG_PAD_NAME (trans->sinkpad), GST_EVENT_TYPE (event), event);
g_strdup_printf ("event ******* (%s:%s) E (type: %d, %s) %p",
GST_DEBUG_PAD_NAME (trans->sinkpad), GST_EVENT_TYPE (event), sstr,
event);
g_free (sstr);
GST_UNLOCK (identity);
g_object_notify (G_OBJECT (identity), "last_message");

View file

@ -1489,6 +1489,7 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
gboolean do_eos = !basesink->eos_queued;
gst_base_sink_preroll_queue_empty (basesink, basesink->sinkpad);
basesink->need_preroll = FALSE;
/* need to post EOS message here if it was not in the preroll queue we
* just emptied. */

View file

@ -294,9 +294,9 @@ static gboolean
gst_fake_sink_event (GstBaseSink * bsink, GstEvent * event)
{
GstFakeSink *sink = GST_FAKE_SINK (bsink);
const GstStructure *s;
if (!sink->silent) {
const GstStructure *s;
gchar *sstr;
GST_LOCK (sink);

View file

@ -351,12 +351,21 @@ gst_fake_src_event_handler (GstBaseSrc * basesrc, GstEvent * event)
src = GST_FAKE_SRC (basesrc);
if (!src->silent) {
const GstStructure *s;
gchar *sstr;
GST_LOCK (src);
g_free (src->last_message);
if ((s = gst_event_get_structure (event)))
sstr = gst_structure_to_string (s);
else
sstr = g_strdup ("");
src->last_message =
g_strdup_printf ("event ******* E (type: %d) %p",
GST_EVENT_TYPE (event), event);
g_strdup_printf ("event ******* E (type: %d, %s) %p",
GST_EVENT_TYPE (event), sstr, event);
g_free (sstr);
GST_UNLOCK (src);
g_object_notify (G_OBJECT (src), "last_message");

View file

@ -240,12 +240,22 @@ gst_identity_event (GstBaseTransform * trans, GstEvent * event)
identity = GST_IDENTITY (trans);
if (!identity->silent) {
const GstStructure *s;
gchar *sstr;
GST_LOCK (identity);
g_free (identity->last_message);
if ((s = gst_event_get_structure (event)))
sstr = gst_structure_to_string (s);
else
sstr = g_strdup ("");
identity->last_message =
g_strdup_printf ("chain ******* (%s:%s)E (type: %d) %p",
GST_DEBUG_PAD_NAME (trans->sinkpad), GST_EVENT_TYPE (event), event);
g_strdup_printf ("event ******* (%s:%s) E (type: %d, %s) %p",
GST_DEBUG_PAD_NAME (trans->sinkpad), GST_EVENT_TYPE (event), sstr,
event);
g_free (sstr);
GST_UNLOCK (identity);
g_object_notify (G_OBJECT (identity), "last_message");