From 2d49414eefd724b96fb9285ce665803b2445d4ad Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 14 Apr 2010 17:46:55 +0300 Subject: [PATCH] queries: add more logging Log human readable formats and log query result. --- libs/gst/base/gstbasesink.c | 5 ++++- libs/gst/base/gstbasesrc.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 2852a34..4ca1602 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -4542,7 +4542,8 @@ gst_base_sink_query (GstElement * element, GstQuery * query) gst_query_parse_position (query, &format, NULL); - GST_DEBUG_OBJECT (basesink, "position format %d", format); + GST_DEBUG_OBJECT (basesink, "position query in format %s", + gst_format_get_name (format)); /* first try to get the position based on the clock */ if ((res = @@ -4624,6 +4625,8 @@ gst_base_sink_query (GstElement * element, GstQuery * query) res = gst_base_sink_peer_query (basesink, query); break; } + GST_DEBUG_OBJECT (basesink, "query %s returns %d", + GST_QUERY_TYPE_NAME (query), res); return res; } diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index e69bf9b..401781f 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -848,6 +848,10 @@ gst_base_src_default_query (GstBaseSrc * src, GstQuery * query) GstFormat format; gst_query_parse_position (query, &format, NULL); + + GST_DEBUG_OBJECT (src, "position query in format %s", + gst_format_get_name (format)); + switch (format) { case GST_FORMAT_PERCENT: { -- 2.7.4