diff --git a/ChangeLog b/ChangeLog index db54d3d739..d868179854 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2005-09-22 Wim Taymans + + * gst/gstbin.c: (gst_bin_add_func): + Some more debug info. + + * gst/gstelement.c: (gst_element_send_event): + Simplify send_event + + * gst/gstelement.h: + Don't know how flags got broken. + + * gst/gstquery.h: + Added new query. + 2005-09-22 Tim-Philipp Müller * check/gst/gstvalue.c: (test_date), (gst_value_suite): diff --git a/gst/gstbin.c b/gst/gstbin.c index 546fe35315..74b34a08b2 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -473,8 +473,11 @@ gst_bin_add_func (GstBin * bin, GstElement * element) goto had_parent; /* if we add a sink we become a sink */ - if (GST_FLAG_IS_SET (element, GST_ELEMENT_IS_SINK)) + if (GST_FLAG_IS_SET (element, GST_ELEMENT_IS_SINK)) { + GST_CAT_DEBUG_OBJECT (GST_CAT_PARENTAGE, bin, "element \"%s\" was sink", + elem_name); GST_FLAG_SET (bin, GST_ELEMENT_IS_SINK); + } bin->children = g_list_prepend (bin->children, element); bin->numchildren++; diff --git a/gst/gstelement.c b/gst/gstelement.c index 5390cb9b5b..92bd9e1764 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -1120,21 +1120,16 @@ gst_element_send_event (GstElement * element, GstEvent * event) GstPad *pad = gst_element_get_random_pad (element, GST_PAD_SINK); if (pad) { - GstPad *peer = gst_pad_get_peer (pad); + GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, + "pushing event to random pad %s:%s", GST_DEBUG_PAD_NAME (pad)); - if (peer) { - GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, - "sending event to random pad %s:%s", GST_DEBUG_PAD_NAME (pad)); - - result = gst_pad_send_event (peer, event); - gst_object_unref (peer); - } + result = gst_pad_push_event (pad, event); gst_object_unref (pad); + } else { + GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "can't send event on element %s", + GST_ELEMENT_NAME (element)); } } - GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "can't send event on element %s", - GST_ELEMENT_NAME (element)); - return result; } diff --git a/gst/gstelement.h b/gst/gstelement.h index 305b8e7207..b0b3871614 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -128,7 +128,7 @@ typedef enum /*< flags=0 >*/ typedef enum { /* ignore state changes from parent */ - GST_ELEMENT_LOCKED_STATE, + GST_ELEMENT_LOCKED_STATE = GST_OBJECT_FLAG_LAST, /* the element is a sink */ GST_ELEMENT_IS_SINK, diff --git a/gst/gstquery.h b/gst/gstquery.h index 1f75fdd184..ecd8887cf1 100644 --- a/gst/gstquery.h +++ b/gst/gstquery.h @@ -41,7 +41,8 @@ G_BEGIN_DECLS * @GST_QUERY_LATENCY: latency of stream * @GST_QUERY_JITTER: current jitter of stream * @GST_QUERY_RATE: current rate of the stream - * @GST_QUERY_SEEKING: seeking start/stop positions + * @GST_QUERY_SEEKING: seeking capabilities + * @GST_QUERY_SEGMENT: segment start/stop positions * @GST_QUERY_CONVERT: convert values * @GST_QUERY_FORMATS: query supported formats for convert * @@ -54,6 +55,7 @@ typedef enum { GST_QUERY_JITTER, /* not in draft-query, necessary? */ GST_QUERY_RATE, GST_QUERY_SEEKING, + GST_QUERY_SEGMENT, GST_QUERY_CONVERT, GST_QUERY_FORMATS } GstQueryType;