debug: logging improvements

Use the event serialisation. Log formats name instead of number.
This commit is contained in:
Stefan Kost 2010-08-05 09:36:16 +03:00
parent 5d0015048b
commit 2237af4b6b
3 changed files with 13 additions and 5 deletions

View file

@ -3233,8 +3233,8 @@ gst_base_sink_event (GstPad * pad, GstEvent * event)
bclass = GST_BASE_SINK_GET_CLASS (basesink);
GST_DEBUG_OBJECT (basesink, "event %p (%s)", event,
GST_EVENT_TYPE_NAME (event));
GST_DEBUG_OBJECT (basesink, "reveived event %p %" GST_PTR_FORMAT, event,
event);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:
@ -4280,6 +4280,9 @@ gst_base_sink_send_event (GstElement * element, GstEvent * event)
/* only push UPSTREAM events upstream */
forward = GST_EVENT_IS_UPSTREAM (event);
GST_DEBUG_OBJECT (basesink, "handling event %p %" GST_PTR_FORMAT, event,
event);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_LATENCY:
{

View file

@ -1522,7 +1522,7 @@ gst_base_src_send_event (GstElement * element, GstEvent * event)
src = GST_BASE_SRC (element);
GST_DEBUG_OBJECT (src, "reveived %s event", GST_EVENT_TYPE_NAME (event));
GST_DEBUG_OBJECT (src, "handling event %p %" GST_PTR_FORMAT, event, event);
switch (GST_EVENT_TYPE (event)) {
/* bidirectional events */
@ -1698,6 +1698,8 @@ gst_base_src_default_event (GstBaseSrc * src, GstEvent * event)
{
gboolean result;
GST_DEBUG_OBJECT (src, "handle event %" GST_PTR_FORMAT, event);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
/* is normally called when in push mode */
@ -2715,8 +2717,9 @@ gst_base_src_start (GstBaseSrc * basesrc)
}
GST_DEBUG_OBJECT (basesrc,
"format: %d, have size: %d, size: %" G_GUINT64_FORMAT ", duration: %"
G_GINT64_FORMAT, format, result, size, basesrc->segment.duration);
"format: %s, have size: %d, size: %" G_GUINT64_FORMAT ", duration: %"
G_GINT64_FORMAT, gst_format_get_name (format), result, size,
basesrc->segment.duration);
seekable = gst_base_src_seekable (basesrc);
GST_DEBUG_OBJECT (basesrc, "is seekable: %d", seekable);

View file

@ -1992,6 +1992,8 @@ gst_base_transform_src_eventfunc (GstBaseTransform * trans, GstEvent * event)
{
gboolean ret;
GST_DEBUG_OBJECT (trans, "handling event %p %" GST_PTR_FORMAT, event, event);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
break;