gstreamer_core/gst/parse/grammar.tab.c
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
--- a/gstreamer_core/gst/parse/grammar.tab.c	Tue Aug 31 15:30:33 2010 +0300
+++ b/gstreamer_core/gst/parse/grammar.tab.c	Wed Sep 01 12:16:41 2010 +0100
@@ -1,6 +1,12 @@
 #ifdef HAVE_CONFIG_H
+#ifdef __SYMBIAN32__
+#include "config.h"
+#else
 #include <config.h>
 #endif
+#endif
+
+
 /* A Bison parser, made by GNU Bison 2.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
@@ -106,9 +112,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#ifdef __SYMBIAN32__
-#include <glib_global.h>
-#endif
 
 #include "../gst_private.h"
 #include "../gst-i18n-lib.h"
@@ -117,7 +120,6 @@
 #include "../gstparse.h"
 #include "../gstinfo.h"
 #include "../gsterror.h"
-#include "../gststructure.h"
 #include "../gsturi.h"
 #include "../gstutils.h"
 #include "../gstvalue.h"
@@ -233,7 +235,7 @@
 } G_STMT_END
 
 #  define ERROR(type, ...) \
-  SET_ERROR (graph->error, (type), __VA_ARGS__ )
+  SET_ERROR (((graph_t *) graph)->error, (type), __VA_ARGS__ )
 
 #elif defined(G_HAVE_GNUC_VARARGS)
 
@@ -246,7 +248,7 @@
 } G_STMT_END
 
 #  define ERROR(type, args...) \
-  SET_ERROR (graph->error,(type) , args )
+  SET_ERROR (((graph_t *) graph)->error,(type) , args )
 
 #else
 
@@ -319,19 +321,13 @@
 
 #endif /* GST_DISABLE_GST_DEBUG */
 
