a bunch of gtk-doc fixes
[platform/upstream/gstreamer.git] / gst / parse / types.h
1 #ifndef __GST_PARSE_TYPES_H__
2 #define __GST_PARSE_TYPES_H__
3
4 #include <glib-object.h>
5 #include "../gstelement.h"
6
7 #ifdef HAVE_CONFIG_H
8 #  include "config.h"
9 #endif
10
11 typedef struct {
12   GstElement *src;
13   GstElement *sink;
14   gchar *src_name;
15   gchar *sink_name;
16   GSList *src_pads;
17   GSList *sink_pads;
18   GstCaps *caps;
19 } link_t;
20
21 typedef struct {
22   GSList *elements;
23   GstElement *first;
24   GstElement *last;
25   link_t *front;
26   link_t *back;
27 } chain_t;
28
29 typedef struct _graph_t graph_t;
30 struct _graph_t {
31   chain_t *chain; /* links are supposed to be done now */
32   GSList *links;
33   GError **error;
34 };
35
36
37 /* 
38  * Memory checking. Should probably be done with gsttrace stuff, but that 
39  * doesn't really work.
40  * This is not safe from reentrance issues, but that doesn't matter as long as
41  * we lock a mutex before parsing anyway.
42  */
43 #ifdef GST_DEBUG_ENABLED
44 #  define __GST_PARSE_TRACE
45 #endif
46
47 #ifdef __GST_PARSE_TRACE
48 gchar  *__gst_parse_strdup (gchar *org);
49 void    __gst_parse_strfree (gchar *str);
50 link_t *__gst_parse_link_new ();
51 void    __gst_parse_link_free (link_t *data);
52 chain_t *__gst_parse_chain_new ();
53 void    __gst_parse_chain_free (chain_t *data);
54 #  define gst_parse_strdup __gst_parse_strdup
55 #  define gst_parse_strfree __gst_parse_strfree
56 #  define gst_parse_link_new __gst_parse_link_new
57 #  define gst_parse_link_free __gst_parse_link_free
58 #  define gst_parse_chain_new __gst_parse_chain_new
59 #  define gst_parse_chain_free __gst_parse_chain_free
60 #else /* __GST_PARSE_TRACE */
61 #  define gst_parse_strdup g_strdup
62 #  define gst_parse_strfree g_free
63 #  define gst_parse_link_new() g_new0 (link_t, 1)
64 #  define gst_parse_link_free g_free
65 #  define gst_parse_chain_new() g_new0 (chain_t, 1)
66 #  define gst_parse_chain_free g_free
67 #endif /* __GST_PARSE_TRACE */
68
69 #endif /* __GST_PARSE_TYPES_H__ */