gst/gstbin.c: Some more debug info.

Original commit message from CVS:
* 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.
This commit is contained in:
Wim Taymans 2005-09-22 16:51:27 +00:00
parent 1709fe625f
commit 4793bc208d
5 changed files with 28 additions and 14 deletions

View file

@ -1,3 +1,17 @@
2005-09-22 Wim Taymans <wim@fluendo.com>
* 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 <tim at centricular dot net> 2005-09-22 Tim-Philipp Müller <tim at centricular dot net>
* check/gst/gstvalue.c: (test_date), (gst_value_suite): * check/gst/gstvalue.c: (test_date), (gst_value_suite):

View file

@ -473,8 +473,11 @@ gst_bin_add_func (GstBin * bin, GstElement * element)
goto had_parent; goto had_parent;
/* if we add a sink we become a sink */ /* 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); GST_FLAG_SET (bin, GST_ELEMENT_IS_SINK);
}
bin->children = g_list_prepend (bin->children, element); bin->children = g_list_prepend (bin->children, element);
bin->numchildren++; bin->numchildren++;

View file

@ -1120,21 +1120,16 @@ gst_element_send_event (GstElement * element, GstEvent * event)
GstPad *pad = gst_element_get_random_pad (element, GST_PAD_SINK); GstPad *pad = gst_element_get_random_pad (element, GST_PAD_SINK);
if (pad) { 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) { result = gst_pad_push_event (pad, event);
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);
}
gst_object_unref (pad); 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; return result;
} }

View file

@ -128,7 +128,7 @@ typedef enum /*< flags=0 >*/
typedef enum typedef enum
{ {
/* ignore state changes from parent */ /* ignore state changes from parent */
GST_ELEMENT_LOCKED_STATE, GST_ELEMENT_LOCKED_STATE = GST_OBJECT_FLAG_LAST,
/* the element is a sink */ /* the element is a sink */
GST_ELEMENT_IS_SINK, GST_ELEMENT_IS_SINK,

View file

@ -41,7 +41,8 @@ G_BEGIN_DECLS
* @GST_QUERY_LATENCY: latency of stream * @GST_QUERY_LATENCY: latency of stream
* @GST_QUERY_JITTER: current jitter of stream * @GST_QUERY_JITTER: current jitter of stream
* @GST_QUERY_RATE: current rate of the 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_CONVERT: convert values
* @GST_QUERY_FORMATS: query supported formats for convert * @GST_QUERY_FORMATS: query supported formats for convert
* *
@ -54,6 +55,7 @@ typedef enum {
GST_QUERY_JITTER, /* not in draft-query, necessary? */ GST_QUERY_JITTER, /* not in draft-query, necessary? */
GST_QUERY_RATE, GST_QUERY_RATE,
GST_QUERY_SEEKING, GST_QUERY_SEEKING,
GST_QUERY_SEGMENT,
GST_QUERY_CONVERT, GST_QUERY_CONVERT,
GST_QUERY_FORMATS GST_QUERY_FORMATS
} GstQueryType; } GstQueryType;