-#define ADD_MISSING_ELEMENT(graph,name) G_STMT_START {                      \
-    if ((graph)->ctx) {                                                     \
-      (graph)->ctx->missing_elements =                                      \
-          g_list_append ((graph)->ctx->missing_elements, g_strdup (name));  \
-    } } G_STMT_END
-
 #define GST_BIN_MAKE(res, type, chainval, assign, free_string) \
 G_STMT_START { \
   chain_t *chain = chainval; \
   GSList *walk; \
   GstBin *bin = (GstBin *) gst_element_factory_make (type, NULL); \
   if (!chain) { \
-    SET_ERROR (graph->error, GST_PARSE_ERROR_EMPTY_BIN, \
+    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_EMPTY_BIN, \
         _("specified empty bin \"%s\", not allowed"), type); \
     g_slist_foreach (assign, (GFunc) gst_parse_strfree, NULL); \
     g_slist_free (assign); \
@@ -340,8 +336,7 @@
       gst_parse_strfree (type); /* Need to clean up the string */ \
     YYERROR; \
   } else if (!bin) { \
-    ADD_MISSING_ELEMENT(graph, type); \
-    SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, \
+    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, \
         _("no bin \"%s\", skipping"), type); \
     g_slist_foreach (assign, (GFunc) gst_parse_strfree, NULL); \
     g_slist_free (assign); \
@@ -395,46 +390,29 @@
   GType value_type;
 
   if (gst_child_proxy_lookup (GST_OBJECT (set->parent), set->name, &target, &pspec)) { 
-    gboolean got_value = FALSE;
-
     value_type = G_PARAM_SPEC_VALUE_TYPE (pspec);
 
     GST_CAT_LOG (GST_CAT_PIPELINE, "parsing delayed property %s as a %s from %s", pspec->name,
       g_type_name (value_type), set->value_str);
     g_value_init (&v, value_type);
-    if (gst_value_deserialize (&v, set->value_str))
-      got_value = TRUE;
-    else if (g_type_is_a (value_type, GST_TYPE_ELEMENT)) {
-       GstElement *bin;
-       
-       bin = gst_parse_bin_from_description (set->value_str, TRUE, NULL);
-       if (bin) {
-         g_value_set_object (&v, bin);
-         got_value = TRUE;
-       }
+    if (gst_value_deserialize (&v, set->value_str)) {
+      g_object_set_property (G_OBJECT (target), pspec->name, &v);
     }
     g_signal_handler_disconnect (child_proxy, set->signal_id);
     g_free(set->name);
     g_free(set->value_str);
     g_free(set);
-    if (!got_value)
-      goto error;
-    g_object_set_property (G_OBJECT (target), pspec->name, &v);
   }
 
-out:
   if (G_IS_VALUE (&v))
     g_value_unset (&v);
   if (target)
     gst_object_unref (target);
   return;
-
-error:
-  GST_CAT_ERROR (GST_CAT_PIPELINE, "could not set property \"%s\" in element \"%s\"",
-	 pspec->name, GST_ELEMENT_NAME (target));
-  goto out;
 }
-
+#ifdef __SYMBIAN32__
+#include<glib_global.h>
+#endif
 
 static void
 gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
@@ -445,10 +423,6 @@
   GstObject *target = NULL;
   GType value_type;
 
-  /* do nothing if assignment is for missing element */
-  if (element == NULL)
-    goto out;
-
   /* parse the string, so the property name is null-terminated an pos points
      to the beginning of the value */
   while (!g_ascii_isspace (*pos) && (*pos != '=')) pos++; 
@@ -468,25 +442,11 @@
   gst_parse_unescape (pos);
 
   if (gst_child_proxy_lookup (GST_OBJECT (element), value, &target, &pspec)) { 
-    gboolean got_value = FALSE;
-
     value_type = G_PARAM_SPEC_VALUE_TYPE (pspec); 
-
     GST_CAT_LOG (GST_CAT_PIPELINE, "parsing property %s as a %s", pspec->name,
       g_type_name (value_type));
     g_value_init (&v, value_type);
-    if (gst_value_deserialize (&v, pos))
-      got_value = TRUE;
-    else if (g_type_is_a (value_type, GST_TYPE_ELEMENT)) {
-       GstElement *bin;
-       
-       bin = gst_parse_bin_from_description (pos, TRUE, NULL);
-       if (bin) {
-         g_value_set_object (&v, bin);
-         got_value = TRUE;
-       }
-    }
-    if (!got_value)
+    if (!gst_value_deserialize (&v, pos))
       goto error;
     g_object_set_property (G_OBJECT (target), pspec->name, &v);
   } else { 
@@ -500,7 +460,7 @@
       data->signal_id = g_signal_connect(GST_OBJECT (element),"child-added", G_CALLBACK (gst_parse_new_child), data);
     }
     else {
-      SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_PROPERTY, \
+      SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_PROPERTY, \
           _("no property \"%s\" in element \"%s\""), value, \
           GST_ELEMENT_NAME (element));
     }
@@ -515,7 +475,7 @@
   return;
   
 error:
-  SET_ERROR (graph->error, GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
+  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
          _("could not set property \"%s\" in element \"%s\" to \"%s\""), 
 	 value, GST_ELEMENT_NAME (element), pos); 
   goto out;
@@ -657,7 +617,7 @@
   return 0;
   
 error:
-  SET_ERROR (graph->error, GST_PARSE_ERROR_LINK,
+  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK,
       _("could not link %s to %s"), GST_ELEMENT_NAME (src),
       GST_ELEMENT_NAME (sink));
   gst_parse_free_link (link);
@@ -688,7 +648,7 @@
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 566 "./grammar.y"
+#line 521 "./grammar.y"
 {
     gchar *s;
     chain_t *c;
@@ -698,7 +658,7 @@
     graph_t *g;
 }
 /* Line 187 of yacc.c.  */
