65fd06694fba4f96380bc66aff52c51620dbcd2e
[platform/upstream/gstreamer.git] / gst / gsttracerfactory.c
1 /* GStreamer
2  * Copyright (C) 2013 Stefan Sauer <ensonic@users.sf.net>
3  *
4  * gsttracerfactory.c: tracing subsystem
5  *
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.
10  *
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.
15  *
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.
20  */
21
22 /**
23  * SECTION:gsttracerfactory
24  * @short_description: Information about registered tracer functions
25  *
26  * Use gst_tracer_factory_get_list() to get a list of tracer factories known to
27  * GStreamer.
28  */
29
30 #include "gst_private.h"
31 #include "gstinfo.h"
32 #include "gsttracerfactory.h"
33 #include "gstregistry.h"
34
35 GST_DEBUG_CATEGORY (tracer_debug);
36 #define GST_CAT_DEFAULT tracer_debug
37
38 #define _do_init \
39 { \
40   GST_DEBUG_CATEGORY_INIT (tracer_debug, "GST_TRACER", \
41       GST_DEBUG_FG_BLUE, "tracing subsystem"); \
42 }
43
44 #define gst_tracer_factory_parent_class parent_class
45 G_DEFINE_TYPE_WITH_CODE (GstTracerFactory, gst_tracer_factory,
46     GST_TYPE_PLUGIN_FEATURE, _do_init);
47
48 static void
49 gst_tracer_factory_class_init (GstTracerFactoryClass * klass)
50 {
51 }
52
53 static void
54 gst_tracer_factory_init (GstTracerFactory * factory)
55 {
56 }
57
58 /**
59  * gst_tracer_factory_get_list:
60  *
61  * Gets the list of all registered tracer factories. You must free the
62  * list using gst_plugin_feature_list_free().
63  *
64  * The returned factories are sorted by factory name.
65  *
66  * Free-function: gst_plugin_feature_list_free
67  *
68  * Returns: (transfer full) (element-type Gst.TracerFactory): the list of all
69  *     registered #GstTracerFactory.
70  *
71  * Since: 1.8
72  */
73 GList *
74 gst_tracer_factory_get_list (void)
75 {
76   return gst_registry_get_feature_list (gst_registry_get (),
77       GST_TYPE_TRACER_FACTORY);
78 }