mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
tracers: code clean ups
Drop some trailing whilespace. Make field order consistent.
This commit is contained in:
parent
fff9680c93
commit
30741e0206
2 changed files with 31 additions and 31 deletions
|
@ -195,13 +195,14 @@ static void
|
|||
log_new_pad_stats (GstPadStats * stats, GstPad * pad)
|
||||
{
|
||||
gst_tracer_log_trace (gst_structure_new ("new-pad",
|
||||
"thread-id", G_TYPE_UINT, GPOINTER_TO_UINT (g_thread_self ()),
|
||||
"ix", G_TYPE_UINT, stats->index,
|
||||
"parent-ix", G_TYPE_UINT, stats->parent_ix,
|
||||
"name", G_TYPE_STRING, GST_OBJECT_NAME (pad),
|
||||
"type", G_TYPE_STRING, G_OBJECT_TYPE_NAME (pad),
|
||||
"is-ghostpad", G_TYPE_BOOLEAN, GST_IS_GHOST_PAD (pad),
|
||||
"pad-direction", GST_TYPE_PAD_DIRECTION, GST_PAD_DIRECTION (pad),
|
||||
"thread-id", G_TYPE_UINT, GPOINTER_TO_UINT (g_thread_self ()), NULL));
|
||||
NULL));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -276,7 +277,7 @@ static void
|
|||
do_query_stats (GstStatsTracer * self, GstPad * this_pad,
|
||||
GstPadStats * this_pad_stats, GstPad * that_pad,
|
||||
GstPadStats * that_pad_stats, GstQuery * qry, GstClockTime elapsed,
|
||||
gboolean res, gboolean pre)
|
||||
gboolean res, gboolean is_post)
|
||||
{
|
||||
GstElement *this_elem = get_real_pad_parent (this_pad);
|
||||
GstElementStats *this_elem_stats = get_element_stats (self, this_elem);
|
||||
|
@ -293,7 +294,7 @@ do_query_stats (GstStatsTracer * self, GstPad * this_pad,
|
|||
"peer-elem-ix", G_TYPE_UINT, that_elem_stats->index,
|
||||
"name", G_TYPE_STRING, GST_QUERY_TYPE_NAME (qry),
|
||||
"structure", GST_TYPE_STRUCTURE, gst_query_get_structure (qry), NULL);
|
||||
if (!pre) {
|
||||
if (is_post) {
|
||||
gst_structure_set (s, "res", G_TYPE_BOOLEAN, res, NULL);
|
||||
}
|
||||
gst_tracer_log_trace (s);
|
||||
|
@ -485,21 +486,20 @@ do_post_message_pre (GstStatsTracer * self, guint64 ts, GstElement * elem,
|
|||
GstMessage * msg)
|
||||
{
|
||||
GstElementStats *stats = get_element_stats (self, elem);
|
||||
const GstStructure *msg_s;
|
||||
GstStructure *structure = gst_structure_new ("message",
|
||||
"thread-id", G_TYPE_UINT, GPOINTER_TO_UINT (g_thread_self ()),
|
||||
"ts", G_TYPE_UINT64, ts,
|
||||
"elem-ix", G_TYPE_UINT, stats->index,
|
||||
"name", G_TYPE_STRING, GST_MESSAGE_TYPE_NAME (msg),
|
||||
NULL);
|
||||
const GstStructure *msg_s = gst_message_get_structure (msg);
|
||||
GstStructure *s;
|
||||
|
||||
stats->last_ts = ts;
|
||||
|
||||
if ((msg_s = gst_message_get_structure (msg))) {
|
||||
gst_structure_set (structure, "structure", GST_TYPE_STRUCTURE, msg_s, NULL);
|
||||
s = gst_structure_new ("message",
|
||||
"thread-id", G_TYPE_UINT, GPOINTER_TO_UINT (g_thread_self ()),
|
||||
"ts", G_TYPE_UINT64, ts,
|
||||
"elem-ix", G_TYPE_UINT, stats->index,
|
||||
"name", G_TYPE_STRING, GST_MESSAGE_TYPE_NAME (msg), NULL);
|
||||
if (msg_s) {
|
||||
gst_structure_set (s, "structure", GST_TYPE_STRUCTURE, msg_s, NULL);
|
||||
}
|
||||
|
||||
gst_tracer_log_trace (structure);
|
||||
gst_tracer_log_trace (s);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -534,7 +534,7 @@ do_query_pre (GstStatsTracer * self, guint64 ts, GstPad * this_pad,
|
|||
GstPadStats *that_pad_stats = get_pad_stats (self, that_pad);
|
||||
|
||||
do_query_stats (self, this_pad, this_pad_stats, that_pad, that_pad_stats,
|
||||
qry, ts, FALSE, TRUE);
|
||||
qry, ts, FALSE, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -546,7 +546,7 @@ do_query_post (GstStatsTracer * self, guint64 ts, GstPad * this_pad,
|
|||
GstPadStats *that_pad_stats = get_pad_stats (self, that_pad);
|
||||
|
||||
do_query_stats (self, this_pad, this_pad_stats, that_pad, that_pad_stats,
|
||||
qry, ts, res, FALSE);
|
||||
qry, ts, res, TRUE);
|
||||
}
|
||||
|
||||
/* tracer class */
|
||||
|
@ -628,7 +628,7 @@ gst_stats_tracer_class_init (GstStatsTracerClass * klass)
|
|||
"description", G_TYPE_STRING, "message structure",
|
||||
NULL),
|
||||
NULL));
|
||||
gst_tracer_log_trace (gst_structure_new ("elementquery.class",
|
||||
gst_tracer_log_trace (gst_structure_new ("element-query.class",
|
||||
"thread-id", GST_TYPE_STRUCTURE, gst_structure_new ("scope",
|
||||
"related-to", G_TYPE_STRING, "thread", /* TODO use genum */
|
||||
NULL),
|
||||
|
|
Loading…
Reference in a new issue