-#line 696 "grammar.tab.c"
+#line 651 "grammar.tab.c"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -711,7 +671,7 @@
 
 
 /* Line 216 of yacc.c.  */
-#line 709 "grammar.tab.c"
+#line 664 "grammar.tab.c"
 
 #ifdef short
 # undef short
@@ -853,14 +813,14 @@
 #   define YYMALLOC malloc
 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
-IMPORT_C void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
-IMPORT_C void free (void *); /* INFRINGES ON USER NAME SPACE */
+void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 # endif
@@ -1004,10 +964,10 @@
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   601,   601,   615,   619,   620,   622,   623,   626,   629,
-     634,   635,   639,   640,   643,   644,   647,   648,   649,   652,
-     665,   666,   667,   670,   675,   676,   711,   739,   740,   754,
-     774,   799,   802
+       0,   556,   556,   564,   568,   569,   571,   572,   575,   578,
+     583,   584,   588,   589,   592,   593,   596,   597,   598,   601,
+     614,   615,   616,   619,   624,   625,   660,   688,   689,   703,
+     723,   748,   751
 };
 #endif
 
@@ -1974,120 +1934,114 @@
   switch (yyn)
     {
         case 2:
-#line 601 "./grammar.y"
+#line 556 "./grammar.y"
     { (yyval.e) = gst_element_factory_make ((yyvsp[(1) - (1)].s), NULL); 
 						if ((yyval.e) == NULL) {
-						  ADD_MISSING_ELEMENT (graph, (yyvsp[(1) - (1)].s));
-						  SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, _("no element \"%s\""), (yyvsp[(1) - (1)].s));
-						  /* if FATAL_ERRORS flag is set, we don't have to worry about backwards
-						   * compatibility and can continue parsing and check for other missing
-						   * elements */
-						  if ((graph->flags & GST_PARSE_FLAG_FATAL_ERRORS) == 0) {
-						    gst_parse_strfree ((yyvsp[(1) - (1)].s));
-						    YYERROR;
-						  }
+						  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, _("no element \"%s\""), (yyvsp[(1) - (1)].s));
+						  gst_parse_strfree ((yyvsp[(1) - (1)].s));
+						  YYERROR;
 						}
 						gst_parse_strfree ((yyvsp[(1) - (1)].s));
                                               ;}
     break;
 
   case 3:
-#line 615 "./grammar.y"
+#line 564 "./grammar.y"
     { gst_parse_element_set ((yyvsp[(2) - (2)].s), (yyvsp[(1) - (2)].e), graph);
 						(yyval.e) = (yyvsp[(1) - (2)].e);
 	                                      ;}
     break;
 
   case 4:
-#line 619 "./grammar.y"
+#line 568 "./grammar.y"
     { (yyval.p) = NULL; ;}
     break;
 
   case 5:
-#line 620 "./grammar.y"
+#line 569 "./grammar.y"
     { (yyval.p) = g_slist_prepend ((yyvsp[(1) - (2)].p), (yyvsp[(2) - (2)].s)); ;}
     break;
 
   case 6:
-#line 622 "./grammar.y"
+#line 571 "./grammar.y"
     { GST_BIN_MAKE ((yyval.c), "bin", (yyvsp[(3) - (4)].c), (yyvsp[(2) - (4)].p), FALSE); ;}
     break;
 
   case 7:
-#line 623 "./grammar.y"
+#line 572 "./grammar.y"
     { GST_BIN_MAKE ((yyval.c), (yyvsp[(1) - (4)].s), (yyvsp[(3) - (4)].c), (yyvsp[(2) - (4)].p), TRUE); 
 						gst_parse_strfree ((yyvsp[(1) - (4)].s));
 					      ;}
     break;
 
   case 8:
