res = klass->query (element, query);
}
- GST_TRACER_ELEMENT_QUERY_POST (element, res);
+ GST_TRACER_ELEMENT_QUERY_POST (element, query, res);
return res;
}
GST_DEBUG_OBJECT (pad, "sent query %p (%s), result %d", query,
GST_QUERY_TYPE_NAME (query), res);
- GST_TRACER_PAD_QUERY_POST (pad, res, query);
+ GST_TRACER_PAD_QUERY_POST (pad, query, res);
if (res != TRUE)
goto query_failed;
* @self: the tracer instance
* @ts: the current timestamp
* @pad: the pad
- * @res: the result of gst_pad_query()
* @query: the query
+ * @res: the result of gst_pad_query()
*
* Post-hook for gst_pad_query() named "pad-query-post".
*/
typedef void (*GstTracerHookPadQueryPost) (GObject *self, GstClockTime ts,
- GstPad *pad, gboolean res, GstQuery *query);
-#define GST_TRACER_PAD_QUERY_POST(pad, res, query) G_STMT_START{ \
+ GstPad *pad, GstQuery *query, gboolean res);
+#define GST_TRACER_PAD_QUERY_POST(pad, query, res) G_STMT_START{ \
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_QUERY_POST), \
- GstTracerHookPadQueryPost, (GST_TRACER_ARGS, pad, res, query)); \
+ GstTracerHookPadQueryPost, (GST_TRACER_ARGS, pad, query, res)); \
}G_STMT_END
/**
* @self: the tracer instance
* @ts: the current timestamp
* @element: the element
+ * @query: the query
* @res: the result of gst_element_query()
*
* Post-hook for gst_element_query() named "element-query-post".
*/
typedef void (*GstTracerHookElementQueryPost) (GObject *self, GstClockTime ts,
- GstElement *element, gboolean res);
-#define GST_TRACER_ELEMENT_QUERY_POST(element, res) G_STMT_START{ \
+ GstElement *element, GstQuery *query, gboolean res);
+#define GST_TRACER_ELEMENT_QUERY_POST(element, query, res) G_STMT_START{ \
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_ELEMENT_QUERY_POST), \
- GstTracerHookElementQueryPost, (GST_TRACER_ARGS, element, res)); \
+ GstTracerHookElementQueryPost, (GST_TRACER_ARGS, element, query, res)); \
}G_STMT_END
/**
#define GST_TRACER_PAD_PUSH_EVENT_PRE(pad, event)
#define GST_TRACER_PAD_PUSH_EVENT_POST(pad, res)
#define GST_TRACER_PAD_QUERY_PRE(pad, query)
-#define GST_TRACER_PAD_QUERY_POST(pad, res, query)
+#define GST_TRACER_PAD_QUERY_POST(pad, query, res)
#define GST_TRACER_ELEMENT_POST_MESSAGE_PRE(element, message)
#define GST_TRACER_ELEMENT_POST_MESSAGE_POST(element, res)
#define GST_TRACER_ELEMENT_QUERY_PRE(element, query)
-#define GST_TRACER_ELEMENT_QUERY_POST(element, res)
+#define GST_TRACER_ELEMENT_QUERY_POST(element, query, res)
#define GST_TRACER_ELEMENT_NEW(element)
#define GST_TRACER_ELEMENT_ADD_PAD(element, pad)
#define GST_TRACER_ELEMENT_REMOVE_PAD(element, pad)
* SECTION:gstlog
* @short_description: log hook event
*
- * A tracing module that logs all data from all hooks.
+ * A tracing module that logs all data from all hooks.
*/
#ifdef HAVE_CONFIG_H
}
static void
+do_pad_query_pre (GstTracer * self, guint64 ts, GstPad * pad, GstQuery * query)
+{
+ do_log (GST_CAT_QUERY,
+ "%" GST_TIME_FORMAT ", pad=%" GST_PTR_FORMAT ", query=%"
+ GST_PTR_FORMAT, GST_TIME_ARGS (ts), pad, query);
+}
+
+static void
+do_pad_query_post (GstTracer * self, guint64 ts, GstPad * pad, gboolean res)
+{
+ do_log (GST_CAT_QUERY,
+ "%" GST_TIME_FORMAT ", pad=%" GST_PTR_FORMAT ", res=%d",
+ GST_TIME_ARGS (ts), pad, res);
+}
+
+static void
do_post_message_pre (GstTracer * self, guint64 ts, GstElement * elem,
GstMessage * msg)
{
}
static void
-do_query_pre (GstTracer * self, guint64 ts, GstElement * elem, GstQuery * query)
+do_element_query_pre (GstTracer * self, guint64 ts, GstElement * elem,
+ GstQuery * query)
{
do_log (GST_CAT_QUERY,
"%" GST_TIME_FORMAT ", element=%" GST_PTR_FORMAT ", query=%"
}
static void
-do_query_post (GstTracer * self, guint64 ts, GstElement * elem, gboolean res)
+do_element_query_post (GstTracer * self, guint64 ts, GstElement * elem,
+ gboolean res)
{
do_log (GST_CAT_QUERY,
"%" GST_TIME_FORMAT ", element=%" GST_PTR_FORMAT ", res=%d",
gst_tracing_register_hook (tracer, "pad-push-event-post",
G_CALLBACK (do_push_event_post));
gst_tracing_register_hook (tracer, "pad-query-pre",
- G_CALLBACK (do_query_pre));
+ G_CALLBACK (do_pad_query_pre));
gst_tracing_register_hook (tracer, "pad-query-post",
- G_CALLBACK (do_query_post));
+ G_CALLBACK (do_pad_query_post));
gst_tracing_register_hook (tracer, "element-post-message-pre",
G_CALLBACK (do_post_message_pre));
gst_tracing_register_hook (tracer, "element-post-message-post",
G_CALLBACK (do_post_message_post));
gst_tracing_register_hook (tracer, "element-query-pre",
- G_CALLBACK (do_query_pre));
+ G_CALLBACK (do_element_query_pre));
gst_tracing_register_hook (tracer, "element-query-post",
- G_CALLBACK (do_query_post));
+ G_CALLBACK (do_element_query_post));
gst_tracing_register_hook (tracer, "element-new",
G_CALLBACK (do_element_new));
gst_tracing_register_hook (tracer, "element-add-pad",
static void
do_query_post (GstStatsTracer * self, guint64 ts, GstPad * this_pad,
- gboolean res, GstQuery * qry)
+ GstQuery * qry, gboolean res)
{
GstPadStats *this_pad_stats = get_pad_stats (self, this_pad);
GstPad *that_pad = GST_PAD_PEER (this_pad);