2014-07-18 05:49:38 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2013 Stefan Sauer <ensonic@users.sf.net>
|
|
|
|
*
|
|
|
|
* gsttracerutils.h: tracing subsystem
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_TRACER_UTILS_H__
|
|
|
|
#define __GST_TRACER_UTILS_H__
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include <glib-object.h>
|
|
|
|
#include <gst/gstconfig.h>
|
|
|
|
#include <gst/gstbin.h>
|
2016-05-09 14:31:36 +00:00
|
|
|
#include <gst/gstutils.h>
|
2014-07-18 05:49:38 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2016-01-06 10:31:16 +00:00
|
|
|
#ifndef GST_DISABLE_GST_TRACER_HOOKS
|
2014-07-18 05:49:38 +00:00
|
|
|
|
|
|
|
/* tracing hooks */
|
|
|
|
|
2014-09-22 07:55:56 +00:00
|
|
|
void _priv_gst_tracing_init (void);
|
|
|
|
void _priv_gst_tracing_deinit (void);
|
2014-07-18 05:49:38 +00:00
|
|
|
|
2014-09-15 20:27:11 +00:00
|
|
|
/* tracer quarks */
|
2014-07-18 05:49:38 +00:00
|
|
|
|
2014-09-15 20:27:11 +00:00
|
|
|
/* These enums need to match the number and order
|
|
|
|
* of strings declared in _quark_table, in gsttracerutils.c */
|
2015-10-06 16:49:46 +00:00
|
|
|
typedef enum /*< skip >*/
|
2014-09-15 20:27:11 +00:00
|
|
|
{
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_PUSH_PRE = 0,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_PUSH_POST,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_PUSH_LIST_PRE,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_PUSH_LIST_POST,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_PULL_RANGE_PRE,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_PULL_RANGE_POST,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_PUSH_EVENT_PRE ,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_PUSH_EVENT_POST,
|
2015-03-13 13:10:42 +00:00
|
|
|
GST_TRACER_QUARK_HOOK_PAD_QUERY_PRE ,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_QUERY_POST,
|
2014-09-15 20:27:11 +00:00
|
|
|
GST_TRACER_QUARK_HOOK_ELEMENT_POST_MESSAGE_PRE,
|
|
|
|
GST_TRACER_QUARK_HOOK_ELEMENT_POST_MESSAGE_POST,
|
|
|
|
GST_TRACER_QUARK_HOOK_ELEMENT_QUERY_PRE,
|
|
|
|
GST_TRACER_QUARK_HOOK_ELEMENT_QUERY_POST,
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
GST_TRACER_QUARK_HOOK_ELEMENT_NEW,
|
|
|
|
GST_TRACER_QUARK_HOOK_ELEMENT_ADD_PAD,
|
|
|
|
GST_TRACER_QUARK_HOOK_ELEMENT_REMOVE_PAD,
|
|
|
|
GST_TRACER_QUARK_HOOK_BIN_ADD_PRE,
|
|
|
|
GST_TRACER_QUARK_HOOK_BIN_ADD_POST,
|
|
|
|
GST_TRACER_QUARK_HOOK_BIN_REMOVE_PRE,
|
|
|
|
GST_TRACER_QUARK_HOOK_BIN_REMOVE_POST,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_LINK_PRE,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_LINK_POST,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_UNLINK_PRE,
|
|
|
|
GST_TRACER_QUARK_HOOK_PAD_UNLINK_POST,
|
2015-10-29 11:40:32 +00:00
|
|
|
GST_TRACER_QUARK_HOOK_ELEMENT_CHANGE_STATE_PRE,
|
|
|
|
GST_TRACER_QUARK_HOOK_ELEMENT_CHANGE_STATE_POST,
|
2016-05-09 14:31:36 +00:00
|
|
|
GST_TRACER_QUARK_HOOK_MINI_OBJECT_CREATED,
|
|
|
|
GST_TRACER_QUARK_HOOK_MINI_OBJECT_DESTROYED,
|
|
|
|
GST_TRACER_QUARK_HOOK_OBJECT_CREATED,
|
|
|
|
GST_TRACER_QUARK_HOOK_OBJECT_DESTROYED,
|
2016-12-01 20:35:45 +00:00
|
|
|
GST_TRACER_QUARK_HOOK_MINI_OBJECT_REFFED,
|
|
|
|
GST_TRACER_QUARK_HOOK_MINI_OBJECT_UNREFFED,
|
|
|
|
GST_TRACER_QUARK_HOOK_OBJECT_REFFED,
|
|
|
|
GST_TRACER_QUARK_HOOK_OBJECT_UNREFFED,
|
2014-09-15 20:27:11 +00:00
|
|
|
GST_TRACER_QUARK_MAX
|
|
|
|
} GstTracerQuarkId;
|
|
|
|
|
|
|
|
extern GQuark _priv_gst_tracer_quark_table[GST_TRACER_QUARK_MAX];
|
|
|
|
|
|
|
|
#define GST_TRACER_QUARK(q) _priv_gst_tracer_quark_table[GST_TRACER_QUARK_##q]
|
|
|
|
|
|
|
|
/* tracing module helpers */
|
2014-07-18 05:49:38 +00:00
|
|
|
|
2014-09-18 06:26:19 +00:00
|
|
|
typedef struct {
|
|
|
|
GObject *tracer;
|
|
|
|
GCallback func;
|
|
|
|
} GstTracerHook;
|
|
|
|
|
2014-07-18 05:49:38 +00:00
|
|
|
extern gboolean _priv_tracer_enabled;
|
2014-09-18 06:26:19 +00:00
|
|
|
/* key are hook-id quarks, values are GstTracerHook */
|
2016-01-06 10:31:16 +00:00
|
|
|
extern GHashTable *_priv_tracers;
|
2014-07-18 05:49:38 +00:00
|
|
|
|
2014-09-18 06:26:19 +00:00
|
|
|
#define GST_TRACER_IS_ENABLED (_priv_tracer_enabled)
|
2014-07-18 05:49:38 +00:00
|
|
|
|
|
|
|
#define GST_TRACER_TS \
|
2016-01-07 16:41:25 +00:00
|
|
|
GST_CLOCK_DIFF (_priv_gst_start_time, gst_util_get_timestamp ())
|
2014-07-18 05:49:38 +00:00
|
|
|
|
|
|
|
/* tracing hooks */
|
|
|
|
|
2014-09-18 06:26:19 +00:00
|
|
|
#define GST_TRACER_ARGS h->tracer, ts
|
|
|
|
#define GST_TRACER_DISPATCH(key,type,args) G_STMT_START{ \
|
|
|
|
if (GST_TRACER_IS_ENABLED) { \
|
|
|
|
GstClockTime ts = GST_TRACER_TS; \
|
|
|
|
GList *__l, *__n; \
|
|
|
|
GstTracerHook *h; \
|
|
|
|
__l = g_hash_table_lookup (_priv_tracers, GINT_TO_POINTER (key)); \
|
|
|
|
for (__n = __l; __n; __n = g_list_next (__n)) { \
|
|
|
|
h = (GstTracerHook *) __n->data; \
|
|
|
|
((type)(h->func)) args; \
|
|
|
|
} \
|
|
|
|
__l = g_hash_table_lookup (_priv_tracers, NULL); \
|
|
|
|
for (__n = __l; __n; __n = g_list_next (__n)) { \
|
|
|
|
h = (GstTracerHook *) __n->data; \
|
|
|
|
((type)(h->func)) args; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadPushPre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @pad: the pad
|
|
|
|
* @buffer: the buffer
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_pad_push() named "pad-push-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadPushPre) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *pad, GstBuffer *buffer);
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_PAD_PUSH_PRE(pad, buffer) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_PRE), \
|
|
|
|
GstTracerHookPadPushPre, (GST_TRACER_ARGS, pad, buffer)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadPushPost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @pad: the pad
|
|
|
|
* @res: the result of gst_pad_push()
|
|
|
|
*
|
|
|
|
* Post-hook for gst_pad_push() named "pad-push-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadPushPost) (GObject * self, GstClockTime ts,
|
|
|
|
GstPad *pad, GstFlowReturn res);
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_PAD_PUSH_POST(pad, res) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_POST), \
|
|
|
|
GstTracerHookPadPushPost, (GST_TRACER_ARGS, pad, res)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadPushListPre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @pad: the pad
|
|
|
|
* @list: the buffer-list
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_pad_push_list() named "pad-push-list-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadPushListPre) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *pad, GstBufferList *list);
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_PAD_PUSH_LIST_PRE(pad, list) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_LIST_PRE), \
|
|
|
|
GstTracerHookPadPushListPre, (GST_TRACER_ARGS, pad, list)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadPushListPost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @pad: the pad
|
|
|
|
* @res: the result of gst_pad_push_list()
|
|
|
|
*
|
|
|
|
* Post-hook for gst_pad_push_list() named "pad-push-list-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadPushListPost) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *pad,
|
|
|
|
GstFlowReturn res);
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_PAD_PUSH_LIST_POST(pad, res) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_LIST_POST), \
|
|
|
|
GstTracerHookPadPushListPost, (GST_TRACER_ARGS, pad, res)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadPullRangePre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @pad: the pad
|
|
|
|
* @offset: the stream offset
|
|
|
|
* @size: the requested size
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_pad_pull_range() named "pad-pull-range-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadPullRangePre) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *pad, guint64 offset, guint size);
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_PAD_PULL_RANGE_PRE(pad, offset, size) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PULL_RANGE_PRE), \
|
|
|
|
GstTracerHookPadPullRangePre, (GST_TRACER_ARGS, pad, offset, size)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadPullRangePost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @pad: the pad
|
|
|
|
* @buffer: the buffer
|
|
|
|
* @res: the result of gst_pad_pull_range()
|
|
|
|
*
|
|
|
|
* Post-hook for gst_pad_pull_range() named "pad-pull-range-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadPullRangePost) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *pad, GstBuffer *buffer, GstFlowReturn res);
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_PAD_PULL_RANGE_POST(pad, buffer, res) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PULL_RANGE_POST), \
|
|
|
|
GstTracerHookPadPullRangePost, (GST_TRACER_ARGS, pad, buffer, res)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadPushEventPre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @pad: the pad
|
|
|
|
* @event: the event
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_pad_push_event() named "pad-push-event-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadPushEventPre) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *pad, GstEvent *event);
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_PAD_PUSH_EVENT_PRE(pad, event) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_EVENT_PRE), \
|
|
|
|
GstTracerHookPadPushEventPre, (GST_TRACER_ARGS, pad, event)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadPushEventPost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @pad: the pad
|
|
|
|
* @res: the result of gst_pad_push_event()
|
|
|
|
*
|
|
|
|
* Post-hook for gst_pad_push_event() named "pad-push-event-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadPushEventPost) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *pad, gboolean res);
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_PAD_PUSH_EVENT_POST(pad, res) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_EVENT_POST), \
|
|
|
|
GstTracerHookPadPushEventPost, (GST_TRACER_ARGS, pad, res)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadQueryPre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @pad: the pad
|
|
|
|
* @query: the query
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_pad_query() named "pad-query-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadQueryPre) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *pad, GstQuery *query);
|
2015-03-13 13:10:42 +00:00
|
|
|
#define GST_TRACER_PAD_QUERY_PRE(pad, query) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_QUERY_PRE), \
|
|
|
|
GstTracerHookPadQueryPre, (GST_TRACER_ARGS, pad, query)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadQueryPost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @pad: the pad
|
|
|
|
* @query: the query
|
2016-01-07 22:03:48 +00:00
|
|
|
* @res: the result of gst_pad_query()
|
2016-01-07 18:13:03 +00:00
|
|
|
*
|
|
|
|
* Post-hook for gst_pad_query() named "pad-query-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadQueryPost) (GObject *self, GstClockTime ts,
|
2016-01-07 22:03:48 +00:00
|
|
|
GstPad *pad, GstQuery *query, gboolean res);
|
|
|
|
#define GST_TRACER_PAD_QUERY_POST(pad, query, res) G_STMT_START{ \
|
2015-03-13 13:10:42 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_QUERY_POST), \
|
2016-01-07 22:03:48 +00:00
|
|
|
GstTracerHookPadQueryPost, (GST_TRACER_ARGS, pad, query, res)); \
|
2015-03-13 13:10:42 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookElementPostMessagePre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @element: the element
|
|
|
|
* @message: the message
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_element_post_message() named "element-post-message-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookElementPostMessagePre) (GObject *self,
|
|
|
|
GstClockTime ts, GstElement *element, GstMessage *message);
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_ELEMENT_POST_MESSAGE_PRE(element, message) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_ELEMENT_POST_MESSAGE_PRE), \
|
|
|
|
GstTracerHookElementPostMessagePre, (GST_TRACER_ARGS, element, message)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookElementPostMessagePost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @element: the element
|
|
|
|
* @res: the result of gst_element_post_message()
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_element_post_message() named "element-post-message-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookElementPostMessagePost) (GObject *self,
|
|
|
|
GstClockTime ts, GstElement *element, gboolean res);
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_ELEMENT_POST_MESSAGE_POST(element, res) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_ELEMENT_POST_MESSAGE_POST), \
|
|
|
|
GstTracerHookElementPostMessagePost, (GST_TRACER_ARGS, element, res)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookElementQueryPre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @element: the element
|
|
|
|
* @query: the query
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_element_query() named "element-query-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookElementQueryPre) (GObject *self, GstClockTime ts,
|
|
|
|
GstElement *element, GstQuery *query);
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_ELEMENT_QUERY_PRE(element, query) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_ELEMENT_QUERY_PRE), \
|
|
|
|
GstTracerHookElementQueryPre, (GST_TRACER_ARGS, element, query)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookElementQueryPost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @element: the element
|
2016-01-07 22:03:48 +00:00
|
|
|
* @query: the query
|
2016-01-07 18:13:03 +00:00
|
|
|
* @res: the result of gst_element_query()
|
|
|
|
*
|
|
|
|
* Post-hook for gst_element_query() named "element-query-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookElementQueryPost) (GObject *self, GstClockTime ts,
|
2016-01-07 22:03:48 +00:00
|
|
|
GstElement *element, GstQuery *query, gboolean res);
|
|
|
|
#define GST_TRACER_ELEMENT_QUERY_POST(element, query, res) G_STMT_START{ \
|
2014-09-18 06:26:19 +00:00
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_ELEMENT_QUERY_POST), \
|
2016-01-07 22:03:48 +00:00
|
|
|
GstTracerHookElementQueryPost, (GST_TRACER_ARGS, element, query, res)); \
|
2014-07-18 05:49:38 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookElementNew:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @element: the element
|
|
|
|
*
|
2017-12-07 12:05:23 +00:00
|
|
|
* Hook for whenever a new element is created, named "element-new".
|
2016-01-07 18:13:03 +00:00
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookElementNew) (GObject *self, GstClockTime ts,
|
|
|
|
GstElement *element);
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
#define GST_TRACER_ELEMENT_NEW(element) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_ELEMENT_NEW), \
|
|
|
|
GstTracerHookElementNew, (GST_TRACER_ARGS, element)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookElementAddPad:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @element: the element
|
|
|
|
* @pad: the pad
|
|
|
|
*
|
|
|
|
* Hook for gst_element_add_pad() named "element-add-pad".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookElementAddPad) (GObject *self, GstClockTime ts,
|
|
|
|
GstElement *element, GstPad *pad);
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
#define GST_TRACER_ELEMENT_ADD_PAD(element, pad) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_ELEMENT_ADD_PAD), \
|
|
|
|
GstTracerHookElementAddPad, (GST_TRACER_ARGS, element, pad)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookElementRemovePad:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @element: the element
|
|
|
|
* @pad: the pad
|
|
|
|
*
|
|
|
|
* Hook for gst_element_remove_pad() named "element-remove-pad".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookElementRemovePad) (GObject *self, GstClockTime ts,
|
|
|
|
GstElement *element, GstPad *pad);
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
#define GST_TRACER_ELEMENT_REMOVE_PAD(element, pad) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_ELEMENT_REMOVE_PAD), \
|
|
|
|
GstTracerHookElementRemovePad, (GST_TRACER_ARGS, element, pad)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookElementChangeStatePre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @element: the element
|
|
|
|
* @transition: the transition
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_element_change_state() named "element-change-state-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookElementChangeStatePre) (GObject *self,
|
|
|
|
GstClockTime ts, GstElement *element, GstStateChange transition);
|
2015-10-29 11:40:32 +00:00
|
|
|
#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
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookElementChangeStatePost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @element: the element
|
|
|
|
* @transition: the transition
|
|
|
|
* @result: the result of gst_pad_push()
|
|
|
|
*
|
|
|
|
* Post-hook for gst_element_change_state() named "element-change-state-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookElementChangeStatePost) (GObject *self,
|
|
|
|
GstClockTime ts, GstElement *element, GstStateChange transition,
|
|
|
|
GstStateChangeReturn result);
|
2015-10-29 11:40:32 +00:00
|
|
|
#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
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookBinAddPre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @bin: the bin
|
|
|
|
* @element: the element
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_bin_add() named "bin-add-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookBinAddPre) (GObject *self, GstClockTime ts,
|
|
|
|
GstBin *bin, GstElement *element);
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
#define GST_TRACER_BIN_ADD_PRE(bin, element) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_BIN_ADD_PRE), \
|
|
|
|
GstTracerHookBinAddPre, (GST_TRACER_ARGS, bin, element)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookBinAddPost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @bin: the bin
|
|
|
|
* @element: the element
|
|
|
|
* @result: the result of gst_bin_add()
|
|
|
|
*
|
|
|
|
* Post-hook for gst_bin_add() named "bin-add-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookBinAddPost) (GObject *self, GstClockTime ts,
|
|
|
|
GstBin *bin, GstElement *element, gboolean result);
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
#define GST_TRACER_BIN_ADD_POST(bin, element, result) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_BIN_ADD_POST), \
|
|
|
|
GstTracerHookBinAddPost, (GST_TRACER_ARGS, bin, element, result)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookBinRemovePre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @bin: the bin
|
|
|
|
* @element: the element
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_bin_remove() named "bin-remove-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookBinRemovePre) (GObject *self, GstClockTime ts,
|
|
|
|
GstBin *bin, GstElement *element);
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
#define GST_TRACER_BIN_REMOVE_PRE(bin, element) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_BIN_REMOVE_PRE), \
|
|
|
|
GstTracerHookBinRemovePre, (GST_TRACER_ARGS, bin, element)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookBinRemovePost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @bin: the bin
|
|
|
|
* @result: the result of gst_bin_remove()
|
|
|
|
*
|
|
|
|
* Post-hook for gst_bin_remove() named "bin-remove-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookBinRemovePost) (GObject *self, GstClockTime ts,
|
|
|
|
GstBin *bin, gboolean result);
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
#define GST_TRACER_BIN_REMOVE_POST(bin, result) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_BIN_REMOVE_POST), \
|
|
|
|
GstTracerHookBinRemovePost, (GST_TRACER_ARGS, bin, result)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadLinkPre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @srcpad: the srcpad
|
|
|
|
* @sinkpad: the sinkpad
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_pad_link() named "pad-link-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadLinkPre) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *srcpad, GstPad *sinkpad);
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
#define GST_TRACER_PAD_LINK_PRE(srcpad, sinkpad) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_LINK_PRE), \
|
|
|
|
GstTracerHookPadLinkPre, (GST_TRACER_ARGS, srcpad, sinkpad)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadLinkPost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @srcpad: the srcpad
|
|
|
|
* @sinkpad: the sinkpad
|
|
|
|
* @result: the result of gst_pad_link()
|
|
|
|
*
|
|
|
|
* Post-hook for gst_pad_link() named "pad-link-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadLinkPost) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *srcpad, GstPad *sinkpad, GstPadLinkReturn result);
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
#define GST_TRACER_PAD_LINK_POST(srcpad, sinkpad, result) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_LINK_POST), \
|
|
|
|
GstTracerHookPadLinkPost, (GST_TRACER_ARGS, srcpad, sinkpad, result)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadUnlinkPre:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @srcpad: the srcpad
|
|
|
|
* @sinkpad: the sinkpad
|
|
|
|
*
|
|
|
|
* Pre-hook for gst_pad_unlink() named "pad-unlink-pre".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadUnlinkPre) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *srcpad, GstPad *sinkpad);
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
#define GST_TRACER_PAD_UNLINK_PRE(srcpad, sinkpad) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_UNLINK_PRE), \
|
|
|
|
GstTracerHookPadUnlinkPre, (GST_TRACER_ARGS, srcpad, sinkpad)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-01-07 18:13:03 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookPadUnlinkPost:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @srcpad: the srcpad
|
|
|
|
* @sinkpad: the sinkpad
|
|
|
|
* @result: the result of gst_pad_push()
|
|
|
|
*
|
|
|
|
* Post-hook for gst_pad_unlink() named "pad-unlink-post".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookPadUnlinkPost) (GObject *self, GstClockTime ts,
|
|
|
|
GstPad *srcpad, GstPad *sinkpad, gboolean result);
|
tracer: add missing hooks
Add following hooks: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733187
2015-06-03 23:50:34 +00:00
|
|
|
#define GST_TRACER_PAD_UNLINK_POST(srcpad, sinkpad, result) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_UNLINK_POST), \
|
|
|
|
GstTracerHookPadUnlinkPost, (GST_TRACER_ARGS, srcpad, sinkpad, result)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-05-09 14:31:36 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookMiniObjectCreated:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @object: the mini object being created
|
|
|
|
*
|
|
|
|
* Hook called when a #GstMiniObject is created named "mini-object-created".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookMiniObjectCreated) (GObject *self, GstClockTime ts,
|
|
|
|
GstMiniObject *object);
|
|
|
|
#define GST_TRACER_MINI_OBJECT_CREATED(object) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_MINI_OBJECT_CREATED), \
|
|
|
|
GstTracerHookMiniObjectCreated, (GST_TRACER_ARGS, object)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstTracerHookMiniObjectDestroyed:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @object: the mini object being destroyed
|
|
|
|
*
|
|
|
|
* Hook called when a #GstMiniObject is being destroyed named
|
|
|
|
* "mini-object-destroyed".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookMiniObjectDestroyed) (GObject *self, GstClockTime ts,
|
|
|
|
GstMiniObject *object);
|
|
|
|
#define GST_TRACER_MINI_OBJECT_DESTROYED(object) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_MINI_OBJECT_DESTROYED), \
|
|
|
|
GstTracerHookMiniObjectDestroyed, (GST_TRACER_ARGS, object)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-12-01 20:35:45 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookObjectUnreffed:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @object: the object being unreffed
|
2018-04-02 10:42:30 +00:00
|
|
|
* @new_refcount: the new refcount after unrefing @object
|
2016-12-01 20:35:45 +00:00
|
|
|
*
|
|
|
|
* Hook called when a #GstObject is being unreffed named
|
|
|
|
* "object-unreffed"
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookObjectUnreffed) (GObject *self, GstClockTime ts,
|
|
|
|
GstObject *object, gint new_refcount);
|
|
|
|
#define GST_TRACER_OBJECT_UNREFFED(object, new_refcount) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_OBJECT_UNREFFED), \
|
|
|
|
GstTracerHookObjectUnreffed, (GST_TRACER_ARGS, object, new_refcount)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstTracerHookObjectReffed:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @object: the object being reffed
|
2018-04-02 10:42:30 +00:00
|
|
|
* @new_refcount: the new refcount after refing @object
|
2016-12-01 20:35:45 +00:00
|
|
|
*
|
|
|
|
* Hook called when a #GstObject is being reffed named
|
|
|
|
* "object-reffed".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookObjectReffed) (GObject *self, GstClockTime ts,
|
|
|
|
GstObject *object, gint new_refcount);
|
|
|
|
#define GST_TRACER_OBJECT_REFFED(object, new_refcount) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_OBJECT_REFFED), \
|
|
|
|
GstTracerHookObjectReffed, (GST_TRACER_ARGS, object, new_refcount)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstTracerHookMiniObjectUnreffed:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @object: the mini object being unreffed
|
2018-04-02 10:42:30 +00:00
|
|
|
* @new_refcount: the new refcount after unrefing @object
|
2016-12-01 20:35:45 +00:00
|
|
|
*
|
|
|
|
* Hook called when a #GstMiniObject is being unreffed named
|
|
|
|
* "mini-object-unreffed".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookMiniObjectUnreffed) (GObject *self, GstClockTime ts,
|
|
|
|
GstMiniObject *object, gint new_refcount);
|
|
|
|
#define GST_TRACER_MINI_OBJECT_UNREFFED(object, new_refcount) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_MINI_OBJECT_UNREFFED), \
|
|
|
|
GstTracerHookMiniObjectUnreffed, (GST_TRACER_ARGS, object, new_refcount)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstTracerHookMiniObjectReffed:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @object: the mini object being reffed
|
2018-04-02 10:42:30 +00:00
|
|
|
* @new_refcount: the new refcount after refing @object
|
2016-12-01 20:35:45 +00:00
|
|
|
*
|
|
|
|
* Hook called when a #GstMiniObject is being reffed named
|
|
|
|
* "mini-object-reffed".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookMiniObjectReffed) (GObject *self, GstClockTime ts,
|
|
|
|
GstMiniObject *object, gint new_refcount);
|
|
|
|
#define GST_TRACER_MINI_OBJECT_REFFED(object, new_refcount) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_MINI_OBJECT_REFFED), \
|
|
|
|
GstTracerHookMiniObjectReffed, (GST_TRACER_ARGS, object, new_refcount)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2016-05-09 14:31:36 +00:00
|
|
|
/**
|
|
|
|
* GstTracerHookObjectCreated:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @object: the object being created
|
|
|
|
*
|
|
|
|
* Hook called when a #GstObject is created named "object-created".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookObjectCreated) (GObject *self, GstClockTime ts,
|
|
|
|
GstObject *object);
|
|
|
|
#define GST_TRACER_OBJECT_CREATED(object) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_OBJECT_CREATED), \
|
|
|
|
GstTracerHookObjectCreated, (GST_TRACER_ARGS, object)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstTracerHookObjectDestroyed:
|
|
|
|
* @self: the tracer instance
|
|
|
|
* @ts: the current timestamp
|
|
|
|
* @object: the object being destroyed
|
|
|
|
*
|
|
|
|
* Hook called when a #GstObject is being destroyed named
|
|
|
|
* "object-destroyed".
|
|
|
|
*/
|
|
|
|
typedef void (*GstTracerHookObjectDestroyed) (GObject *self, GstClockTime ts,
|
|
|
|
GstObject *object);
|
|
|
|
#define GST_TRACER_OBJECT_DESTROYED(object) G_STMT_START{ \
|
|
|
|
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_OBJECT_DESTROYED), \
|
|
|
|
GstTracerHookObjectDestroyed, (GST_TRACER_ARGS, object)); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
|
|
|
|
2016-01-06 10:31:16 +00:00
|
|
|
#else /* !GST_DISABLE_GST_TRACER_HOOKS */
|
2014-07-18 05:49:38 +00:00
|
|
|
|
2017-11-10 15:26:50 +00:00
|
|
|
static inline void
|
|
|
|
_priv_gst_tracing_init (void)
|
|
|
|
{
|
|
|
|
GST_DEBUG ("Tracing hooks are disabled");
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
_priv_gst_tracing_deinit (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-07-18 05:49:38 +00:00
|
|
|
#define GST_TRACER_PAD_PUSH_PRE(pad, buffer)
|
|
|
|
#define GST_TRACER_PAD_PUSH_POST(pad, res)
|
|
|
|
#define GST_TRACER_PAD_PUSH_LIST_PRE(pad, list)
|
|
|
|
#define GST_TRACER_PAD_PUSH_LIST_POST(pad, res)
|
|
|
|
#define GST_TRACER_PAD_PULL_RANGE_PRE(pad, offset, size)
|
|
|
|
#define GST_TRACER_PAD_PULL_RANGE_POST(pad, buffer, res)
|
|
|
|
#define GST_TRACER_PAD_PUSH_EVENT_PRE(pad, event)
|
|
|
|
#define GST_TRACER_PAD_PUSH_EVENT_POST(pad, res)
|
2015-10-06 12:01:03 +00:00
|
|
|
#define GST_TRACER_PAD_QUERY_PRE(pad, query)
|
2016-01-07 22:03:48 +00:00
|
|
|
#define GST_TRACER_PAD_QUERY_POST(pad, query, res)
|
2014-07-18 05:49:38 +00:00
|
|
|
#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)
|
2016-01-07 22:03:48 +00:00
|
|
|
#define GST_TRACER_ELEMENT_QUERY_POST(element, query, res)
|
2015-10-06 09:39:33 +00:00
|
|
|
#define GST_TRACER_ELEMENT_NEW(element)
|
|
|
|
#define GST_TRACER_ELEMENT_ADD_PAD(element, pad)
|
|
|
|
#define GST_TRACER_ELEMENT_REMOVE_PAD(element, pad)
|
2015-10-29 11:40:32 +00:00
|
|
|
#define GST_TRACER_ELEMENT_CHANGE_STATE_PRE(element, transition)
|
|
|
|
#define GST_TRACER_ELEMENT_CHANGE_STATE_POST(element, transition, res)
|
2015-10-06 09:39:33 +00:00
|
|
|
#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)
|
|
|
|
#define GST_TRACER_BIN_REMOVE_POST(bin, res)
|
|
|
|
#define GST_TRACER_PAD_LINK_PRE(srcpad, sinkpad)
|
|
|
|
#define GST_TRACER_PAD_LINK_POST(srcpad, sinkpad, res)
|
|
|
|
#define GST_TRACER_PAD_UNLINK_PRE(srcpad, sinkpad)
|
|
|
|
#define GST_TRACER_PAD_UNLINK_POST(srcpad, sinkpad, res)
|
2016-05-09 14:31:36 +00:00
|
|
|
#define GST_TRACER_MINI_OBJECT_CREATED(object)
|
|
|
|
#define GST_TRACER_MINI_OBJECT_DESTROYED(object)
|
2016-12-01 20:35:45 +00:00
|
|
|
#define GST_TRACER_MINI_OBJECT_REFFED(object, new_refcount)
|
2017-07-05 12:17:49 +00:00
|
|
|
#define GST_TRACER_MINI_OBJECT_UNREFFED(object, new_refcount)
|
2016-05-09 14:31:36 +00:00
|
|
|
#define GST_TRACER_OBJECT_CREATED(object)
|
|
|
|
#define GST_TRACER_OBJECT_DESTROYED(object)
|
2016-12-01 20:35:45 +00:00
|
|
|
#define GST_TRACER_OBJECT_REFFED(object, new_refcount)
|
|
|
|
#define GST_TRACER_OBJECT_UNREFFED(object, new_refcount)
|
2014-07-18 05:49:38 +00:00
|
|
|
|
2016-01-06 10:31:16 +00:00
|
|
|
#endif /* GST_DISABLE_GST_TRACER_HOOKS */
|
2014-07-18 05:49:38 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_TRACER_UTILS_H__ */
|
|
|
|
|