element: Enforce that elements created by gst_element_factory_create/make() are floating
[platform/upstream/gstreamer.git] / gst / parse / types.h
index e3e541d..5dbb959 100644 (file)
@@ -15,14 +15,13 @@ typedef struct {
   reference_t src;
   reference_t sink;
   GstCaps *caps;
+  gboolean all_pads;
 } link_t;
 
 typedef struct {
   GSList *elements;
   reference_t first;
   reference_t last;
-  //link_t *front;
-  //link_t *back;
 } chain_t;
 
 typedef struct _graph_t graph_t;
@@ -40,10 +39,14 @@ struct _graph_t {
  * doesn't really work.
  * This is not safe from reentrance issues, but that doesn't matter as long as
  * we lock a mutex before parsing anyway.
+ *
+ * FIXME: Disable this for now for the above reasons
  */
-//#ifdef GST_DEBUG_ENABLED
+#if 0
+#ifdef GST_DEBUG_ENABLED
 #  define __GST_PARSE_TRACE
-//#endif
+#endif
+#endif
 
 #ifdef __GST_PARSE_TRACE
 G_GNUC_INTERNAL  gchar  *__gst_parse_strdup (gchar *org);
@@ -61,10 +64,10 @@ G_GNUC_INTERNAL  void       __gst_parse_chain_free (chain_t *data);
 #else /* __GST_PARSE_TRACE */
 #  define gst_parse_strdup g_strdup
 #  define gst_parse_strfree g_free
-#  define gst_parse_link_new() g_new0 (link_t, 1)
-#  define gst_parse_link_free g_free
-#  define gst_parse_chain_new() g_new0 (chain_t, 1)
-#  define gst_parse_chain_free g_free
+#  define gst_parse_link_new() g_slice_new0 (link_t)
+#  define gst_parse_link_free(l) g_slice_free (link_t, l)
+#  define gst_parse_chain_new() g_slice_new0 (chain_t)
+#  define gst_parse_chain_free(c) g_slice_free (chain_t, c)
 #endif /* __GST_PARSE_TRACE */
 
 static inline void
@@ -86,8 +89,7 @@ gst_parse_unescape (gchar *str)
       /* make sure we don't read beyond the end of the string */
       if (*walk == '\0')
         break;
-    } else if (*walk == '"' && (!in_quotes || (in_quotes
-                && (*(walk - 1) != '\\')))) {
+    } else if (*walk == '"' && (!in_quotes || *(walk - 1) != '\\')) {
       /* don't unescape inside quotes and don't switch
        * state with escaped quoted inside quotes */
       in_quotes = !in_quotes;