oclass = GST_ELEMENT_GET_CLASS (element);
+ GST_TRACER_ELEMENT_CHANGE_STATE_PRE (element, transition);
+
/* call the state change function so it can set the state */
if (oclass->change_state)
ret = (oclass->change_state) (element, transition);
else
ret = GST_STATE_CHANGE_FAILURE;
+ GST_TRACER_ELEMENT_CHANGE_STATE_POST (element, transition, ret);
+
switch (ret) {
case GST_STATE_CHANGE_FAILURE:
GST_CAT_INFO_OBJECT (GST_CAT_STATES, element,
"pad-push-event-post", "pad-query-pre", "pad-query-post",
"element-post-message-pre",
"element-post-message-post", "element-query-pre", "element-query-post",
- "element-new", "element-add-pad", "element-remove-pad", "bin-add-pre",
- "bin-add-post", "bin-remove-pre", "bin-remove-post", "pad-link-pre",
- "pad-link-post", "pad-unlink-pre", "pad-unlink-post"
+ "element-new", "element-add-pad", "element-remove-pad",
+ "bin-add-pre", "bin-add-post", "bin-remove-pre", "bin-remove-post",
+ "pad-link-pre", "pad-link-post", "pad-unlink-pre", "pad-unlink-post",
+ "element-change-state-pre", "element-change-state-post"
};
GQuark _priv_gst_tracer_quark_table[GST_TRACER_QUARK_MAX];
GST_TRACER_QUARK_HOOK_PAD_LINK_POST,
GST_TRACER_QUARK_HOOK_PAD_UNLINK_PRE,
GST_TRACER_QUARK_HOOK_PAD_UNLINK_POST,
+ GST_TRACER_QUARK_HOOK_ELEMENT_CHANGE_STATE_PRE,
+ GST_TRACER_QUARK_HOOK_ELEMENT_CHANGE_STATE_POST,
GST_TRACER_QUARK_MAX
} GstTracerQuarkId;
GstTracerHookElementRemovePad, (GST_TRACER_ARGS, element, pad)); \
}G_STMT_END
+typedef void (*GstTracerHookElementChangeStatePre) (GObject *, GstClockTime,
+ GstElement *, GstStateChange);
+#define GST_TRACER_ELEMENT_CHANGE_STATE_PRE(element, transition) G_STMT_START{ \
+ GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_ELEMENT_CHANGE_STATE_PRE), \
+ GstTracerHookElementChangeStatePre, (GST_TRACER_ARGS, element, transition)); \
+}G_STMT_END
+
+typedef void (*GstTracerHookElementChangeStatePost) (GObject *, GstClockTime,
+ GstElement *, GstStateChange, GstStateChangeReturn);
+#define GST_TRACER_ELEMENT_CHANGE_STATE_POST(element, transition, result) G_STMT_START{ \
+ GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_ELEMENT_CHANGE_STATE_POST), \
+ GstTracerHookElementChangeStatePost, (GST_TRACER_ARGS, element, transition, result)); \
+}G_STMT_END
+
typedef void (*GstTracerHookBinAddPre) (GObject *, GstClockTime,
GstBin *, GstElement *);
#define GST_TRACER_BIN_ADD_PRE(bin, element) G_STMT_START{ \
#define GST_TRACER_ELEMENT_NEW(element)
#define GST_TRACER_ELEMENT_ADD_PAD(element, pad)
#define GST_TRACER_ELEMENT_REMOVE_PAD(element, pad)
+#define GST_TRACER_ELEMENT_CHANGE_STATE_PRE(element, transition)
+#define GST_TRACER_ELEMENT_CHANGE_STATE_POST(element, transition, res)
#define GST_TRACER_BIN_ADD_PRE(bin, element)
#define GST_TRACER_BIN_ADD_POST(bin, element, res)
#define GST_TRACER_BIN_REMOVE_PRE(bin, element)