2013-10-24 12:47:48 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2013 Stefan Sauer <ensonic@users.sf.net>
|
|
|
|
*
|
|
|
|
* gsttracers.c: tracing modules
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2014-02-18 10:06:10 +00:00
|
|
|
#include "gstlatency.h"
|
2013-10-24 12:47:48 +00:00
|
|
|
#include "gstlog.h"
|
2013-11-20 07:22:58 +00:00
|
|
|
#include "gstrusage.h"
|
2013-10-28 07:08:20 +00:00
|
|
|
#include "gststats.h"
|
2013-10-24 12:47:48 +00:00
|
|
|
|
|
|
|
static gboolean
|
|
|
|
plugin_init (GstPlugin * plugin)
|
|
|
|
{
|
2014-02-18 10:06:10 +00:00
|
|
|
if (!gst_tracer_register (plugin, "latency", gst_latency_tracer_get_type ()))
|
|
|
|
return FALSE;
|
2015-10-06 16:46:24 +00:00
|
|
|
#ifndef GST_DISABLE_GST_DEBUG
|
2013-10-24 12:47:48 +00:00
|
|
|
if (!gst_tracer_register (plugin, "log", gst_log_tracer_get_type ()))
|
|
|
|
return FALSE;
|
2015-10-06 16:46:24 +00:00
|
|
|
#endif
|
2015-10-07 10:22:34 +00:00
|
|
|
#ifdef HAVE_GETRUSAGE
|
2013-11-20 07:22:58 +00:00
|
|
|
if (!gst_tracer_register (plugin, "rusage", gst_rusage_tracer_get_type ()))
|
|
|
|
return FALSE;
|
|
|
|
#endif
|
2013-10-28 07:08:20 +00:00
|
|
|
if (!gst_tracer_register (plugin, "stats", gst_stats_tracer_get_type ()))
|
|
|
|
return FALSE;
|
2013-10-24 12:47:48 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, coretracers,
|
|
|
|
"GStreamer core tracers", plugin_init, VERSION, GST_LICENSE,
|
|
|
|
GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
|