2 * Copyright (C) 2013 Stefan Sauer <ensonic@users.sf.net>
4 * gsttracerfactory.c: tracing subsystem
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
23 * SECTION:gsttracerfactory
24 * @title: GstTracerFactory
25 * @short_description: Information about registered tracer functions
27 * Use gst_tracer_factory_get_list() to get a list of tracer factories known to
31 #include "gst_private.h"
33 #include "gsttracerfactory.h"
34 #include "gstregistry.h"
36 GST_DEBUG_CATEGORY (tracer_debug);
37 #define GST_CAT_DEFAULT tracer_debug
41 GST_DEBUG_CATEGORY_INIT (tracer_debug, "GST_TRACER", \
42 GST_DEBUG_FG_BLUE, "tracing subsystem"); \
45 #define gst_tracer_factory_parent_class parent_class
46 G_DEFINE_TYPE_WITH_CODE (GstTracerFactory, gst_tracer_factory,
47 GST_TYPE_PLUGIN_FEATURE, _do_init);
50 gst_tracer_factory_class_init (GstTracerFactoryClass * klass)
55 gst_tracer_factory_init (GstTracerFactory * factory)
60 * gst_tracer_factory_get_list:
62 * Gets the list of all registered tracer factories. You must free the
63 * list using gst_plugin_feature_list_free().
65 * The returned factories are sorted by factory name.
67 * Free-function: gst_plugin_feature_list_free
69 * Returns: (transfer full) (element-type Gst.TracerFactory): the list of all
70 * registered #GstTracerFactory.
75 gst_tracer_factory_get_list (void)
77 return gst_registry_get_feature_list (gst_registry_get (),
78 GST_TYPE_TRACER_FACTORY);
82 * gst_tracer_factory_get_tracer_type:
83 * @factory: factory to get managed #GType from
85 * Get the #GType for elements managed by this factory. The type can
86 * only be retrieved if the element factory is loaded, which can be
87 * assured with gst_plugin_feature_load().
89 * Returns: the #GType for tracers managed by this factory or 0 if
90 * the factory is not loaded.
95 gst_tracer_factory_get_tracer_type (GstTracerFactory * factory)
97 g_return_val_if_fail (GST_IS_TRACER_FACTORY (factory), 0);