-#line 626 "./grammar.y"
+#line 575 "./grammar.y"
     { GST_BIN_MAKE ((yyval.c), (yyvsp[(1) - (3)].s), NULL, (yyvsp[(2) - (3)].p), TRUE); 
 						gst_parse_strfree ((yyvsp[(1) - (3)].s));
 					      ;}
     break;
 
   case 9:
-#line 629 "./grammar.y"
+#line 578 "./grammar.y"
     { GST_BIN_MAKE ((yyval.c), (yyvsp[(1) - (4)].s), NULL, (yyvsp[(2) - (4)].p), TRUE); 
 						gst_parse_strfree ((yyvsp[(1) - (4)].s));
 					      ;}
     break;
 
   case 10:
-#line 634 "./grammar.y"
+#line 583 "./grammar.y"
     { (yyval.p) = g_slist_prepend (NULL, (yyvsp[(1) - (1)].s)); ;}
     break;
 
   case 11:
-#line 635 "./grammar.y"
+#line 584 "./grammar.y"
     { (yyval.p) = (yyvsp[(2) - (2)].p);
 						(yyval.p) = g_slist_prepend ((yyval.p), (yyvsp[(1) - (2)].s));
 					      ;}
     break;
 
   case 12:
-#line 639 "./grammar.y"
+#line 588 "./grammar.y"
     { (yyval.p) = g_slist_prepend (NULL, (yyvsp[(2) - (2)].s)); ;}
     break;
 
   case 13:
-#line 640 "./grammar.y"
+#line 589 "./grammar.y"
     { (yyval.p) = g_slist_prepend ((yyvsp[(3) - (3)].p), (yyvsp[(2) - (3)].s)); ;}
     break;
 
   case 14:
-#line 643 "./grammar.y"
+#line 592 "./grammar.y"
     { MAKE_REF ((yyval.l), (yyvsp[(1) - (1)].s), NULL); ;}
     break;
 
   case 15:
-#line 644 "./grammar.y"
+#line 593 "./grammar.y"
     { MAKE_REF ((yyval.l), (yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].p)); ;}
     break;
 
   case 16:
-#line 647 "./grammar.y"
+#line 596 "./grammar.y"
     { (yyval.l) = (yyvsp[(1) - (1)].l); ;}
     break;
 
   case 17:
-#line 648 "./grammar.y"
+#line 597 "./grammar.y"
     { MAKE_REF ((yyval.l), NULL, (yyvsp[(1) - (1)].p)); ;}
     break;
 
   case 18:
-#line 649 "./grammar.y"
+#line 598 "./grammar.y"
     { MAKE_REF ((yyval.l), NULL, NULL); ;}
     break;
 
   case 19:
-#line 652 "./grammar.y"
+#line 601 "./grammar.y"
     { (yyval.l) = (yyvsp[(1) - (3)].l);
 						if ((yyvsp[(2) - (3)].s)) {
 						  (yyval.l)->caps = gst_caps_from_string ((yyvsp[(2) - (3)].s));
 						  if ((yyval.l)->caps == NULL)
-						    SET_ERROR (graph->error, GST_PARSE_ERROR_LINK, _("could not parse caps \"%s\""), (yyvsp[(2) - (3)].s));
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("could not parse caps \"%s\""), (yyvsp[(2) - (3)].s));
 						  gst_parse_strfree ((yyvsp[(2) - (3)].s));
 						}
 						(yyval.l)->sink_name = (yyvsp[(3) - (3)].l)->src_name;
@@ -2097,22 +2051,22 @@
     break;
 
   case 20:
-#line 665 "./grammar.y"
+#line 614 "./grammar.y"
     { (yyval.p) = g_slist_prepend (NULL, (yyvsp[(1) - (1)].l)); ;}
     break;
 
   case 21:
-#line 666 "./grammar.y"
+#line 615 "./grammar.y"
     { (yyval.p) = g_slist_prepend ((yyvsp[(2) - (2)].p), (yyvsp[(1) - (2)].l)); ;}
     break;
 
   case 22:
