1 #ifndef __GST_PARSE_TYPES_H__
2 #define __GST_PARSE_TYPES_H__
4 #include <glib-object.h>
5 #include "../gstelement.h"
6 #include "../gstparse.h"
26 typedef struct _graph_t graph_t;
28 chain_t *chain; /* links are supposed to be done now */
31 GstParseContext *ctx; /* may be NULL */
37 * Memory checking. Should probably be done with gsttrace stuff, but that
38 * doesn't really work.
39 * This is not safe from reentrance issues, but that doesn't matter as long as
40 * we lock a mutex before parsing anyway.
42 * FIXME: Disable this for now for the above reasons
45 #ifdef GST_DEBUG_ENABLED
46 # define __GST_PARSE_TRACE
50 #ifdef __GST_PARSE_TRACE
51 G_GNUC_INTERNAL gchar *__gst_parse_strdup (gchar *org);
52 G_GNUC_INTERNAL void __gst_parse_strfree (gchar *str);
53 G_GNUC_INTERNAL link_t *__gst_parse_link_new (void);
54 G_GNUC_INTERNAL void __gst_parse_link_free (link_t *data);
55 G_GNUC_INTERNAL chain_t *__gst_parse_chain_new (void);
56 G_GNUC_INTERNAL void __gst_parse_chain_free (chain_t *data);
57 # define gst_parse_strdup __gst_parse_strdup
58 # define gst_parse_strfree __gst_parse_strfree
59 # define gst_parse_link_new __gst_parse_link_new
60 # define gst_parse_link_free __gst_parse_link_free
61 # define gst_parse_chain_new __gst_parse_chain_new
62 # define gst_parse_chain_free __gst_parse_chain_free
63 #else /* __GST_PARSE_TRACE */
64 # define gst_parse_strdup g_strdup
65 # define gst_parse_strfree g_free
66 # define gst_parse_link_new() g_slice_new0 (link_t)
67 # define gst_parse_link_free(l) g_slice_free (link_t, l)
68 # define gst_parse_chain_new() g_slice_new0 (chain_t)
69 # define gst_parse_chain_free(c) g_slice_free (chain_t, c)
70 #endif /* __GST_PARSE_TRACE */
73 gst_parse_unescape (gchar *str)
78 g_return_if_fail (str != NULL);
83 GST_DEBUG ("unescaping %s", str);
86 if (*walk == '\\' && !in_quotes) {
88 /* make sure we don't read beyond the end of the string */
91 } else if (*walk == '"' && (!in_quotes || (in_quotes
92 && (*(walk - 1) != '\\')))) {
93 /* don't unescape inside quotes and don't switch
94 * state with escaped quoted inside quotes */
95 in_quotes = !in_quotes;
104 G_GNUC_INTERNAL GstElement *priv_gst_parse_launch (const gchar * str,
106 GstParseContext * ctx,
107 GstParseFlags flags);
109 #endif /* __GST_PARSE_TYPES_H__ */