-#line 667 "./grammar.y"
+#line 616 "./grammar.y"
     { (yyval.p) = (yyvsp[(1) - (2)].p); ;}
     break;
 
   case 23:
-#line 670 "./grammar.y"
+#line 619 "./grammar.y"
     { (yyval.c) = gst_parse_chain_new ();
 						(yyval.c)->first = (yyval.c)->last = (yyvsp[(1) - (1)].e);
 						(yyval.c)->front = (yyval.c)->back = NULL;
@@ -2121,24 +2075,24 @@
     break;
 
   case 24:
-#line 675 "./grammar.y"
+#line 624 "./grammar.y"
     { (yyval.c) = (yyvsp[(1) - (1)].c); ;}
     break;
 
   case 25:
-#line 676 "./grammar.y"
+#line 625 "./grammar.y"
     { if ((yyvsp[(1) - (2)].c)->back && (yyvsp[(2) - (2)].c)->front) {
 						  if (!(yyvsp[(1) - (2)].c)->back->sink_name) {
-						    SET_ERROR (graph->error, GST_PARSE_ERROR_LINK, _("link without source element"));
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
 						    gst_parse_free_link ((yyvsp[(1) - (2)].c)->back);
 						  } else {
-						    graph->links = g_slist_prepend (graph->links, (yyvsp[(1) - (2)].c)->back);
+						    ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, (yyvsp[(1) - (2)].c)->back);
 						  }
 						  if (!(yyvsp[(2) - (2)].c)->front->src_name) {
-						    SET_ERROR (graph->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
 						    gst_parse_free_link ((yyvsp[(2) - (2)].c)->front);
 						  } else {
-						    graph->links = g_slist_prepend (graph->links, (yyvsp[(2) - (2)].c)->front);
+						    ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, (yyvsp[(2) - (2)].c)->front);
 						  }
 						  (yyvsp[(1) - (2)].c)->back = NULL;
 						} else if ((yyvsp[(1) - (2)].c)->back) {
@@ -2153,7 +2107,7 @@
 						}
 						
 						if ((yyvsp[(1) - (2)].c)->back) {
-						  graph->links = g_slist_prepend (graph->links, (yyvsp[(1) - (2)].c)->back);
+						  ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, (yyvsp[(1) - (2)].c)->back);
 						}
 						(yyvsp[(1) - (2)].c)->last = (yyvsp[(2) - (2)].c)->last;
 						(yyvsp[(1) - (2)].c)->back = (yyvsp[(2) - (2)].c)->back;
@@ -2165,7 +2119,7 @@
     break;
 
   case 26:
-#line 711 "./grammar.y"
+#line 660 "./grammar.y"
     { GSList *walk;
 						if ((yyvsp[(1) - (2)].c)->back) {
 						  (yyvsp[(2) - (2)].p) = g_slist_prepend ((yyvsp[(2) - (2)].p), (yyvsp[(1) - (2)].c)->back);
@@ -2178,14 +2132,14 @@
 						for (walk = (yyvsp[(2) - (2)].p); walk; walk = walk->next) {
 						  link_t *link = (link_t *) walk->data;
 						  if (!link->sink_name && walk->next) {
-						    SET_ERROR (graph->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
 						    gst_parse_free_link (link);
 						  } else if (!link->src_name && !link->src) {
-						    SET_ERROR (graph->error, GST_PARSE_ERROR_LINK, _("link without source element"));
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
 						    gst_parse_free_link (link);
 						  } else {
 						    if (walk->next) {
-						      graph->links = g_slist_prepend (graph->links, link);
+						      ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, link);
 						    } else {
 						      (yyvsp[(1) - (2)].c)->back = link;
 						    }
@@ -2197,18 +2151,18 @@
     break;
 
   case 27:
-#line 739 "./grammar.y"
+#line 688 "./grammar.y"
     { (yyval.c) = (yyvsp[(1) - (2)].c); ;}
     break;
 
   case 28:
-#line 740 "./grammar.y"
+#line 689 "./grammar.y"
     { if ((yyvsp[(2) - (2)].c)->front) {
 						  if (!(yyvsp[(2) - (2)].c)->front->src_name) {
-						    SET_ERROR (graph->error, GST_PARSE_ERROR_LINK, _("link without source element"));
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
 						    gst_parse_free_link ((yyvsp[(2) - (2)].c)->front);
 						  } else {
-						    graph->links = g_slist_prepend (graph->links, (yyvsp[(2) - (2)].c)->front);
+						    ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, (yyvsp[(2) - (2)].c)->front);
 						  }
 						}
 						if (!(yyvsp[(1) - (2)].l)->sink_name) {
@@ -2220,23 +2174,23 @@
     break;
 
   case 29:
-#line 754 "./grammar.y"
+#line 703 "./grammar.y"
     { (yyval.c) = (yyvsp[(2) - (2)].c);
 						if ((yyval.c)->front) {
 						  GstElement *element = 
 							  gst_element_make_from_uri (GST_URI_SRC, (yyvsp[(1) - (2)].s), NULL);
 						  if (!element) {
-						    SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, 
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, 
 							    _("no source element for URI \"%s\""), (yyvsp[(1) - (2)].s));
 						  } else {
 						    (yyval.c)->front->src = element;
-						    graph->links = g_slist_prepend (
-							    graph->links, (yyval.c)->front);
+						    ((graph_t *) graph)->links = g_slist_prepend (
+							    ((graph_t *) graph)->links, (yyval.c)->front);
 						    (yyval.c)->front = NULL;
 						    (yyval.c)->elements = g_slist_prepend ((yyval.c)->elements, element);
 						  }
 						} else {
-						  SET_ERROR (graph->error, GST_PARSE_ERROR_LINK, 
+						  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, 
 							  _("no element to link URI \"%s\" to"), (yyvsp[(1) - (2)].s));
 						}
 						g_free ((yyvsp[(1) - (2)].s));
@@ -2244,18 +2198,18 @@
     break;
 
   case 30:
-#line 774 "./grammar.y"
+#line 723 "./grammar.y"
     { GstElement *element =
 							  gst_element_make_from_uri (GST_URI_SINK, (yyvsp[(2) - (2)].s), NULL);
 						if (!element) {
-						  SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, 
+						  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, 
 							  _("no sink element for URI \"%s\""), (yyvsp[(2) - (2)].s));
 						  gst_parse_link_free ((yyvsp[(1) - (2)].l));
 						  g_free ((yyvsp[(2) - (2)].s));
 						  YYERROR;
 						} else if ((yyvsp[(1) - (2)].l)->sink_name || (yyvsp[(1) - (2)].l)->sink_pads) {
                                                   gst_object_unref (element);
-						  SET_ERROR (graph->error, GST_PARSE_ERROR_LINK, 
+						  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, 
 							  _("could not link sink element for URI \"%s\""), (yyvsp[(2) - (2)].s));
 						  gst_parse_link_free ((yyvsp[(1) - (2)].l));
 						  g_free ((yyvsp[(2) - (2)].s));
@@ -2272,18 +2226,18 @@
     break;
 
   case 31:
-#line 799 "./grammar.y"
-    { SET_ERROR (graph->error, GST_PARSE_ERROR_EMPTY, _("empty pipeline not allowed"));
-						(yyval.g) = graph;
+#line 748 "./grammar.y"
+    { SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_EMPTY, _("empty pipeline not allowed"));
+						(yyval.g) = (graph_t *) graph;
 					      ;}
     break;
 
   case 32:
-#line 802 "./grammar.y"
-    { (yyval.g) = graph;
+#line 751 "./grammar.y"
+    { (yyval.g) = (graph_t *) graph;
 						if ((yyvsp[(1) - (1)].c)->front) {
 						  if (!(yyvsp[(1) - (1)].c)->front->src_name) {
-						    SET_ERROR (graph->error, GST_PARSE_ERROR_LINK, _("link without source element"));
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
 						    gst_parse_free_link ((yyvsp[(1) - (1)].c)->front);
 						  } else {
 						    (yyval.g)->links = g_slist_prepend ((yyval.g)->links, (yyvsp[(1) - (1)].c)->front);
@@ -2292,7 +2246,7 @@
 						}
 						if ((yyvsp[(1) - (1)].c)->back) {
 						  if (!(yyvsp[(1) - (1)].c)->back->sink_name) {
-						    SET_ERROR (graph->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
 						    gst_parse_free_link ((yyvsp[(1) - (1)].c)->back);
 						  } else {
 						    (yyval.g)->links = g_slist_prepend ((yyval.g)->links, (yyvsp[(1) - (1)].c)->back);
@@ -2305,7 +2259,7 @@
 
 
 /* Line 1267 of yacc.c.  */
-#line 2303 "grammar.tab.c"
+#line 2252 "grammar.tab.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2519,7 +2473,7 @@
 }
 
 
-#line 825 "./grammar.y"
+#line 774 "./grammar.y"
 
 
 
@@ -2533,8 +2487,7 @@
 
 
 GstElement *
-_gst_parse_launch (const gchar *str, GError **error, GstParseContext *ctx,
-    GstParseFlags flags)
+_gst_parse_launch (const gchar *str, GError **error)
 {
   graph_t g;
   gchar *dstr;
@@ -2544,13 +2497,10 @@
   yyscan_t scanner;
 
   g_return_val_if_fail (str != NULL, NULL);
-  g_return_val_if_fail (error == NULL || *error == NULL, NULL);
 
   g.chain = NULL;
   g.links = NULL;
   g.error = error;
-  g.ctx = ctx;
-  g.flags = flags;
   
 #ifdef __GST_PARSE_TRACE
   GST_CAT_DEBUG (GST_CAT_PIPELINE, "TRACE: tracing enabled");
@@ -2583,10 +2533,10 @@
   
   if (!g.chain) {
     ret = NULL;
-  } else if (!g.chain->elements->next) {
+  } else if (!(((chain_t *) g.chain)->elements->next)) {
     /* only one toplevel element */  
-    ret = (GstElement *) g.chain->elements->data;
-    g_slist_free (g.chain->elements);
+    ret = (GstElement *) ((chain_t *) g.chain)->elements->data;
+    g_slist_free (((chain_t *) g.chain)->elements);
     if (GST_IS_BIN (ret))
       bin = GST_BIN (ret);
     gst_parse_chain_free (g.chain);
@@ -2619,12 +2569,8 @@
         }
       }
       if (!l->src) {
-        if (l->src_name) {
-          SET_ERROR (error, GST_PARSE_ERROR_NO_SUCH_ELEMENT,
-              "No element named \"%s\" - omitting link", l->src_name);
-        } else {
-          /* probably a missing element which we've handled already */
-        }
+        SET_ERROR (error, GST_PARSE_ERROR_NO_SUCH_ELEMENT,
+            "No element named \"%s\" - omitting link", l->src_name);
         gst_parse_free_link (l);
         continue;
       }
@@ -2640,12 +2586,8 @@
         }
       }
       if (!l->sink) {
-        if (l->sink_name) {
-          SET_ERROR (error, GST_PARSE_ERROR_NO_SUCH_ELEMENT,
-              "No element named \"%s\" - omitting link", l->sink_name);
-        } else {
-          /* probably a missing element which we've handled already */
-        }
+        SET_ERROR (error, GST_PARSE_ERROR_NO_SUCH_ELEMENT,
+            "No element named \"%s\" - omitting link", l->sink_name);
         gst_parse_free_link (l);
         continue;
       }